diff options
author | bfredl <bjorn.linse@gmail.com> | 2023-09-23 18:29:19 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-09-23 18:29:19 +0200 |
commit | 93d27ea578a2d25fff1ec892d84f5e9a609eb377 (patch) | |
tree | 2628c4e354f30387a81cefde050663c0975d43bf /src/nvim/edit.c | |
parent | fcdfbb430377a82921cf1a72df97bce7952733e8 (diff) | |
parent | 3a7cb72dcbe4aaaed47999ab5afaf3d1cb8d4df8 (diff) | |
download | rneovim-93d27ea578a2d25fff1ec892d84f5e9a609eb377.tar.gz rneovim-93d27ea578a2d25fff1ec892d84f5e9a609eb377.tar.bz2 rneovim-93d27ea578a2d25fff1ec892d84f5e9a609eb377.zip |
Merge pull request #25268 from bfredl/grid_line
refactor(grid): properly namespace and separate stateful grid functions
Diffstat (limited to 'src/nvim/edit.c')
-rw-r--r-- | src/nvim/edit.c | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/nvim/edit.c b/src/nvim/edit.c index 216f8a67db..520d3bc2b3 100644 --- a/src/nvim/edit.c +++ b/src/nvim/edit.c @@ -1449,6 +1449,7 @@ void edit_putchar(int c, bool highlight) // save the character to be able to put it back if (pc_status == PC_STATUS_UNSET) { + // TODO(bfredl): save the schar_T instead grid_getbytes(&curwin->w_grid, pc_row, pc_col, pc_bytes, &pc_attr); pc_status = PC_STATUS_SET; } @@ -1532,7 +1533,7 @@ void edit_unputchar(void) if (pc_status == PC_STATUS_RIGHT || pc_status == PC_STATUS_LEFT) { redrawWinline(curwin, curwin->w_cursor.lnum); } else { - grid_puts(&curwin->w_grid, pc_bytes, pc_row, pc_col, pc_attr); + grid_puts(&curwin->w_grid, pc_bytes, -1, pc_row, pc_col, pc_attr); } } } @@ -3485,7 +3486,8 @@ static bool ins_esc(long *count, int cmdchar, bool nomove) // Otherwise remove the mode message. if (reg_recording != 0 || restart_edit != NUL) { showmode(); - } else if (p_smd && (got_int || !skip_showmode())) { + } else if (p_smd && (got_int || !skip_showmode()) + && !(p_ch == 0 && !ui_has(kUIMessages))) { msg(""); } // Exit Insert mode |