This PR originates from neovim/neovim#19243.
Adds a new option to avoid scrolling when opening/closing splits. Perceived by users of the plugin mentioned in the original PR as less visually jarring. Especially so when using the quickfix window for automatic linting(opening and closing automatically as a buffers' linting errors are resolved).
https://github.com/vim/vim/pull/10682
(5 files)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Merging #10682 (522c767) into master (b908188) will increase coverage by
0.89%
.
The diff coverage is16.66%
.
@@ Coverage Diff @@ ## master #10682 +/- ## ========================================== + Coverage 81.71% 82.60% +0.89% ========================================== Files 158 148 -10 Lines 185631 172979 -12652 Branches 41980 39103 -2877 ========================================== - Hits 151686 142891 -8795 + Misses 21486 17490 -3996 - Partials 12459 12598 +139
Flag | Coverage Δ | |
---|---|---|
huge-clang-none | 82.60% <16.66%> (-0.01%) |
⬇️ |
linux | 82.60% <16.66%> (-0.01%) |
⬇️ |
mingw-x64-HUGE | ? |
|
mingw-x64-HUGE-gui | ? |
|
windows | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
Impacted Files | Coverage Δ | |
---|---|---|
src/window.c | 87.30% <16.66%> (-1.10%) |
⬇️ |
src/highlight.c | 78.41% <0.00%> (-2.69%) |
⬇️ |
src/time.c | 87.08% <0.00%> (-2.56%) |
⬇️ |
src/misc2.c | 86.68% <0.00%> (-2.52%) |
⬇️ |
src/help.c | 80.07% <0.00%> (-2.38%) |
⬇️ |
src/buffer.c | 84.11% <0.00%> (-2.35%) |
⬇️ |
src/session.c | 63.15% <0.00%> (-1.94%) |
⬇️ |
src/menu.c | 81.36% <0.00%> (-1.83%) |
⬇️ |
src/gui.c | 71.24% <0.00%> (-1.82%) |
⬇️ |
src/arglist.c | 83.83% <0.00%> (-1.72%) |
⬇️ |
... and 131 more |
Continue to review full report at Codecov.
Legend - Click here to learn more
Δ = absolute <relative> (impact)
,ø = not affected
,? = missing data
Powered by Codecov. Last update b908188...522c767. Read the comment docs.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Thanks for considering the option. I'll try to improve the wording in the docs and look into making a test.
After some discussion under the neovim devs the current proposal is to make the option non-boolean and have the following options:
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I was thinking tests could go in testdir/test_window_cmd.vim
looking something like:
func Test_winscroll_with_splits() set splitbelow set scrolloff=0 set splitscroll=1 call setline(1, range(1,256)) norm Mk "move cursor to line above where new split will begin wincmd s wincmd p call assert_equal(1, line("w0")) wincmd q similar sequence when cursor is behind new split and for splitscroll={0,2} and scrolloff > 0 %bw! endfunc
Does that seem right?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
—
View it on GitHub or unsubscribe.
You are receiving this because you are subscribed to this thread.
@luukvbaal commented on this pull request.
In src/testdir/test_window_cmd.vim:
> + norm gg + execute 'norm' l:line . 'G' + split + wincmd p + call assert_equal(2, line("w0")) + quit + + set scrolloff=0 + set splitscroll=2 + norm ggL + split + quit + call assert_equal(winheight(0), line(".")) + split + wincmd p + call assert_equal(winheight(0), line("."))
I made the option non-boolean in the latest commit as per neovim/neovim#19243 (comment). I also added some tests but I'm running into an issue.
I cant get this test to pass even though manually running the commands yields the expected results. I expect this has something to do with https://github.com/vim/vim/blob/34be31ebaa1ed3f139928d0f7a1a6d1993621e31/src/window.c#L4943-L4945
Where we move the cursor to the last visible line when moving back to the original window in the case where 'splitscroll' == 2
and the cursor was behind the newly opened split. I suspect this is not the correct way to set the cursor position and is what causes the assertion to fail when run inside a VimL function.
I suspected some function from move.c
should be called to update/invalidate but I didn't find it yet. What would be the correct way to update the cursor, or am I on the wrong track?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal commented on this pull request.
In src/testdir/test_window_cmd.vim:
> + norm gg + execute 'norm' l:line . 'G' + split + wincmd p + call assert_equal(2, line("w0")) + quit + + set scrolloff=0 + set splitscroll=2 + norm ggL + split + quit + call assert_equal(winheight(0), line(".")) + split + wincmd p + call assert_equal(winheight(0), line("."))
I figured out w_botline
is not the expected value here when running the test, hence the cursor is not set and the test fails. Is w_botline
being outdated expected when running VimL functions?
Exchanging w_botline
for w_topline + w_height
resolves the issue and makes the test pass. Would this be a reasonable workaround or should I be calling some sort of function from move.c
to update w_botline
?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
No, when lines wrap then w_topline + w_height can be much higher than the actual w_botline.
Right, can confirm this change yielded the wrong outcome when wrapped lines are present.
If it is really only for testing, a ":redraw" should work.
I think it is, and indeed redraw
makes the test pass.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal commented on this pull request.
In src/window.c:
> scroll_to_fraction(wp, prev_height); + curwin->w_valid &= ~VALID_TOPLINE;
Without this invalidation, it was possible to scroll to invalid cursor positions disobeying 'scrolloff'
. I guess a consequence of setting w_fraction
manually.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I think the latest commit is a valid implementation of the proposed option. Requesting review I guess.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Who has tried out this patch? Is it useful and does it work properly?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I have tried it out, set splitscroll=2
helps stabilize your buffer content on window open/close event (In my case terminal toggling)
set splitscroll=1
also works correctly
Video preview:
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Instead of numbers, wouldn't it be better to use strings for the splitscroll
option? It's hard to remember what which number does.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I have tried it out and it seems to work as intentional. Until now I had my own small script that does the same thing using autocommands with winsaveview()
and winrestview()
. Having a built-in option would be nice.
@luukvbaal There's one issue though. With set splitscroll=2
the buffer is still scrolled when the terminal window is resized such that it would hide the cursor. If there are multiple vertical split windows, only the currently focused window is scrolled.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
It should probably also be mentioned somewhere that this option only works when splitbelow
is set.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Instead of numbers, wouldn't it be better to use strings for the splitscroll option?
Numbers seems to be the convention for similar options. See e.g. 'conceallevel'
and 'laststatus'
.
If there are multiple vertical split windows, only the currently focused window is scrolled.
I'm not sure this is an issue, the option claims to determine the scroll behavior when splitting, not when resizing. And when set splitscroll=2
, to delay setting the cursor position setting the cursor to a valid position(botline
) until you again focus the window. If you are actively resizing the splits, the currently active window will thus keep its cursor on botline(and scroll).
Would you expect all windows to scroll, or no windows to scroll including the currently focused window?
It should probably also be mentioned somewhere that this option only works when
splitbelow
is set.
Yeah fair. Or to improve the option to also "work" with 'nosplitbelow'
(as in stabilize the window content, it currently just doesn't consider the option but you're right that different logic would be required to stabilize buffer content with 'nosplitbelow'
).
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Latest commit handles nosplitbelow
where feasible. Stabilizing is possible when the cursor position is not hidden behind lower window but doesn't make sense when it would be.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Those options were added long ago. These days we don't care so much for the extra memory use, and care more for easy of use (since there are so many options now). If we can come up with good, meaningful names that would be preferred.
I see, I guess I missed options like 'ambiwidth'
: https://github.com/vim/vim/blob/cb398d1a5b189261b32658e180d13081761b8d24/runtime/doc/options.txt#L743-L754?
Something like 'splitscroll'
with these values then?
So when the 'splitscroll' option is non-zero (active) then 'splitbelow' would be ignored? Or the other way around? That doesn't make sense. If the new window is above the current window, it could still do the same thing, right? It's only a matter of time until users ask for this. Ah, it appears you already took care of it after this message.
No nothing was ignored in earlier commits, window position would still honor 'splitbelow'
but the logic required some mirroring to make sense for 'splitbelow'
vs 'nosplitbelow'
.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Would you expect all windows to scroll in this case, or no windows at all, including the currently focused window?
I think the current behavior is inconsistent. The inactive windows are not scrolled but the currently focused one is. I would have expected all windows to stay "stable" when the Vim terminal window is resized.
And there's another inconsistency. Let's say you have two vertical splits and then you run :botright copen
. While in the quickfix window, run :resize +5
. You can run the command multiple times and none of the vertical splits will be scrolled (assuming set splitscroll=2
). I would have assumed the same behavior when the entire screen is resized (think of a quick tmux split-window
, or quickly opening a new terminal window with a tiling window manager).
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal There's another case when the currently focused window is scrolled but the other split windows are kept stable.
Open two vertical splits, place the cursor at the bottom in each window. Then open the command-line window with q:
, and the close it with :q
. When the command-line window is opened, the windows are not scrolled, but when it's closed, the last focused window is scrolled.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Reading the explanation gives a hint about what to call them: how about: "normal", "noscroll" and "neverscroll"?
Yeah sure, sounds good to me. I have a commit ready implementing the change to stringopt.
Sorry for not getting back to some of the replies here. I think the option implementation requires some further consideration. It works for the simple case splitting a single window into two but I'm not sure isolating the change to win_new_height()
is sufficient. I think we might require some of the logic in win_split_ins()
handling all the edge cases. Will have to look at it again. Consider draft for now.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I reworked the option to truly obey the description in all cases (I think). Any and all opened splits will maintain their current scroll position regardless of how they were opened (topleft
/belowright
/(no)splitbelow
etc.
In the process I reverted back to a boolean option and got rid of the non-forcing noscroll
option, only keeping the (now more comprehensive) neverscroll
. Always setting the cursor position instead of scrolling. I'm not sure adding back the noscroll
option will be worth the hassle/code.
Another round of testing would be appreciated. Tests still need updating.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
tabline/winbar could use handling as well, not sure if feasible or worth it.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
RE the failing tests: right, the topfrp
argument is a remnant of when I tried to reduce the handling of unchanged windows by only passing the frame where the window heights have changed. Couldn't get it working right away properly, not sure if it's still possible but maybe the current check is sufficient for performance considerations and we can get rid of the frame arg:
https://github.com/vim/vim/blob/1aea71e8c3800409fbce66850a6bfd60c1bf97f0/src/window.c#L6371-L6373
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
I wasn't sure if it's always possible to know the frame(s) that contain changed windows and pass it to the scroll correct function from where it's called. I think looping over all the windows in to be sure is fine and unnecessary work is avoided by the prev_height
check.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal commented on this pull request.
In src/window.c:
> @@ -1327,6 +1333,11 @@ win_split_ins( msg_col = 0; // put position back at start of line } + // If we have there is a winbar, win_equal invalidates w_botline + // before we get to spsc_correct_scroll (why only with winbar?). + if (!p_spsc && WINBAR_HEIGHT(curwin))
@brammool with the latest commit we also avoid scrolling in all cases when a winbar is present. Without this check w_botline
was invalidated due to some recursive calls to win_new_width()
in equal_win()
, before we get to spsc_correct_scroll()
. Resulting in scrolling in curwin
(actually prevwin
after win_enter_ext(wp)
.
Would a check like this be okay? It's not really checking against the root cause of what causes scrolling but it seems to work and I don't see any side effects.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
The strategy is to keep all lines on the same actual terminal line, updating the cursor to a valid position rather then scrolling when necessary. To do this, indeed topline
remains unchanged a window is reduced in size from below(botline
shifts upward).
However, when a window is reduced in size from above(i.e. when winrow
!= prev_winrow
), to keep the window content "stable", we have to update topline
instead. To do this, I am setting the cursor line to where the new botline
would have been, followed by a scroll_to_fraction()
with fraction set to FRACTION_MULT
, such that this cursor position will be the new botline
.
This botline
value depends on the value of laststatus
, the number of windows in a frame/tabpage
, and the winbar
height. I think I covered all possible cases now but I'm not quite sure why the recursive calls to win_new_width()
only happen when a winbar is open. It feels like I'm working around the problem but if it works it works.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Hmm, I think what you are trying to do is not 100% possible.
The topline can only be the start of a buffer line, thus when this line wraps it occupies two screen lines.
Yeah true, I noticed this during testing. I saw it as an acceptable loss for now, I use nowrap
my self and it will still lead to less scrolling, even when lines are wrapped.
There is a todo item somewhere to have the first line possible start halfway the line. That would have to be implemented first. The reason it's not done yet is that it will require a lot of work to get right.
I can imagine this will be tricky.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@barmmool How would I go about adding topfill lines to a window? I'm trying to stabilize one (final hopefully) case where the curwin has a winbar and is split above. The winbar will move to the with the window to the lower split, leaving more available toplines for the upper split.
I can account for this by scrolling up, but when w_topline < WINBAR_HEIGHT(curwin)
, topfill lines would have to be added instead.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
See https://asciinema.org/a/zKuzBLQttMYGsjvnx7Yi6DTwL for visualization.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
I see, thanks. I think this is it for now then. Still waiting for some feedback on whether the normal/noscroll/neverscroll
option is deemed necessary, also over at the neovim PR.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Not sure why the added test fails on appveyor with gvim, can't seem to replicate it failing.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Is it possible to add the old cursor position to the jump list before it is changed? Does it even make sense?
Just a thought: imagine, I carefully placed the cursor somewhere in the buffer, then open a new split, and it happens that the cursor is moved up to avoid scrolling the window. If I focus the previous window before I opened the split, the cursor will be on a different line. Someone might need the old position, in that case my first thought would be to hit <C-o>
to jump back to the previous buffer position. But this doesn't work at the moment.
I tested the latest version. There are still some cases when the window is scrolled.
Open two vertical splits, place the cursor at the bottom in each window. Then open the command-line window with q:
. When the command-line window is opened, the last window is scrolled.
With set nosplitscroll
, when a vertical split is opened with <c-w>v
, the cursor is not at the same position in the split. This is unexpected. Why is the cursor moved in the new vertical split? I think it should stay at the old position, since everything is copied from the old window.
This is illustrated in the following video. Before I open the vertical split, the cursor is at the very bottom of the buffer on the word "Atari". By default the old cursor position is copied when a new split is opened. But when I hit <c-w>v
, the cursor is moved 5 lines above (below the line "OS/2 support...").
https://user-images.githubusercontent.com/6266600/183931234-cd4e3197-aee8-4e5d-a3d3-a305cd6b410a.mp4
It looks like that for vertical splits, it is never possible to keep the cursor at the very bottom of the window. Open two vertical splits, place the cursor at the bottom and then hit <c-w>p
. The cursor is not at the old position anymore. Even if no windows have been opened.
Note: for consistency, there should probably also be help tags for nosplitscroll
and nospsc
.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Is it possible to add the old cursor position to the jump list before it is changed? Does it even make sense?
Yeah my plugin did this as well. It does make sense I guess although I can't say I ever used it. Would have to figure out how to populate the jumplist.
Thanks for testing, I'll look into the problems you mentioned. You're right that vertical splits should be skipped altogether. I had this in previous versions but got lost somewhere along the way. Although I wonder if it is always enough to know that a vertical split was spawned. I'm not familiar with all the possible ways splits can be opened. Can there ever be opened a vertical split where other windows in the tab might change in height? That would complicate things.
The q:
one is interesting, not sure why it isn't handled currently. Is it not a regular window? I'll check it out.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 2 commits.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@bfrg I think I addressed everything you mentioned, thanks again for testing it out.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Alright, I'm happy with how this looks and works now. I would consider it mergeable and would put it up for review @brammool but I haven't had any feedback yet from neovim side on the omission of the noscroll
option(or here for that matter, but there were some opinions shared on the option earlier and it originated over at the neovim PR). The addition of the jumplist entry with the old cursor position makes it even more obsolete imo.
The failing test on appveyor with gvim still requires fixing I guess but I haven't been able to reproduce it yet. It seems to be running the test on windows, perhaps I can reproduce it there.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
For vertical splits, the cursor is still moved even though it's not necessary.
To reproduce, place the cursor on the very last line of the window and the open a new vertical split with <c-w>v
. In the new window, the cursor remains in the same line as in the previous window, but when I jump back with <c-w>p
, the cursor has been moved up. If I press <c-w>p
again, it has been moved in the other window as well. The cursors should remain at their previous positions since no window was scrolled. You can try to move the cursor to the lowest line in each window and then focus the previous window. The cursor will be moved up again. It looks like the amount it is moved up depends on scrolloff
which is set to 5 by default.
Pressing <c-o>
works as expected 👍 .
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.
To reproduce, place the cursor on the very last line of the window and the open a new vertical
Oh right, though this is only true and "not necessary" when the last line of the window is also the last line of the buffer/file. I can't reproduce it on any arbitrary position in the buffer when placing the the cursor on the last line(also not possible when scrolloff is set). Is that what you mean, or are you seeing this without scrolloff set/not on the last line of the buffer?
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@brammool I would like to do some refactoring and look into the failing test(seems it fails on gvim although I can't reproduce), perhaps hold off on review if you were planning to.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
Done with this for now. There is still the winbar edgecase(scroll offset by winbar height) when opening a vertical split or horizontal split above the winbar but it's not a merge blocker imo. Won't have time to look at it until later this month.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 2 commits.
You are receiving this because you are subscribed to this thread.
Can some people try this out and give feedback?
spsc_correct_cursor() and spsc_correct_scroll() are declared static but the function are not.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
@luukvbaal pushed 1 commit.
You are receiving this because you are subscribed to this thread.
I gave this a quick spin. It seems to work reasonably well and the results were unsurprising, which has to be the goal.
However, I was sort of confused by the result of :1spl
I was expecting the 1-line split to cover the first line in the buffer in the same way that in :split
or rightbelow 1split
we sort of "steal" the screen lines at the bottom of the buffer.
here's some playing including the result of a number of 1spl actions: https://asciinema.org/a/oA68f6K9CKHRV04HMfLYiZe0p
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.
Yes, I would agree the result of :1split
is surprising. It seems to work as expected for 2:split
. I doubt many people ever run :1split
but I'll look into it thanks.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.