mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-14 05:53:59 +00:00
Use right arrow to accept autosuggestions
This commit is contained in:
parent
27f2859258
commit
0dba7b3313
1 changed files with 11 additions and 1 deletions
12
reader.cpp
12
reader.cpp
|
@ -3163,7 +3163,17 @@ const wchar_t *reader_readline()
|
||||||
{
|
{
|
||||||
data->buff_pos++;
|
data->buff_pos++;
|
||||||
reader_repaint();
|
reader_repaint();
|
||||||
}
|
} else {
|
||||||
|
/* We're at the end of our buffer, and the user hit right. Try autosuggestion. */
|
||||||
|
if (! data->autosuggestion.empty()) {
|
||||||
|
/* Accept the autosuggestion */
|
||||||
|
data->command_line = data->autosuggestion;
|
||||||
|
data->buff_pos = data->command_line.size();
|
||||||
|
data->check_size();
|
||||||
|
reader_super_highlight_me_plenty(data->buff_pos, 0);
|
||||||
|
reader_repaint();
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue