diff options
author | ridiculousfish <corydoras@ridiculousfish.com> | 2013-08-20 20:08:56 -0700 |
---|---|---|
committer | ridiculousfish <corydoras@ridiculousfish.com> | 2013-08-20 20:08:56 -0700 |
commit | d6791a836b887d8de79af6a2b2b2385d5ebc27b3 (patch) | |
tree | 8a52a387b37d013be174b23e36064740b7ce217a /reader.cpp | |
parent | 69c6b007aa5d478873cedf0330f1a48641581467 (diff) |
Include the autosuggestion in history if it was truncated
Diffstat (limited to 'reader.cpp')
-rw-r--r-- | reader.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
@@ -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)); } |