From 86067eb05ef01ff4acea9b006506b2b4abd3a3eb Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 24 Jul 2017 23:05:35 +0200 Subject: [PATCH 1/2] patch 8.0.0770: compiler warning for missing field initializer Problem: Compiler warning for missing field initializer. Solution: Add two more values. (Yegappan Lakshmanan) --- src/libvterm/src/encoding.c | 2 +- src/version.c | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/src/libvterm/src/encoding.c b/src/libvterm/src/encoding.c index d47485ac30..b37a08c3f1 100644 --- a/src/libvterm/src/encoding.c +++ b/src/libvterm/src/encoding.c @@ -218,7 +218,7 @@ encodings[] = { { ENC_SINGLE_94, '0', (VTermEncoding*)&encoding_DECdrawing }, { ENC_SINGLE_94, 'A', (VTermEncoding*)&encoding_uk }, { ENC_SINGLE_94, 'B', &encoding_usascii }, - { 0 }, + { 0, 0, NULL }, }; /* This ought to be INTERNAL but isn't because it's used by unit testing */ diff --git a/src/version.c b/src/version.c index 2c0a53b58e..44e4404c11 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 770, /**/ 769, /**/ From 1c84493bbeda1d58b70e9b2b7723ce92fb2a49d4 Mon Sep 17 00:00:00 2001 From: Bram Moolenaar Date: Mon, 24 Jul 2017 23:36:41 +0200 Subject: [PATCH 2/2] patch 8.0.0771: cursor in terminal window not always updated in GUI Problem: Cursor in a terminal window not always updated in the GUI. Solution: Call gui_update_cursor(). (Yasuhiro Matsumoto, closes #1868) --- src/terminal.c | 29 ++++++++++++++++++----------- src/version.c | 2 ++ 2 files changed, 20 insertions(+), 11 deletions(-) diff --git a/src/terminal.c b/src/terminal.c index 93715d51a5..f75ac38c3f 100644 --- a/src/terminal.c +++ b/src/terminal.c @@ -33,7 +33,8 @@ * while, if the terminal window is visible, the screen contents is drawn. * * TODO: - * - do not store terminal buffer in viminfo + * - include functions from #1871 + * - do not store terminal buffer in viminfo. Or prefix term:// ? * - Add a scrollback buffer (contains lines to scroll off the top). * Can use the buf_T lines, store attributes somewhere else? * - When the job ends: @@ -314,6 +315,18 @@ term_write_job_output(term_T *term, char_u *msg, size_t len) vterm_screen_flush_damage(vterm_obtain_screen(vterm)); } + static void +update_cursor() +{ + /* TODO: this should not always be needed */ + setcursor(); + out_flush(); +#ifdef FEAT_GUI + if (gui.in_use) + gui_update_cursor(FALSE, FALSE); +#endif +} + /* * Invoked when "msg" output from a job was received. Write it to the terminal * of "buffer". @@ -329,8 +342,7 @@ write_to_term(buf_T *buffer, char_u *msg, channel_T *channel) /* TODO: only update once in a while. */ update_screen(0); - setcursor(); - out_flush(); + update_cursor(); } /* @@ -461,8 +473,7 @@ terminal_loop(void) { /* TODO: skip screen update when handling a sequence of keys. */ update_screen(0); - setcursor(); - out_flush(); + update_cursor(); ++no_mapping; ++allow_keys; got_int = FALSE; @@ -550,8 +561,7 @@ term_job_ended(job_T *job) if (did_one) { redraw_statuslines(); - setcursor(); - out_flush(); + update_cursor(); } if (curbuf->b_term != NULL && curbuf->b_term->tl_job == job) maketitle(); @@ -616,10 +626,7 @@ handle_movecursor( } if (is_current) - { - setcursor(); - out_flush(); - } + update_cursor(); return 1; } diff --git a/src/version.c b/src/version.c index 44e4404c11..10189f4897 100644 --- a/src/version.c +++ b/src/version.c @@ -769,6 +769,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 771, /**/ 770, /**/