Skip to content

Commit be8a43a

Browse files
author
Scott Pierce
committed
Force vertical split to the far right
Before we were only using `wincmd|` which would create the split in the current window. This was fine when there was only a single vertical window, but when multiple windows already existed the split would be in the middle of the worksplace instead of the far right. By adding `wincmd L`, we push the window all the way to the right. This may disrepect the `g:side_search_split_pct` setting, but I think that's better than the side search showing up in the middle.
1 parent 1a8b340 commit be8a43a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

plugin/side-search.vim

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -71,6 +71,7 @@ function! s:new_buffer(splitter, split_pct) abort
7171
execute a:splitter
7272
if a:splitter == 'vnew'
7373
execute s:percent_columns(a:split_pct) . 'wincmd|'
74+
execute 'wincmd L'
7475
else
7576
execute s:percent_lines(a:split_pct) . 'wincmd_'
7677
endif

0 commit comments

Comments
 (0)