Skip to content

Commit 1e5a940

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 8bb4835 + 833093b commit 1e5a940

4 files changed

Lines changed: 32 additions & 6 deletions

File tree

src/getchar.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -844,6 +844,14 @@ start_redo(long count, int old_redo)
844844
if (c >= '1' && c < '9')
845845
++c;
846846
add_char_buff(&readbuf2, c);
847+
848+
/* the expression register should be re-evaluated */
849+
if (c == '=')
850+
{
851+
add_char_buff(&readbuf2, CAR);
852+
cmd_silent = TRUE;
853+
}
854+
847855
c = read_redo(FALSE, old_redo);
848856
}
849857

src/term.c

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2878,14 +2878,15 @@ term_color(char_u *s, int n)
28782878
#else
28792879
char *format = "%s%s%%dm";
28802880
#endif
2881-
sprintf(buf, format,
2882-
i == 2 ?
2881+
char *lead = i == 2 ? (
28832882
#if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
2884-
s[1] == '|' ? IF_EB("\033|", ESC_STR "|") :
2883+
s[1] == '|' ? IF_EB("\033|", ESC_STR "|") :
28852884
#endif
2886-
IF_EB("\033[", ESC_STR "[") : "\233",
2887-
s[i] == '3' ? (n >= 16 ? "38;5;" : "9")
2888-
: (n >= 16 ? "48;5;" : "10"));
2885+
IF_EB("\033[", ESC_STR "[")) : "\233";
2886+
char *tail = s[i] == '3' ? (n >= 16 ? "38;5;" : "9")
2887+
: (n >= 16 ? "48;5;" : "10");
2888+
2889+
sprintf(buf, format, lead, tail);
28892890
OUT_STR(tgoto(buf, 0, n >= 16 ? n : n - 8));
28902891
}
28912892
else

src/testdir/test_put.vim

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,3 +45,16 @@ func Test_put_lines()
4545
bw!
4646
call setreg('a', a[0], a[1])
4747
endfunc
48+
49+
func Test_put_expr()
50+
new
51+
call setline(1, repeat(['A'], 6))
52+
exec "1norm! \"=line('.')\<cr>p"
53+
norm! j0.
54+
norm! j0.
55+
exec "4norm! \"=\<cr>P"
56+
norm! j0.
57+
norm! j0.
58+
call assert_equal(['A1','A2','A3','4A','5A','6A'], getline(1,'$'))
59+
bw!
60+
endfunc

src/version.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -776,6 +776,10 @@ static char *(features[]) =
776776

777777
static int included_patches[] =
778778
{ /* Add new patch number below this line */
779+
/**/
780+
22,
781+
/**/
782+
21,
779783
/**/
780784
20,
781785
/**/

0 commit comments

Comments
 (0)