This works somewhat like the count for `:h :cbefore`
return
endif
+ # If [count] exceeded the previous diags
+ if which == 'prev' && a_count > 1 && a_count != count
+ JumpDiag(diags[0])
+ return
+ endif
+
if which == 'here'
util.WarnMsg('Error: No more diagnostics found on this line')
else
command! -nargs=0 -bar LspDiagHighlightDisable lsp.DiagHighlightDisable()
command! -nargs=0 -bar LspDiagHighlightEnable lsp.DiagHighlightEnable()
command! -nargs=0 -bar -count=1 LspDiagNext lsp.JumpToDiag('next', <count>)
-command! -nargs=0 -bar LspDiagPrev lsp.JumpToDiag('prev')
+command! -nargs=0 -bar -count=1 LspDiagPrev lsp.JumpToDiag('prev', <count>)
command! -nargs=0 -bar LspDiagShow lsp.ShowDiagnostics()
command! -nargs=0 -bar LspDiagHere lsp.JumpToDiag('here')
command! -nargs=0 -bar LspFold lsp.FoldDocument()