diff options
-rw-r--r-- | modules/textadept/editing.lua | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 1ba9bd9e..c67542ba 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -476,7 +476,8 @@ function M.highlight_word() local buffer = buffer local s, e = buffer.selection_start, buffer.selection_end if s == e then - s, e = buffer:word_start_position(s, true), buffer:word_end_position(s) + s = buffer:word_start_position(s, true) + e = buffer:word_end_position(s, true) end if s == e then return end local word = buffer:text_range(s, e) |