diff options
| author | 2009-03-01 15:47:27 -0500 | |
|---|---|---|
| committer | 2009-03-01 15:47:27 -0500 | |
| commit | c2c910627f6b8dc4bd638d2d83b3dcf83d92b857 (patch) | |
| tree | 357506c1d7864b6ddd6a3d477e2672c65d07ba01 /modules | |
| parent | 713578e58c701470e69566adbc53a7c405426cf0 (diff) | |
| download | textadept-c2c910627f6b8dc4bd638d2d83b3dcf83d92b857.tar.gz textadept-c2c910627f6b8dc4bd638d2d83b3dcf83d92b857.zip | |
Use buffer:text_range() instead of buffer:get_text() because of trailing '\0'.
Diffstat (limited to 'modules')
| -rw-r--r-- | modules/textadept/editing.lua | 2 |
1 files changed, 1 insertions, 1 deletions
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 |
