Skip to content

Commit

Permalink
Make "readahead" text insertion clear the pager
Browse files Browse the repository at this point in the history
Without this change, pasting text with the pager contents
visible would not clear the pager.

Fixes #1974
  • Loading branch information
ridiculousfish committed Mar 23, 2015
1 parent 0ecf294 commit 7aac3db
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions reader.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
}

Expand Down

0 comments on commit 7aac3db

Please sign in to comment.