Merge remote-tracking branch 'vim/master'

This commit is contained in:
Kazuki Sakamoto
2018-05-23 20:48:44 -07:00
4 changed files with 32 additions and 6 deletions
+8
View File
@@ -844,6 +844,14 @@ start_redo(long count, int old_redo)
if (c >= '1' && c < '9')
++c;
add_char_buff(&readbuf2, c);
/* the expression register should be re-evaluated */
if (c == '=')
{
add_char_buff(&readbuf2, CAR);
cmd_silent = TRUE;
}
c = read_redo(FALSE, old_redo);
}
+7 -6
View File
@@ -2878,14 +2878,15 @@ term_color(char_u *s, int n)
#else
char *format = "%s%s%%dm";
#endif
sprintf(buf, format,
i == 2 ?
char *lead = i == 2 ? (
#if defined(FEAT_VTP) && defined(FEAT_TERMGUICOLORS)
s[1] == '|' ? IF_EB("\033|", ESC_STR "|") :
s[1] == '|' ? IF_EB("\033|", ESC_STR "|") :
#endif
IF_EB("\033[", ESC_STR "[") : "\233",
s[i] == '3' ? (n >= 16 ? "38;5;" : "9")
: (n >= 16 ? "48;5;" : "10"));
IF_EB("\033[", ESC_STR "[")) : "\233";
char *tail = s[i] == '3' ? (n >= 16 ? "38;5;" : "9")
: (n >= 16 ? "48;5;" : "10");
sprintf(buf, format, lead, tail);
OUT_STR(tgoto(buf, 0, n >= 16 ? n : n - 8));
}
else
+13
View File
@@ -45,3 +45,16 @@ func Test_put_lines()
bw!
call setreg('a', a[0], a[1])
endfunc
func Test_put_expr()
new
call setline(1, repeat(['A'], 6))
exec "1norm! \"=line('.')\<cr>p"
norm! j0.
norm! j0.
exec "4norm! \"=\<cr>P"
norm! j0.
norm! j0.
call assert_equal(['A1','A2','A3','4A','5A','6A'], getline(1,'$'))
bw!
endfunc
+4
View File
@@ -776,6 +776,10 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
22,
/**/
21,
/**/
20,
/**/