From c3b390e533ccb244915b4db736cab2f774ee92b0 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Thu, 5 Jan 2012 05:36:08 -0500 Subject: Fixed bug introduced in recent code cleanup; modules/textadept/editing.lua --- modules/textadept/editing.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/textadept') diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index f960f7b9..ffd1ff78 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -158,8 +158,9 @@ function M.match_brace(select) local caret = buffer.current_pos local match_pos = buffer:brace_match(caret) if match_pos == -1 then return end - if not select then caret = match_pos end - if match_pos > caret then + if not select then + buffer:goto_pos(match_pos) + elseif match_pos > caret then buffer:set_sel(caret, match_pos + 1) else buffer:set_sel(caret + 1, match_pos) -- cgit v1.2.3