Skip to content

Commit b4cfec6

Browse files
committed
Rename hide_on_intersect to hide_on_float_intersect
1 parent 9cb1ab7 commit b4cfec6

File tree

4 files changed

+12
-8
lines changed

4 files changed

+12
-8
lines changed

autoload/scrollview.vim

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,8 +36,12 @@ let g:scrollview_signs_hidden_for_insert =
3636
\ get(g:, 'scrollview_signs_hidden_for_insert', [])
3737
let g:scrollview_hide_bar_for_insert =
3838
\ get(g:, 'scrollview_hide_bar_for_insert', v:false)
39-
let g:scrollview_hide_on_intersect =
40-
\ get(g:, 'scrollview_hide_on_intersect', v:false)
39+
" Use the old option, scrollview_hide_on_intersect, if it's set.
40+
if has_key(g:, 'scrollview_hide_on_intersect')
41+
let g:scrollview_hide_on_float_intersect = g:scrollview_hide_on_intersect
42+
endif
43+
let g:scrollview_hide_on_float_intersect =
44+
\ get(g:, 'scrollview_hide_on_float_intersect', v:false)
4145
let g:scrollview_hover = get(g:, 'scrollview_hover', v:true)
4246
let g:scrollview_include_end_region =
4347
\ get(g:, 'scrollview_include_end_region', v:false)

doc/scrollview.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -251,7 +251,7 @@ scrollview_hide_bar_for_insert *scrollview_hide_bar_for_insert*
251251
the current window for insert mode. Defaults to |v:false|.
252252
See |scrollview_signs_hidden_for_insert| for hiding signs.
253253

254-
scrollview_hide_on_intersect *scrollview_hide_on_intersect*
254+
scrollview_hide_on_float_intersect *scrollview_hide_on_float_intersect*
255255
|Boolean| specifying whether each scrollbar or sign
256256
becomes hidden (not shown) when it would otherwise
257257
intersect with a floating window. Defaults to |v:false|.

doc/tags

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -79,7 +79,7 @@ scrollview_floating_windows scrollview.txt /*scrollview_floating_windows*
7979
scrollview_folds_priority scrollview.txt /*scrollview_folds_priority*
8080
scrollview_folds_symbol scrollview.txt /*scrollview_folds_symbol*
8181
scrollview_hide_bar_for_insert scrollview.txt /*scrollview_hide_bar_for_insert*
82-
scrollview_hide_on_intersect scrollview.txt /*scrollview_hide_on_intersect*
82+
scrollview_hide_on_float_intersect scrollview.txt /*scrollview_hide_on_float_intersect*
8383
scrollview_hover scrollview.txt /*scrollview_hover*
8484
scrollview_include_end_region scrollview.txt /*scrollview_include_end_region*
8585
scrollview_indent_spaces_condition scrollview.txt /*scrollview_indent_spaces_condition*

lua/scrollview.lua

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1376,7 +1376,7 @@ local show_scrollbar = function(winid, bar_winid)
13761376
and winid == api.nvim_get_current_win() then
13771377
return -1
13781378
end
1379-
if to_bool(vim.g.scrollview_hide_on_intersect) then
1379+
if to_bool(vim.g.scrollview_hide_on_float_intersect) then
13801380
local winrow0 = wininfo.winrow - 1
13811381
local wincol0 = wininfo.wincol - 1
13821382
local float_overlaps = get_float_overlaps(
@@ -1708,7 +1708,7 @@ local show_signs = function(winid, sign_winids, bar_winid)
17081708
end
17091709
total_width = total_width + sign_width
17101710
local show = is_valid_column(winid, col, sign_width)
1711-
if to_bool(vim.g.scrollview_hide_on_intersect)
1711+
if to_bool(vim.g.scrollview_hide_on_float_intersect)
17121712
and show then
17131713
local winrow0 = wininfo.winrow - 1
17141714
local wincol0 = wininfo.wincol - 1
@@ -2900,8 +2900,8 @@ local handle_mouse = function(button, primary)
29002900
-- already been processed. The current window (from prior to
29012901
-- scrolling) is not changed.
29022902
-- Refresh scrollbars to handle the scenario where
2903-
-- scrollview_hide_on_intersect is enabled and dragging resulted in
2904-
-- a scrollbar overlapping a floating window.
2903+
-- scrollview_hide_on_float_intersect is enabled and dragging
2904+
-- resulted in a scrollbar overlapping a floating window.
29052905
refresh_bars()
29062906
-- We only restore the cursor after dragging is finished. The
29072907
-- cursor position can't be changed while dragging (but it stays in

0 commit comments

Comments
 (0)