comparison src/normal.c @ 31680:24d9c23bf665 v9.0.1172

patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short Commit: https://github.com/vim/vim/commit/79c11e399be3d96ed6d1c7458b1380e878ec717b Author: Bram Moolenaar <Bram@vim.org> Date: Tue Jan 10 17:29:29 2023 +0000 patch 9.0.1172: when 'selection' is "exclusive" then "1v" is one char short Problem: When 'selection' is "exclusive" then "1v" is one char short. Solution: Add one character when 'selection' is "exclusive. (closes https://github.com/vim/vim/issues/11791)
author Bram Moolenaar <Bram@vim.org>
date Tue, 10 Jan 2023 18:30:04 +0100
parents e94571ac4134
children 07480c2f5ea8
comparison
equal deleted inserted replaced
31679:ba5b5ed7d62c 31680:24d9c23bf665
5470 if (VIsual_mode == 'v') 5470 if (VIsual_mode == 'v')
5471 { 5471 {
5472 if (resel_VIsual_line_count <= 1) 5472 if (resel_VIsual_line_count <= 1)
5473 { 5473 {
5474 update_curswant_force(); 5474 update_curswant_force();
5475 curwin->w_curswant += resel_VIsual_vcol * cap->count0 - 1; 5475 curwin->w_curswant += resel_VIsual_vcol * cap->count0;
5476 if (*p_sel != 'e')
5477 --curwin->w_curswant;
5476 } 5478 }
5477 else 5479 else
5478 curwin->w_curswant = resel_VIsual_vcol; 5480 curwin->w_curswant = resel_VIsual_vcol;
5479 coladvance(curwin->w_curswant); 5481 coladvance(curwin->w_curswant);
5480 } 5482 }