|
Karsten Hopp |
d5f1ea |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
d5f1ea |
Subject: Patch 7.3.456
|
|
Karsten Hopp |
d5f1ea |
Fcc: outbox
|
|
Karsten Hopp |
d5f1ea |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
d5f1ea |
Mime-Version: 1.0
|
|
Karsten Hopp |
d5f1ea |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
d5f1ea |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
d5f1ea |
------------
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
Patch 7.3.456
|
|
Karsten Hopp |
d5f1ea |
Problem: ":tab drop file" has several problems, including moving the
|
|
Karsten Hopp |
d5f1ea |
current window and opening a new tab for a file that already has a
|
|
Karsten Hopp |
d5f1ea |
window.
|
|
Karsten Hopp |
d5f1ea |
Solution: Refactor ":tab drop" handling. (Hirohito Higashi)
|
|
Karsten Hopp |
d5f1ea |
Files: src/buffer.c, src/testdir/test62.in, src/testdir/test62.ok
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
*** ../vim-7.3.455/src/buffer.c 2012-02-22 14:58:24.000000000 +0100
|
|
Karsten Hopp |
d5f1ea |
--- src/buffer.c 2012-02-22 19:08:34.000000000 +0100
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4405,4411 ****
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
int i;
|
|
Karsten Hopp |
d5f1ea |
win_T *wp, *wpnext;
|
|
Karsten Hopp |
d5f1ea |
! char_u *opened; /* array of flags for which args are open */
|
|
Karsten Hopp |
d5f1ea |
int opened_len; /* length of opened[] */
|
|
Karsten Hopp |
d5f1ea |
int use_firstwin = FALSE; /* use first window for arglist */
|
|
Karsten Hopp |
d5f1ea |
int split_ret = OK;
|
|
Karsten Hopp |
d5f1ea |
--- 4405,4416 ----
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
int i;
|
|
Karsten Hopp |
d5f1ea |
win_T *wp, *wpnext;
|
|
Karsten Hopp |
d5f1ea |
! char_u *opened; /* Array of weight for which args are open:
|
|
Karsten Hopp |
d5f1ea |
! * 0: not opened
|
|
Karsten Hopp |
d5f1ea |
! * 1: opened in other tab
|
|
Karsten Hopp |
d5f1ea |
! * 2: opened in curtab
|
|
Karsten Hopp |
d5f1ea |
! * 3: opened in curtab and curwin
|
|
Karsten Hopp |
d5f1ea |
! */
|
|
Karsten Hopp |
d5f1ea |
int opened_len; /* length of opened[] */
|
|
Karsten Hopp |
d5f1ea |
int use_firstwin = FALSE; /* use first window for arglist */
|
|
Karsten Hopp |
d5f1ea |
int split_ret = OK;
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4414,4419 ****
|
|
Karsten Hopp |
d5f1ea |
--- 4419,4426 ----
|
|
Karsten Hopp |
d5f1ea |
buf_T *buf;
|
|
Karsten Hopp |
d5f1ea |
tabpage_T *tpnext;
|
|
Karsten Hopp |
d5f1ea |
int had_tab = cmdmod.tab;
|
|
Karsten Hopp |
d5f1ea |
+ win_T *old_curwin, *last_curwin;
|
|
Karsten Hopp |
d5f1ea |
+ tabpage_T *old_curtab, *last_curtab;
|
|
Karsten Hopp |
d5f1ea |
win_T *new_curwin = NULL;
|
|
Karsten Hopp |
d5f1ea |
tabpage_T *new_curtab = NULL;
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4430,4435 ****
|
|
Karsten Hopp |
d5f1ea |
--- 4437,4451 ----
|
|
Karsten Hopp |
d5f1ea |
if (opened == NULL)
|
|
Karsten Hopp |
d5f1ea |
return;
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
+ /* Autocommands may do anything to the argument list. Make sure it's not
|
|
Karsten Hopp |
d5f1ea |
+ * freed while we are working here by "locking" it. We still have to
|
|
Karsten Hopp |
d5f1ea |
+ * watch out for its size to be changed. */
|
|
Karsten Hopp |
d5f1ea |
+ alist = curwin->w_alist;
|
|
Karsten Hopp |
d5f1ea |
+ ++alist->al_refcount;
|
|
Karsten Hopp |
d5f1ea |
+
|
|
Karsten Hopp |
d5f1ea |
+ old_curwin = curwin;
|
|
Karsten Hopp |
d5f1ea |
+ old_curtab = curtab;
|
|
Karsten Hopp |
d5f1ea |
+
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_GUI
|
|
Karsten Hopp |
d5f1ea |
need_mouse_correct = TRUE;
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4451,4486 ****
|
|
Karsten Hopp |
d5f1ea |
wpnext = wp->w_next;
|
|
Karsten Hopp |
d5f1ea |
buf = wp->w_buffer;
|
|
Karsten Hopp |
d5f1ea |
if (buf->b_ffname == NULL
|
|
Karsten Hopp |
d5f1ea |
! || buf->b_nwindows > 1
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
d5f1ea |
|| wp->w_width != Columns
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
)
|
|
Karsten Hopp |
d5f1ea |
! i = ARGCOUNT;
|
|
Karsten Hopp |
d5f1ea |
else
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
/* check if the buffer in this window is in the arglist */
|
|
Karsten Hopp |
d5f1ea |
! for (i = 0; i < ARGCOUNT; ++i)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! if (ARGLIST[i].ae_fnum == buf->b_fnum
|
|
Karsten Hopp |
d5f1ea |
! || fullpathcmp(alist_name(&ARGLIST[i]),
|
|
Karsten Hopp |
d5f1ea |
! buf->b_ffname, TRUE) & FPC_SAME)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! if (i < opened_len)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! opened[i] = TRUE;
|
|
Karsten Hopp |
d5f1ea |
if (i == 0)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
new_curwin = wp;
|
|
Karsten Hopp |
d5f1ea |
new_curtab = curtab;
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
! if (wp->w_alist != curwin->w_alist)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
/* Use the current argument list for all windows
|
|
Karsten Hopp |
d5f1ea |
* containing a file from it. */
|
|
Karsten Hopp |
d5f1ea |
alist_unlink(wp->w_alist);
|
|
Karsten Hopp |
d5f1ea |
! wp->w_alist = curwin->w_alist;
|
|
Karsten Hopp |
d5f1ea |
++wp->w_alist->al_refcount;
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
break;
|
|
Karsten Hopp |
d5f1ea |
--- 4467,4517 ----
|
|
Karsten Hopp |
d5f1ea |
wpnext = wp->w_next;
|
|
Karsten Hopp |
d5f1ea |
buf = wp->w_buffer;
|
|
Karsten Hopp |
d5f1ea |
if (buf->b_ffname == NULL
|
|
Karsten Hopp |
d5f1ea |
! || (!keep_tabs && buf->b_nwindows > 1)
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_VERTSPLIT
|
|
Karsten Hopp |
d5f1ea |
|| wp->w_width != Columns
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
)
|
|
Karsten Hopp |
d5f1ea |
! i = opened_len;
|
|
Karsten Hopp |
d5f1ea |
else
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
/* check if the buffer in this window is in the arglist */
|
|
Karsten Hopp |
d5f1ea |
! for (i = 0; i < opened_len; ++i)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! if (i < alist->al_ga.ga_len
|
|
Karsten Hopp |
d5f1ea |
! && (AARGLIST(alist)[i].ae_fnum == buf->b_fnum
|
|
Karsten Hopp |
d5f1ea |
! || fullpathcmp(alist_name(&AARGLIST(alist)[i]),
|
|
Karsten Hopp |
d5f1ea |
! buf->b_ffname, TRUE) & FPC_SAME))
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! int weight = 1;
|
|
Karsten Hopp |
d5f1ea |
!
|
|
Karsten Hopp |
d5f1ea |
! if (old_curtab == curtab)
|
|
Karsten Hopp |
d5f1ea |
! {
|
|
Karsten Hopp |
d5f1ea |
! ++weight;
|
|
Karsten Hopp |
d5f1ea |
! if (old_curwin == wp)
|
|
Karsten Hopp |
d5f1ea |
! ++weight;
|
|
Karsten Hopp |
d5f1ea |
! }
|
|
Karsten Hopp |
d5f1ea |
!
|
|
Karsten Hopp |
d5f1ea |
! if (weight > (int)opened[i])
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! opened[i] = (char_u)weight;
|
|
Karsten Hopp |
d5f1ea |
if (i == 0)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
+ if (new_curwin != NULL)
|
|
Karsten Hopp |
d5f1ea |
+ new_curwin->w_arg_idx = opened_len;
|
|
Karsten Hopp |
d5f1ea |
new_curwin = wp;
|
|
Karsten Hopp |
d5f1ea |
new_curtab = curtab;
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
! else if (keep_tabs)
|
|
Karsten Hopp |
d5f1ea |
! i = opened_len;
|
|
Karsten Hopp |
d5f1ea |
!
|
|
Karsten Hopp |
d5f1ea |
! if (wp->w_alist != alist)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
/* Use the current argument list for all windows
|
|
Karsten Hopp |
d5f1ea |
* containing a file from it. */
|
|
Karsten Hopp |
d5f1ea |
alist_unlink(wp->w_alist);
|
|
Karsten Hopp |
d5f1ea |
! wp->w_alist = alist;
|
|
Karsten Hopp |
d5f1ea |
++wp->w_alist->al_refcount;
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
break;
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4489,4495 ****
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
wp->w_arg_idx = i;
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
! if (i == ARGCOUNT && !keep_tabs) /* close this window */
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
if (P_HID(buf) || forceit || buf->b_nwindows > 1
|
|
Karsten Hopp |
d5f1ea |
|| !bufIsChanged(buf))
|
|
Karsten Hopp |
d5f1ea |
--- 4520,4526 ----
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
wp->w_arg_idx = i;
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
! if (i == opened_len && !keep_tabs)/* close this window */
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
if (P_HID(buf) || forceit || buf->b_nwindows > 1
|
|
Karsten Hopp |
d5f1ea |
|| !bufIsChanged(buf))
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4511,4517 ****
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
d5f1ea |
/* don't close last window */
|
|
Karsten Hopp |
d5f1ea |
! if (firstwin == lastwin && first_tabpage->tp_next == NULL)
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
use_firstwin = TRUE;
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
d5f1ea |
--- 4542,4549 ----
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
d5f1ea |
/* don't close last window */
|
|
Karsten Hopp |
d5f1ea |
! if (firstwin == lastwin
|
|
Karsten Hopp |
d5f1ea |
! && (first_tabpage->tp_next == NULL || !had_tab))
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
use_firstwin = TRUE;
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4545,4564 ****
|
|
Karsten Hopp |
d5f1ea |
* Open a window for files in the argument list that don't have one.
|
|
Karsten Hopp |
d5f1ea |
* ARGCOUNT may change while doing this, because of autocommands.
|
|
Karsten Hopp |
d5f1ea |
*/
|
|
Karsten Hopp |
d5f1ea |
! if (count > ARGCOUNT || count <= 0)
|
|
Karsten Hopp |
d5f1ea |
! count = ARGCOUNT;
|
|
Karsten Hopp |
d5f1ea |
!
|
|
Karsten Hopp |
d5f1ea |
! /* Autocommands may do anything to the argument list. Make sure it's not
|
|
Karsten Hopp |
d5f1ea |
! * freed while we are working here by "locking" it. We still have to
|
|
Karsten Hopp |
d5f1ea |
! * watch out for its size to be changed. */
|
|
Karsten Hopp |
d5f1ea |
! alist = curwin->w_alist;
|
|
Karsten Hopp |
d5f1ea |
! ++alist->al_refcount;
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
d5f1ea |
/* Don't execute Win/Buf Enter/Leave autocommands here. */
|
|
Karsten Hopp |
d5f1ea |
++autocmd_no_enter;
|
|
Karsten Hopp |
d5f1ea |
++autocmd_no_leave;
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
win_enter(lastwin, FALSE);
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
d5f1ea |
/* ":drop all" should re-use an empty window to avoid "--remote-tab"
|
|
Karsten Hopp |
d5f1ea |
--- 4577,4592 ----
|
|
Karsten Hopp |
d5f1ea |
* Open a window for files in the argument list that don't have one.
|
|
Karsten Hopp |
d5f1ea |
* ARGCOUNT may change while doing this, because of autocommands.
|
|
Karsten Hopp |
d5f1ea |
*/
|
|
Karsten Hopp |
d5f1ea |
! if (count > opened_len || count <= 0)
|
|
Karsten Hopp |
d5f1ea |
! count = opened_len;
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
d5f1ea |
/* Don't execute Win/Buf Enter/Leave autocommands here. */
|
|
Karsten Hopp |
d5f1ea |
++autocmd_no_enter;
|
|
Karsten Hopp |
d5f1ea |
++autocmd_no_leave;
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
+ last_curwin = curwin;
|
|
Karsten Hopp |
d5f1ea |
+ last_curtab = curtab;
|
|
Karsten Hopp |
d5f1ea |
win_enter(lastwin, FALSE);
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
d5f1ea |
/* ":drop all" should re-use an empty window to avoid "--remote-tab"
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4568,4578 ****
|
|
Karsten Hopp |
d5f1ea |
use_firstwin = TRUE;
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
! for (i = 0; i < count && i < alist->al_ga.ga_len && !got_int; ++i)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
if (alist == &global_alist && i == global_alist.al_ga.ga_len - 1)
|
|
Karsten Hopp |
d5f1ea |
arg_had_last = TRUE;
|
|
Karsten Hopp |
d5f1ea |
! if (i < opened_len && opened[i])
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
/* Move the already present window to below the current window */
|
|
Karsten Hopp |
d5f1ea |
if (curwin->w_arg_idx != i)
|
|
Karsten Hopp |
d5f1ea |
--- 4596,4606 ----
|
|
Karsten Hopp |
d5f1ea |
use_firstwin = TRUE;
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
! for (i = 0; i < count && i < opened_len && !got_int; ++i)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
if (alist == &global_alist && i == global_alist.al_ga.ga_len - 1)
|
|
Karsten Hopp |
d5f1ea |
arg_had_last = TRUE;
|
|
Karsten Hopp |
d5f1ea |
! if (opened[i] > 0)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
/* Move the already present window to below the current window */
|
|
Karsten Hopp |
d5f1ea |
if (curwin->w_arg_idx != i)
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4581,4587 ****
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
if (wpnext->w_arg_idx == i)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! win_move_after(wpnext, curwin);
|
|
Karsten Hopp |
d5f1ea |
break;
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
--- 4609,4621 ----
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
if (wpnext->w_arg_idx == i)
|
|
Karsten Hopp |
d5f1ea |
{
|
|
Karsten Hopp |
d5f1ea |
! if (keep_tabs)
|
|
Karsten Hopp |
d5f1ea |
! {
|
|
Karsten Hopp |
d5f1ea |
! new_curwin = wpnext;
|
|
Karsten Hopp |
d5f1ea |
! new_curtab = curtab;
|
|
Karsten Hopp |
d5f1ea |
! }
|
|
Karsten Hopp |
d5f1ea |
! else
|
|
Karsten Hopp |
d5f1ea |
! win_move_after(wpnext, curwin);
|
|
Karsten Hopp |
d5f1ea |
break;
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
}
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 4636,4641 ****
|
|
Karsten Hopp |
d5f1ea |
--- 4670,4683 ----
|
|
Karsten Hopp |
d5f1ea |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
d5f1ea |
--autocmd_no_enter;
|
|
Karsten Hopp |
d5f1ea |
#endif
|
|
Karsten Hopp |
d5f1ea |
+ /* restore last referenced tabpage's curwin */
|
|
Karsten Hopp |
d5f1ea |
+ if (last_curtab != new_curtab)
|
|
Karsten Hopp |
d5f1ea |
+ {
|
|
Karsten Hopp |
d5f1ea |
+ if (valid_tabpage(last_curtab))
|
|
Karsten Hopp |
d5f1ea |
+ goto_tabpage_tp(last_curtab);
|
|
Karsten Hopp |
d5f1ea |
+ if (win_valid(last_curwin))
|
|
Karsten Hopp |
d5f1ea |
+ win_enter(last_curwin, FALSE);
|
|
Karsten Hopp |
d5f1ea |
+ }
|
|
Karsten Hopp |
d5f1ea |
/* to window with first arg */
|
|
Karsten Hopp |
d5f1ea |
if (valid_tabpage(new_curtab))
|
|
Karsten Hopp |
d5f1ea |
goto_tabpage_tp(new_curtab);
|
|
Karsten Hopp |
d5f1ea |
*** ../vim-7.3.455/src/testdir/test62.in 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
d5f1ea |
--- src/testdir/test62.in 2012-02-22 18:45:10.000000000 +0100
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 50,55 ****
|
|
Karsten Hopp |
d5f1ea |
--- 50,92 ----
|
|
Karsten Hopp |
d5f1ea |
:call append(line('$'), test_status)
|
|
Karsten Hopp |
d5f1ea |
:"
|
|
Karsten Hopp |
d5f1ea |
:"
|
|
Karsten Hopp |
d5f1ea |
+ :" Test for ":tab drop exist-file" to keep current window.
|
|
Karsten Hopp |
d5f1ea |
+ :sp test1
|
|
Karsten Hopp |
d5f1ea |
+ :tab drop test1
|
|
Karsten Hopp |
d5f1ea |
+ :let test_status = 'tab drop 1: fail'
|
|
Karsten Hopp |
d5f1ea |
+ :if tabpagenr('$') == 1 && winnr('$') == 2 && winnr() == 1
|
|
Karsten Hopp |
d5f1ea |
+ : let test_status = 'tab drop 1: pass'
|
|
Karsten Hopp |
d5f1ea |
+ :endif
|
|
Karsten Hopp |
d5f1ea |
+ :close
|
|
Karsten Hopp |
d5f1ea |
+ :call append(line('$'), test_status)
|
|
Karsten Hopp |
d5f1ea |
+ :"
|
|
Karsten Hopp |
d5f1ea |
+ :"
|
|
Karsten Hopp |
d5f1ea |
+ :" Test for ":tab drop new-file" to keep current window of tabpage 1.
|
|
Karsten Hopp |
d5f1ea |
+ :split
|
|
Karsten Hopp |
d5f1ea |
+ :tab drop newfile
|
|
Karsten Hopp |
d5f1ea |
+ :let test_status = 'tab drop 2: fail'
|
|
Karsten Hopp |
d5f1ea |
+ :if tabpagenr('$') == 2 && tabpagewinnr(1, '$') == 2 && tabpagewinnr(1) == 1
|
|
Karsten Hopp |
d5f1ea |
+ : let test_status = 'tab drop 2: pass'
|
|
Karsten Hopp |
d5f1ea |
+ :endif
|
|
Karsten Hopp |
d5f1ea |
+ :tabclose
|
|
Karsten Hopp |
d5f1ea |
+ :q
|
|
Karsten Hopp |
d5f1ea |
+ :call append(line('$'), test_status)
|
|
Karsten Hopp |
d5f1ea |
+ :"
|
|
Karsten Hopp |
d5f1ea |
+ :"
|
|
Karsten Hopp |
d5f1ea |
+ :" Test for ":tab drop multi-opend-file" to keep current tabpage and window.
|
|
Karsten Hopp |
d5f1ea |
+ :new test1
|
|
Karsten Hopp |
d5f1ea |
+ :tabnew
|
|
Karsten Hopp |
d5f1ea |
+ :new test1
|
|
Karsten Hopp |
d5f1ea |
+ :tab drop test1
|
|
Karsten Hopp |
d5f1ea |
+ :let test_status = 'tab drop 3: fail'
|
|
Karsten Hopp |
d5f1ea |
+ :if tabpagenr() == 2 && tabpagewinnr(2, '$') == 2 && tabpagewinnr(2) == 1
|
|
Karsten Hopp |
d5f1ea |
+ : let test_status = 'tab drop 3: pass'
|
|
Karsten Hopp |
d5f1ea |
+ :endif
|
|
Karsten Hopp |
d5f1ea |
+ :tabclose
|
|
Karsten Hopp |
d5f1ea |
+ :q
|
|
Karsten Hopp |
d5f1ea |
+ :call append(line('$'), test_status)
|
|
Karsten Hopp |
d5f1ea |
+ :"
|
|
Karsten Hopp |
d5f1ea |
+ :"
|
|
Karsten Hopp |
d5f1ea |
:/^Results/,$w! test.out
|
|
Karsten Hopp |
d5f1ea |
:qa!
|
|
Karsten Hopp |
d5f1ea |
ENDTEST
|
|
Karsten Hopp |
d5f1ea |
*** ../vim-7.3.455/src/testdir/test62.ok 2010-08-15 21:57:29.000000000 +0200
|
|
Karsten Hopp |
d5f1ea |
--- src/testdir/test62.ok 2012-02-22 18:45:10.000000000 +0100
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 5,7 ****
|
|
Karsten Hopp |
d5f1ea |
--- 5,10 ----
|
|
Karsten Hopp |
d5f1ea |
this is tab page 4
|
|
Karsten Hopp |
d5f1ea |
gettabvar: pass
|
|
Karsten Hopp |
d5f1ea |
settabvar: pass
|
|
Karsten Hopp |
d5f1ea |
+ tab drop 1: pass
|
|
Karsten Hopp |
d5f1ea |
+ tab drop 2: pass
|
|
Karsten Hopp |
d5f1ea |
+ tab drop 3: pass
|
|
Karsten Hopp |
d5f1ea |
*** ../vim-7.3.455/src/version.c 2012-02-22 18:29:29.000000000 +0100
|
|
Karsten Hopp |
d5f1ea |
--- src/version.c 2012-02-22 19:11:52.000000000 +0100
|
|
Karsten Hopp |
d5f1ea |
***************
|
|
Karsten Hopp |
d5f1ea |
*** 716,717 ****
|
|
Karsten Hopp |
d5f1ea |
--- 716,719 ----
|
|
Karsten Hopp |
d5f1ea |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
d5f1ea |
+ /**/
|
|
Karsten Hopp |
d5f1ea |
+ 456,
|
|
Karsten Hopp |
d5f1ea |
/**/
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
--
|
|
Karsten Hopp |
d5f1ea |
% cat /usr/include/life.h
|
|
Karsten Hopp |
d5f1ea |
void life(void);
|
|
Karsten Hopp |
d5f1ea |
|
|
Karsten Hopp |
d5f1ea |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
d5f1ea |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
d5f1ea |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
d5f1ea |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|