output = execute(':2LspDiagNext')->split("\n")
assert_equal('Error: No more diagnostics found', output[0])
+ # :[count]LspDiagPrev
+ cursor(7, 2)
+ :4LspDiagPrev
+ assert_equal([3, 14], [line('.'), col('.')])
+ output = execute(':4LspDiagPrev')->split("\n")
+ assert_equal('Error: No more diagnostics found', output[0])
+
:%d
setline(1, ['void blueFunc()', '{', '}'])
g:WaitForDiags(0)
assert_equal([2, 9], [line('.'), col('.')])
g:LspOptionsSet({showDiagInPopup: true})
+ # :[count]LspDiagPrev
+ g:LspOptionsSet({showDiagInPopup: false})
+ cursor(1, 1)
+ :2LspDiagPrev
+ assert_equal('Error: No more diagnostics found', output[0])
+ cursor(3, 3)
+ :2LspDiagPrev
+ assert_equal([1, 9], [line('.'), col('.')])
+ :2LspDiagPrev
+ assert_equal([1, 5], [line('.'), col('.')])
+ output = execute(':2LspDiagPrev')->split("\n")
+ assert_equal('Error: No more diagnostics found', output[0])
+
+ cursor(3, 3)
+ :99LspDiagPrev
+ assert_equal([1, 5], [line('.'), col('.')])
+ g:LspOptionsSet({showDiagInPopup: true})
+
bw!
enddef