diff options
-rw-r--r-- | core/ext/find.lua | 2 | ||||
-rw-r--r-- | core/ext/pm/ctags_browser.lua | 2 | ||||
-rw-r--r-- | modules/textadept/editing.lua | 2 |
3 files changed, 3 insertions, 3 deletions
diff --git a/core/ext/find.lua b/core/ext/find.lua index 064a7ddb..018eaefe 100644 --- a/core/ext/find.lua +++ b/core/ext/find.lua @@ -70,7 +70,7 @@ function find.find(text, next, flags, nowrap, wrapped) elseif flags < 16 then -- lua pattern search (forward search only) text = text:gsub('\\[abfnrtv\\]', escapes) - local buffer_text = buffer:get_text(buffer.length) + local buffer_text = buffer:text_range(0, buffer.length) local results = { buffer_text:find(text, buffer.anchor + increment) } if #results > 0 then result = results[1] diff --git a/core/ext/pm/ctags_browser.lua b/core/ext/pm/ctags_browser.lua index 23556f68..a0d8aaa2 100644 --- a/core/ext/pm/ctags_browser.lua +++ b/core/ext/pm/ctags_browser.lua @@ -211,7 +211,7 @@ function perform_action(selected_item) if item.children then item = item.children end end if item.pattern then - local buffer_text = buffer:get_text(buffer.length) + local buffer_text = buffer:text_range(0, buffer.length) local search_text = item.pattern:gsub('\\/', '/') local s = buffer_text:find(search_text, 1, true) if s then diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index aa939282..61dfbd4c 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -152,7 +152,7 @@ function autocomplete_word(word_chars) local buffer = buffer local caret, length = buffer.current_pos, buffer.length local completions, c_list = {}, {} - local buffer_text = buffer:get_text(length) + local buffer_text = buffer:text_range(0, length) local root = buffer_text:sub(1, caret):match('['..word_chars..']+$') if not root or #root == 0 then return end buffer.target_start, buffer.target_end = 0, buffer.length |