| To: vim_dev@googlegroups.com |
| Subject: Patch 7.4.487 |
| Fcc: outbox |
| From: Bram Moolenaar <Bram@moolenaar.net> |
| Mime-Version: 1.0 |
| Content-Type: text/plain; charset=UTF-8 |
| Content-Transfer-Encoding: 8bit |
| |
| |
| Patch 7.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) |
| Files: src/window.c, 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/testdir/test_signs.in, |
| src/testdir/test_signs.ok |
| |
| |
| |
| |
| |
| *** 4407,4426 **** |
| buf_jump_open_win(buf) |
| buf_T *buf; |
| { |
| ! # ifdef FEAT_WINDOWS |
| ! win_T *wp; |
| |
| ! 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 |
| } |
| |
| /* |
| --- 4407,4425 ---- |
| buf_jump_open_win(buf) |
| buf_T *buf; |
| { |
| ! win_T *wp = NULL; |
| |
| ! 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); |
| # endif |
| + return wp; |
| } |
| |
| /* |
| |
| *** 4432,4443 **** |
| buf_jump_open_tab(buf) |
| buf_T *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; |
| |
| --- 4431,4440 ---- |
| buf_jump_open_tab(buf) |
| buf_T *buf; |
| { |
| + win_T *wp = buf_jump_open_win(buf); |
| # ifdef FEAT_WINDOWS |
| tabpage_T *tp; |
| |
| if (wp != NULL) |
| return wp; |
| |
| |
| *** 4455,4467 **** |
| break; |
| } |
| } |
| - |
| - return wp; |
| - # else |
| - if (curwin->w_buffer == buf) |
| - return curwin; |
| - return NULL; |
| # endif |
| } |
| #endif |
| |
| --- 4452,4459 ---- |
| break; |
| } |
| } |
| # endif |
| + return wp; |
| } |
| #endif |
| |
| |
| |
| |
| *** 46,51 **** |
| --- 46,52 ---- |
| test_mapping.out \ |
| test_options.out \ |
| test_qf_title.out \ |
| + test_signs.out \ |
| test_utf8.out |
| |
| .SUFFIXES: .in .out |
| |
| *** 179,182 **** |
| --- 180,184 ---- |
| 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 |
| |
| |
| |
| *** 45,50 **** |
| --- 45,51 ---- |
| test_mapping.out \ |
| test_options.out \ |
| test_qf_title.out \ |
| + test_signs.out \ |
| test_utf8.out |
| |
| SCRIPTS32 = test50.out test70.out |
| |
| |
| |
| *** 65,70 **** |
| --- 65,71 ---- |
| test_mapping.out \ |
| test_options.out \ |
| test_qf_title.out \ |
| + test_signs.out \ |
| test_utf8.out |
| |
| SCRIPTS32 = test50.out test70.out |
| |
| |
| |
| *** 47,52 **** |
| --- 47,53 ---- |
| test_mapping.out \ |
| test_options.out \ |
| test_qf_title.out \ |
| + test_signs.out \ |
| test_utf8.out |
| |
| .SUFFIXES: .in .out |
| |
| |
| |
| *** 106,111 **** |
| --- 106,112 ---- |
| test_mapping.out \ |
| test_options.out \ |
| test_qf_title.out \ |
| + test_signs.out \ |
| test_utf8.out |
| |
| # Known problems: |
| |
| |
| |
| *** 43,48 **** |
| --- 43,49 ---- |
| test_mapping.out \ |
| test_options.out \ |
| test_qf_title.out \ |
| + test_signs.out \ |
| test_utf8.out |
| |
| SCRIPTS_GUI = test16.out |
| |
| |
| |
| |
| --- 1,22 ---- |
| + Tests for signs |
| + STARTTEST |
| + :so small.vim |
| + :if !has("signs") |
| + : e! test.ok |
| + : wq! test.out |
| + :endif |
| + :" |
| + :sign define JumpSign text=x |
| + :exe 'sign place 42 line=2 name=JumpSign buffer=' . bufnr('') |
| + :" Split the window to the bottom to verify :sign-jump will stay in the current |
| + :" window if the buffer is displayed there |
| + :bot split |
| + :exe 'sign jump 42 buffer=' . bufnr('') |
| + :call append(line('$'), winnr()) |
| + :$-1,$w! test.out |
| + ENDTEST |
| + |
| + STARTTEST |
| + :qa! |
| + ENDTEST |
| + |
| |
| |
| |
| |
| --- 1,2 ---- |
| + |
| + 2 |
| |
| |
| |
| *** 743,744 **** |
| --- 743,746 ---- |
| { /* Add new patch number below this line */ |
| + /**/ |
| + 487, |
| /**/ |
| |
| -- |
| I'd like to meet the man who invented sex and see what he's working on now. |
| |
| /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ |
| /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ |
| \\\ an exciting new programming language -- http://www.Zimbu.org /// |
| \\\ help me help AIDS victims -- http://ICCF-Holland.org /// |