Skip to content

Commit de39807

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 68cde01 + 1c84493 commit de39807

3 files changed

Lines changed: 23 additions & 12 deletions

File tree

src/libvterm/src/encoding.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -218,7 +218,7 @@ encodings[] = {
218218
{ ENC_SINGLE_94, '0', (VTermEncoding*)&encoding_DECdrawing },
219219
{ ENC_SINGLE_94, 'A', (VTermEncoding*)&encoding_uk },
220220
{ ENC_SINGLE_94, 'B', &encoding_usascii },
221-
{ 0 },
221+
{ 0, 0, NULL },
222222
};
223223

224224
/* This ought to be INTERNAL but isn't because it's used by unit testing */

src/terminal.c

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,8 @@
3333
* while, if the terminal window is visible, the screen contents is drawn.
3434
*
3535
* TODO:
36-
* - do not store terminal buffer in viminfo
36+
* - include functions from #1871
37+
* - do not store terminal buffer in viminfo. Or prefix term:// ?
3738
* - Add a scrollback buffer (contains lines to scroll off the top).
3839
* Can use the buf_T lines, store attributes somewhere else?
3940
* - When the job ends:
@@ -314,6 +315,18 @@ term_write_job_output(term_T *term, char_u *msg, size_t len)
314315
vterm_screen_flush_damage(vterm_obtain_screen(vterm));
315316
}
316317

318+
static void
319+
update_cursor()
320+
{
321+
/* TODO: this should not always be needed */
322+
setcursor();
323+
out_flush();
324+
#ifdef FEAT_GUI
325+
if (gui.in_use)
326+
gui_update_cursor(FALSE, FALSE);
327+
#endif
328+
}
329+
317330
/*
318331
* Invoked when "msg" output from a job was received. Write it to the terminal
319332
* of "buffer".
@@ -329,8 +342,7 @@ write_to_term(buf_T *buffer, char_u *msg, channel_T *channel)
329342

330343
/* TODO: only update once in a while. */
331344
update_screen(0);
332-
setcursor();
333-
out_flush();
345+
update_cursor();
334346
}
335347

336348
/*
@@ -461,8 +473,7 @@ terminal_loop(void)
461473
{
462474
/* TODO: skip screen update when handling a sequence of keys. */
463475
update_screen(0);
464-
setcursor();
465-
out_flush();
476+
update_cursor();
466477
++no_mapping;
467478
++allow_keys;
468479
got_int = FALSE;
@@ -550,8 +561,7 @@ term_job_ended(job_T *job)
550561
if (did_one)
551562
{
552563
redraw_statuslines();
553-
setcursor();
554-
out_flush();
564+
update_cursor();
555565
}
556566
if (curbuf->b_term != NULL && curbuf->b_term->tl_job == job)
557567
maketitle();
@@ -616,10 +626,7 @@ handle_movecursor(
616626
}
617627

618628
if (is_current)
619-
{
620-
setcursor();
621-
out_flush();
622-
}
629+
update_cursor();
623630

624631
return 1;
625632
}

src/version.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -784,6 +784,10 @@ static char *(features[]) =
784784

785785
static int included_patches[] =
786786
{ /* Add new patch number below this line */
787+
/**/
788+
771,
789+
/**/
790+
770,
787791
/**/
788792
769,
789793
/**/

0 commit comments

Comments
 (0)