diff options
author | 2014-11-26 20:34:23 -0500 | |
---|---|---|
committer | 2014-11-26 20:34:23 -0500 | |
commit | a5b9b2d90cba4170353f2dcfcf15826e673c377c (patch) | |
tree | 9bdd55abaa8e5ad3d07cb86a51993fbbd5755466 /modules/textadept/run.lua | |
parent | b21e66a3cd20e088149926ecdf5710dabd1ec03b (diff) | |
download | textadept-a5b9b2d90cba4170353f2dcfcf15826e673c377c.tar.gz textadept-a5b9b2d90cba4170353f2dcfcf15826e673c377c.zip |
Fixed bug in jumping to compile/run errors and clear annotations before builds.
Diffstat (limited to 'modules/textadept/run.lua')
-rw-r--r-- | modules/textadept/run.lua | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 2baa470c..6ccc094f 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -66,9 +66,10 @@ local function command(commands, event) io.save_file() command = commands[buffer.filename:match('[^.]+$')] or commands[buffer:get_lexer()] - cwd = buffer.filename:match('^(.+[/\\])[^/\\]+$') or '' + cwd = buffer.filename:match('^(.+)[/\\][^/\\]+$') or '' data = buffer:get_lexer() else + for i = 1, #_BUFFERS do _BUFFERS[i]:annotation_clear_all() end cwd = io.get_project_root() command = commands[cwd] if not command then @@ -299,7 +300,7 @@ function M.goto_error(line, next) local error = get_error(buffer:get_line(line):match('^[^\r\n]*')) if not error then if CURSES then view:goto_buffer(cur_buf) end return end textadept.editing.select_line() - ui.goto_file(M.cwd..error.filename, true, preferred_view, true) + ui.goto_file(M.cwd..'/'..error.filename, true, preferred_view, true) local line, message = error.line, error.message buffer:goto_line(line - 1) if message then |