aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar Julian Aron Prenner <julian@linux4you.it>2014-01-23 10:23:04 +0100
committerGravatar Julian Aron Prenner <julian@linux4you.it>2014-01-23 10:23:04 +0100
commit844b01cb6be2ab3a3f7070112c94604b43710835 (patch)
tree0edb77427d3d7a49f2f8cdecc67f2f6da160611d /reader.cpp
parent45465e0c450eb2e73ef43a553fe3bb0f72b53a7b (diff)
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)
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/reader.cpp b/reader.cpp
index 1e629af1..e02cfc54 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -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;
}