aboutsummaryrefslogtreecommitdiff
path: root/modules/textadept/find.lua
diff options
context:
space:
mode:
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)