Patch 9.0.1244
Problem: Cursor briefly displayed in a wrong position when pressing Esc in
Insert mode after autoindent was used.
Solution: Do not adjust the cursor position for assumed deleted white space
if text is following. (closes #11877)
Files: src/getchar.c
*** ../vim-9.0.1243/src/getchar.c 2023-01-08 13:44:21.065352366 +0000
--- src/getchar.c 2023-01-25 17:31:04.329794247 +0000
***************
*** 3328,3342 ****
{
if (curwin->w_wcol > 0)
{
! if (did_ai)
{
chartabsize_T cts;
- /*
- * We are expecting to truncate the trailing
- * white-space, so find the last non-white
- * character -- webb
- */
curwin->w_wcol = 0;
ptr = ml_get_curline();
init_chartabsize_arg(&cts, curwin,
--- 3328,3342 ----
{
if (curwin->w_wcol > 0)
{
! // After auto-indenting and no text is following,
! // we are expecting to truncate the trailing
! // white-space, so find the last non-white
! // character -- webb
! if (did_ai && *skipwhite(ml_get_curline()
! + curwin->w_cursor.col) == NUL)
{
chartabsize_T cts;
curwin->w_wcol = 0;
ptr = ml_get_curline();
init_chartabsize_arg(&cts, curwin,
*** ../vim-9.0.1243/src/version.c 2023-01-25 15:31:24.358723462 +0000
--- src/version.c 2023-01-25 17:33:15.693795387 +0000
***************
*** 697,698 ****
--- 697,700 ----
{ /* Add new patch number below this line */
+ /**/
+ 1244,
/**/
--
hundred-and-one symptoms of being an internet addict:
45. You buy a Captain Kirk chair with a built-in keyboard and mouse.
/// Bram Moolenaar -- Br...@Moolenaar.net --
http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features --
http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims --
http://ICCF-Holland.org ///