On Wed, Sep 24, 2014 at 01:27:23PM +0200, Bram Moolenaar wrote:
> 
> Patch 7.4.460 (after 7.4.454)
> Problem:    Can't build without the quickfix feature. (Erik Falor)
> Solution:   Add a #ifdef.
> Files:            src/window.c
> 
> 
> *** ../vim-7.4.459/src/window.c       2014-09-23 13:48:40.054785798 +0200
> --- src/window.c      2014-09-24 13:24:27.318971352 +0200
> ***************
> *** 484,490 ****
> --- 484,492 ----
>                   postponed_split = Prenum;
>               else
>                   postponed_split = -1;
> + #ifdef FEAT_QUICKFIX
>               g_do_tagpreview = 0;
> + #endif

Apparently, I just can't let this patch go...

I discovered that setting 'g_do_tagpreview = 0' here makes CTRL-W_}
not open a tag preview window; it merely splits into another ordinary
window. If you look at the region of window.c just before the above
patch you find that the preceding case statement intentionally falls
through into the code shown here, and the value just barely stored
into g_do_tagpreview gets zeroed out.

I wonder whether the assignment to g_do_tagpreview should have been
there in the first place.

The problem patch 7.4.454 intends to fix is described like so:

"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."

Removing the assignment to g_do_tagpreview solves both my problem with
CTRL-W_} as well as the original reporter's problem with CTRL-W_] in
visual mode.

--- a/src/window.c
+++ b/src/window.c
@@ -484,9 +484,6 @@
                    postponed_split = Prenum;
                else
                    postponed_split = -1;
-#ifdef FEAT_QUICKFIX
-               g_do_tagpreview = 0;
-#endif



-- 
Erik Falor
Registered Linux User #445632                  http://linuxcounter.net

Attachment: pgpYVfZbwSt3U.pgp
Description: PGP signature

Raspunde prin e-mail lui