diff options
Diffstat (limited to 'src/nvim/undo.c')
| -rw-r--r-- | src/nvim/undo.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/nvim/undo.c b/src/nvim/undo.c index 35f46e512d..1eb73d85d7 100644 --- a/src/nvim/undo.c +++ b/src/nvim/undo.c @@ -120,6 +120,7 @@ #include "nvim/path.h" #include "nvim/pos.h" #include "nvim/sha256.h" +#include "nvim/spell.h" #include "nvim/state.h" #include "nvim/strings.h" #include "nvim/types.h" @@ -2372,6 +2373,12 @@ static void u_undoredo(int undo, bool do_buf_event) } changed_lines(top + 1, 0, bot, newsize - oldsize, do_buf_event); + // When text has been changed, possibly the start of the next line + // may have SpellCap that should be removed or it needs to be + // displayed. Schedule the next line for redrawing just in case. + if (spell_check_window(curwin) && bot <= curbuf->b_ml.ml_line_count) { + redrawWinline(curwin, bot); + } // Set the '[ mark. if (top + 1 < curbuf->b_op_start.lnum) { @@ -2667,7 +2674,7 @@ void ex_undolist(exarg_T *eap) undo_fmt_time(IObuff + strlen(IObuff), IOSIZE - strlen(IObuff), uhp->uh_time); if (uhp->uh_save_nr > 0) { while (strlen(IObuff) < 33) { - STRCAT(IObuff, " "); + xstrlcat(IObuff, " ", IOSIZE); } vim_snprintf_add(IObuff, IOSIZE, " %3ld", uhp->uh_save_nr); } |
