From 64cca7da444b2d685eefb9b4ca91cd028fce39cf Mon Sep 17 00:00:00 2001 From: Timothee Cour Date: Mon, 5 Nov 2018 22:02:33 -0800 Subject: [PATCH 1/2] fix #118 --- core/commands/nimcheck.py | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/core/commands/nimcheck.py b/core/commands/nimcheck.py index f3eb340..cc839e6 100755 --- a/core/commands/nimcheck.py +++ b/core/commands/nimcheck.py @@ -114,7 +114,7 @@ def run_nimcheck(file_path, callback, verbosity, disabled_hints, extra_args): yield callback(None) entries = parse_nimcheck(stdout) - sublime.status_message('Nim Check Finished.') + sublime.status_message('run_nimcheck:Nim Check Finished.') yield callback(entries) @@ -246,7 +246,7 @@ def run(self, *args, **varargs): if entries is None: sublime.status_message('Nim Check Failed.') yield - sublime.status_message('Nim Check Finished.') + sublime.status_message('run:Nim Check Finished.') self.highlight_and_list_entries(entries, window, view) @@ -319,7 +319,13 @@ def highlight_and_list_entries(self, entries, window, view): error_entries.send(None) warn_entries.send(None) for entry in entries: - if entry.file_name.lower() != view_name.lower(): + + # makes it work when `--listFullPaths` is in user config + # TODO: more robust in case multiple names are allowed, PENDING https://github.com/nim-lang/Nim/pull/8614 + file_name = entry.file_name + file_name = os.path.basename(file_name) + + if file_name.lower() != view_name.lower(): continue # Determine whether the entry should be highlighted/listed From 244aa70102b5e94e99d976917c9138b65a416939 Mon Sep 17 00:00:00 2001 From: Varriount Date: Tue, 6 Nov 2018 00:54:00 -0800 Subject: [PATCH 2/2] Update core/commands/nimcheck.py Co-Authored-By: timotheecour --- core/commands/nimcheck.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/commands/nimcheck.py b/core/commands/nimcheck.py index cc839e6..dd6ccf8 100755 --- a/core/commands/nimcheck.py +++ b/core/commands/nimcheck.py @@ -321,7 +321,8 @@ def highlight_and_list_entries(self, entries, window, view): for entry in entries: # makes it work when `--listFullPaths` is in user config - # TODO: more robust in case multiple names are allowed, PENDING https://github.com/nim-lang/Nim/pull/8614 + # TODO: Make this more robust if/when multiple names are allowed, + # PENDING https://github.com/nim-lang/Nim/pull/8614 file_name = entry.file_name file_name = os.path.basename(file_name)