Mercurial > vim
comparison src/textobject.c @ 28980:42e3dfd5b2d6 v8.2.5012
patch 8.2.5012: cannot select one character inside ()
Commit: https://github.com/vim/vim/commit/53737b5eeeab1f95964f78b055d6094fab559533
Author: LemonBoy <thatlemon@gmail.com>
Date: Tue May 24 11:49:31 2022 +0100
patch 8.2.5012: cannot select one character inside ()
Problem: Cannot select one character inside ().
Solution: Do not try to extend the area if it is empty. (closes https://github.com/vim/vim/issues/10472,
closes #6616)
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Tue, 24 May 2022 13:00:04 +0200 |
parents | 1ab5add6f4e8 |
children | b6c284c1f095 |
comparison
equal
deleted
inserted
replaced
28979:b49306ac0c96 | 28980:42e3dfd5b2d6 |
---|---|
1131 } | 1131 } |
1132 | 1132 |
1133 /* | 1133 /* |
1134 * In Visual mode, when the resulting area is not bigger than what we | 1134 * In Visual mode, when the resulting area is not bigger than what we |
1135 * started with, extend it to the next block, and then exclude again. | 1135 * started with, extend it to the next block, and then exclude again. |
1136 * Don't try to expand the area if the area is empty. | |
1136 */ | 1137 */ |
1137 if (!LT_POS(start_pos, old_start) && !LT_POS(old_end, curwin->w_cursor) | 1138 if (!LT_POS(start_pos, old_start) && !LT_POS(old_end, curwin->w_cursor) |
1139 && !EQUAL_POS(start_pos, curwin->w_cursor) | |
1138 && VIsual_active) | 1140 && VIsual_active) |
1139 { | 1141 { |
1140 curwin->w_cursor = old_start; | 1142 curwin->w_cursor = old_start; |
1141 decl(&curwin->w_cursor); | 1143 decl(&curwin->w_cursor); |
1142 if ((pos = findmatch(NULL, what)) == NULL) | 1144 if ((pos = findmatch(NULL, what)) == NULL) |