diff options
author | Gregory Anders <greg@gpanders.com> | 2024-12-18 11:41:05 -0600 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-12-18 11:41:05 -0600 |
commit | 3db3947b0ed256d498b09eef95c4969e28387e66 (patch) | |
tree | 572c9e6f9508a4255353506e81998e0b17343e5a /src | |
parent | 7121983c45d92349a6532f32dcde9f425e30781e (diff) | |
download | rneovim-3db3947b0ed256d498b09eef95c4969e28387e66.tar.gz rneovim-3db3947b0ed256d498b09eef95c4969e28387e66.tar.bz2 rneovim-3db3947b0ed256d498b09eef95c4969e28387e66.zip |
fix(terminal): restore cursor from 'guicursor' on TermLeave (#31620)
Fixes: https://github.com/neovim/neovim/issues/31612
Diffstat (limited to 'src')
-rw-r--r-- | src/nvim/terminal.c | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/src/nvim/terminal.c b/src/nvim/terminal.c index fa08f3d6ca..969c539f97 100644 --- a/src/nvim/terminal.c +++ b/src/nvim/terminal.c @@ -641,9 +641,6 @@ bool terminal_enter(void) curwin->w_p_so = 0; curwin->w_p_siso = 0; - // Save the existing cursor entry since it may be modified by the application - cursorentry_T save_cursorentry = shape_table[SHAPE_IDX_TERM]; - // Update the cursor shape table and flush changes to the UI s->term->pending.cursor = true; refresh_cursor(s->term); @@ -674,8 +671,8 @@ bool terminal_enter(void) RedrawingDisabled = s->save_rd; apply_autocmds(EVENT_TERMLEAVE, NULL, NULL, false, curbuf); - shape_table[SHAPE_IDX_TERM] = save_cursorentry; - ui_mode_info_set(); + // Restore the terminal cursor to what is set in 'guicursor' + (void)parse_shape_opt(SHAPE_CURSOR); if (save_curwin == curwin->handle) { // Else: window was closed. curwin->w_p_cul = save_w_p_cul; |