aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/snippets.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2010-12-19 15:26:31 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2010-12-19 15:26:31 -0500
commitfdd68d51e9bcbaac89f77e235fef2f596aa35b97 (patch)
treed279232f3f333a353a95bca6a85dec68dadc768a /modules/textadept/snippets.lua
parent34a576b5ed1618f5e5aed0950fcfaed07e0a71ce (diff)
downloadtextadept-fdd68d51e9bcbaac89f77e235fef2f596aa35b97.tar.gz
textadept-fdd68d51e9bcbaac89f77e235fef2f596aa35b97.zip
Use buffer.selection_start and buffer.selection_end.
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.