comparison src/undo.c @ 30545:9a6f7e750697 v9.0.0608

patch 9.0.0608: with spelling, deleting a full stop does not update next line Commit: https://github.com/vim/vim/commit/26f09ea54b2c60abf21df42c60bdfc60eca17b0d Author: Bram Moolenaar <Bram@vim.org> Date: Tue Sep 27 16:29:38 2022 +0100 patch 9.0.0608: with spelling, deleting a full stop does not update next line Problem: With spell checking, deleting a full stop at the end of a line does not update SpellCap at the start of the next line. Solution: Update the next line when characters have been deleted. Also when using undo.
author Bram Moolenaar <Bram@vim.org>
date Tue, 27 Sep 2022 17:30:05 +0200
parents 89e1d67814a9
children 53c3df37a2b0
comparison
equal deleted inserted replaced
30544:f37a467a0e49 30545:9a6f7e750697
2833 curbuf->b_op_start.lnum += newsize - oldsize; 2833 curbuf->b_op_start.lnum += newsize - oldsize;
2834 if (curbuf->b_op_end.lnum > top + oldsize) 2834 if (curbuf->b_op_end.lnum > top + oldsize)
2835 curbuf->b_op_end.lnum += newsize - oldsize; 2835 curbuf->b_op_end.lnum += newsize - oldsize;
2836 } 2836 }
2837 if (oldsize > 0 || newsize > 0) 2837 if (oldsize > 0 || newsize > 0)
2838 {
2838 changed_lines(top + 1, 0, bot, newsize - oldsize); 2839 changed_lines(top + 1, 0, bot, newsize - oldsize);
2840 #ifdef FEAT_SPELL
2841 // When text has been changed, possibly the start of the next line
2842 // may have SpellCap that should be removed or it needs to be
2843 // displayed. Schedule the next line for redrawing just in case.
2844 if (spell_check_window(curwin) && bot <= curbuf->b_ml.ml_line_count)
2845 redrawWinline(curwin, bot);
2846 #endif
2847 }
2839 2848
2840 // Set the '[ mark. 2849 // Set the '[ mark.
2841 if (top + 1 < curbuf->b_op_start.lnum) 2850 if (top + 1 < curbuf->b_op_start.lnum)
2842 curbuf->b_op_start.lnum = top + 1; 2851 curbuf->b_op_start.lnum = top + 1;
2843 // Set the '] mark. 2852 // Set the '] mark.