Mercurial > vim
comparison src/move.c @ 30293:914b3c64ab92 v9.0.0482
patch 9.0.0482: "g0" moves to wrong location with virtual text "above"
Commit: https://github.com/vim/vim/commit/e24b4aba1fbf782954897abdbfc084c4221428eb
Author: Bram Moolenaar <Bram@vim.org>
Date: Fri Sep 16 20:51:14 2022 +0100
patch 9.0.0482: "g0" moves to wrong location with virtual text "above"
Problem: "g0" moves to wrong location with virtual text "above".
Solution: Compensate for the extra columns. (closes https://github.com/vim/vim/issues/11141) Also fix "g$"
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Fri, 16 Sep 2022 22:00:04 +0200 |
parents | 0d084880276a |
children | b5f67135fcb6 |
comparison
equal
deleted
inserted
replaced
30292:eeb2c98953bf | 30293:914b3c64ab92 |
---|---|
468 return TRUE; | 468 return TRUE; |
469 } | 469 } |
470 return FALSE; | 470 return FALSE; |
471 } | 471 } |
472 | 472 |
473 /* | |
474 * Update w_curswant. | |
475 */ | |
476 void | |
477 update_curswant_force(void) | |
478 { | |
479 validate_virtcol(); | |
480 curwin->w_curswant = curwin->w_virtcol | |
481 #ifdef FEAT_PROP_POPUP | |
482 - curwin->w_virtcol_first_char | |
483 #endif | |
484 ; | |
485 curwin->w_set_curswant = FALSE; | |
486 } | |
487 | |
488 /* | |
489 * Update w_curswant if w_set_curswant is set. | |
490 */ | |
473 void | 491 void |
474 update_curswant(void) | 492 update_curswant(void) |
475 { | 493 { |
476 if (curwin->w_set_curswant) | 494 if (curwin->w_set_curswant) |
477 { | 495 update_curswant_force(); |
478 validate_virtcol(); | |
479 curwin->w_curswant = curwin->w_virtcol | |
480 #ifdef FEAT_PROP_POPUP | |
481 - curwin->w_virtcol_first_char | |
482 #endif | |
483 ; | |
484 curwin->w_set_curswant = FALSE; | |
485 } | |
486 } | 496 } |
487 | 497 |
488 /* | 498 /* |
489 * Check if the cursor has moved. Set the w_valid flag accordingly. | 499 * Check if the cursor has moved. Set the w_valid flag accordingly. |
490 */ | 500 */ |