Problem: Cursor moves when cmdwin is closed when 'splitscroll' is off.
Solution: Save and restore cursor position when opening and closing cmdwin.
Reverts change to ex_getln.c from e697d48, keep the test. Can you confirm this works @mityu.
https://github.com/vim/vim/pull/11134
(1 file)
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Merging #11134 (a7a8d33) into master (e697d48) will decrease coverage by
0.45%.
The diff coverage is100.00%.
@@ Coverage Diff @@ ## master #11134 +/- ## ========================================== - Coverage 81.61% 81.15% -0.46% ========================================== Files 162 152 -10 Lines 188258 178257 -10001 Branches 42786 40471 -2315 ========================================== - Hits 153645 144668 -8977 + Misses 22136 20937 -1199 - Partials 12477 12652 +175
| Flag | Coverage Δ | |
|---|---|---|
| huge-clang-none | 82.69% <100.00%> (-0.01%) |
⬇️ |
| huge-gcc-none | ? |
|
| huge-gcc-testgui | ? |
|
| huge-gcc-unittests | 0.29% <0.00%> (ø) |
|
| linux | 81.15% <100.00%> (-1.32%) |
⬇️ |
| mingw-x86-HUGE | ? |
|
| windows | ? |
Flags with carried forward coverage won't be shown. Click here to find out more.
| Impacted Files | Coverage Δ | |
|---|---|---|
| src/ex_getln.c | 83.50% <100.00%> (-2.32%) |
⬇️ |
| src/if_perl.xs | 54.85% <0.00%> (-17.93%) |
⬇️ |
| src/regexp_nfa.c | 80.41% <0.00%> (-9.30%) |
⬇️ |
| src/arabic.c | 85.86% <0.00%> (-8.70%) |
⬇️ |
| src/typval.c | 84.95% <0.00%> (-8.29%) |
⬇️ |
| src/regexp_bt.c | 78.48% <0.00%> (-7.48%) |
⬇️ |
| src/vim9execute.c | 83.83% <0.00%> (-7.39%) |
⬇️ |
| src/json.c | 77.74% <0.00%> (-5.49%) |
⬇️ |
| src/vim9instr.c | 77.39% <0.00%> (-5.09%) |
⬇️ |
| src/vim9compile.c | 87.36% <0.00%> (-4.83%) |
⬇️ |
| ... and 134 more |
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.
—
Reply to this email directly, view it on GitHub, or unsubscribe.
You are receiving this because you are subscribed to this thread.![]()
I found one problem with this patch at least. With win_execute() function, you can change cursor positions on other windows while in cmdwin. However, with this patch, cursor position changes for the current window by user-side scripts will be reverted when leaving cmdwin.
Example:
Gq::call win_execute(winnr('#')->win_getid(), 'call cursor(1, 1)')<CR><C-w>qWithout this patch, the cursor position will be (1, 1), but with this patch, it's not.
—
Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.![]()
Right. What we actually want to do is delay the win_fix_cursor until after the win_restore_size in open_cmdwin, or skip it altogether. Not sure how to achieve this. Would have to pass along args to a a lot of functions I think.
—
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.![]()
Or set a global of course. I think the latest commit should fix the cursor issue without 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.![]()
It seems that this patch works well. LGTM.
—
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.![]()