From ee0a0dc23402c24a85ea2d5794b8e6bb1063d491 Mon Sep 17 00:00:00 2001 From: Dan Date: Mon, 24 Jun 2024 01:04:07 -0400 Subject: [PATCH] Partially revert a31310b for nvim<0.9.2 --- doc/scrollview.txt | 6 ++++-- plugin/scrollview.vim | 12 ++++++++++-- 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/doc/scrollview.txt b/doc/scrollview.txt index 1576eea..983482f 100644 --- a/doc/scrollview.txt +++ b/doc/scrollview.txt @@ -678,7 +678,8 @@ colors. `ScrollViewFolds` fold signs Directory `ScrollViewHover` scrollbar and signs on hover - CurSearch + CurSearch for nvim>=0.9.2 + and WildMenu otherwise `ScrollViewLatestChange` latestchange signs SpecialKey `ScrollViewLocList` loclist signs @@ -688,7 +689,8 @@ colors. `ScrollViewQuickFix` quickfix signs Constant `ScrollViewRestricted` |scrollview-restricted| scrollbar - CurSearch + CurSearch for nvim>=0.9.2 + and MatchParen otherwise `ScrollViewSearch` search signs NonText `ScrollViewSpell` spell signs diff --git a/plugin/scrollview.vim b/plugin/scrollview.vim index b9eca9f..fb4a376 100644 --- a/plugin/scrollview.vim +++ b/plugin/scrollview.vim @@ -52,12 +52,20 @@ for [s:key, s:fallback, s:sign] in s:diagnostics_highlight_data execute 'highlight default link ' .. s:key .. ' ' .. s:highlight endfor highlight default link ScrollViewFolds Directory -highlight default link ScrollViewHover CurSearch +if has('nvim-0.9.2') + highlight default link ScrollViewHover CurSearch +else + highlight default link ScrollViewHover WildMenu +endif highlight default link ScrollViewLatestChange SpecialKey highlight default link ScrollViewLocList LineNr highlight default link ScrollViewMarks Identifier highlight default link ScrollViewQuickFix Constant -highlight default link ScrollViewRestricted CurSearch +if has('nvim-0.9.2') + highlight default link ScrollViewRestricted CurSearch +else + highlight default link ScrollViewRestricted MatchParen +endif highlight default link ScrollViewSearch NonText highlight default link ScrollViewSpell Statement highlight default link ScrollViewTextWidth Question