|
Karsten Hopp |
e85e0e |
To: vim_dev@googlegroups.com
|
|
Karsten Hopp |
e85e0e |
Subject: Patch 7.4.535
|
|
Karsten Hopp |
e85e0e |
Fcc: outbox
|
|
Karsten Hopp |
e85e0e |
From: Bram Moolenaar <Bram@moolenaar.net>
|
|
Karsten Hopp |
e85e0e |
Mime-Version: 1.0
|
|
Karsten Hopp |
e85e0e |
Content-Type: text/plain; charset=UTF-8
|
|
Karsten Hopp |
e85e0e |
Content-Transfer-Encoding: 8bit
|
|
Karsten Hopp |
e85e0e |
------------
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
Patch 7.4.535 (after 7.4.530)
|
|
Karsten Hopp |
e85e0e |
Problem: Can't build with tiny features.
|
|
Karsten Hopp |
e85e0e |
Solution: Add #ifdefs and skip a test.
|
|
Karsten Hopp |
e85e0e |
Files: src/ex_docmd.c, src/testdir/test_argument_count.in
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
*** ../vim-7.4.534/src/ex_docmd.c 2014-11-27 16:38:07.648261279 +0100
|
|
Karsten Hopp |
e85e0e |
--- src/ex_docmd.c 2014-11-27 18:12:30.874072643 +0100
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 1713,1718 ****
|
|
Karsten Hopp |
e85e0e |
--- 1713,1765 ----
|
|
Karsten Hopp |
e85e0e |
return buf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
+ #ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
e85e0e |
+ static int current_win_nr __ARGS((win_T *win));
|
|
Karsten Hopp |
e85e0e |
+ static int current_tab_nr __ARGS((tabpage_T *tab));
|
|
Karsten Hopp |
e85e0e |
+
|
|
Karsten Hopp |
e85e0e |
+ static int
|
|
Karsten Hopp |
e85e0e |
+ current_win_nr(win)
|
|
Karsten Hopp |
e85e0e |
+ win_T *win;
|
|
Karsten Hopp |
e85e0e |
+ {
|
|
Karsten Hopp |
e85e0e |
+ win_T *wp;
|
|
Karsten Hopp |
e85e0e |
+ int nr = 0;
|
|
Karsten Hopp |
e85e0e |
+
|
|
Karsten Hopp |
e85e0e |
+ for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
e85e0e |
+ {
|
|
Karsten Hopp |
e85e0e |
+ ++nr;
|
|
Karsten Hopp |
e85e0e |
+ if (wp == win)
|
|
Karsten Hopp |
e85e0e |
+ break;
|
|
Karsten Hopp |
e85e0e |
+ }
|
|
Karsten Hopp |
e85e0e |
+ return nr;
|
|
Karsten Hopp |
e85e0e |
+ }
|
|
Karsten Hopp |
e85e0e |
+
|
|
Karsten Hopp |
e85e0e |
+ static int
|
|
Karsten Hopp |
e85e0e |
+ current_tab_nr(tab)
|
|
Karsten Hopp |
e85e0e |
+ tabpage_T *tab;
|
|
Karsten Hopp |
e85e0e |
+ {
|
|
Karsten Hopp |
e85e0e |
+ tabpage_T *tp;
|
|
Karsten Hopp |
e85e0e |
+ int nr = 0;
|
|
Karsten Hopp |
e85e0e |
+
|
|
Karsten Hopp |
e85e0e |
+ for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
|
Karsten Hopp |
e85e0e |
+ {
|
|
Karsten Hopp |
e85e0e |
+ ++nr;
|
|
Karsten Hopp |
e85e0e |
+ if (tp == tab)
|
|
Karsten Hopp |
e85e0e |
+ break;
|
|
Karsten Hopp |
e85e0e |
+ }
|
|
Karsten Hopp |
e85e0e |
+ return nr;
|
|
Karsten Hopp |
e85e0e |
+ }
|
|
Karsten Hopp |
e85e0e |
+
|
|
Karsten Hopp |
e85e0e |
+ # define CURRENT_WIN_NR current_win_nr(curwin)
|
|
Karsten Hopp |
e85e0e |
+ # define LAST_WIN_NR current_win_nr(NULL)
|
|
Karsten Hopp |
e85e0e |
+ # define CURRENT_TAB_NR current_tab_nr(curtab)
|
|
Karsten Hopp |
e85e0e |
+ # define LAST_TAB_NR current_tab_nr(NULL)
|
|
Karsten Hopp |
e85e0e |
+ #else
|
|
Karsten Hopp |
e85e0e |
+ # define CURRENT_WIN_NR 1
|
|
Karsten Hopp |
e85e0e |
+ # define LAST_WIN_NR 1
|
|
Karsten Hopp |
e85e0e |
+ # define CURRENT_TAB_NR 1
|
|
Karsten Hopp |
e85e0e |
+ # define LAST_TAB_NR 1
|
|
Karsten Hopp |
e85e0e |
+ #endif
|
|
Karsten Hopp |
e85e0e |
+
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
/*
|
|
Karsten Hopp |
e85e0e |
* Execute one Ex command.
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 1765,1772 ****
|
|
Karsten Hopp |
e85e0e |
#endif
|
|
Karsten Hopp |
e85e0e |
cmdmod_T save_cmdmod;
|
|
Karsten Hopp |
e85e0e |
int ni; /* set when Not Implemented */
|
|
Karsten Hopp |
e85e0e |
- win_T *wp;
|
|
Karsten Hopp |
e85e0e |
- tabpage_T *tp;
|
|
Karsten Hopp |
e85e0e |
char_u *cmd;
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
vim_memset(&ea, 0, sizeof(ea));
|
|
Karsten Hopp |
e85e0e |
--- 1812,1817 ----
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 2085,2097 ****
|
|
Karsten Hopp |
e85e0e |
ea.line2 = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
! if (wp == curwin)
|
|
Karsten Hopp |
e85e0e |
! break;
|
|
Karsten Hopp |
e85e0e |
! }
|
|
Karsten Hopp |
e85e0e |
ea.line2 = lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
--- 2130,2136 ----
|
|
Karsten Hopp |
e85e0e |
ea.line2 = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = CURRENT_WIN_NR;
|
|
Karsten Hopp |
e85e0e |
ea.line2 = lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 2102,2114 ****
|
|
Karsten Hopp |
e85e0e |
ea.line2 = curbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for(tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
! if (tp == curtab)
|
|
Karsten Hopp |
e85e0e |
! break;
|
|
Karsten Hopp |
e85e0e |
! }
|
|
Karsten Hopp |
e85e0e |
ea.line2 = lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
--- 2141,2147 ----
|
|
Karsten Hopp |
e85e0e |
ea.line2 = curbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = CURRENT_TAB_NR;
|
|
Karsten Hopp |
e85e0e |
ea.line2 = lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4198,4205 ****
|
|
Karsten Hopp |
e85e0e |
pos_T pos;
|
|
Karsten Hopp |
e85e0e |
pos_T *fp;
|
|
Karsten Hopp |
e85e0e |
linenr_T lnum;
|
|
Karsten Hopp |
e85e0e |
- win_T *wp;
|
|
Karsten Hopp |
e85e0e |
- tabpage_T *tp;
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
cmd = skipwhite(*ptr);
|
|
Karsten Hopp |
e85e0e |
lnum = MAXLNUM;
|
|
Karsten Hopp |
e85e0e |
--- 4231,4236 ----
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4215,4227 ****
|
|
Karsten Hopp |
e85e0e |
lnum = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
! if (wp == curwin)
|
|
Karsten Hopp |
e85e0e |
! break;
|
|
Karsten Hopp |
e85e0e |
! }
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
lnum = curwin->w_arg_idx + 1;
|
|
Karsten Hopp |
e85e0e |
--- 4246,4252 ----
|
|
Karsten Hopp |
e85e0e |
lnum = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = CURRENT_WIN_NR;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
lnum = curwin->w_arg_idx + 1;
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4231,4243 ****
|
|
Karsten Hopp |
e85e0e |
lnum = curbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for(tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
! if (tp == curtab)
|
|
Karsten Hopp |
e85e0e |
! break;
|
|
Karsten Hopp |
e85e0e |
! }
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
--- 4256,4262 ----
|
|
Karsten Hopp |
e85e0e |
lnum = curbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = CURRENT_TAB_NR;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4250,4258 ****
|
|
Karsten Hopp |
e85e0e |
lnum = curbuf->b_ml.ml_line_count;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
lnum = ARGCOUNT;
|
|
Karsten Hopp |
e85e0e |
--- 4269,4275 ----
|
|
Karsten Hopp |
e85e0e |
lnum = curbuf->b_ml.ml_line_count;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = LAST_WIN_NR;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
lnum = ARGCOUNT;
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4262,4270 ****
|
|
Karsten Hopp |
e85e0e |
lnum = lastbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for(tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
--- 4279,4285 ----
|
|
Karsten Hopp |
e85e0e |
lnum = lastbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = LAST_TAB_NR;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4419,4434 ****
|
|
Karsten Hopp |
e85e0e |
switch (addr_type)
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
case ADDR_LINES:
|
|
Karsten Hopp |
e85e0e |
! lnum = curwin->w_cursor.lnum; /* "+1" is same as ".+1" */
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
! if (wp == curwin)
|
|
Karsten Hopp |
e85e0e |
! break;
|
|
Karsten Hopp |
e85e0e |
! }
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
lnum = curwin->w_arg_idx + 1;
|
|
Karsten Hopp |
e85e0e |
--- 4434,4444 ----
|
|
Karsten Hopp |
e85e0e |
switch (addr_type)
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
case ADDR_LINES:
|
|
Karsten Hopp |
e85e0e |
! /* "+1" is same as ".+1" */
|
|
Karsten Hopp |
e85e0e |
! lnum = curwin->w_cursor.lnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_WINDOWS:
|
|
Karsten Hopp |
e85e0e |
! lnum = CURRENT_WIN_NR;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_ARGUMENTS:
|
|
Karsten Hopp |
e85e0e |
lnum = curwin->w_arg_idx + 1;
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4438,4450 ****
|
|
Karsten Hopp |
e85e0e |
lnum = curbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = 0;
|
|
Karsten Hopp |
e85e0e |
! for(tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! lnum++;
|
|
Karsten Hopp |
e85e0e |
! if (tp == curtab)
|
|
Karsten Hopp |
e85e0e |
! break;
|
|
Karsten Hopp |
e85e0e |
! }
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
--- 4448,4454 ----
|
|
Karsten Hopp |
e85e0e |
lnum = curbuf->b_fnum;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
case ADDR_TABS:
|
|
Karsten Hopp |
e85e0e |
! lnum = CURRENT_TAB_NR;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4481,4489 ****
|
|
Karsten Hopp |
e85e0e |
lnum = 0;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
! c = 0;
|
|
Karsten Hopp |
e85e0e |
! for (tp = first_tabpage; tp != NULL; tp = tp->tp_next)
|
|
Karsten Hopp |
e85e0e |
! c++;
|
|
Karsten Hopp |
e85e0e |
if (lnum >= c)
|
|
Karsten Hopp |
e85e0e |
lnum = c;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
--- 4485,4491 ----
|
|
Karsten Hopp |
e85e0e |
lnum = 0;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
! c = LAST_TAB_NR;
|
|
Karsten Hopp |
e85e0e |
if (lnum >= c)
|
|
Karsten Hopp |
e85e0e |
lnum = c;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 4493,4501 ****
|
|
Karsten Hopp |
e85e0e |
lnum = 0;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
! c = 0;
|
|
Karsten Hopp |
e85e0e |
! for (wp = firstwin; wp != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
e85e0e |
! c++;
|
|
Karsten Hopp |
e85e0e |
if (lnum > c)
|
|
Karsten Hopp |
e85e0e |
lnum = c;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
--- 4495,4501 ----
|
|
Karsten Hopp |
e85e0e |
lnum = 0;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
! c = LAST_WIN_NR;
|
|
Karsten Hopp |
e85e0e |
if (lnum > c)
|
|
Karsten Hopp |
e85e0e |
lnum = c;
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 6805,6819 ****
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
/*
|
|
Karsten Hopp |
e85e0e |
! * ":quit": quit current window, quit Vim if closed the last window.
|
|
Karsten Hopp |
e85e0e |
*/
|
|
Karsten Hopp |
e85e0e |
static void
|
|
Karsten Hopp |
e85e0e |
ex_quit(eap)
|
|
Karsten Hopp |
e85e0e |
exarg_T *eap;
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
win_T *wp;
|
|
Karsten Hopp |
e85e0e |
! buf_T *buf;
|
|
Karsten Hopp |
e85e0e |
! int wnr;
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
#ifdef FEAT_CMDWIN
|
|
Karsten Hopp |
e85e0e |
if (cmdwin_type != 0)
|
|
Karsten Hopp |
e85e0e |
--- 6805,6819 ----
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
/*
|
|
Karsten Hopp |
e85e0e |
! * ":quit": quit current window, quit Vim if the last window is closed.
|
|
Karsten Hopp |
e85e0e |
*/
|
|
Karsten Hopp |
e85e0e |
static void
|
|
Karsten Hopp |
e85e0e |
ex_quit(eap)
|
|
Karsten Hopp |
e85e0e |
exarg_T *eap;
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
+ #if defined(FEAT_WINDOWS) || defined(FEAT_AUTOCMD)
|
|
Karsten Hopp |
e85e0e |
win_T *wp;
|
|
Karsten Hopp |
e85e0e |
! #endif
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
#ifdef FEAT_CMDWIN
|
|
Karsten Hopp |
e85e0e |
if (cmdwin_type != 0)
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 6828,6855 ****
|
|
Karsten Hopp |
e85e0e |
text_locked_msg();
|
|
Karsten Hopp |
e85e0e |
return;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
if (eap->addr_count > 0)
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
! wnr = eap->line2;
|
|
Karsten Hopp |
e85e0e |
! for (wp = firstwin; --wnr > 0; )
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! if (wp->w_next == NULL)
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
- else
|
|
Karsten Hopp |
e85e0e |
- wp = wp->w_next;
|
|
Karsten Hopp |
e85e0e |
- }
|
|
Karsten Hopp |
e85e0e |
- buf = wp->w_buffer;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
else
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
wp = curwin;
|
|
Karsten Hopp |
e85e0e |
! buf = curbuf;
|
|
Karsten Hopp |
e85e0e |
! }
|
|
Karsten Hopp |
e85e0e |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
e85e0e |
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
|
|
Karsten Hopp |
e85e0e |
/* Refuse to quit when locked or when the buffer in the last window is
|
|
Karsten Hopp |
e85e0e |
* being closed (can only happen in autocommands). */
|
|
Karsten Hopp |
e85e0e |
! if (curbuf_locked() || (buf->b_nwindows == 1 && buf->b_closing))
|
|
Karsten Hopp |
e85e0e |
return;
|
|
Karsten Hopp |
e85e0e |
#endif
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
--- 6828,6854 ----
|
|
Karsten Hopp |
e85e0e |
text_locked_msg();
|
|
Karsten Hopp |
e85e0e |
return;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
+ #ifdef FEAT_WINDOWS
|
|
Karsten Hopp |
e85e0e |
if (eap->addr_count > 0)
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
! int wnr = eap->line2;
|
|
Karsten Hopp |
e85e0e |
!
|
|
Karsten Hopp |
e85e0e |
! for (wp = firstwin; wp->w_next != NULL; wp = wp->w_next)
|
|
Karsten Hopp |
e85e0e |
! if (--wnr <= 0)
|
|
Karsten Hopp |
e85e0e |
break;
|
|
Karsten Hopp |
e85e0e |
}
|
|
Karsten Hopp |
e85e0e |
else
|
|
Karsten Hopp |
e85e0e |
! #endif
|
|
Karsten Hopp |
e85e0e |
! #if defined(FEAT_WINDOWS) || defined(FEAT_AUTOCMD)
|
|
Karsten Hopp |
e85e0e |
wp = curwin;
|
|
Karsten Hopp |
e85e0e |
! #endif
|
|
Karsten Hopp |
e85e0e |
!
|
|
Karsten Hopp |
e85e0e |
#ifdef FEAT_AUTOCMD
|
|
Karsten Hopp |
e85e0e |
apply_autocmds(EVENT_QUITPRE, NULL, NULL, FALSE, curbuf);
|
|
Karsten Hopp |
e85e0e |
/* Refuse to quit when locked or when the buffer in the last window is
|
|
Karsten Hopp |
e85e0e |
* being closed (can only happen in autocommands). */
|
|
Karsten Hopp |
e85e0e |
! if (curbuf_locked() || (wp->w_buffer->b_nwindows == 1
|
|
Karsten Hopp |
e85e0e |
! && wp->w_buffer->b_closing))
|
|
Karsten Hopp |
e85e0e |
return;
|
|
Karsten Hopp |
e85e0e |
#endif
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 7214,7222 ****
|
|
Karsten Hopp |
e85e0e |
ex_hide(eap)
|
|
Karsten Hopp |
e85e0e |
exarg_T *eap;
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
- win_T *win;
|
|
Karsten Hopp |
e85e0e |
- int winnr = 0;
|
|
Karsten Hopp |
e85e0e |
-
|
|
Karsten Hopp |
e85e0e |
if (*eap->arg != NUL && check_nextcmd(eap->arg) == NULL)
|
|
Karsten Hopp |
e85e0e |
eap->errmsg = e_invarg;
|
|
Karsten Hopp |
e85e0e |
else
|
|
Karsten Hopp |
e85e0e |
--- 7213,7218 ----
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 7231,7237 ****
|
|
Karsten Hopp |
e85e0e |
# endif
|
|
Karsten Hopp |
e85e0e |
if (eap->addr_count == 0)
|
|
Karsten Hopp |
e85e0e |
win_close(curwin, FALSE); /* don't free buffer */
|
|
Karsten Hopp |
e85e0e |
! else {
|
|
Karsten Hopp |
e85e0e |
for (win = firstwin; win != NULL; win = win->w_next)
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
winnr++;
|
|
Karsten Hopp |
e85e0e |
--- 7227,7237 ----
|
|
Karsten Hopp |
e85e0e |
# endif
|
|
Karsten Hopp |
e85e0e |
if (eap->addr_count == 0)
|
|
Karsten Hopp |
e85e0e |
win_close(curwin, FALSE); /* don't free buffer */
|
|
Karsten Hopp |
e85e0e |
! else
|
|
Karsten Hopp |
e85e0e |
! {
|
|
Karsten Hopp |
e85e0e |
! int winnr = 0;
|
|
Karsten Hopp |
e85e0e |
! win_T *win;
|
|
Karsten Hopp |
e85e0e |
!
|
|
Karsten Hopp |
e85e0e |
for (win = firstwin; win != NULL; win = win->w_next)
|
|
Karsten Hopp |
e85e0e |
{
|
|
Karsten Hopp |
e85e0e |
winnr++;
|
|
Karsten Hopp |
e85e0e |
*** ../vim-7.4.534/src/testdir/test_argument_count.in 2014-11-27 16:22:42.746412995 +0100
|
|
Karsten Hopp |
e85e0e |
--- src/testdir/test_argument_count.in 2014-11-27 18:21:05.568408375 +0100
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 1,6 ****
|
|
Karsten Hopp |
e85e0e |
--- 1,7 ----
|
|
Karsten Hopp |
e85e0e |
Tests for :[count]argument! and :[count]argdelete vim: set ft=vim :
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
STARTTEST
|
|
Karsten Hopp |
e85e0e |
+ :so small.vim
|
|
Karsten Hopp |
e85e0e |
:%argd
|
|
Karsten Hopp |
e85e0e |
:argadd a b c d
|
|
Karsten Hopp |
e85e0e |
:set hidden
|
|
Karsten Hopp |
e85e0e |
*** ../vim-7.4.534/src/version.c 2014-11-27 17:44:05.380820867 +0100
|
|
Karsten Hopp |
e85e0e |
--- src/version.c 2014-11-27 18:30:32.826167330 +0100
|
|
Karsten Hopp |
e85e0e |
***************
|
|
Karsten Hopp |
e85e0e |
*** 743,744 ****
|
|
Karsten Hopp |
e85e0e |
--- 743,746 ----
|
|
Karsten Hopp |
e85e0e |
{ /* Add new patch number below this line */
|
|
Karsten Hopp |
e85e0e |
+ /**/
|
|
Karsten Hopp |
e85e0e |
+ 535,
|
|
Karsten Hopp |
e85e0e |
/**/
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
--
|
|
Karsten Hopp |
e85e0e |
Mushrooms always grow in damp places and so they look like umbrellas.
|
|
Karsten Hopp |
e85e0e |
|
|
Karsten Hopp |
e85e0e |
/// Bram Moolenaar -- Bram@Moolenaar.net -- http://www.Moolenaar.net \\\
|
|
Karsten Hopp |
e85e0e |
/// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
|
|
Karsten Hopp |
e85e0e |
\\\ an exciting new programming language -- http://www.Zimbu.org ///
|
|
Karsten Hopp |
e85e0e |
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///
|