aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2012-01-05 05:36:08 -0500
committermitchell <70453897+667e-11@users.noreply.github.com>2012-01-05 05:36:08 -0500
commitc3b390e533ccb244915b4db736cab2f774ee92b0 (patch)
tree831d6c394e348bdd983739c9716a65ffe859969f /modules/textadept
parent2ab6deaecb4576c932dd63186927e9481bf5dedc (diff)
downloadtextadept-c3b390e533ccb244915b4db736cab2f774ee92b0.tar.gz
textadept-c3b390e533ccb244915b4db736cab2f774ee92b0.zip
Fixed bug introduced in recent code cleanup; modules/textadept/editing.lua
Diffstat (limited to 'modules/textadept')
-rw-r--r--modules/textadept/editing.lua5
1 files changed, 3 insertions, 2 deletions
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)