aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
Diffstat (limited to 'modules')
-rw-r--r--modules/textadept/editing.lua7
1 files changed, 3 insertions, 4 deletions
diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua
index c832c8fe..ee312df0 100644
--- a/modules/textadept/editing.lua
+++ b/modules/textadept/editing.lua
@@ -20,8 +20,8 @@ local kill_ring = { pos = 1, maxn = 10 }
-- @class table
-- @name char_matches
local char_matches = {
- ['('] = ')', ['['] = ']', ['{'] = '}',
- ["'"] = "'", ['"'] = '"'
+ [40] = ')', [91] = ']', [123] = '}',
+ [39] = "'", [34] = '"'
}
---
@@ -95,7 +95,7 @@ textadept.events.add_handler('update_ui',
textadept.events.add_handler('char_added',
function(char) -- auto-indent on return
- if char ~= '\n' then return end
+ if char ~= 10 then return end
local buffer = buffer
local anchor, caret = buffer.anchor, buffer.current_pos
local curr_line = buffer:line_from_position(caret)
@@ -483,7 +483,6 @@ end
-- Selects text in a specified enclosure.
-- @param str The enclosure type in enclosure.
-- @see enclosure
--- @see char_matches
function select_enclosed(str)
if not str then return end
local buffer = buffer