aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
authormitchell <70453897+667e-11@users.noreply.github.com>2014-06-04 22:12:45 -0400
committermitchell <70453897+667e-11@users.noreply.github.com>2014-06-04 22:12:45 -0400
commitcf5190cebe13d9ccb579455c7fcd8f205da3d6bb (patch)
treeb59cb2ae073238a66969a7ac14e9fe0a59af2e62 /modules/textadept/find.lua
parent4586dbadae4d0f5347491a6c1b02d7ea5bb077a1 (diff)
downloadtextadept-cf5190cebe13d9ccb579455c7fcd8f205da3d6bb.tar.gz
textadept-cf5190cebe13d9ccb579455c7fcd8f205da3d6bb.zip
Pressing "Enter" in message buffer simulates double-click.
In a "Find in Files" buffer, goes to the file on the current line. In a message buffer, jumps to the error or warning on the current line.
Diffstat (limited to 'modules/textadept/find.lua')
-rw-r--r--modules/textadept/find.lua6
1 files changed, 6 insertions, 0 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua
index dda00c9a..bd9c8825 100644
--- a/modules/textadept/find.lua
+++ b/modules/textadept/find.lua
@@ -374,6 +374,12 @@ function M.goto_file_found(line, next)
ui.goto_file(file:iconv(_CHARSET, 'UTF-8'), true, preferred_view)
textadept.editing.goto_line(line_num)
end
+events.connect(events.KEYPRESS, function(code)
+ if keys.KEYSYMS[code] == '\n' and is_ff_buf(buffer) then
+ M.goto_file_found(buffer:line_from_position(buffer.current_pos))
+ return true
+ end
+end)
events.connect(events.DOUBLE_CLICK, function(pos, line)
if is_ff_buf(buffer) then M.goto_file_found(line) end
end)