diff options
author | Bram Moolenaar <Bram@vim.org> | 2014-10-21 20:57:15 +0200 |
---|---|---|
committer | Bram Moolenaar <Bram@vim.org> | 2014-10-21 20:57:15 +0200 |
commit | 482a2b5c9d53fa7ae44a64bbbfa0bae868cbe4a0 (patch) | |
tree | 2111ced8150aaec28ad6434cec217d9df294f52f /src | |
parent | 958636c40619a9f8c3d10e9f76a7f634dd11d13b (diff) |
updated for version 7.4.487v7.4.487
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)
Diffstat (limited to 'src')
-rw-r--r-- | src/testdir/Make_amiga.mak | 2 | ||||
-rw-r--r-- | src/testdir/Make_dos.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_ming.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_os2.mak | 1 | ||||
-rw-r--r-- | src/testdir/Make_vms.mms | 1 | ||||
-rw-r--r-- | src/testdir/Makefile | 1 | ||||
-rw-r--r-- | src/version.c | 2 | ||||
-rw-r--r-- | src/window.c | 30 |
8 files changed, 20 insertions, 19 deletions
diff --git a/src/testdir/Make_amiga.mak b/src/testdir/Make_amiga.mak index c0df2c1b56..58316fc7f2 100644 --- a/src/testdir/Make_amiga.mak +++ b/src/testdir/Make_amiga.mak @@ -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 diff --git a/src/testdir/Make_dos.mak b/src/testdir/Make_dos.mak index 91500439fd..abcabce03e 100644 --- a/src/testdir/Make_dos.mak +++ b/src/testdir/Make_dos.mak @@ -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 diff --git a/src/testdir/Make_ming.mak b/src/testdir/Make_ming.mak index 247c0f259d..2a124b1b83 100644 --- a/src/testdir/Make_ming.mak +++ b/src/testdir/Make_ming.mak @@ -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 diff --git a/src/testdir/Make_os2.mak b/src/testdir/Make_os2.mak index cfade3f7f7..5f3dc13930 100644 --- a/src/testdir/Make_os2.mak +++ b/src/testdir/Make_os2.mak @@ -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 diff --git a/src/testdir/Make_vms.mms b/src/testdir/Make_vms.mms index 6483b7ce3a..e105376baf 100644 --- a/src/testdir/Make_vms.mms +++ b/src/testdir/Make_vms.mms @@ -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: diff --git a/src/testdir/Makefile b/src/testdir/Makefile index 41f25cfbd1..6b3bf9b7e1 100644 --- a/src/testdir/Makefile +++ b/src/testdir/Makefile @@ -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 diff --git a/src/version.c b/src/version.c index c470959c68..b6f750cdcc 100644 --- a/src/version.c +++ b/src/version.c @@ -742,6 +742,8 @@ static char *(features[]) = static int included_patches[] = { /* Add new patch number below this line */ /**/ + 487, +/**/ 486, /**/ 485, diff --git a/src/window.c b/src/window.c index fda9199b2e..b975a61420 100644 --- a/src/window.c +++ b/src/window.c @@ -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 |