From 18ac2fba9d14ea6ea09a6517b137730427b55a38 Mon Sep 17 00:00:00 2001 From: Yegappan Lakshmanan Date: Sun, 2 Apr 2023 18:24:56 -0700 Subject: [PATCH] Update the no diag found message --- autoload/lsp/diag.vim | 2 +- test/clangd_tests.vim | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/autoload/lsp/diag.vim b/autoload/lsp/diag.vim index c7dd31a..5da9e81 100644 --- a/autoload/lsp/diag.vim +++ b/autoload/lsp/diag.vim @@ -393,7 +393,7 @@ export def ShowCurrentDiag(lspserver: dict, atPos: bool) var col: number = charcol('.') var diag: dict = lspserver.getDiagByPos(bnr, lnum, col, atPos) if diag->empty() - util.WarnMsg('No diagnostic messages found for current line') + util.WarnMsg($'No diagnostic messages found for current {atPos ? "position" : "line"}') else DisplayDiag(diag) endif diff --git a/test/clangd_tests.vim b/test/clangd_tests.vim index aaa12a5..5ceabb4 100644 --- a/test/clangd_tests.vim +++ b/test/clangd_tests.vim @@ -429,7 +429,7 @@ def g:Test_LspDiag_Multi() for i in range(1, 4) cursor(1, i) output = execute('LspDiagCurrent!')->split('\n') - assert_match('No diagnostic messages found for current line', output[0]) + assert_match('No diagnostic messages found for current position', output[0]) endfor cursor(1, 5) @@ -439,7 +439,7 @@ def g:Test_LspDiag_Multi() for i in range(6, 8) cursor(1, i) output = execute('LspDiagCurrent!')->split('\n') - assert_match('No diagnostic messages found for current line', output[0]) + assert_match('No diagnostic messages found for current position', output[0]) endfor for i in range(9, 11) @@ -450,7 +450,7 @@ def g:Test_LspDiag_Multi() for i in range(12, 12) cursor(1, i) output = execute('LspDiagCurrent!')->split('\n') - assert_match('No diagnostic messages found for current line', output[0]) + assert_match('No diagnostic messages found for current position', output[0]) endfor g:LspOptionsSet({showDiagInPopup: true}) -- 2.48.1