mirror of
https://github.com/fish-shell/fish-shell
synced 2024-11-10 15:14:44 +00:00
Ctrl+E should insert suggested completion and then go to end of line
(Closes #91, #932) Currently, control-E is bound to `end-of-line`. This patch modifes the `end-of-line` procedure so that, if it is invoked when the cursor is at the end of a command and there is pending completion text, it will accept the completion text and move to the end. The behavior of `end-of-line` will not otherwise be altered.
This commit is contained in:
parent
8dd9602f06
commit
e3ea953ff4
1 changed files with 10 additions and 3 deletions
13
reader.cpp
13
reader.cpp
|
@ -3114,10 +3114,17 @@ const wchar_t *reader_readline(void)
|
|||
|
||||
case R_END_OF_LINE:
|
||||
{
|
||||
while (buff[data->buff_pos] &&
|
||||
buff[data->buff_pos] != L'\n')
|
||||
if (data->buff_pos < data->command_length())
|
||||
{
|
||||
data->buff_pos++;
|
||||
while (buff[data->buff_pos] &&
|
||||
buff[data->buff_pos] != L'\n')
|
||||
{
|
||||
data->buff_pos++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
accept_autosuggestion(true);
|
||||
}
|
||||
|
||||
reader_repaint();
|
||||
|
|
Loading…
Reference in a new issue