aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
authorGravatar axel <axel@liljencrantz.se>2006-02-02 01:55:46 +1000
committerGravatar axel <axel@liljencrantz.se>2006-02-02 01:55:46 +1000
commit5942a6d6c193f6d985d9f4eaada7c8113a40d1c0 (patch)
treed5ca0bb99ef5be699f32f97df8ec8c519b81afc3
parenta781736fb77b78b837ce4776279886da5fd78e1a (diff)
Don't reset history on cursor movement
darcs-hash:20060201155546-ac50b-975730e850775a9f47e15a65c9c5959a335edc93.gz
-rw-r--r--reader.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/reader.c b/reader.c
index 6f8d2439..f4d17d28 100644
--- a/reader.c
+++ b/reader.c
@@ -2641,7 +2641,10 @@ wchar_t *reader_readline()
case R_HISTORY_SEARCH_BACKWARD:
{
if( (last_char != R_HISTORY_SEARCH_BACKWARD) &&
- (last_char != R_HISTORY_SEARCH_FORWARD) )
+ (last_char != R_HISTORY_SEARCH_FORWARD) &&
+ (last_char != R_FORWARD_CHAR) &&
+ (last_char != R_BACKWARD_CHAR) )
+
{
wcscpy(data->search_buff, data->buff );
data->search_buff[data->buff_pos]=0;
@@ -2655,7 +2658,9 @@ wchar_t *reader_readline()
case R_HISTORY_SEARCH_FORWARD:
{
if( (last_char != R_HISTORY_SEARCH_BACKWARD) &&
- (last_char != R_HISTORY_SEARCH_FORWARD) )
+ (last_char != R_HISTORY_SEARCH_FORWARD) &&
+ (last_char != R_FORWARD_CHAR) &&
+ (last_char != R_BACKWARD_CHAR) )
{
wcscpy(data->search_buff, data->buff );
data->search_buff[data->buff_pos]=0;
@@ -2808,7 +2813,9 @@ wchar_t *reader_readline()
if( (c != R_HISTORY_SEARCH_BACKWARD) &&
(c != R_HISTORY_SEARCH_FORWARD) &&
(c != R_HISTORY_TOKEN_SEARCH_BACKWARD) &&
- (c != R_HISTORY_TOKEN_SEARCH_FORWARD) )
+ (c != R_HISTORY_TOKEN_SEARCH_FORWARD) &&
+ (c != R_FORWARD_CHAR) &&
+ (c != R_BACKWARD_CHAR) )
{
data->search_buff[0]=0;
history_reset();