Skip to content

Commit 7ef6c3b

Browse files
committed
updated for version 7.4.110
Problem: "gUgn" cannot be repeeated. (Dimitar Dimitrov) Solution: Don't put "gn" in a different order in the redo buffer. Restore 'wrapscan' when the pattern isn't found. (Christian Wellenbrock)
1 parent bda2170 commit 7ef6c3b

File tree

3 files changed

+10
-9
lines changed

3 files changed

+10
-9
lines changed

src/normal.c

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -962,11 +962,8 @@ normal_cmd(oap, toplevel)
962962
#ifdef FEAT_CMDL_INFO
963963
need_flushbuf |= add_to_showcmd(ca.nchar);
964964
#endif
965-
/* For "gn" from redo, need to get one more char to determine the
966-
* operator */
967965
if (ca.nchar == 'r' || ca.nchar == '\'' || ca.nchar == '`'
968-
|| ca.nchar == Ctrl_BSL
969-
|| ((ca.nchar == 'n' || ca.nchar == 'N') && !stuff_empty()))
966+
|| ca.nchar == Ctrl_BSL)
970967
{
971968
cp = &ca.extra_char; /* need to get a third character */
972969
if (ca.nchar != 'r')
@@ -1797,10 +1794,9 @@ do_pending_operator(cap, old_col, gui_yank)
17971794
* otherwise it might be the second char of the operator. */
17981795
if (cap->cmdchar == 'g' && (cap->nchar == 'n'
17991796
|| cap->nchar == 'N'))
1800-
/* "gn" and "gN" are a bit different */
1801-
prep_redo(oap->regname, 0L, NUL, cap->cmdchar, cap->nchar,
1802-
get_op_char(oap->op_type),
1803-
get_extra_op_char(oap->op_type));
1797+
prep_redo(oap->regname, cap->count0,
1798+
get_op_char(oap->op_type), get_extra_op_char(oap->op_type),
1799+
oap->motion_force, cap->cmdchar, cap->nchar);
18041800
else if (cap->cmdchar != ':')
18051801
prep_redo(oap->regname, 0L, NUL, 'v',
18061802
get_op_char(oap->op_type),

src/search.c

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4544,7 +4544,10 @@ current_search(count, forward)
45444544
/* Is the pattern is zero-width? */
45454545
one_char = is_one_char(spats[last_idx].pat);
45464546
if (one_char == -1)
4547-
return FAIL; /* invalid pattern */
4547+
{
4548+
p_ws = old_p_ws;
4549+
return FAIL; /* pattern not found */
4550+
}
45484551

45494552
/*
45504553
* The trick is to first search backwards and then search forward again,

src/version.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -738,6 +738,8 @@ static char *(features[]) =
738738

739739
static int included_patches[] =
740740
{ /* Add new patch number below this line */
741+
/**/
742+
110,
741743
/**/
742744
109,
743745
/**/

0 commit comments

Comments
 (0)