diff --git a/autoload/lsp/internal/diagnostics/float.vim b/autoload/lsp/internal/diagnostics/float.vim index f7f40a158..82469ca63 100644 --- a/autoload/lsp/internal/diagnostics/float.vim +++ b/autoload/lsp/internal/diagnostics/float.vim @@ -26,9 +26,17 @@ function! lsp#internal#diagnostics#float#_enable() abort \ ), \ lsp#callbag#filter({_->g:lsp_diagnostics_float_cursor}), \ lsp#callbag#tap({_->s:hide_float()}), + \ lsp#callbag#map({_->{ + \ 'bufnr': bufnr('%'), + \ 'curpos': getcurpos()[0:2], + \ 'changedtick': b:changedtick + \ }}), \ lsp#callbag#debounceTime(g:lsp_diagnostics_float_delay), - \ lsp#callbag#map({_->{'bufnr': bufnr('%'), 'curpos': getcurpos()[0:2], 'changedtick': b:changedtick }}), - \ lsp#callbag#distinctUntilChanged({a,b -> a['bufnr'] == b['bufnr'] && a['curpos'] == b['curpos'] && a['changedtick'] == b['changedtick']}), + \ lsp#callbag#distinctUntilChanged({a,b -> + \ a['bufnr'] == b['bufnr'] + \ && a['curpos'] == b['curpos'] + \ && a['changedtick'] == b['changedtick'] + \ }), \ lsp#callbag#filter({_->mode() is# 'n'}), \ lsp#callbag#filter({_->getbufvar(bufnr('%'), '&buftype') !=# 'terminal' }), \ lsp#callbag#map({_->lsp#internal#diagnostics#under_cursor#get_diagnostic()}),