updated for version 7.4.487 v7.4.487
authorBram Moolenaar <Bram@vim.org>
Tue, 21 Oct 2014 18:57:15 +0000 (20:57 +0200)
committerBram Moolenaar <Bram@vim.org>
Tue, 21 Oct 2014 18:57:15 +0000 (20:57 +0200)
Problem:    ":sign jump" may use another window even though the file is
            already edited in the current window.
Solution:   First check if the file is in the current window. (James McCoy)

src/testdir/Make_amiga.mak
src/testdir/Make_dos.mak
src/testdir/Make_ming.mak
src/testdir/Make_os2.mak
src/testdir/Make_vms.mms
src/testdir/Makefile
src/version.c
src/window.c

index c0df2c1b56229103b0db7f2e4b03c4a321394ede..58316fc7f25b0d042690ce3135888b171bc26756 100644 (file)
@@ -46,6 +46,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_mapping.out \
                test_options.out \
                test_qf_title.out \
+               test_signs.out \
                test_utf8.out
 
 .SUFFIXES: .in .out
@@ -179,4 +180,5 @@ test_listlbr.out: test_listlbr.in
 test_listlbr_utf8.out: test_listlbr_utf8.in
 test_options.out: test_options.in
 test_qf_title.out: test_qf_title.in
+test_signs.out: test_signs.in
 test_utf8.out: test_utf8.in
index 91500439fda156abc9e999791d793d42314c5fb3..abcabce03eb526630942924c638b62733b27e89c 100644 (file)
@@ -45,6 +45,7 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_mapping.out \
                test_options.out \
                test_qf_title.out \
+               test_signs.out \
                test_utf8.out
 
 SCRIPTS32 =    test50.out test70.out
index 247c0f259d253b658fbd2f6fa77c288fcbe04474..2a124b1b8310871464cfd8919b74ce49f038ea27 100644 (file)
@@ -65,6 +65,7 @@ SCRIPTS =     test3.out test4.out test5.out test6.out test7.out \
                test_mapping.out \
                test_options.out \
                test_qf_title.out \
+               test_signs.out \
                test_utf8.out
 
 SCRIPTS32 =    test50.out test70.out
index cfade3f7f7d6b2b15bafbd713982b61f9a9230a3..5f3dc139303be0c5d1a873ec0fab44aba3d38398 100644 (file)
@@ -47,6 +47,7 @@ SCRIPTS = test1.out test3.out test4.out test5.out test6.out \
                test_mapping.out \
                test_options.out \
                test_qf_title.out \
+               test_signs.out \
                test_utf8.out
 
 .SUFFIXES: .in .out
index 6483b7ce3ab00e1638d48d6e7919c03fd9b2c5c2..e105376baf76df03a91853402d3f62183aafe055 100644 (file)
@@ -106,6 +106,7 @@ SCRIPT = test1.out  test2.out  test3.out  test4.out  test5.out  \
         test_mapping.out \
         test_options.out \
         test_qf_title.out \
+        test_signs.out \
         test_utf8.out
 
 # Known problems:
index 41f25cfbd14298546e38284bbc9025308a5936e4..6b3bf9b7e1adda3d1c2d1a7affa22f6b1174fe0e 100644 (file)
@@ -43,6 +43,7 @@ SCRIPTS = test1.out test2.out test3.out test4.out test5.out test6.out \
                test_mapping.out \
                test_options.out \
                test_qf_title.out \
+               test_signs.out \
                test_utf8.out
 
 SCRIPTS_GUI = test16.out
index c470959c6892ffb4098592f9f66d2fa120f0ac5f..b6f750cdcca23bcd3cab8d3c3b95da523890b1a3 100644 (file)
@@ -741,6 +741,8 @@ static char *(features[]) =
 
 static int included_patches[] =
 {   /* Add new patch number below this line */
+/**/
+    487,
 /**/
     486,
 /**/
index fda9199b2e3802eeaaaefbff6c99317b95e44098..b975a614207f96a81752890c388e06b6f7663729 100644 (file)
@@ -4407,20 +4407,19 @@ win_enter_ext(wp, undo_sync, curwin_invalid, trigger_enter_autocmds, trigger_lea
 buf_jump_open_win(buf)
     buf_T      *buf;
 {
-# ifdef FEAT_WINDOWS
-    win_T      *wp;
+    win_T      *wp = NULL;
 
-    for (wp = firstwin; wp != NULL; wp = wp->w_next)
-       if (wp->w_buffer == buf)
-           break;
+    if (curwin->w_buffer == buf)
+       wp = curwin;
+# ifdef FEAT_WINDOWS
+    else
+       for (wp = firstwin; wp != NULL; wp = wp->w_next)
+           if (wp->w_buffer == buf)
+               break;
     if (wp != NULL)
        win_enter(wp, FALSE);
-    return wp;
-# else
-    if (curwin->w_buffer == buf)
-       return curwin;
-    return NULL;
 # endif
+    return wp;
 }
 
 /*
@@ -4432,12 +4431,10 @@ buf_jump_open_win(buf)
 buf_jump_open_tab(buf)
     buf_T      *buf;
 {
+    win_T      *wp = buf_jump_open_win(buf);
 # ifdef FEAT_WINDOWS
-    win_T      *wp;
     tabpage_T  *tp;
 
-    /* First try the current tab page. */
-    wp = buf_jump_open_win(buf);
     if (wp != NULL)
        return wp;
 
@@ -4455,13 +4452,8 @@ buf_jump_open_tab(buf)
                break;
            }
        }
-
-    return wp;
-# else
-    if (curwin->w_buffer == buf)
-       return curwin;
-    return NULL;
 # endif
+    return wp;
 }
 #endif