aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-06-25 02:59:39 +0530
committerGravatar Siteshwar Vashisht <siteshwar@gmail.com>2012-06-25 03:02:37 +0530
commitccfc909eb2e754cc4558e258c011e8c9000559f5 (patch)
treed6e22270cfe739f449acd8f6d743913d31d5dc1f /reader.cpp
parent1a93cbba1e6ff0c1c5767b529a42f444b985b7dc (diff)
Fixed crash caused by pressing pageup button
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp6
1 files changed, 5 insertions, 1 deletions
diff --git a/reader.cpp b/reader.cpp
index 9725f467..d7f5235d 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -3213,7 +3213,11 @@ const wchar_t *reader_readline()
case R_BEGINNING_OF_HISTORY:
{
- data->history_search.go_to_beginning();
+ data->history_search = history_search_t(*data->history, data->command_line, HISTORY_SEARCH_TYPE_PREFIX);
+ data->history_search.go_to_beginning();
+ wcstring new_text = data->history_search.current_string();
+ set_command_line_and_position(new_text, new_text.size());
+
break;
}