Use right arrow to accept autosuggestions

This commit is contained in:
ridiculousfish 2012-02-06 11:59:34 -08:00
parent 27f2859258
commit 0dba7b3313

View file

@ -3163,6 +3163,16 @@ const wchar_t *reader_readline()
{
data->buff_pos++;
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;
}