mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Make "readahead" text insertion clear the pager
Without this change, pasting text with the pager contents visible would not clear the pager. Fixes #1974
This commit is contained in:
parent
0ecf294d34
commit
7aac3db55c
1 changed files with 9 additions and 2 deletions
11
reader.cpp
11
reader.cpp
|
@ -3156,8 +3156,15 @@ const wchar_t *reader_readline(int nchars)
|
|||
break;
|
||||
}
|
||||
|
||||
insert_string(&data->command_line, arr, true);
|
||||
|
||||
editable_line_t *el = data->active_edit_line();
|
||||
insert_string(el, arr, true);
|
||||
|
||||
/* End paging upon inserting into the normal command line */
|
||||
if (el == &data->command_line)
|
||||
{
|
||||
clear_pager();
|
||||
}
|
||||
last_char = c;
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue