Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 5a836d4

Browse filesBrowse files
committed
screen: don't unconditionally clear messages on window scroll
In vim, scrolling a window might mess up the cmdline. To keep it simple, cmdline was always cleared for any window scroll. In nvim, where safe scrolling is implemented in the TUI layer, this problem doesn't exist. Clearing the message on scrolling, when we not do it e.g when switching tabs is a bit weird, as the former is a much smaller context change. A vim patch introduced the possibility to avoid the cmdlline clear for redraws caused by async events. This case will now trivially be covered, as the redraw is always avoided. vim-patch:8.0.0592: if a job writes to a buffer screen is not updated
1 parent 95fa71c commit 5a836d4
Copy full SHA for 5a836d4

File tree

Expand file treeCollapse file tree

3 files changed

+5
-9
lines changed
Filter options
Expand file treeCollapse file tree

3 files changed

+5
-9
lines changed

‎src/nvim/screen.c

Copy file name to clipboardExpand all lines: src/nvim/screen.c
-4Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6274,10 +6274,6 @@ static int win_do_lines(win_T *wp, int row, int line_count, int del)
62746274
return OK;
62756275
}
62766276

6277-
// when scrolling, the message on the command line should be cleared,
6278-
// otherwise it will stay there forever.
6279-
check_for_delay(false);
6280-
clear_cmdline = true;
62816277
int retval;
62826278
if (del) {
62836279
retval = grid_del_lines(&wp->w_grid, row, line_count,

‎test/functional/ex_cmds/cmd_map_spec.lua

Copy file name to clipboardExpand all lines: test/functional/ex_cmds/cmd_map_spec.lua
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -279,7 +279,7 @@ describe('mappings with <Cmd>', function()
279279
{1:~ }|
280280
{1:~ }|
281281
{1:~ }|
282-
|
282+
:normal ,x |
283283
]])
284284

285285
eq('Vim:E492: Not an editor command: nosuchcommand', exc_exec("normal ,f"))
@@ -294,7 +294,7 @@ describe('mappings with <Cmd>', function()
294294
{1:~ }|
295295
{1:~ }|
296296
{1:~ }|
297-
|
297+
:normal ,x |
298298
]])
299299

300300
feed_command(':%d')

‎test/functional/ui/mouse_spec.lua

Copy file name to clipboardExpand all lines: test/functional/ui/mouse_spec.lua
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -662,7 +662,7 @@ describe('ui/mouse/input', function()
662662
|
663663
{0:~ }|
664664
{4:[No Name] [+] }|
665-
|
665+
:vsp |
666666
]])
667667
feed('<ScrollWheelUp><27,0>')
668668
screen:expect([[
@@ -679,7 +679,7 @@ describe('ui/mouse/input', function()
679679
|
680680
{0:~ }|
681681
{4:[No Name] [+] }|
682-
|
682+
:vsp |
683683
]])
684684
feed('<ScrollWheelUp><27,7><ScrollWheelUp>')
685685
screen:expect([[
@@ -696,7 +696,7 @@ describe('ui/mouse/input', function()
696696
many |
697697
lines |
698698
{4:[No Name] [+] }|
699-
|
699+
:vsp |
700700
]])
701701
end)
702702

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.