Compare commits

..

9 Commits

Author SHA1 Message Date
Bram Moolenaar
d94ac0caca patch 8.1.1672: "make cmdidxs" doesn't work
Problem:    "make cmdidxs" doesn't work.
Solution:   Update macro names. (Naruhiko Nishino, closes #4660)
2019-07-12 20:24:59 +02:00
Bram Moolenaar
b7b9efbccf patch 8.1.1671: copying a blob may result in it being locked
Problem:    Copying a blob may result in it being locked.
Solution:   Reset v_lock. (Ken Takata, closes #4648)
2019-07-12 20:17:03 +02:00
Bram Moolenaar
0231f8312b patch 8.1.1670: sign column not always properly aligned
Problem:    Sign column not always properly aligned.
Solution:   Use "col" only after it was calculated. (Yee Cheng Chin,
            closes #4649)
2019-07-12 19:22:22 +02:00
Bram Moolenaar
efef9fea72 patch 8.1.1669: Travis: test results section is closed even when failed
Problem:    Travis: test results section is closed even when some tests
            failed.
Solution:   Only close the section on success. (Daniel Hahler, closes #4659)
2019-07-12 18:45:40 +02:00
Bram Moolenaar
8ccabf624e patch 8.1.1668: popup window test is a bit flaky on some systems
Problem:    Popup window test is a bit flaky on some systems.
Solution:   Clear the command line. (Naruhiko Nishino, closes #4656)
2019-07-12 18:12:51 +02:00
Bram Moolenaar
8071cb2c64 patch 8.1.1667: flags for Ex commands may clash with other symbols
Problem:    Flags for Ex commands may clash with other symbols.
Solution:   Prepend with EX_.
2019-07-12 17:58:01 +02:00
Bram Moolenaar
bd42b31780 patch 8.1.1666: click in popup window scrollbar with border doesn't scroll
Problem:    Click in popup window scrollbar with border doesn't scroll.
Solution:   Correct column for the border. (Naruhiko Nishino, closes #4650)
2019-07-12 16:35:34 +02:00
Bram Moolenaar
b420747478 patch 8.1.1665: crash when popup window with mask is below the screen
Problem:    Crash when popup window with mask is below the screen.
Solution:   Correct boundary check.
2019-07-12 16:05:45 +02:00
Bram Moolenaar
847a5d69a8 patch 8.1.1664: GUI resize may cause changing Rows at a bad time
Problem:    GUI resize may cause changing Rows at a bad time. (Dominique
            Pelle)
Solution:   Postpone resizing while updating the screen.
2019-07-12 15:37:13 +02:00
17 changed files with 1310 additions and 1258 deletions

View File

@@ -142,8 +142,11 @@ script:
"${SRCDIR}"/vim --not-a-term -u NONE -S "${SRCDIR}"/testdir/if_ver-2.vim -c quit > /dev/null
cat if_ver.txt
fi
- do_test make ${SHADOWOPT} ${TEST}
- echo -en "travis_fold:end:test\\r\\033[0K"
- |
if do_test make ${SHADOWOPT} ${TEST}; then
echo -en "travis_fold:end:test\\r\\033[0K"
fi
# instead of a 2*2*8 matrix (2*os + 2*compiler + 8*env),
# exclude some builds on mac os x and linux

View File

@@ -63,6 +63,7 @@ blob_copy(typval_T *from, typval_T *to)
int ret = OK;
to->v_type = VAR_BLOB;
to->v_lock = 0;
if (from->vval.v_blob == NULL)
to->vval.v_blob = NULL;
else if (rettv_blob_alloc(to) == FAIL)

View File

@@ -14,8 +14,8 @@ let lines = readfile('ex_cmds.h')
let idx = 0
while idx < len(lines)
let line = lines[idx]
if line =~ '^EX(CMD_'
let m = matchlist(line, '^EX(CMD_\S*,\s*"\([a-z][^"]*\)"')
if line =~ '^EXCMD(CMD_'
let m = matchlist(line, '^EXCMD(CMD_\S*,\s*"\([a-z][^"]*\)"')
if len(m) >= 2
let cmds += [ m[1] ]
else
@@ -27,18 +27,18 @@ while idx < len(lines)
let idx += 1
let addr_type = lines[idx]
if flags =~ '\<RANGE\>'
if flags =~ '\<EX_RANGE\>'
if addr_type =~ 'ADDR_NONE'
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Using RANGE with ADDR_NONE: ' .. line
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Using EX_RANGE with ADDR_NONE: ' .. line
endif
else
if addr_type !~ 'ADDR_NONE'
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing ADDR_NONE: ' .. line
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing ADDR_NONE: ' .. line
endif
endif
if flags =~ '\<DFLALL\>' && (addr_type =~ 'ADDR_OTHER' || addr_type =~ 'ADDR_NONE')
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing misplaced DFLALL: ' .. line
if flags =~ '\<EX_DFLALL\>' && (addr_type =~ 'ADDR_OTHER' || addr_type =~ 'ADDR_NONE')
echoerr 'ex_cmds.h:' .. (idx - 1) .. ': Missing misplaced EX_DFLALL: ' .. line
endif
endif
let idx += 1

View File

@@ -3547,7 +3547,7 @@ f_expandcmd(typval_T *argvars, typval_T *rettv)
memset(&eap, 0, sizeof(eap));
eap.cmd = cmdstr;
eap.arg = cmdstr;
eap.argt |= NOSPC;
eap.argt |= EX_NOSPC;
eap.usefilter = FALSE;
eap.nextcmd = NULL;
eap.cmdidx = CMD_USER;

File diff suppressed because it is too large Load Diff

View File

@@ -1844,7 +1844,7 @@ do_one_cmd(
if (*ea.cmd == '|' || (exmode_active && ea.line1 != ea.line2))
{
ea.cmdidx = CMD_print;
ea.argt = RANGE+COUNT+TRLBAR;
ea.argt = EX_RANGE+EX_COUNT+EX_TRLBAR;
if ((errormsg = invalid_range(&ea)) == NULL)
{
correct_range(&ea);
@@ -1976,26 +1976,26 @@ do_one_cmd(
if (!ea.skip)
{
#ifdef HAVE_SANDBOX
if (sandbox != 0 && !(ea.argt & SBOXOK))
if (sandbox != 0 && !(ea.argt & EX_SBOXOK))
{
// Command not allowed in sandbox.
errormsg = _(e_sandbox);
goto doend;
}
#endif
if (restricted != 0 && (ea.argt & RESTRICT))
if (restricted != 0 && (ea.argt & EX_RESTRICT))
{
errormsg = _("E981: Command not allowed in rvim");
goto doend;
}
if (!curbuf->b_p_ma && (ea.argt & MODIFY))
if (!curbuf->b_p_ma && (ea.argt & EX_MODIFY))
{
/* Command not allowed in non-'modifiable' buffer */
errormsg = _(e_modifiable);
goto doend;
}
if (text_locked() && !(ea.argt & CMDWIN)
if (text_locked() && !(ea.argt & EX_CMDWIN)
&& !IS_USER_CMDIDX(ea.cmdidx))
{
/* Command not allowed when editing the command line. */
@@ -2007,7 +2007,7 @@ do_one_cmd(
* Do allow ":checktime" (it is postponed).
* Do allow ":edit" (check for an argument later).
* Do allow ":file" with no arguments (check for an argument later). */
if (!(ea.argt & CMDWIN)
if (!(ea.argt & EX_CMDWIN)
&& ea.cmdidx != CMD_checktime
&& ea.cmdidx != CMD_edit
&& ea.cmdidx != CMD_file
@@ -2015,7 +2015,7 @@ do_one_cmd(
&& curbuf_locked())
goto doend;
if (!ni && !(ea.argt & RANGE) && ea.addr_count > 0)
if (!ni && !(ea.argt & EX_RANGE) && ea.addr_count > 0)
{
/* no range allowed */
errormsg = _(e_norange);
@@ -2023,7 +2023,7 @@ do_one_cmd(
}
}
if (!ni && !(ea.argt & BANG) && ea.forceit) /* no <!> allowed */
if (!ni && !(ea.argt & EX_BANG) && ea.forceit) // no <!> allowed
{
errormsg = _(e_nobang);
goto doend;
@@ -2033,7 +2033,7 @@ do_one_cmd(
* Don't complain about the range if it is not used
* (could happen if line_count is accidentally set to 0).
*/
if (!ea.skip && !ni && (ea.argt & RANGE))
if (!ea.skip && !ni && (ea.argt & EX_RANGE))
{
/*
* If the range is backwards, ask for confirmation and, if given, swap
@@ -2068,7 +2068,7 @@ do_one_cmd(
correct_range(&ea);
#ifdef FEAT_FOLDING
if (((ea.argt & WHOLEFOLD) || ea.addr_count >= 2) && !global_busy
if (((ea.argt & EX_WHOLEFOLD) || ea.addr_count >= 2) && !global_busy
&& ea.addr_type == ADDR_LINES)
{
/* Put the first line at the start of a closed fold, put the last line
@@ -2105,7 +2105,7 @@ do_one_cmd(
* Check for "++opt=val" argument.
* Must be first, allow ":w ++enc=utf8 !cmd"
*/
if (ea.argt & ARGOPT)
if (ea.argt & EX_ARGOPT)
while (ea.arg[0] == '+' && ea.arg[1] == '+')
if (getargopt(&ea) == FAIL && !ni)
{
@@ -2161,14 +2161,14 @@ do_one_cmd(
* Check for "+command" argument, before checking for next command.
* Don't do this for ":read !cmd" and ":write !cmd".
*/
if ((ea.argt & EDITCMD) && !ea.usefilter)
if ((ea.argt & EX_CMDARG) && !ea.usefilter)
ea.do_ecmd_cmd = getargcmd(&ea.arg);
/*
* Check for '|' to separate commands and '"' to start comments.
* Don't do this for ":read !cmd" and ":write !cmd".
*/
if ((ea.argt & TRLBAR) && !ea.usefilter)
if ((ea.argt & EX_TRLBAR) && !ea.usefilter)
separate_nextcmd(&ea);
/*
@@ -2201,7 +2201,7 @@ do_one_cmd(
}
}
if ((ea.argt & DFLALL) && ea.addr_count == 0)
if ((ea.argt & EX_DFLALL) && ea.addr_count == 0)
{
buf_T *buf;
@@ -2251,17 +2251,17 @@ do_one_cmd(
case ADDR_NONE:
case ADDR_UNSIGNED:
case ADDR_QUICKFIX:
iemsg(_("INTERNAL: Cannot use DFLALL with ADDR_NONE, ADDR_UNSIGNED or ADDR_QUICKFIX"));
iemsg(_("INTERNAL: Cannot use EX_DFLALL with ADDR_NONE, ADDR_UNSIGNED or ADDR_QUICKFIX"));
break;
}
}
/* accept numbered register only when no count allowed (:put) */
if ( (ea.argt & REGSTR)
if ( (ea.argt & EX_REGSTR)
&& *ea.arg != NUL
/* Do not allow register = for user commands */
&& (!IS_USER_CMDIDX(ea.cmdidx) || *ea.arg != '=')
&& !((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)))
&& !((ea.argt & EX_COUNT) && VIM_ISDIGIT(*ea.arg)))
{
#ifndef FEAT_CLIPBOARD
/* check these explicitly for a more specific error message */
@@ -2288,16 +2288,16 @@ do_one_cmd(
}
/*
* Check for a count. When accepting a BUFNAME, don't use "123foo" as a
* Check for a count. When accepting a EX_BUFNAME, don't use "123foo" as a
* count, it's a buffer name.
*/
if ((ea.argt & COUNT) && VIM_ISDIGIT(*ea.arg)
&& (!(ea.argt & BUFNAME) || *(p = skipdigits(ea.arg)) == NUL
if ((ea.argt & EX_COUNT) && VIM_ISDIGIT(*ea.arg)
&& (!(ea.argt & EX_BUFNAME) || *(p = skipdigits(ea.arg)) == NUL
|| VIM_ISWHITE(*p)))
{
n = getdigits(&ea.arg);
ea.arg = skipwhite(ea.arg);
if (n <= 0 && !ni && (ea.argt & ZEROR) == 0)
if (n <= 0 && !ni && (ea.argt & EX_ZEROR) == 0)
{
errormsg = _(e_zerocount);
goto doend;
@@ -2324,17 +2324,17 @@ do_one_cmd(
/*
* Check for flags: 'l', 'p' and '#'.
*/
if (ea.argt & EXFLAGS)
if (ea.argt & EX_FLAGS)
get_flags(&ea);
/* no arguments allowed */
if (!ni && !(ea.argt & EXTRA) && *ea.arg != NUL
&& *ea.arg != '"' && (*ea.arg != '|' || (ea.argt & TRLBAR) == 0))
if (!ni && !(ea.argt & EX_EXTRA) && *ea.arg != NUL
&& *ea.arg != '"' && (*ea.arg != '|' || (ea.argt & EX_TRLBAR) == 0))
{
// no arguments allowed but there is something
errormsg = _(e_trailing);
goto doend;
}
if (!ni && (ea.argt & NEEDARG) && *ea.arg == NUL)
if (!ni && (ea.argt & EX_NEEDARG) && *ea.arg == NUL)
{
errormsg = _(e_argreq);
goto doend;
@@ -2368,7 +2368,7 @@ do_one_cmd(
break;
/* Commands that handle '|' themselves. Check: A command should
* either have the TRLBAR flag, appear in this list or appear in
* either have the EX_TRLBAR flag, appear in this list or appear in
* the list at ":help :bar". */
case CMD_aboveleft:
case CMD_and:
@@ -2435,7 +2435,7 @@ do_one_cmd(
}
#endif
if (ea.argt & XFILE)
if (ea.argt & EX_XFILE)
{
if (expand_filename(&ea, cmdlinep, &errormsg) == FAIL)
goto doend;
@@ -2445,7 +2445,7 @@ do_one_cmd(
* Accept buffer name. Cannot be used at the same time with a buffer
* number. Don't do this for a user command.
*/
if ((ea.argt & BUFNAME) && *ea.arg != NUL && ea.addr_count == 0
if ((ea.argt & EX_BUFNAME) && *ea.arg != NUL && ea.addr_count == 0
&& !IS_USER_CMDIDX(ea.cmdidx))
{
/*
@@ -2462,7 +2462,7 @@ do_one_cmd(
while (p > ea.arg && VIM_ISWHITE(p[-1]))
--p;
}
ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & BUFUNL) != 0,
ea.line2 = buflist_findpat(ea.arg, p, (ea.argt & EX_BUFUNL) != 0,
FALSE, FALSE);
if (ea.line2 < 0) /* failed */
goto doend;
@@ -3528,7 +3528,7 @@ set_one_cmd_context(
}
/* Does command allow "+command"? */
if ((ea.argt & EDITCMD) && !usefilter && *arg == '+')
if ((ea.argt & EX_CMDARG) && !usefilter && *arg == '+')
{
/* Check if we're in the +command */
p = arg + 1;
@@ -3546,7 +3546,7 @@ set_one_cmd_context(
* Check for '|' to separate commands and '"' to start comments.
* Don't do this for ":read !cmd" and ":write !cmd".
*/
if ((ea.argt & TRLBAR) && !usefilter)
if ((ea.argt & EX_TRLBAR) && !usefilter)
{
p = arg;
/* ":redir @" is not the start of a comment */
@@ -3559,7 +3559,7 @@ set_one_cmd_context(
if (p[1] != NUL)
++p;
}
else if ( (*p == '"' && !(ea.argt & NOTRLCOM))
else if ( (*p == '"' && !(ea.argt & EX_NOTRLCOM))
|| *p == '|' || *p == '\n')
{
if (*(p - 1) != '\\')
@@ -3573,9 +3573,9 @@ set_one_cmd_context(
}
}
/* no arguments allowed */
if (!(ea.argt & EXTRA) && *arg != NUL &&
vim_strchr((char_u *)"|\"", *arg) == NULL)
if (!(ea.argt & EX_EXTRA) && *arg != NUL
&& vim_strchr((char_u *)"|\"", *arg) == NULL)
// no arguments allowed but there is something
return NULL;
/* Find start of last argument (argument just before cursor): */
@@ -3597,7 +3597,7 @@ set_one_cmd_context(
}
}
if (ea.argt & XFILE)
if (ea.argt & EX_XFILE)
{
int c;
int in_quote = FALSE;
@@ -3630,7 +3630,7 @@ set_one_cmd_context(
* characters that end the command and white space. */
else if (c == '|' || c == '\n' || c == '"' || (VIM_ISWHITE(c)
#ifdef SPACE_IN_FILENAME
&& (!(ea.argt & NOSPC) || usefilter)
&& (!(ea.argt & EX_NOSPC) || usefilter)
#endif
))
{
@@ -4001,8 +4001,8 @@ set_one_cmd_context(
case CMD_USER_BUF:
if (compl != EXPAND_NOTHING)
{
// XFILE: file names are handled above
if (!(ea.argt & XFILE))
// EX_XFILE: file names are handled above
if (!(ea.argt & EX_XFILE))
{
#ifdef FEAT_MENU
if (compl == EXPAND_MENUS)
@@ -4652,7 +4652,7 @@ invalid_range(exarg_T *eap)
|| eap->line1 > eap->line2)
return _(e_invrange);
if (eap->argt & RANGE)
if (eap->argt & EX_RANGE)
{
switch (eap->addr_type)
{
@@ -4738,7 +4738,7 @@ invalid_range(exarg_T *eap)
static void
correct_range(exarg_T *eap)
{
if (!(eap->argt & ZEROR)) /* zero in range not allowed */
if (!(eap->argt & EX_ZEROR)) // zero in range not allowed
{
if (eap->line1 == 0)
eap->line1 = 1;
@@ -4947,7 +4947,7 @@ expand_filename(
&& eap->cmdidx != CMD_make
&& eap->cmdidx != CMD_terminal
#ifndef UNIX
&& !(eap->argt & NOSPC)
&& !(eap->argt & EX_NOSPC)
#endif
)
{
@@ -4999,7 +4999,7 @@ expand_filename(
* One file argument: Expand wildcards.
* Don't do this with ":r !command" or ":w !command".
*/
if ((eap->argt & NOSPC) && !eap->usefilter)
if ((eap->argt & EX_NOSPC) && !eap->usefilter)
{
/*
* May do this twice:
@@ -5150,7 +5150,7 @@ separate_nextcmd(exarg_T *eap)
{
if (*p == Ctrl_V)
{
if (eap->argt & (USECTRLV | XFILE))
if (eap->argt & (EX_CTRLV | EX_XFILE))
++p; /* skip CTRL-V and next char */
else
/* remove CTRL-V and skip next char */
@@ -5161,7 +5161,7 @@ separate_nextcmd(exarg_T *eap)
#ifdef FEAT_EVAL
/* Skip over `=expr` when wildcards are expanded. */
else if (p[0] == '`' && p[1] == '=' && (eap->argt & XFILE))
else if (p[0] == '`' && p[1] == '=' && (eap->argt & EX_XFILE))
{
p += 2;
(void)skip_expr(&p);
@@ -5171,7 +5171,7 @@ separate_nextcmd(exarg_T *eap)
/* Check for '"': start of comment or '|': next command */
/* :@" and :*" do not start a comment!
* :redir @" doesn't either. */
else if ((*p == '"' && !(eap->argt & NOTRLCOM)
else if ((*p == '"' && !(eap->argt & EX_NOTRLCOM)
&& ((eap->cmdidx != CMD_at && eap->cmdidx != CMD_star)
|| p != eap->arg)
&& (eap->cmdidx != CMD_redir
@@ -5179,11 +5179,11 @@ separate_nextcmd(exarg_T *eap)
|| *p == '|' || *p == '\n')
{
/*
* We remove the '\' before the '|', unless USECTRLV is used
* We remove the '\' before the '|', unless EX_CTRLV is used
* AND 'b' is present in 'cpoptions'.
*/
if ((vim_strchr(p_cpo, CPO_BAR) == NULL
|| !(eap->argt & USECTRLV)) && *(p - 1) == '\\')
|| !(eap->argt & EX_CTRLV)) && *(p - 1) == '\\')
{
STRMOVE(p - 1, p); /* remove the '\' */
--p;
@@ -5197,7 +5197,7 @@ separate_nextcmd(exarg_T *eap)
}
}
if (!(eap->argt & NOTRLCOM)) /* remove trailing spaces */
if (!(eap->argt & EX_NOTRLCOM)) /* remove trailing spaces */
del_trailing_spaces(eap->arg);
}
@@ -9276,6 +9276,7 @@ find_cmdline_var(char_u *src, int *usedlen)
* '#' to curwin->w_altfile
* '<cword>' to word under the cursor
* '<cWORD>' to WORD under the cursor
* '<cexpr>' to C-expression under the cursor
* '<cfile>' to path name under the cursor
* '<sfile>' to sourced file name
* '<slnum>' to sourced file line number

View File

@@ -4834,7 +4834,7 @@ addstar(
* EXPAND_COMMANDS Cursor is still touching the command, so complete
* it.
* EXPAND_BUFFERS Complete file names for :buf and :sbuf commands.
* EXPAND_FILES After command with XFILE set, or after setting
* EXPAND_FILES After command with EX_XFILE set, or after setting
* with P_EXPAND set. eg :e ^I, :w>>^I
* EXPAND_DIRECTORIES In some cases this is used instead of the latter
* when we know only directories are of interest. eg

View File

@@ -2253,7 +2253,7 @@ gui_outstr_nowrap(
int col = gui.col;
#ifdef FEAT_SIGN_ICONS
int draw_sign = FALSE;
int signcol = col;
int signcol;
char_u extra[18];
# ifdef FEAT_NETBEANS_INTG
int multi_sign = FALSE;
@@ -2270,7 +2270,7 @@ gui_outstr_nowrap(
# ifdef FEAT_NETBEANS_INTG
|| *s == MULTISIGN_BYTE
# endif
)
)
{
# ifdef FEAT_NETBEANS_INTG
if (*s == MULTISIGN_BYTE)
@@ -2289,7 +2289,10 @@ gui_outstr_nowrap(
--col;
len = (int)STRLEN(s);
if (len > 2)
signcol = col + len - 3; // Right align sign icon in the number column
// right align sign icon in the number column
signcol = col + len - 3;
else
signcol = col;
draw_sign = TRUE;
highlight_mask = 0;
}

View File

@@ -317,7 +317,7 @@ popup_handle_scrollbar_click(win_T *wp, int row, int col)
return;
if (row >= wp->w_popup_border[0]
&& row < height - wp->w_popup_border[2]
&& col == popup_width(wp) - 1)
&& col == popup_width(wp) - wp->w_popup_border[1] - 1)
{
if (row >= height / 2)
{
@@ -2323,8 +2323,10 @@ update_popup_transparent(win_T *wp, int val)
--lines;
if (lines < 0)
lines = 0;
for (line = lines; line < linee && line < screen_Rows; ++line)
for (col = cols; col < cole && col < screen_Columns; ++col)
for (line = lines; line < linee
&& line + wp->w_winrow < screen_Rows; ++line)
for (col = cols; col < cole
&& col + wp->w_wincol < screen_Columns; ++col)
popup_transparent[(line + wp->w_winrow) * screen_Columns
+ col + wp->w_wincol] = val;
}

View File

@@ -4809,7 +4809,7 @@ syn_cmd_include(exarg_T *eap, int syncing UNUSED)
* Everything that's left, up to the next command, should be the
* filename to include.
*/
eap->argt |= (XFILE | NOSPC);
eap->argt |= (EX_XFILE | EX_NOSPC);
separate_nextcmd(eap);
if (*eap->arg == '<' || *eap->arg == '$' || mch_isFullName(eap->arg))
{

View File

@@ -3425,11 +3425,15 @@ set_shellsize(int width, int height, int mustset)
if (State == HITRETURN || State == SETWSIZE)
{
/* postpone the resizing */
// postpone the resizing
State = SETWSIZE;
return;
}
if (updating_screen)
// resizing while in update_screen() may cause a crash
return;
/* curwin->w_buffer can be NULL when we are closing a window and the
* buffer has already been closed and removing a scrollbar causes a resize
* event. Don't resize then, it will happen after entering another buffer.

View File

@@ -0,0 +1,13 @@
>1+0&#ffffff0|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|x+0#0000001#ffd7ff255@8|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|y+0#0000001#ffd7ff255@8|8+0#0000000#ffffff0|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|1|2|3|4|5|6|7|8|9|1|0|1@2|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|2|7|2|8|2|9|3|0|3|1|3|2|3@2|4|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
| +0&#e0e0e08@11|1+0&#ffffff0@1|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|2|6|═+0#0000001#ffd7ff255@13|X|4+0#0000000#ffffff0|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|o+0&#e0e0e08|m|e| |5+0&#ffffff0|6|7|t+0&#e0e0e08| @3|1+0&#ffffff0@1|2|1|3|1|4|1|5|1|6|1|7|1|8|1|9|2|0|2|1|2@2|3|2|4|2|5|║+0#0000001#ffd7ff255| @4|2+0#0000000#ffffff0|9|3| +0#0000001#ffd7ff255@6|║|4+0#0000000#ffffff0|3|5|3|6|3|7|3|8|3|9|4|0|4|1|4|2
|:|c|t+0&#e0e0e08|h|l+0&#ffffff0| |p|l+0&#e0e0e08|i|n|e| |m+0&#ffffff0|o|v|e|(|w|i|n|i|d|b|,| |{|'|p|o|s|'|:| |'|t|o|p|l|e|f|t|║+0#0000001#ffd7ff255| |j|u|s|t|l+0#0000000#ffffff0|'|:|e+0#0000001#ffd7ff255| |l|i|n|e| |║|,+0#0000000#ffffff0|1| @10|T|o|p|

View File

@@ -1,10 +1,10 @@
>1+0&#ffffff0| @73
|2| @73
|3| @73
|4| @31|f+0#0000001#ffd7ff255|i|v|e| @3| +0#0000000#ff404010| +0&#ffffff0@32
|5| @31|s+0#0000001#ffd7ff255|i|x| @4| +0#0000000#ff404010| +0&#ffffff0@32
|6| @31|s+0#0000001#ffd7ff255|e|v|e|n| @2| +0#0000000#4040ff13| +0&#ffffff0@32
|7| @31|e+0#0000001#ffd7ff255|i|g|h|t| @2| +0#0000000#4040ff13| +0&#ffffff0@32
|8| @73
|3| @30|╔+0#0000001#ffd7ff255|═@8|X| +0#0000000#ffffff0@31
|4| @30|║+0#0000001#ffd7ff255|f|i|v|e| @3| +0#0000000#ff404010|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
|5| @30|║+0#0000001#ffd7ff255|s|i|x| @4| +0#0000000#ff404010|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
|6| @30|║+0#0000001#ffd7ff255|s|e|v|e|n| @2| +0#0000000#4040ff13|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
|7| @30|║+0#0000001#ffd7ff255|e|i|g|h|t| @2| +0#0000000#4040ff13|║+0#0000001#ffd7ff255| +0#0000000#ffffff0@31
|8| @30|╚+0#0000001#ffd7ff255|═@8|╝| +0#0000000#ffffff0@31
|9| @73
|:|c|a|l@1| |C|l|i|c|k|B|o|t|(|)| @40|1|,|1| @10|T|o|p|

View File

@@ -71,6 +71,10 @@ func Test_blob_assign()
call assert_fails('let b .= "xx"', 'E734:')
call assert_fails('let b += "xx"', 'E734:')
call assert_fails('let b[1:1] .= 0z55', 'E734:')
let l = [0z12]
let m = deepcopy(l)
let m[0] = 0z34 " E742 or E741 should not occur.
endfunc
func Test_blob_get_range()

View File

@@ -486,6 +486,10 @@ func Test_popup_with_mask()
call term_sendkeys(buf, ":call popup_move(winidb, {'pos': 'topright', 'col': 12})\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_mask_4', {})
call term_sendkeys(buf, ":call popup_move(winid, {'pos': 'topright', 'col': 12, 'line': 11})\<CR>")
call term_sendkeys(buf, ":call popup_move(winidb, {'pos': 'topleft', 'col': 42, 'line': 11})\<CR>")
call VerifyScreenDump(buf, 'Test_popupwin_mask_5', {})
" clean up
call StopVimInTerminal(buf)
call delete('XtestPopupMask')
@@ -521,6 +525,9 @@ func Test_popup_select()
call term_sendkeys(buf, ":call popup_close(winid)\<CR>")
call term_sendkeys(buf, "\"*p")
" clean the command line, sometimes it still shows a command
call term_sendkeys(buf, ":\<esc>")
call VerifyScreenDump(buf, 'Test_popupwin_select_02', {})
" clean up
@@ -1576,6 +1583,7 @@ func Test_popup_scrollbar()
call feedkeys("\<F4>\<LeftMouse>", "xt")
endfunc
func ClickBot()
call popup_setoptions(g:winid, {'border': [], 'close': 'button'})
call feedkeys("\<F5>\<LeftMouse>", "xt")
endfunc
map <silent> <F3> :call test_setmouse(5, 36)<CR>

View File

@@ -419,12 +419,12 @@ uc_list(char_u *name, size_t name_len)
// Special cases
len = 4;
if (a & BANG)
if (a & EX_BANG)
{
msg_putchar('!');
--len;
}
if (a & REGSTR)
if (a & EX_REGSTR)
{
msg_putchar('"');
--len;
@@ -434,7 +434,7 @@ uc_list(char_u *name, size_t name_len)
msg_putchar('b');
--len;
}
if (a & TRLBAR)
if (a & EX_TRLBAR)
{
msg_putchar('|');
--len;
@@ -456,13 +456,13 @@ uc_list(char_u *name, size_t name_len)
len = 0;
// Arguments
switch ((int)(a & (EXTRA|NOSPC|NEEDARG)))
switch ((int)(a & (EX_EXTRA|EX_NOSPC|EX_NEEDARG)))
{
case 0: IObuff[len++] = '0'; break;
case (EXTRA): IObuff[len++] = '*'; break;
case (EXTRA|NOSPC): IObuff[len++] = '?'; break;
case (EXTRA|NEEDARG): IObuff[len++] = '+'; break;
case (EXTRA|NOSPC|NEEDARG): IObuff[len++] = '1'; break;
case 0: IObuff[len++] = '0'; break;
case (EX_EXTRA): IObuff[len++] = '*'; break;
case (EX_EXTRA|EX_NOSPC): IObuff[len++] = '?'; break;
case (EX_EXTRA|EX_NEEDARG): IObuff[len++] = '+'; break;
case (EX_EXTRA|EX_NOSPC|EX_NEEDARG): IObuff[len++] = '1'; break;
}
do {
@@ -470,15 +470,15 @@ uc_list(char_u *name, size_t name_len)
} while (len < 5 - over);
// Address / Range
if (a & (RANGE|COUNT))
if (a & (EX_RANGE|EX_COUNT))
{
if (a & COUNT)
if (a & EX_COUNT)
{
// -count=N
sprintf((char *)IObuff + len, "%ldc", cmd->uc_def);
len += (int)STRLEN(IObuff + len);
}
else if (a & DFLALL)
else if (a & EX_DFLALL)
IObuff[len++] = '%';
else if (cmd->uc_def >= 0)
{
@@ -638,10 +638,10 @@ parse_compl_arg(
{
*complp = command_complete[i].expand;
if (command_complete[i].expand == EXPAND_BUFFERS)
*argt |= BUFNAME;
*argt |= EX_BUFNAME;
else if (command_complete[i].expand == EXPAND_DIRECTORIES
|| command_complete[i].expand == EXPAND_FILES)
*argt |= XFILE;
*argt |= EX_XFILE;
break;
}
}
@@ -702,13 +702,13 @@ uc_scan_attr(
// First, try the simple attributes (no arguments)
if (STRNICMP(attr, "bang", len) == 0)
*argt |= BANG;
*argt |= EX_BANG;
else if (STRNICMP(attr, "buffer", len) == 0)
*flags |= UC_BUFFER;
else if (STRNICMP(attr, "register", len) == 0)
*argt |= REGSTR;
*argt |= EX_REGSTR;
else if (STRNICMP(attr, "bar", len) == 0)
*argt |= TRLBAR;
*argt |= EX_TRLBAR;
else
{
int i;
@@ -736,13 +736,13 @@ uc_scan_attr(
// Do nothing - this is the default
;
else if (*val == '1')
*argt |= (EXTRA | NOSPC | NEEDARG);
*argt |= (EX_EXTRA | EX_NOSPC | EX_NEEDARG);
else if (*val == '*')
*argt |= EXTRA;
*argt |= EX_EXTRA;
else if (*val == '?')
*argt |= (EXTRA | NOSPC);
*argt |= (EX_EXTRA | EX_NOSPC);
else if (*val == '+')
*argt |= (EXTRA | NEEDARG);
*argt |= (EX_EXTRA | EX_NEEDARG);
else
goto wrong_nargs;
}
@@ -755,9 +755,9 @@ wrong_nargs:
}
else if (STRNICMP(attr, "range", attrlen) == 0)
{
*argt |= RANGE;
*argt |= EX_RANGE;
if (vallen == 1 && *val == '%')
*argt |= DFLALL;
*argt |= EX_DFLALL;
else if (val != NULL)
{
p = val;
@@ -769,7 +769,7 @@ two_count:
}
*def = getdigits(&p);
*argt |= ZEROR;
*argt |= EX_ZEROR;
if (p != val + vallen || vallen == 0)
{
@@ -784,7 +784,7 @@ invalid_count:
}
else if (STRNICMP(attr, "count", attrlen) == 0)
{
*argt |= (COUNT | ZEROR | RANGE);
*argt |= (EX_COUNT | EX_ZEROR | EX_RANGE);
// default for -count is using any number
if (*addr_type_arg == ADDR_NONE)
*addr_type_arg = ADDR_OTHER;
@@ -818,7 +818,7 @@ invalid_count:
}
else if (STRNICMP(attr, "addr", attrlen) == 0)
{
*argt |= RANGE;
*argt |= EX_RANGE;
if (val == NULL)
{
emsg(_("E179: argument required for -addr"));
@@ -827,7 +827,7 @@ invalid_count:
if (parse_addr_type_arg(val, (int)vallen, addr_type_arg) == FAIL)
return FAIL;
if (*addr_type_arg != ADDR_LINES)
*argt |= ZEROR;
*argt |= EX_ZEROR;
}
else
{
@@ -1315,7 +1315,7 @@ uc_check_code(
// When specified there is a single argument don't split it.
// Works for ":Cmd %" when % is "a b c".
if ((eap->argt & NOSPC) && quote == 2)
if ((eap->argt & EX_NOSPC) && quote == 2)
quote = 1;
switch (quote)

View File

@@ -777,6 +777,24 @@ static char *(features[]) =
static int included_patches[] =
{ /* Add new patch number below this line */
/**/
1672,
/**/
1671,
/**/
1670,
/**/
1669,
/**/
1668,
/**/
1667,
/**/
1666,
/**/
1665,
/**/
1664,
/**/
1663,
/**/