aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-08-11 10:17:41 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2014-08-11 10:17:41 -0700
commit6ce74febc7a77e327f4292169ee238a792909150 (patch)
treef4dec642b3c9b0e173487291b2ffc1faa4f4fd8e /reader.cpp
parentede3d422a0ee8f5b3ed6ee20e08916c979784133 (diff)
Accepting an autosuggestion should clear the pager
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp6
1 files changed, 6 insertions, 0 deletions
diff --git a/reader.cpp b/reader.cpp
index 057ab706..bb3b57fc 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)
{