From 75f9be1041bcbb2a9d426fe9ffc8739c37f50b8e Mon Sep 17 00:00:00 2001 From: mitchell <70453897+orbitalquark@users.noreply.github.com> Date: Sat, 26 Feb 2022 20:50:22 -0500 Subject: Improve Windows network directory path handling. --- core/ui.lua | 2 +- modules/textadept/run.lua | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/core/ui.lua b/core/ui.lua index 263f6a54..1a4d8992 100644 --- a/core/ui.lua +++ b/core/ui.lua @@ -495,7 +495,7 @@ if CURSES then end events.connect(events.INITIALIZED, function() - local lua_error = (not WIN32 and '^/' or '^%a:[/\\]') .. '.-%.lua:%d+:' + local lua_error = (not WIN32 and '^/' or '^%a?:?[/\\][/\\]?') .. '.-%.lua:%d+:' -- Print internal Lua error messages as they are reported. -- Attempt to mimic the Lua interpreter's error message format so tools that look for it can -- recognize these errors too. diff --git a/modules/textadept/run.lua b/modules/textadept/run.lua index 7f517529..ad4d22fa 100644 --- a/modules/textadept/run.lua +++ b/modules/textadept/run.lua @@ -495,10 +495,10 @@ function M.goto_error(line_num, next) if not detail then return end buffer:goto_line(line_num) textadept.editing.select_line() - if not detail.filename:find(not WIN32 and '^/' or '^%a:[/\\]') and cwd then + if not detail.filename:find(not WIN32 and '^/' or '^%a?:?[/\\][/\\]?') and cwd then detail.filename = cwd .. (not WIN32 and '/' or '\\') .. detail.filename end - local sloppy = not detail.filename:find(not WIN32 and '^/' or '^%a:[/\\]') + local sloppy = not detail.filename:find(not WIN32 and '^/' or '^%a?:?[/\\][/\\]?') ui.goto_file(detail.filename, true, preferred_view, sloppy) textadept.editing.goto_line(detail.line) if detail.column then buffer:goto_pos(buffer:find_column(detail.line, detail.column)) end -- cgit v1.2.3