From 6ce74febc7a77e327f4292169ee238a792909150 Mon Sep 17 00:00:00 2001 From: ridiculousfish Date: Mon, 11 Aug 2014 10:17:41 -0700 Subject: [PATCH] Accepting an autosuggestion should clear the pager --- reader.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/reader.cpp b/reader.cpp index 057ab7067..bb3b57fc6 100644 --- a/reader.cpp +++ b/reader.cpp @@ -403,6 +403,9 @@ public: /* Sets the command line contents, without clearing the pager */ static void reader_set_buffer_maintaining_pager(const wcstring &b, size_t pos); +/* Clears the pager */ +static void clear_pager(); + /** The current interactive reading context */ @@ -1564,6 +1567,9 @@ static void accept_autosuggestion(bool full) { if (! data->autosuggestion.empty()) { + /* Accepting an autosuggestion clears the pager */ + clear_pager(); + /* Accept the autosuggestion */ if (full) {