diff options
author | 2013-06-20 15:14:33 -0400 | |
---|---|---|
committer | 2013-06-20 15:14:33 -0400 | |
commit | 21e6fe5c1bc6cb29e9eac0588e0555879437fdce (patch) | |
tree | 95b61e9fe0b54aad9444afa1826a49655a170947 | |
parent | 6289bf7642c9b8365ab2e33d63c68239857e7d1b (diff) | |
download | textadept-21e6fe5c1bc6cb29e9eac0588e0555879437fdce.tar.gz textadept-21e6fe5c1bc6cb29e9eac0588e0555879437fdce.zip |
Fixed bug in find and run double-click event handlers.
-rw-r--r-- | modules/textadept/find.lua | 5 | ||||
-rw-r--r-- | modules/textadept/run.lua | 4 |
2 files changed, 6 insertions, 3 deletions
diff --git a/modules/textadept/find.lua b/modules/textadept/find.lua index 68b43993..d7c34fd3 100644 --- a/modules/textadept/find.lua +++ b/modules/textadept/find.lua @@ -378,8 +378,9 @@ function M.goto_file_found(line, next) gui.goto_file(file, true, preferred_view) _M.textadept.editing.goto_line(line_num) end -events.connect(events.DOUBLE_CLICK, - function(pos, line) M.goto_file_found(line) end) +events.connect(events.DOUBLE_CLICK, function(pos, line) + if is_ff_buf(buffer) then M.goto_file_found(line) end +end) --[[ The functions below are Lua C functions. diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 512d9ea9..a5b1ce67 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -240,7 +240,9 @@ function M.goto_error(line, next) buffer.annotation_style[line - 1] = 8 -- error end end -events.connect(events.DOUBLE_CLICK, function(pos, line) M.goto_error(line) end) +events.connect(events.DOUBLE_CLICK, function(pos, line) + if is_msg_buf(buffer) then M.goto_error(line) end +end) local CURSES_MARK = _SCINTILLA.constants.SC_MARK_CHARACTER + string.byte(' ') -- Sets view properties for error markers. |