Mercurial > vim
comparison src/normal.c @ 24788:b36ceac30454 v8.2.2932
patch 8.2.2932: select mode test fails
Commit: https://github.com/vim/vim/commit/4f3c57f7980592b25f483e5953799c010a8ae196
Author: Bram Moolenaar <Bram@vim.org>
Date: Thu Jun 3 22:11:08 2021 +0200
patch 8.2.2932: select mode test fails
Problem: Select mode test fails.
Solution: Do not always reset the held mouse button.
author | Bram Moolenaar <Bram@vim.org> |
---|---|
date | Thu, 03 Jun 2021 22:15:02 +0200 |
parents | 288565c9b4e0 |
children | b032da736676 |
comparison
equal
deleted
inserted
replaced
24787:7ac638bad396 | 24788:b36ceac30454 |
---|---|
1348 } | 1348 } |
1349 #endif | 1349 #endif |
1350 | 1350 |
1351 /* | 1351 /* |
1352 * End Visual mode. | 1352 * End Visual mode. |
1353 * This function should ALWAYS be called to end Visual mode, except from | 1353 * This function or the next should ALWAYS be called to end Visual mode, except |
1354 * do_pending_operator(). | 1354 * from do_pending_operator(). |
1355 */ | 1355 */ |
1356 void | 1356 void |
1357 end_visual_mode(void) | 1357 end_visual_mode() |
1358 { | |
1359 end_visual_mode_keep_button(); | |
1360 reset_held_button(); | |
1361 } | |
1362 | |
1363 void | |
1364 end_visual_mode_keep_button() | |
1358 { | 1365 { |
1359 #ifdef FEAT_CLIPBOARD | 1366 #ifdef FEAT_CLIPBOARD |
1360 /* | 1367 /* |
1361 * If we are using the clipboard, then remember what was selected in case | 1368 * If we are using the clipboard, then remember what was selected in case |
1362 * we need to paste it somewhere while we still own the selection. | 1369 * we need to paste it somewhere while we still own the selection. |
1378 } | 1385 } |
1379 # endif | 1386 # endif |
1380 #endif | 1387 #endif |
1381 | 1388 |
1382 VIsual_active = FALSE; | 1389 VIsual_active = FALSE; |
1383 reset_held_button(); | |
1384 setmouse(); | 1390 setmouse(); |
1385 mouse_dragging = 0; | 1391 mouse_dragging = 0; |
1386 | 1392 |
1387 // Save the current VIsual area for '< and '> marks, and "gv" | 1393 // Save the current VIsual area for '< and '> marks, and "gv" |
1388 curbuf->b_visual.vi_mode = VIsual_mode; | 1394 curbuf->b_visual.vi_mode = VIsual_mode; |