From 940732342827ebe0d3bb98740419f621f9c77391 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 26 Mar 2020 17:37:08 -0400 Subject: Switched to 1-based indices for buffer positions, lines, and countable entities. --- modules/textadept/session.lua | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'modules/textadept/session.lua') diff --git a/modules/textadept/session.lua b/modules/textadept/session.lua index c0e611e5..b446ca54 100644 --- a/modules/textadept/session.lua +++ b/modules/textadept/session.lua @@ -168,11 +168,11 @@ function M.save(filename) top_line = current and buffer.first_visible_line or buffer._top_line, } local bookmarks = {} - local line = buffer:marker_next(0, 1 << textadept.bookmarks.MARK_BOOKMARK) + local BOOKMARK_BIT = 1 << textadept.bookmarks.MARK_BOOKMARK - 1 + local line = buffer:marker_next(1, BOOKMARK_BIT) while line ~= -1 do bookmarks[#bookmarks + 1] = line - line = buffer:marker_next( - line + 1, 1 << textadept.bookmarks.MARK_BOOKMARK) + line = buffer:marker_next(line + 1, BOOKMARK_BIT) end session.buffers[#session.buffers].bookmarks = bookmarks ::continue:: -- cgit v1.2.3