Mercurial > vim
diff src/window.c @ 6239:0cdff7c26855 v7.4.454
updated for version 7.4.454
Problem: When using a Visual selection of multiple words and doing CTRL-W_]
it jumps to the tag matching the word under the cursor, not the
selected text. (Patrick hemmer)
Solution: Do not reset Visual mode. (idea by Christian Brabandt)
author | Bram Moolenaar <bram@vim.org> |
---|---|
date | Tue, 23 Sep 2014 13:48:43 +0200 |
parents | 63121fdd093f |
children | d5eba03293a6 |
line wrap: on
line diff
--- a/src/window.c +++ b/src/window.c @@ -479,14 +479,15 @@ newwindow: case ']': case Ctrl_RSB: CHECK_CMDWIN - reset_VIsual_and_resel(); /* stop Visual mode */ + /* keep Visual mode, can select words to use as a tag */ if (Prenum) postponed_split = Prenum; else postponed_split = -1; - - /* Execute the command right here, required when - * "wincmd ]" was used in a function. */ + g_do_tagpreview = 0; + + /* Execute the command right here, required when "wincmd ]" + * was used in a function. */ do_nv_ident(Ctrl_RSB, NUL); break; @@ -590,7 +591,7 @@ wingotofile: #endif case ']': case Ctrl_RSB: - reset_VIsual_and_resel(); /* stop Visual mode */ + /* keep Visual mode, can select words to use as a tag */ if (Prenum) postponed_split = Prenum; else