aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-20 20:08:56 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2013-08-20 20:08:56 -0700
commitd6791a836b887d8de79af6a2b2b2385d5ebc27b3 (patch)
tree8a52a387b37d013be174b23e36064740b7ce217a /reader.cpp
parent69c6b007aa5d478873cedf0330f1a48641581467 (diff)
Include the autosuggestion in history if it was truncated
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/reader.cpp b/reader.cpp
index 907a6aab..96d7bc44 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -3517,9 +3517,9 @@ const wchar_t *reader_readline(void)
data->search_buff.append(data->command_line);
data->history_search = history_search_t(*data->history, data->search_buff, HISTORY_SEARCH_TYPE_CONTAINS);
- /* Skip the autosuggestion as history */
+ /* Skip the autosuggestion as history unless it was truncated */
const wcstring &suggest = data->autosuggestion;
- if (! suggest.empty())
+ if (! suggest.empty() && ! data->screen.autosuggestion_is_truncated)
{
data->history_search.skip_matches(wcstring_list_t(&suggest, 1 + &suggest));
}