mirror of
https://github.com/vim/vim.git
synced 2025-09-26 04:04:07 -04:00
updated for version 7.2-048
This commit is contained in:
@@ -18146,14 +18146,17 @@ get_vim_var_list(idx)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Set v:count, v:count1 and v:prevcount.
|
* Set v:count to "count" and v:count1 to "count1".
|
||||||
|
* When "set_prevcount" is TRUE first set v:prevcount from v:count.
|
||||||
*/
|
*/
|
||||||
void
|
void
|
||||||
set_vcount(count, count1)
|
set_vcount(count, count1, set_prevcount)
|
||||||
long count;
|
long count;
|
||||||
long count1;
|
long count1;
|
||||||
|
int set_prevcount;
|
||||||
{
|
{
|
||||||
vimvars[VV_PREVCOUNT].vv_nr = vimvars[VV_COUNT].vv_nr;
|
if (set_prevcount)
|
||||||
|
vimvars[VV_PREVCOUNT].vv_nr = vimvars[VV_COUNT].vv_nr;
|
||||||
vimvars[VV_COUNT].vv_nr = count;
|
vimvars[VV_COUNT].vv_nr = count;
|
||||||
vimvars[VV_COUNT1].vv_nr = count1;
|
vimvars[VV_COUNT1].vv_nr = count1;
|
||||||
}
|
}
|
||||||
|
20
src/normal.c
20
src/normal.c
@@ -580,6 +580,9 @@ normal_cmd(oap, toplevel)
|
|||||||
static int old_mapped_len = 0;
|
static int old_mapped_len = 0;
|
||||||
#endif
|
#endif
|
||||||
int idx;
|
int idx;
|
||||||
|
#ifdef FEAT_EVAL
|
||||||
|
int set_prevcount = FALSE;
|
||||||
|
#endif
|
||||||
|
|
||||||
vim_memset(&ca, 0, sizeof(ca)); /* also resets ca.retval */
|
vim_memset(&ca, 0, sizeof(ca)); /* also resets ca.retval */
|
||||||
ca.oap = oap;
|
ca.oap = oap;
|
||||||
@@ -615,7 +618,12 @@ normal_cmd(oap, toplevel)
|
|||||||
/* When not finishing an operator and no register name typed, reset the
|
/* When not finishing an operator and no register name typed, reset the
|
||||||
* count. */
|
* count. */
|
||||||
if (!finish_op && !oap->regname)
|
if (!finish_op && !oap->regname)
|
||||||
|
{
|
||||||
ca.opcount = 0;
|
ca.opcount = 0;
|
||||||
|
#ifdef FEAT_EVAL
|
||||||
|
set_prevcount = TRUE;
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
|
||||||
#ifdef FEAT_AUTOCMD
|
#ifdef FEAT_AUTOCMD
|
||||||
/* Restore counts from before receiving K_CURSORHOLD. This means after
|
/* Restore counts from before receiving K_CURSORHOLD. This means after
|
||||||
@@ -719,7 +727,15 @@ getcount:
|
|||||||
* command, so that v:count can be used in an expression mapping
|
* command, so that v:count can be used in an expression mapping
|
||||||
* right after the count. */
|
* right after the count. */
|
||||||
if (toplevel && stuff_empty())
|
if (toplevel && stuff_empty())
|
||||||
set_vcount(ca.count0, ca.count0 == 0 ? 1 : ca.count0);
|
{
|
||||||
|
long count = ca.count0;
|
||||||
|
|
||||||
|
/* multiply with ca.opcount the same way as below */
|
||||||
|
if (ca.opcount != 0)
|
||||||
|
count = ca.opcount * (count == 0 ? 1 : count);
|
||||||
|
set_vcount(count, count == 0 ? 1 : count, set_prevcount);
|
||||||
|
set_prevcount = FALSE; /* only set v:prevcount once */
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
if (ctrl_w)
|
if (ctrl_w)
|
||||||
{
|
{
|
||||||
@@ -806,7 +822,7 @@ getcount:
|
|||||||
* Only set v:count when called from main() and not a stuffed command.
|
* Only set v:count when called from main() and not a stuffed command.
|
||||||
*/
|
*/
|
||||||
if (toplevel && stuff_empty())
|
if (toplevel && stuff_empty())
|
||||||
set_vcount(ca.count0, ca.count1);
|
set_vcount(ca.count0, ca.count1, set_prevcount);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
/*
|
/*
|
||||||
|
@@ -61,7 +61,7 @@ void set_vim_var_nr __ARGS((int idx, long val));
|
|||||||
long get_vim_var_nr __ARGS((int idx));
|
long get_vim_var_nr __ARGS((int idx));
|
||||||
char_u *get_vim_var_str __ARGS((int idx));
|
char_u *get_vim_var_str __ARGS((int idx));
|
||||||
list_T *get_vim_var_list __ARGS((int idx));
|
list_T *get_vim_var_list __ARGS((int idx));
|
||||||
void set_vcount __ARGS((long count, long count1));
|
void set_vcount __ARGS((long count, long count1, int set_prevcount));
|
||||||
void set_vim_var_string __ARGS((int idx, char_u *val, int len));
|
void set_vim_var_string __ARGS((int idx, char_u *val, int len));
|
||||||
void set_vim_var_list __ARGS((int idx, list_T *val));
|
void set_vim_var_list __ARGS((int idx, list_T *val));
|
||||||
void set_reg_var __ARGS((int c));
|
void set_reg_var __ARGS((int c));
|
||||||
|
@@ -676,6 +676,8 @@ static char *(features[]) =
|
|||||||
|
|
||||||
static int included_patches[] =
|
static int included_patches[] =
|
||||||
{ /* Add new patch number below this line */
|
{ /* Add new patch number below this line */
|
||||||
|
/**/
|
||||||
|
48,
|
||||||
/**/
|
/**/
|
||||||
47,
|
47,
|
||||||
/**/
|
/**/
|
||||||
|
Reference in New Issue
Block a user