]> Sergey Matveev's repositories - vim-lsp.git/commitdiff
Update the no diag found message
authorYegappan Lakshmanan <yegappan@yahoo.com>
Mon, 3 Apr 2023 01:24:56 +0000 (18:24 -0700)
committerYegappan Lakshmanan <yegappan@yahoo.com>
Mon, 3 Apr 2023 01:24:56 +0000 (18:24 -0700)
autoload/lsp/diag.vim
test/clangd_tests.vim

index c7dd31a23d800a632ea9a30f78fab58cd948b8b5..5da9e81e2dc69283ef5eca7b5e836ee706a5e1a3 100644 (file)
@@ -393,7 +393,7 @@ export def ShowCurrentDiag(lspserver: dict<any>, atPos: bool)
   var col: number = charcol('.')
   var diag: dict<any> = 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
index aaa12a511b60096110b442adc07928c4e6b44778..5ceabb4c23f2a26ff6753d157027559bf113d614 100644 (file)
@@ -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})