From a5b9b2d90cba4170353f2dcfcf15826e673c377c Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 26 Nov 2014 20:34:23 -0500 Subject: Fixed bug in jumping to compile/run errors and clear annotations before builds. --- modules/textadept/run.lua | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'modules/textadept/run.lua') 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 -- cgit v1.2.3