From fdd68d51e9bcbaac89f77e235fef2f596aa35b97 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Sun, 19 Dec 2010 15:26:31 -0500 Subject: Use buffer.selection_start and buffer.selection_end. --- modules/textadept/snippets.lua | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modules/textadept/snippets.lua') 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. -- cgit v1.2.3