mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-03-15 23:22:53 +08: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
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…
x
Reference in New Issue
Block a user