To: vim-dev@vim.org Subject: Patch 7.2a.016 Fcc: outbox From: Bram Moolenaar Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 8bit ------------ Patch 7.2a.016 Problem: Using CTRL-W v in the quickfix window results in two quickfix windows, which is not allowed. ":tab split" should be allowed to open a new quickfix window in another tab. Solution: For CTRL-W v instead of splitting the window open a new one. When using ":tab" do allow splitting the quickfix window (was already included in patch 7.2a.013). Files: src/window.c *** ../vim-7.2a.015/src/window.c Tue Jun 24 22:17:40 2008 --- src/window.c Mon Jul 7 21:11:36 2008 *************** *** 149,160 **** case Ctrl_V: case 'v': CHECK_CMDWIN ! #ifdef FEAT_VISUAL reset_VIsual_and_resel(); /* stop Visual mode */ ! #endif ! #ifdef FEAT_GUI need_mouse_correct = TRUE; ! #endif win_split((int)Prenum, WSP_VERT); break; #endif --- 149,166 ---- case Ctrl_V: case 'v': CHECK_CMDWIN ! # ifdef FEAT_VISUAL reset_VIsual_and_resel(); /* stop Visual mode */ ! # endif ! # ifdef FEAT_QUICKFIX ! /* When splitting the quickfix window open a new buffer in it, ! * don't replicate the quickfix buffer. */ ! if (bt_quickfix(curbuf)) ! goto newwindow; ! # endif ! # ifdef FEAT_GUI need_mouse_correct = TRUE; ! # endif win_split((int)Prenum, WSP_VERT); break; #endif *************** *** 168,174 **** #endif STRCPY(cbuf, "split #"); if (Prenum) ! sprintf((char *)cbuf + 7, "%ld", Prenum); do_cmdline_cmd(cbuf); break; --- 174,181 ---- #endif STRCPY(cbuf, "split #"); if (Prenum) ! vim_snprintf((char *)cbuf + 7, sizeof(cbuf) - 7, ! "%ld", Prenum); do_cmdline_cmd(cbuf); break; *************** *** 183,191 **** newwindow: #endif if (Prenum) ! sprintf((char *)cbuf, "%ld", Prenum); /* window height */ else cbuf[0] = NUL; STRCAT(cbuf, "new"); do_cmdline_cmd(cbuf); break; --- 190,203 ---- newwindow: #endif if (Prenum) ! /* window height */ ! vim_snprintf((char *)cbuf, sizeof(cbuf) - 5, "%ld", Prenum); else cbuf[0] = NUL; + #if defined(FEAT_VERTSPLIT) && defined(FEAT_QUICKFIX) + if (nchar == 'v' || nchar == Ctrl_V) + STRCAT(cbuf, "v"); + #endif STRCAT(cbuf, "new"); do_cmdline_cmd(cbuf); break; *** ../vim-7.2a.015/src/version.c Sun Jul 6 19:15:18 2008 --- src/version.c Mon Jul 7 20:56:36 2008 *************** *** 678,679 **** --- 678,681 ---- { /* Add new patch number below this line */ + /**/ + 16, /**/ -- hundred-and-one symptoms of being an internet addict: 173. You keep tracking down the email addresses of all your friends (even childhood friends). /// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\ /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\ \\\ download, build and distribute -- http://www.A-A-P.org /// \\\ help me help AIDS victims -- http://ICCF-Holland.org ///