Skip to content

Commit 0ce7413

Browse files
committed
patch 8.1.0076: command getting cleared with CTRL-W : in a terminal window
Problem: Command getting cleared with CTRL-W : in a terminal window. (Jason Franklin) Solution: Call redraw_after_callback() when editing the command line.
1 parent 252b7ee commit 0ce7413

File tree

2 files changed

+7
-3
lines changed

2 files changed

+7
-3
lines changed

src/terminal.c

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -973,11 +973,13 @@ write_to_term(buf_T *buffer, char_u *msg, channel_T *channel)
973973
* contents, thus no screen update is needed. */
974974
if (!term->tl_normal_mode)
975975
{
976-
/* TODO: only update once in a while. */
976+
// Don't use update_screen() when editing the command line, it gets
977+
// cleared.
978+
// TODO: only update once in a while.
977979
ch_log(term->tl_job->jv_channel, "updating screen");
978-
if (buffer == curbuf)
980+
if (buffer == curbuf && (State & CMDLINE) == 0)
979981
{
980-
update_screen(0);
982+
update_screen(VALID_NO_UPDATE);
981983
/* update_screen() can be slow, check the terminal wasn't closed
982984
* already */
983985
if (buffer == curbuf && curbuf->b_term != NULL)

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -761,6 +761,8 @@ static char *(features[]) =
761761

762762
static int included_patches[] =
763763
{ /* Add new patch number below this line */
764+
/**/
765+
76,
764766
/**/
765767
75,
766768
/**/

0 commit comments

Comments
 (0)