Mirror of the Vim source from https://github.com/vim/vim
Revision | a5c68c2e5ae87e5c91d81240fbc2409014530189 (tree) |
---|---|
Zeit | 2023-01-26 02:45:04 |
Autor | Bram Moolenaar <Bram@vim....> |
Commiter | Bram Moolenaar |
patch 9.0.1244: cursor displayed in wrong position when leaving Insert mode
Commit: https://github.com/vim/vim/commit/0f843ef091eceb470caece1d90fdfe08926fe076
Author: Bram Moolenaar <Bram@vim.org>
Date: Wed Jan 25 17:34:41 2023 +0000
@@ -3328,15 +3328,15 @@ | ||
3328 | 3328 | { |
3329 | 3329 | if (curwin->w_wcol > 0) |
3330 | 3330 | { |
3331 | - if (did_ai) | |
3331 | + // After auto-indenting and no text is following, | |
3332 | + // we are expecting to truncate the trailing | |
3333 | + // white-space, so find the last non-white | |
3334 | + // character -- webb | |
3335 | + if (did_ai && *skipwhite(ml_get_curline() | |
3336 | + + curwin->w_cursor.col) == NUL) | |
3332 | 3337 | { |
3333 | 3338 | chartabsize_T cts; |
3334 | 3339 | |
3335 | - /* | |
3336 | - * We are expecting to truncate the trailing | |
3337 | - * white-space, so find the last non-white | |
3338 | - * character -- webb | |
3339 | - */ | |
3340 | 3340 | curwin->w_wcol = 0; |
3341 | 3341 | ptr = ml_get_curline(); |
3342 | 3342 | init_chartabsize_arg(&cts, curwin, |
@@ -696,6 +696,8 @@ | ||
696 | 696 | static int included_patches[] = |
697 | 697 | { /* Add new patch number below this line */ |
698 | 698 | /**/ |
699 | + 1244, | |
700 | +/**/ | |
699 | 701 | 1243, |
700 | 702 | /**/ |
701 | 703 | 1242, |