aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/snippets.lua
diff options
context:
space:
mode:
Diffstat (limited to 'modules/textadept/snippets.lua')
-rw-r--r--modules/textadept/snippets.lua2
1 files changed, 1 insertions, 1 deletions
diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua
index bcfc209c..cda54792 100644
--- a/modules/textadept/snippets.lua
+++ b/modules/textadept/snippets.lua
@@ -196,7 +196,7 @@ local function next_tab_stop()
snippet.snapshots[index] = s_text
if index > 0 then
buffer:begin_undo_action()
- local caret = math.max(buffer.anchor, buffer.current_pos)
+ local caret = buffer.selection_end
local ph_text = buffer:text_range(snippet.ph_pos, caret)
-- Transform mirror.