patch 9.1.0856: mouseshape might be wrong on r and gr Commit: https://github.com/vim/vim/commit/a1b654ff36a9d3a22d632d7eeaddb8224e621928 Author: Yee Cheng Chin <ychin....@gmail.com> Date: Mon Nov 11 21:57:27 2024 +0100
patch 9.1.0856: mouseshape might be wrong on r and gr Problem: mouseshape might be wrong on r and gr Solution: call update_mousesape(-1) immediately (Yee Cheng Chin) Currently, when entering the "pretend" or single character replace modes using `r` or `gr`, the mouse cursor doesn't immediately update until you have re-focused the window or moved the mouse. This is because it's not calling `update_mouseshape(-1)` immediately, so the cursor will only be updated when it's called by other functions like `gui_mouse_focus`. To fix this, just make sure we call this `update_mouseshape(-1)`. It's what we do when entering Insert or Replace modes for example. I noticed this when trying to figure out why MacVim CI is failing in `Test_mouse_shape_after_cancelling_gr` (introduced in #12110), but I think that test is only passing in Vim GTK CI by accident, since this issue happens there too. I think the window captured focus after the mouse `gr` call which triggers a mouse shape change but it probably would have failed under other circumstances. fixes: #14660 closes: #12157 Signed-off-by: Yee Cheng Chin <ychin....@gmail.com> Signed-off-by: Christian Brabandt <c...@256bit.org> diff --git a/src/normal.c b/src/normal.c index b0540050a..9e617d926 100644 --- a/src/normal.c +++ b/src/normal.c @@ -417,6 +417,9 @@ normal_cmd_get_more_chars( State = MODE_REPLACE; // pretend Replace mode #ifdef CURSOR_SHAPE ui_cursor_shape(); // show different cursor shape +#endif +#ifdef FEAT_MOUSESHAPE + update_mouseshape(-1); #endif } if (lang && curbuf->b_p_iminsert == B_IMODE_LMAP) diff --git a/src/version.c b/src/version.c index 22473eb55..4f66b3de2 100644 --- a/src/version.c +++ b/src/version.c @@ -704,6 +704,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ +/**/ + 856, /**/ 855, /**/ -- -- You received this message from the "vim_dev" maillist. Do not top-post! Type your reply below the text you are replying to. For more information, visit http://www.vim.org/maillist.php --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to vim_dev+unsubscr...@googlegroups.com. To view this discussion visit https://groups.google.com/d/msgid/vim_dev/E1tAbW3-00F4rk-Dy%40256bit.org.