diff options
Diffstat (limited to 'modules')
-rw-r--r-- | modules/textadept/bookmarks.lua | 2 | ||||
-rw-r--r-- | modules/textadept/editing.lua | 16 | ||||
-rw-r--r-- | modules/textadept/filter_through.lua | 2 | ||||
-rw-r--r-- | modules/textadept/snippets.lua | 6 |
4 files changed, 11 insertions, 15 deletions
diff --git a/modules/textadept/bookmarks.lua b/modules/textadept/bookmarks.lua index fdf6b8b2..0e6ab017 100644 --- a/modules/textadept/bookmarks.lua +++ b/modules/textadept/bookmarks.lua @@ -78,7 +78,7 @@ function goto() if line == -1 then return end repeat local text = buffer:get_line(line):sub(1, -2) -- chop \n - markers[#markers + 1] = table.concat({ line + 1, text }, ': ') + markers[#markers + 1] = tostring(line + 1)..': '..text line = buffer:marker_next(line + 1, 2^MARK_BOOKMARK) until line < 0 local line = gui.filteredlist(L('Select Bookmark'), 'Bookmark', markers) diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index 4d885a81..b6e8bf70 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -161,16 +161,12 @@ function match_brace(select) local buffer = buffer local caret = buffer.current_pos local match_pos = buffer:brace_match(caret) - if match_pos ~= -1 then - if select then - if match_pos > caret then - buffer:set_sel(caret, match_pos + 1) - else - buffer:set_sel(caret + 1, match_pos) - end - else - buffer:goto_pos(match_pos) - end + if match_pos == -1 then return end + if not select then caret = match_pos end + if match_pos > caret then + buffer:set_sel(caret, match_pos + 1) + else + buffer:set_sel(caret + 1, match_pos) end end diff --git a/modules/textadept/filter_through.lua b/modules/textadept/filter_through.lua index 35123194..bb55f444 100644 --- a/modules/textadept/filter_through.lua +++ b/modules/textadept/filter_through.lua @@ -52,7 +52,7 @@ events.connect(events.COMMAND_ENTRY_COMMAND, function(text) local f = io.open(tmpfile, 'wb') f:write(input) f:close() - local cmd = table.concat({ cat, '"'..tmpfile..'"', '|', text }, ' ') + local cmd = cat..' "'..tmpfile..'" | '..text if WIN32 then cmd = cmd:gsub('/', '\\') end local p = io.popen(cmd) if s ~= e then diff --git a/modules/textadept/snippets.lua b/modules/textadept/snippets.lua index 45f32d83..3763ab7c 100644 --- a/modules/textadept/snippets.lua +++ b/modules/textadept/snippets.lua @@ -214,17 +214,17 @@ end -- Global snippets and snippets in the current lexer are shown. function _select() local list = {} - local table_concat, type = table.concat, type + local type = type for trigger, text in pairs(snippets) do if type(text) == 'string' and trigger ~= '_NAME' and trigger ~= '_PACKAGE' then - list[#list + 1] = table_concat({trigger, 'global', text }, '\0') + list[#list + 1] = trigger..'\0global\0'..text end end local lexer = buffer:get_lexer() for trigger, text in pairs(snippets[lexer] or {}) do if type(text) == 'string' then - list[#list + 1] = table_concat({trigger, lexer, text }, '\0') + list[#list + 1] = trigger..'\0'..lexer..'\0'..text end end table.sort(list) |