Add 'and' input function; fixes a bug with t,T

'and' will prevent later input functions from being executed if the
previous one did not succeed (e.g. a jump to a char not on the command
line)
This commit is contained in:
Julian Aron Prenner
2014-01-23 10:23:04 +01:00
parent 45465e0c45
commit 844b01cb6b
4 changed files with 48 additions and 8 deletions

View File

@@ -3865,15 +3865,18 @@ const wchar_t *reader_readline(void)
{
wchar_t target = input_function_pop_arg();
size_t len = data->command_length();
bool status = false;
for(int i = data->buff_pos + 1; i < len; i++)
{
if(buff[i] == target)
{
update_buff_pos(i);
status = true;
break;
}
}
input_function_set_status(status);
reader_repaint();
break;
}
@@ -3882,15 +3885,18 @@ const wchar_t *reader_readline(void)
{
wchar_t target = input_function_pop_arg();
size_t len = data->command_length();
bool status = false;
for(int i = data->buff_pos - 1; i >= 0; i--)
{
if(buff[i] == target)
{
update_buff_pos(i);
status = true;
break;
}
}
input_function_set_status(status);
reader_repaint();
break;
}