Skip to content
This repository was archived by the owner on Sep 24, 2024. It is now read-only.

Commit 9e42350

Browse files
committed
Revert "Clear highlighting when no remaining symbols/regions exist (#61)"
Reverts ce92c8e as it causes flashing highlight. Proper fix will be made.
1 parent ce92c8e commit 9e42350

File tree

1 file changed

+4
-12
lines changed

1 file changed

+4
-12
lines changed

autoload/lsp_cxx_hl/hl.vim

Lines changed: 4 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -64,17 +64,13 @@ endfunction
6464
" Notify of new semantic highlighting symbols
6565
function! lsp_cxx_hl#hl#notify_symbols(bufnr, symbols) abort
6666
if g:lsp_cxx_hl_use_nvim_text_props
67-
if len(a:symbols) == 0
68-
call lsp_cxx_hl#textprop_nvim#symbols#clear(a:bufnr)
69-
elseif get(b:, 'lsp_cxx_hl_disabled', 0)
67+
if get(b:, 'lsp_cxx_hl_disabled', 0)
7068
call lsp_cxx_hl#hl#clear()
7169
else
7270
call lsp_cxx_hl#textprop_nvim#symbols#notify(a:bufnr, a:symbols)
7371
endif
7472
elseif g:lsp_cxx_hl_use_text_props
75-
if len(a:symbols) == 0
76-
call lsp_cxx_hl#textprop#symbols#clear(a:bufnr)
77-
elseif get(b:, 'lsp_cxx_hl_disabled', 0)
73+
if get(b:, 'lsp_cxx_hl_disabled', 0)
7874
call lsp_cxx_hl#hl#clear()
7975
else
8076
call lsp_cxx_hl#textprop#symbols#notify(a:bufnr, a:symbols)
@@ -93,17 +89,13 @@ endfunction
9389
" Notify of new preprocessor skipped regions
9490
function! lsp_cxx_hl#hl#notify_skipped(bufnr, skipped) abort
9591
if g:lsp_cxx_hl_use_nvim_text_props
96-
if len(a:skipped) == 0
97-
call lsp_cxx_hl#textprop_nvim#skipped#clear(a:bufnr)
98-
elseif get(b:, 'lsp_cxx_hl_disabled', 0)
92+
if get(b:, 'lsp_cxx_hl_disabled', 0)
9993
call lsp_cxx_hl#hl#clear()
10094
else
10195
call lsp_cxx_hl#textprop_nvim#skipped#notify(a:bufnr, a:skipped)
10296
endif
10397
elseif g:lsp_cxx_hl_use_text_props
104-
if len(a:skipped) == 0
105-
call lsp_cxx_hl#textprop#skipped#clear(a:bufnr)
106-
elseif get(b:, 'lsp_cxx_hl_disabled', 0)
98+
if get(b:, 'lsp_cxx_hl_disabled', 0)
10799
call lsp_cxx_hl#hl#clear()
108100
else
109101
call lsp_cxx_hl#textprop#skipped#notify(a:bufnr, a:skipped)

0 commit comments

Comments
 (0)