aboutsummaryrefslogtreecommitdiffhomepage
path: root/reader.cpp
diff options
context:
space:
mode:
authorGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-03-23 11:58:57 -0700
committerGravatar ridiculousfish <corydoras@ridiculousfish.com>2015-03-23 12:09:16 -0700
commit7aac3db55cdf84e5d2f8e194ee01c38a6694550b (patch)
tree773ebe943d39669b806d1e498d63c4fdd906f2d9 /reader.cpp
parent0ecf294d3457cb00bca9b89eb3d87fb2e587671e (diff)
Make "readahead" text insertion clear the pager
Without this change, pasting text with the pager contents visible would not clear the pager. Fixes #1974
Diffstat (limited to 'reader.cpp')
-rw-r--r--reader.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/reader.cpp b/reader.cpp
index 5231699f..e8bd5615 100644
--- a/reader.cpp
+++ b/reader.cpp
@@ -3156,8 +3156,15 @@ const wchar_t *reader_readline(int nchars)
break;
}
- insert_string(&data->command_line, arr, true);
-
+ editable_line_t *el = data->active_edit_line();
+ insert_string(el, arr, true);
+
+ /* End paging upon inserting into the normal command line */
+ if (el == &data->command_line)
+ {
+ clear_pager();
+ }
+ last_char = c;
}
}