mirror of
https://github.com/zoriya/vim.git
synced 2025-12-13 10:46:17 +00:00
Compare commits
18 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
1e8e14552e | ||
|
|
24a9e348aa | ||
|
|
a1bd86e0f2 | ||
|
|
53564f7c1a | ||
|
|
5fe691240b | ||
|
|
090209bfbd | ||
|
|
6d006f9e95 | ||
|
|
f8be461d02 | ||
|
|
4670490673 | ||
|
|
a529ce068b | ||
|
|
a1fed064d1 | ||
|
|
4d785895d1 | ||
|
|
d2c061d24c | ||
|
|
6a8958db25 | ||
|
|
6f9a476b2f | ||
|
|
d6abcd154c | ||
|
|
663bb23316 | ||
|
|
c768a208ca |
@@ -87,6 +87,7 @@ UninstPage instfiles
|
|||||||
Function .onInit
|
Function .onInit
|
||||||
MessageBox MB_YESNO|MB_ICONQUESTION \
|
MessageBox MB_YESNO|MB_ICONQUESTION \
|
||||||
"This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer.$\n Continue?" \
|
"This will install Vim ${VER_MAJOR}.${VER_MINOR} on your computer.$\n Continue?" \
|
||||||
|
/SD IDYES \
|
||||||
IDYES NoAbort
|
IDYES NoAbort
|
||||||
Abort ; causes installer to quit.
|
Abort ; causes installer to quit.
|
||||||
NoAbort:
|
NoAbort:
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
*eval.txt* For Vim version 8.0. Last change: 2017 Jun 13
|
*eval.txt* For Vim version 8.0. Last change: 2017 Jun 23
|
||||||
|
|
||||||
|
|
||||||
VIM REFERENCE MANUAL by Bram Moolenaar
|
VIM REFERENCE MANUAL by Bram Moolenaar
|
||||||
@@ -4586,6 +4586,7 @@ getqflist([{what}]) *getqflist()*
|
|||||||
returns only the items listed in {what} as a dictionary. The
|
returns only the items listed in {what} as a dictionary. The
|
||||||
following string items are supported in {what}:
|
following string items are supported in {what}:
|
||||||
context get the context stored with |setqflist()|
|
context get the context stored with |setqflist()|
|
||||||
|
items quickfix list entries
|
||||||
nr get information for this quickfix list; zero
|
nr get information for this quickfix list; zero
|
||||||
means the current quickfix list and '$' means
|
means the current quickfix list and '$' means
|
||||||
the last quickfix list
|
the last quickfix list
|
||||||
@@ -4602,6 +4603,7 @@ getqflist([{what}]) *getqflist()*
|
|||||||
|
|
||||||
The returned dictionary contains the following entries:
|
The returned dictionary contains the following entries:
|
||||||
context context information stored with |setqflist()|
|
context context information stored with |setqflist()|
|
||||||
|
items quickfix list entries
|
||||||
nr quickfix list number
|
nr quickfix list number
|
||||||
title quickfix list title text
|
title quickfix list title text
|
||||||
winid quickfix |window-ID| (if opened)
|
winid quickfix |window-ID| (if opened)
|
||||||
@@ -5466,9 +5468,9 @@ line({expr}) The result is a Number, which is the line number of the file
|
|||||||
This autocommand jumps to the last known position in a file
|
This autocommand jumps to the last known position in a file
|
||||||
just after opening it, if the '" mark is set: >
|
just after opening it, if the '" mark is set: >
|
||||||
:au BufReadPost *
|
:au BufReadPost *
|
||||||
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
\ if line("'\"") > 1 && line("'\"") <= line("$") && &ft !~# 'commit'
|
||||||
\ | exe "normal! g`\""
|
\ | exe "normal! g`\""
|
||||||
\ | endif
|
\ | endif
|
||||||
|
|
||||||
line2byte({lnum}) *line2byte()*
|
line2byte({lnum}) *line2byte()*
|
||||||
Return the byte count from the start of the buffer for line
|
Return the byte count from the start of the buffer for line
|
||||||
@@ -5890,7 +5892,7 @@ max({expr}) Return the maximum value of all items in {expr}.
|
|||||||
it returns the maximum of all values in the dictionary.
|
it returns the maximum of all values in the dictionary.
|
||||||
If {expr} is neither a list nor a dictionary, or one of the
|
If {expr} is neither a list nor a dictionary, or one of the
|
||||||
items in {expr} cannot be used as a Number this results in
|
items in {expr} cannot be used as a Number this results in
|
||||||
an error. An empty |List| or |Dictionary| results in zero.
|
an error. An empty |List| or |Dictionary| results in zero.
|
||||||
|
|
||||||
*min()*
|
*min()*
|
||||||
min({expr}) Return the minimum value of all items in {expr}.
|
min({expr}) Return the minimum value of all items in {expr}.
|
||||||
@@ -5898,7 +5900,7 @@ min({expr}) Return the minimum value of all items in {expr}.
|
|||||||
it returns the minimum of all values in the dictionary.
|
it returns the minimum of all values in the dictionary.
|
||||||
If {expr} is neither a list nor a dictionary, or one of the
|
If {expr} is neither a list nor a dictionary, or one of the
|
||||||
items in {expr} cannot be used as a Number this results in
|
items in {expr} cannot be used as a Number this results in
|
||||||
an error. An empty |List| or |Dictionary| results in zero.
|
an error. An empty |List| or |Dictionary| results in zero.
|
||||||
|
|
||||||
*mkdir()* *E739*
|
*mkdir()* *E739*
|
||||||
mkdir({name} [, {path} [, {prot}]])
|
mkdir({name} [, {path} [, {prot}]])
|
||||||
@@ -6193,8 +6195,8 @@ printf({fmt}, {expr1} ...) *printf()*
|
|||||||
zero the decimal point is omitted. When the precision
|
zero the decimal point is omitted. When the precision
|
||||||
is not specified 6 is used. A really big number
|
is not specified 6 is used. A really big number
|
||||||
(out of range or dividing by zero) results in "inf"
|
(out of range or dividing by zero) results in "inf"
|
||||||
or "-inf" with %f (INF or -INF with %F).
|
or "-inf" with %f (INF or -INF with %F).
|
||||||
"0.0 / 0.0" results in "nan" with %f (NAN with %F).
|
"0.0 / 0.0" results in "nan" with %f (NAN with %F).
|
||||||
Example: >
|
Example: >
|
||||||
echo printf("%.2f", 12.115)
|
echo printf("%.2f", 12.115)
|
||||||
< 12.12
|
< 12.12
|
||||||
@@ -6998,6 +7000,8 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
|
|||||||
argument is ignored. The following items can be specified in
|
argument is ignored. The following items can be specified in
|
||||||
{what}:
|
{what}:
|
||||||
context any Vim type can be stored as a context
|
context any Vim type can be stored as a context
|
||||||
|
items list of quickfix entries. Same as the {list}
|
||||||
|
argument.
|
||||||
nr list number in the quickfix stack; zero
|
nr list number in the quickfix stack; zero
|
||||||
means the current quickfix list and '$' means
|
means the current quickfix list and '$' means
|
||||||
the last quickfix list
|
the last quickfix list
|
||||||
@@ -7651,17 +7655,20 @@ synIDtrans({synID}) *synIDtrans()*
|
|||||||
":highlight link" are followed.
|
":highlight link" are followed.
|
||||||
|
|
||||||
synconcealed({lnum}, {col}) *synconcealed()*
|
synconcealed({lnum}, {col}) *synconcealed()*
|
||||||
The result is a List. The first item in the list is 0 if the
|
The result is a List with currently three items:
|
||||||
character at the position {lnum} and {col} is not part of a
|
1. The first item in the list is 0 if the character at the
|
||||||
concealable region, 1 if it is. The second item in the list is
|
position {lnum} and {col} is not part of a concealable
|
||||||
a string. If the first item is 1, the second item contains the
|
region, 1 if it is.
|
||||||
text which will be displayed in place of the concealed text,
|
2. The second item in the list is a string. If the first item
|
||||||
depending on the current setting of 'conceallevel'. The third
|
is 1, the second item contains the text which will be
|
||||||
and final item in the list is a unique number representing the
|
displayed in place of the concealed text, depending on the
|
||||||
specific syntax region matched. This allows detection of the
|
current setting of 'conceallevel' and 'listchars'.
|
||||||
beginning of a new concealable region if there are two
|
3. The third and final item in the list is a unique number
|
||||||
consecutive regions with the same replacement character.
|
representing the specific syntax region matched. This
|
||||||
For an example use see $VIMRUNTIME/syntax/2html.vim .
|
allows detection of the beginning of a new concealable
|
||||||
|
region if there are two consecutive regions with the same
|
||||||
|
replacement character. For an example use see
|
||||||
|
$VIMRUNTIME/syntax/2html.vim .
|
||||||
|
|
||||||
|
|
||||||
synstack({lnum}, {col}) *synstack()*
|
synstack({lnum}, {col}) *synstack()*
|
||||||
@@ -8348,8 +8355,8 @@ winwidth({nr}) *winwidth()*
|
|||||||
:if winwidth(0) <= 50
|
:if winwidth(0) <= 50
|
||||||
: exe "normal 50\<C-W>|"
|
: exe "normal 50\<C-W>|"
|
||||||
:endif
|
:endif
|
||||||
< For getting the terminal or screen size, see the 'columns'
|
< For getting the terminal or screen size, see the 'columns'
|
||||||
option.
|
option.
|
||||||
|
|
||||||
|
|
||||||
wordcount() *wordcount()*
|
wordcount() *wordcount()*
|
||||||
@@ -8367,11 +8374,11 @@ wordcount() *wordcount()*
|
|||||||
cursor_words Number of words before cursor position
|
cursor_words Number of words before cursor position
|
||||||
(not in Visual mode)
|
(not in Visual mode)
|
||||||
visual_bytes Number of bytes visually selected
|
visual_bytes Number of bytes visually selected
|
||||||
(only in Visual mode)
|
(only in Visual mode)
|
||||||
visual_chars Number of chars visually selected
|
visual_chars Number of chars visually selected
|
||||||
(only in Visual mode)
|
(only in Visual mode)
|
||||||
visual_words Number of chars visually selected
|
visual_words Number of chars visually selected
|
||||||
(only in Visual mode)
|
(only in Visual mode)
|
||||||
|
|
||||||
|
|
||||||
*writefile()*
|
*writefile()*
|
||||||
@@ -8715,6 +8722,9 @@ See |:verbose-cmd| for more information.
|
|||||||
not used an error message is given. When [!] is used,
|
not used an error message is given. When [!] is used,
|
||||||
an existing function is silently replaced. Unless it
|
an existing function is silently replaced. Unless it
|
||||||
is currently being executed, that is an error.
|
is currently being executed, that is an error.
|
||||||
|
NOTE: Use ! wisely. If used without care it can cause
|
||||||
|
an existing function to be replaced unexpectedly,
|
||||||
|
which is hard to debug.
|
||||||
|
|
||||||
For the {arguments} see |function-argument|.
|
For the {arguments} see |function-argument|.
|
||||||
|
|
||||||
@@ -8764,18 +8774,36 @@ See |:verbose-cmd| for more information.
|
|||||||
implies that the effect of |:nohlsearch| is undone
|
implies that the effect of |:nohlsearch| is undone
|
||||||
when the function returns.
|
when the function returns.
|
||||||
|
|
||||||
*:endf* *:endfunction* *E126* *E193*
|
*:endf* *:endfunction* *E126* *E193* *W22*
|
||||||
:endf[unction] The end of a function definition. Must be on a line
|
:endf[unction] [argument]
|
||||||
by its own, without other commands.
|
The end of a function definition. Best is to put it
|
||||||
|
on a line by its own, without [argument].
|
||||||
|
|
||||||
|
[argument] can be:
|
||||||
|
| command command to execute next
|
||||||
|
\n command command to execute next
|
||||||
|
" comment always ignored
|
||||||
|
anything else ignored, warning given when
|
||||||
|
'verbose' is non-zero
|
||||||
|
The support for a following command was added in Vim
|
||||||
|
8.0.0654, before that any argument was silently
|
||||||
|
ignored.
|
||||||
|
|
||||||
|
To be able to define a function inside an `:execute`
|
||||||
|
command, use line breaks instead of |:bar|: >
|
||||||
|
:exe "func Foo()\necho 'foo'\nendfunc"
|
||||||
|
<
|
||||||
*:delf* *:delfunction* *E130* *E131* *E933*
|
*:delf* *:delfunction* *E130* *E131* *E933*
|
||||||
:delf[unction] {name} Delete function {name}.
|
:delf[unction][!] {name}
|
||||||
|
Delete function {name}.
|
||||||
{name} can also be a |Dictionary| entry that is a
|
{name} can also be a |Dictionary| entry that is a
|
||||||
|Funcref|: >
|
|Funcref|: >
|
||||||
:delfunc dict.init
|
:delfunc dict.init
|
||||||
< This will remove the "init" entry from "dict". The
|
< This will remove the "init" entry from "dict". The
|
||||||
function is deleted if there are no more references to
|
function is deleted if there are no more references to
|
||||||
it.
|
it.
|
||||||
|
With the ! there is no error if the function does not
|
||||||
|
exist.
|
||||||
*:retu* *:return* *E133*
|
*:retu* *:return* *E133*
|
||||||
:retu[rn] [expr] Return from a function. When "[expr]" is given, it is
|
:retu[rn] [expr] Return from a function. When "[expr]" is given, it is
|
||||||
evaluated and returned as the result of the function.
|
evaluated and returned as the result of the function.
|
||||||
|
|||||||
@@ -2086,7 +2086,7 @@ test1 \
|
|||||||
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
|
test20 test21 test22 test23 test24 test25 test26 test27 test28 test29 \
|
||||||
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
test30 test31 test32 test33 test34 test36 test37 test38 test39 \
|
||||||
test40 test41 test42 test43 test44 test45 test48 test49 \
|
test40 test41 test42 test43 test44 test45 test48 test49 \
|
||||||
test50 test51 test52 test53 test54 test55 test56 test57 test58 test59 \
|
test50 test51 test52 test53 test54 test55 test56 test57 test59 \
|
||||||
test60 test64 test66 test67 test68 test69 \
|
test60 test64 test66 test67 test68 test69 \
|
||||||
test70 test72 test73 test74 test75 test77 test78 test79 \
|
test70 test72 test73 test74 test75 test77 test78 test79 \
|
||||||
test80 test82 test83 test84 test85 test86 test87 test88 \
|
test80 test82 test83 test84 test85 test86 test87 test88 \
|
||||||
|
|||||||
14
src/edit.c
14
src/edit.c
@@ -4308,9 +4308,17 @@ ins_compl_get_exp(pos_T *ini)
|
|||||||
{
|
{
|
||||||
ins_buf = curbuf;
|
ins_buf = curbuf;
|
||||||
first_match_pos = *ini;
|
first_match_pos = *ini;
|
||||||
/* So that ^N can match word immediately after cursor */
|
/* Move the cursor back one character so that ^N can match the
|
||||||
if (ctrl_x_mode == 0)
|
* word immediately after the cursor. */
|
||||||
dec(&first_match_pos);
|
if (ctrl_x_mode == 0 && dec(&first_match_pos) < 0)
|
||||||
|
{
|
||||||
|
/* Move the cursor to after the last character in the
|
||||||
|
* buffer, so that word at start of buffer is found
|
||||||
|
* correctly. */
|
||||||
|
first_match_pos.lnum = ins_buf->b_ml.ml_line_count;
|
||||||
|
first_match_pos.col =
|
||||||
|
(colnr_T)STRLEN(ml_get(first_match_pos.lnum));
|
||||||
|
}
|
||||||
last_match_pos = first_match_pos;
|
last_match_pos = first_match_pos;
|
||||||
type = 0;
|
type = 0;
|
||||||
|
|
||||||
|
|||||||
@@ -3191,7 +3191,7 @@ f_feedkeys(typval_T *argvars, typval_T *rettv UNUSED)
|
|||||||
ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
|
ins_typebuf(keys_esc, (remap ? REMAP_YES : REMAP_NONE),
|
||||||
insert ? 0 : typebuf.tb_len, !typed, FALSE);
|
insert ? 0 : typebuf.tb_len, !typed, FALSE);
|
||||||
vim_free(keys_esc);
|
vim_free(keys_esc);
|
||||||
if (vgetc_busy)
|
if (vgetc_busy || timer_busy)
|
||||||
typebuf_was_filled = TRUE;
|
typebuf_was_filled = TRUE;
|
||||||
if (execute)
|
if (execute)
|
||||||
{
|
{
|
||||||
@@ -11841,8 +11841,8 @@ f_synconcealed(typval_T *argvars UNUSED, typval_T *rettv)
|
|||||||
if ((syntax_flags & HL_CONCEAL) && curwin->w_p_cole < 3)
|
if ((syntax_flags & HL_CONCEAL) && curwin->w_p_cole < 3)
|
||||||
{
|
{
|
||||||
cchar = syn_get_sub_char();
|
cchar = syn_get_sub_char();
|
||||||
if (cchar == NUL && curwin->w_p_cole == 1 && lcs_conceal != NUL)
|
if (cchar == NUL && curwin->w_p_cole == 1)
|
||||||
cchar = lcs_conceal;
|
cchar = (lcs_conceal == NUL) ? ' ' : lcs_conceal;
|
||||||
if (cchar != NUL)
|
if (cchar != NUL)
|
||||||
{
|
{
|
||||||
# ifdef FEAT_MBYTE
|
# ifdef FEAT_MBYTE
|
||||||
|
|||||||
@@ -426,7 +426,7 @@ EX(CMD_delcommand, "delcommand", ex_delcommand,
|
|||||||
NEEDARG|WORD1|TRLBAR|CMDWIN,
|
NEEDARG|WORD1|TRLBAR|CMDWIN,
|
||||||
ADDR_LINES),
|
ADDR_LINES),
|
||||||
EX(CMD_delfunction, "delfunction", ex_delfunction,
|
EX(CMD_delfunction, "delfunction", ex_delfunction,
|
||||||
NEEDARG|WORD1|CMDWIN,
|
BANG|NEEDARG|WORD1|CMDWIN,
|
||||||
ADDR_LINES),
|
ADDR_LINES),
|
||||||
EX(CMD_display, "display", ex_display,
|
EX(CMD_display, "display", ex_display,
|
||||||
EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN,
|
EXTRA|NOTRLCOM|TRLBAR|SBOXOK|CMDWIN,
|
||||||
|
|||||||
@@ -1209,11 +1209,18 @@ check_due_timer(void)
|
|||||||
this_due = GET_TIMEDIFF(timer, now);
|
this_due = GET_TIMEDIFF(timer, now);
|
||||||
if (this_due <= 1)
|
if (this_due <= 1)
|
||||||
{
|
{
|
||||||
|
int save_timer_busy = timer_busy;
|
||||||
|
int save_vgetc_busy = vgetc_busy;
|
||||||
|
|
||||||
|
timer_busy = timer_busy > 0 || vgetc_busy > 0;
|
||||||
|
vgetc_busy = 0;
|
||||||
timer->tr_firing = TRUE;
|
timer->tr_firing = TRUE;
|
||||||
timer_callback(timer);
|
timer_callback(timer);
|
||||||
timer->tr_firing = FALSE;
|
timer->tr_firing = FALSE;
|
||||||
timer_next = timer->tr_next;
|
timer_next = timer->tr_next;
|
||||||
did_one = TRUE;
|
did_one = TRUE;
|
||||||
|
timer_busy = save_timer_busy;
|
||||||
|
vgetc_busy = save_vgetc_busy;
|
||||||
|
|
||||||
/* Only fire the timer again if it repeats and stop_timer() wasn't
|
/* Only fire the timer again if it repeats and stop_timer() wasn't
|
||||||
* called while inside the callback (tr_id == -1). */
|
* called while inside the callback (tr_id == -1). */
|
||||||
|
|||||||
@@ -2370,7 +2370,8 @@ do_one_cmd(
|
|||||||
goto doend;
|
goto doend;
|
||||||
}
|
}
|
||||||
/* Check for wrong commands. */
|
/* Check for wrong commands. */
|
||||||
if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78)
|
if (*p == '!' && ea.cmd[1] == 0151 && ea.cmd[0] == 78
|
||||||
|
&& !IS_USER_CMDIDX(ea.cmdidx))
|
||||||
{
|
{
|
||||||
errormsg = uc_fun_cmd();
|
errormsg = uc_fun_cmd();
|
||||||
goto doend;
|
goto doend;
|
||||||
|
|||||||
@@ -1659,6 +1659,7 @@ EXTERN int in_free_unref_items INIT(= FALSE);
|
|||||||
|
|
||||||
#ifdef FEAT_TIMERS
|
#ifdef FEAT_TIMERS
|
||||||
EXTERN int did_add_timer INIT(= FALSE);
|
EXTERN int did_add_timer INIT(= FALSE);
|
||||||
|
EXTERN int timer_busy INIT(= 0); /* when timer is inside vgetc() then > 0 */
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#ifdef FEAT_EVAL
|
#ifdef FEAT_EVAL
|
||||||
|
|||||||
@@ -112,6 +112,7 @@
|
|||||||
|
|
||||||
/* Used for the sgr mouse. */
|
/* Used for the sgr mouse. */
|
||||||
#define KS_SGR_MOUSE 237
|
#define KS_SGR_MOUSE 237
|
||||||
|
#define KS_SGR_MOUSE_RELEASE 236 /* Release */
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Filler used after KS_SPECIAL and others
|
* Filler used after KS_SPECIAL and others
|
||||||
@@ -416,6 +417,7 @@ enum key_extra
|
|||||||
#define K_PTERM_MOUSE TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER)
|
#define K_PTERM_MOUSE TERMCAP2KEY(KS_PTERM_MOUSE, KE_FILLER)
|
||||||
#define K_URXVT_MOUSE TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER)
|
#define K_URXVT_MOUSE TERMCAP2KEY(KS_URXVT_MOUSE, KE_FILLER)
|
||||||
#define K_SGR_MOUSE TERMCAP2KEY(KS_SGR_MOUSE, KE_FILLER)
|
#define K_SGR_MOUSE TERMCAP2KEY(KS_SGR_MOUSE, KE_FILLER)
|
||||||
|
#define K_SGR_MOUSERELEASE TERMCAP2KEY(KS_SGR_MOUSE_RELEASE, KE_FILLER)
|
||||||
|
|
||||||
#define K_SELECT TERMCAP2KEY(KS_SELECT, KE_FILLER)
|
#define K_SELECT TERMCAP2KEY(KS_SELECT, KE_FILLER)
|
||||||
#define K_TEAROFF TERMCAP2KEY(KS_TEAROFF, KE_FILLER)
|
#define K_TEAROFF TERMCAP2KEY(KS_TEAROFF, KE_FILLER)
|
||||||
|
|||||||
@@ -3471,6 +3471,13 @@ give_warning(char_u *message, int hl)
|
|||||||
--no_wait_return;
|
--no_wait_return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void
|
||||||
|
give_warning2(char_u *message, char_u *a1, int hl)
|
||||||
|
{
|
||||||
|
vim_snprintf((char *)IObuff, IOSIZE, (char *)message, a1);
|
||||||
|
give_warning(IObuff, hl);
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Advance msg cursor to column "col".
|
* Advance msg cursor to column "col".
|
||||||
*/
|
*/
|
||||||
|
|||||||
@@ -2438,6 +2438,7 @@ static struct key_name_entry
|
|||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_MOUSE_SGR
|
#ifdef FEAT_MOUSE_SGR
|
||||||
{K_SGR_MOUSE, (char_u *)"SgrMouse"},
|
{K_SGR_MOUSE, (char_u *)"SgrMouse"},
|
||||||
|
{K_SGR_MOUSERELEASE, (char_u *)"SgrMouseRelelase"},
|
||||||
#endif
|
#endif
|
||||||
{K_LEFTMOUSE, (char_u *)"LeftMouse"},
|
{K_LEFTMOUSE, (char_u *)"LeftMouse"},
|
||||||
{K_LEFTMOUSE_NM, (char_u *)"LeftMouseNM"},
|
{K_LEFTMOUSE_NM, (char_u *)"LeftMouseNM"},
|
||||||
|
|||||||
@@ -3771,7 +3771,6 @@ check_mouse_termcode(void)
|
|||||||
del_mouse_termcode(KS_PTERM_MOUSE);
|
del_mouse_termcode(KS_PTERM_MOUSE);
|
||||||
# endif
|
# endif
|
||||||
# ifdef FEAT_MOUSE_URXVT
|
# ifdef FEAT_MOUSE_URXVT
|
||||||
/* same conflict as the dec mouse */
|
|
||||||
if (use_xterm_mouse() == 3
|
if (use_xterm_mouse() == 3
|
||||||
# ifdef FEAT_GUI
|
# ifdef FEAT_GUI
|
||||||
&& !gui.in_use
|
&& !gui.in_use
|
||||||
@@ -3779,8 +3778,8 @@ check_mouse_termcode(void)
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
set_mouse_termcode(KS_URXVT_MOUSE, (char_u *)(term_is_8bit(T_NAME)
|
set_mouse_termcode(KS_URXVT_MOUSE, (char_u *)(term_is_8bit(T_NAME)
|
||||||
? IF_EB("\233", CSI_STR)
|
? IF_EB("\233*M", CSI_STR "*M")
|
||||||
: IF_EB("\033[", ESC_STR "[")));
|
: IF_EB("\033[*M", ESC_STR "[*M")));
|
||||||
|
|
||||||
if (*p_mouse != NUL)
|
if (*p_mouse != NUL)
|
||||||
{
|
{
|
||||||
@@ -3792,7 +3791,6 @@ check_mouse_termcode(void)
|
|||||||
del_mouse_termcode(KS_URXVT_MOUSE);
|
del_mouse_termcode(KS_URXVT_MOUSE);
|
||||||
# endif
|
# endif
|
||||||
# ifdef FEAT_MOUSE_SGR
|
# ifdef FEAT_MOUSE_SGR
|
||||||
/* There is no conflict with xterm mouse */
|
|
||||||
if (use_xterm_mouse() == 4
|
if (use_xterm_mouse() == 4
|
||||||
# ifdef FEAT_GUI
|
# ifdef FEAT_GUI
|
||||||
&& !gui.in_use
|
&& !gui.in_use
|
||||||
@@ -3800,8 +3798,12 @@ check_mouse_termcode(void)
|
|||||||
)
|
)
|
||||||
{
|
{
|
||||||
set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME)
|
set_mouse_termcode(KS_SGR_MOUSE, (char_u *)(term_is_8bit(T_NAME)
|
||||||
? IF_EB("\233<", CSI_STR "<")
|
? IF_EB("\233<*M", CSI_STR "<*M")
|
||||||
: IF_EB("\033[<", ESC_STR "[<")));
|
: IF_EB("\033[<*M", ESC_STR "[<*M")));
|
||||||
|
|
||||||
|
set_mouse_termcode(KS_SGR_MOUSE_RELEASE, (char_u *)(term_is_8bit(T_NAME)
|
||||||
|
? IF_EB("\233<*m", CSI_STR "<*m")
|
||||||
|
: IF_EB("\033[<*m", ESC_STR "[<*m")));
|
||||||
|
|
||||||
if (*p_mouse != NUL)
|
if (*p_mouse != NUL)
|
||||||
{
|
{
|
||||||
@@ -3810,7 +3812,10 @@ check_mouse_termcode(void)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
{
|
||||||
del_mouse_termcode(KS_SGR_MOUSE);
|
del_mouse_termcode(KS_SGR_MOUSE);
|
||||||
|
del_mouse_termcode(KS_SGR_MOUSE_RELEASE);
|
||||||
|
}
|
||||||
# endif
|
# endif
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -75,6 +75,7 @@ void verbose_leave_scroll(void);
|
|||||||
void verbose_stop(void);
|
void verbose_stop(void);
|
||||||
int verbose_open(void);
|
int verbose_open(void);
|
||||||
void give_warning(char_u *message, int hl);
|
void give_warning(char_u *message, int hl);
|
||||||
|
void give_warning2(char_u *message, char_u *a1, int hl);
|
||||||
void msg_advance(int col);
|
void msg_advance(int col);
|
||||||
int do_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
|
int do_dialog(int type, char_u *title, char_u *message, char_u *buttons, int dfltbutton, char_u *textfield, int ex_cmd);
|
||||||
void display_confirm_msg(void);
|
void display_confirm_msg(void);
|
||||||
|
|||||||
@@ -47,19 +47,32 @@ struct qfline_S
|
|||||||
*/
|
*/
|
||||||
#define LISTCOUNT 10
|
#define LISTCOUNT 10
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Quickfix/Location list definition
|
||||||
|
* Contains a list of entries (qfline_T). qf_start points to the first entry
|
||||||
|
* and qf_last points to the last entry. qf_count contains the list size.
|
||||||
|
*
|
||||||
|
* Usually the list contains one or more entries. But an empty list can be
|
||||||
|
* created using setqflist()/setloclist() with a title and/or user context
|
||||||
|
* information and entries can be added later using setqflist()/setloclist().
|
||||||
|
*/
|
||||||
typedef struct qf_list_S
|
typedef struct qf_list_S
|
||||||
{
|
{
|
||||||
qfline_T *qf_start; /* pointer to the first error */
|
qfline_T *qf_start; /* pointer to the first error */
|
||||||
qfline_T *qf_last; /* pointer to the last error */
|
qfline_T *qf_last; /* pointer to the last error */
|
||||||
qfline_T *qf_ptr; /* pointer to the current error */
|
qfline_T *qf_ptr; /* pointer to the current error */
|
||||||
int qf_count; /* number of errors (0 means no error list) */
|
int qf_count; /* number of errors (0 means empty list) */
|
||||||
int qf_index; /* current index in the error list */
|
int qf_index; /* current index in the error list */
|
||||||
int qf_nonevalid; /* TRUE if not a single valid entry found */
|
int qf_nonevalid; /* TRUE if not a single valid entry found */
|
||||||
char_u *qf_title; /* title derived from the command that created
|
char_u *qf_title; /* title derived from the command that created
|
||||||
* the error list */
|
* the error list or set by setqflist */
|
||||||
typval_T *qf_ctx; /* context set by setqflist/setloclist */
|
typval_T *qf_ctx; /* context set by setqflist/setloclist */
|
||||||
} qf_list_T;
|
} qf_list_T;
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Quickfix/Location list stack definition
|
||||||
|
* Contains a list of quickfix/location lists (qf_list_T)
|
||||||
|
*/
|
||||||
struct qf_info_S
|
struct qf_info_S
|
||||||
{
|
{
|
||||||
/*
|
/*
|
||||||
@@ -1347,6 +1360,9 @@ qf_init_end:
|
|||||||
static void
|
static void
|
||||||
qf_store_title(qf_info_T *qi, int qf_idx, char_u *title)
|
qf_store_title(qf_info_T *qi, int qf_idx, char_u *title)
|
||||||
{
|
{
|
||||||
|
vim_free(qi->qf_lists[qf_idx].qf_title);
|
||||||
|
qi->qf_lists[qf_idx].qf_title = NULL;
|
||||||
|
|
||||||
if (title != NULL)
|
if (title != NULL)
|
||||||
{
|
{
|
||||||
char_u *p = alloc((int)STRLEN(title) + 2);
|
char_u *p = alloc((int)STRLEN(title) + 2);
|
||||||
@@ -2735,10 +2751,11 @@ qf_history(exarg_T *eap)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Free all the entries in the error list "idx".
|
* Free all the entries in the error list "idx". Note that other information
|
||||||
|
* associated with the list like context and title are not freed.
|
||||||
*/
|
*/
|
||||||
static void
|
static void
|
||||||
qf_free(qf_info_T *qi, int idx)
|
qf_free_items(qf_info_T *qi, int idx)
|
||||||
{
|
{
|
||||||
qfline_T *qfp;
|
qfline_T *qfp;
|
||||||
qfline_T *qfpnext;
|
qfline_T *qfpnext;
|
||||||
@@ -2763,10 +2780,7 @@ qf_free(qf_info_T *qi, int idx)
|
|||||||
qi->qf_lists[idx].qf_start = qfpnext;
|
qi->qf_lists[idx].qf_start = qfpnext;
|
||||||
--qi->qf_lists[idx].qf_count;
|
--qi->qf_lists[idx].qf_count;
|
||||||
}
|
}
|
||||||
vim_free(qi->qf_lists[idx].qf_title);
|
|
||||||
qi->qf_lists[idx].qf_title = NULL;
|
|
||||||
free_tv(qi->qf_lists[idx].qf_ctx);
|
|
||||||
qi->qf_lists[idx].qf_ctx = NULL;
|
|
||||||
qi->qf_lists[idx].qf_index = 0;
|
qi->qf_lists[idx].qf_index = 0;
|
||||||
qi->qf_lists[idx].qf_start = NULL;
|
qi->qf_lists[idx].qf_start = NULL;
|
||||||
qi->qf_lists[idx].qf_last = NULL;
|
qi->qf_lists[idx].qf_last = NULL;
|
||||||
@@ -2782,6 +2796,21 @@ qf_free(qf_info_T *qi, int idx)
|
|||||||
qi->qf_multiscan = FALSE;
|
qi->qf_multiscan = FALSE;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/*
|
||||||
|
* Free error list "idx". Frees all the entries in the quickfix list,
|
||||||
|
* associated context information and the title.
|
||||||
|
*/
|
||||||
|
static void
|
||||||
|
qf_free(qf_info_T *qi, int idx)
|
||||||
|
{
|
||||||
|
qf_free_items(qi, idx);
|
||||||
|
|
||||||
|
vim_free(qi->qf_lists[idx].qf_title);
|
||||||
|
qi->qf_lists[idx].qf_title = NULL;
|
||||||
|
free_tv(qi->qf_lists[idx].qf_ctx);
|
||||||
|
qi->qf_lists[idx].qf_ctx = NULL;
|
||||||
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* qf_mark_adjust: adjust marks
|
* qf_mark_adjust: adjust marks
|
||||||
*/
|
*/
|
||||||
@@ -4698,13 +4727,11 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
|||||||
} else if ((di->di_tv.v_type == VAR_STRING) &&
|
} else if ((di->di_tv.v_type == VAR_STRING) &&
|
||||||
(STRCMP(di->di_tv.vval.v_string, "$") == 0))
|
(STRCMP(di->di_tv.vval.v_string, "$") == 0))
|
||||||
{
|
{
|
||||||
{
|
/* Get the last quickfix list number */
|
||||||
/* Get the last quickfix list number */
|
if (qi->qf_listcount > 0)
|
||||||
if (qi->qf_listcount > 0)
|
qf_idx = qi->qf_listcount - 1;
|
||||||
qf_idx = qi->qf_listcount - 1;
|
else
|
||||||
else
|
qf_idx = -1; /* Quickfix stack is empty */
|
||||||
qf_idx = -1; /* Quickfix stack is empty */
|
|
||||||
}
|
|
||||||
flags |= QF_GETLIST_NR;
|
flags |= QF_GETLIST_NR;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
@@ -4724,6 +4751,9 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
|||||||
|
|
||||||
if (dict_find(what, (char_u *)"context", -1) != NULL)
|
if (dict_find(what, (char_u *)"context", -1) != NULL)
|
||||||
flags |= QF_GETLIST_CONTEXT;
|
flags |= QF_GETLIST_CONTEXT;
|
||||||
|
|
||||||
|
if (dict_find(what, (char_u *)"items", -1) != NULL)
|
||||||
|
flags |= QF_GETLIST_ITEMS;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (flags & QF_GETLIST_TITLE)
|
if (flags & QF_GETLIST_TITLE)
|
||||||
@@ -4743,6 +4773,15 @@ get_errorlist_properties(win_T *wp, dict_T *what, dict_T *retdict)
|
|||||||
if (win != NULL)
|
if (win != NULL)
|
||||||
status = dict_add_nr_str(retdict, "winid", win->w_id, NULL);
|
status = dict_add_nr_str(retdict, "winid", win->w_id, NULL);
|
||||||
}
|
}
|
||||||
|
if ((status == OK) && (flags & QF_GETLIST_ITEMS))
|
||||||
|
{
|
||||||
|
list_T *l = list_alloc();
|
||||||
|
if (l != NULL)
|
||||||
|
{
|
||||||
|
(void)get_errorlist(wp, qf_idx, l);
|
||||||
|
dict_add_list(retdict, "items", l);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((status == OK) && (flags & QF_GETLIST_CONTEXT))
|
if ((status == OK) && (flags & QF_GETLIST_CONTEXT))
|
||||||
{
|
{
|
||||||
@@ -4802,7 +4841,7 @@ qf_add_entries(
|
|||||||
#endif
|
#endif
|
||||||
else if (action == 'r')
|
else if (action == 'r')
|
||||||
{
|
{
|
||||||
qf_free(qi, qf_idx);
|
qf_free_items(qi, qf_idx);
|
||||||
qf_store_title(qi, qf_idx, title);
|
qf_store_title(qi, qf_idx, title);
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -4915,15 +4954,27 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action)
|
|||||||
/* for zero use the current list */
|
/* for zero use the current list */
|
||||||
if (di->di_tv.vval.v_number != 0)
|
if (di->di_tv.vval.v_number != 0)
|
||||||
qf_idx = di->di_tv.vval.v_number - 1;
|
qf_idx = di->di_tv.vval.v_number - 1;
|
||||||
if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
|
|
||||||
|
if ((action == ' ' || action == 'a') &&
|
||||||
|
qf_idx == qi->qf_listcount)
|
||||||
|
/*
|
||||||
|
* When creating a new list, accept qf_idx pointing to the next
|
||||||
|
* non-available list
|
||||||
|
*/
|
||||||
|
newlist = TRUE;
|
||||||
|
else if (qf_idx < 0 || qf_idx >= qi->qf_listcount)
|
||||||
return FAIL;
|
return FAIL;
|
||||||
|
else
|
||||||
|
newlist = FALSE; /* use the specified list */
|
||||||
} else if (di->di_tv.v_type == VAR_STRING &&
|
} else if (di->di_tv.v_type == VAR_STRING &&
|
||||||
STRCMP(di->di_tv.vval.v_string, "$") == 0 &&
|
STRCMP(di->di_tv.vval.v_string, "$") == 0 &&
|
||||||
qi->qf_listcount > 0)
|
qi->qf_listcount > 0)
|
||||||
|
{
|
||||||
qf_idx = qi->qf_listcount - 1;
|
qf_idx = qi->qf_listcount - 1;
|
||||||
|
newlist = FALSE;
|
||||||
|
}
|
||||||
else
|
else
|
||||||
return FAIL;
|
return FAIL;
|
||||||
newlist = FALSE; /* use the specified list */
|
|
||||||
}
|
}
|
||||||
|
|
||||||
if (newlist)
|
if (newlist)
|
||||||
@@ -4944,6 +4995,17 @@ qf_set_properties(qf_info_T *qi, dict_T *what, int action)
|
|||||||
retval = OK;
|
retval = OK;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if ((di = dict_find(what, (char_u *)"items", -1)) != NULL)
|
||||||
|
{
|
||||||
|
if (di->di_tv.v_type == VAR_LIST)
|
||||||
|
{
|
||||||
|
char_u *title_save = vim_strsave(qi->qf_lists[qf_idx].qf_title);
|
||||||
|
|
||||||
|
retval = qf_add_entries(qi, qf_idx, di->di_tv.vval.v_list,
|
||||||
|
title_save, action == ' ' ? 'a' : action);
|
||||||
|
vim_free(title_save);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
if ((di = dict_find(what, (char_u *)"context", -1)) != NULL)
|
if ((di = dict_find(what, (char_u *)"context", -1)) != NULL)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -6909,6 +6909,7 @@ static char *(highlight_init_both[]) =
|
|||||||
"Cursor guibg=fg guifg=bg",
|
"Cursor guibg=fg guifg=bg",
|
||||||
"lCursor guibg=fg guifg=bg", /* should be different, but what? */
|
"lCursor guibg=fg guifg=bg", /* should be different, but what? */
|
||||||
#endif
|
#endif
|
||||||
|
"default link QuickFixLine Search",
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -6997,8 +6998,6 @@ static char *(highlight_init_light[]) =
|
|||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
"Normal gui=NONE",
|
"Normal gui=NONE",
|
||||||
#endif
|
#endif
|
||||||
CENT("QuickFixLine term=reverse ctermbg=Cyan",
|
|
||||||
"QuickFixLine term=reverse ctermbg=Cyan guibg=Cyan"),
|
|
||||||
NULL
|
NULL
|
||||||
};
|
};
|
||||||
|
|
||||||
@@ -7084,8 +7083,6 @@ static char *(highlight_init_dark[]) =
|
|||||||
CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey",
|
CENT("Conceal ctermbg=DarkGrey ctermfg=LightGrey",
|
||||||
"Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"),
|
"Conceal ctermbg=DarkGrey ctermfg=LightGrey guibg=DarkGrey guifg=LightGrey"),
|
||||||
#endif
|
#endif
|
||||||
CENT("QuickFixLine term=reverse ctermbg=Cyan",
|
|
||||||
"QuickFixLine term=reverse ctermbg=Cyan guibg=Cyan"),
|
|
||||||
#ifdef FEAT_GUI
|
#ifdef FEAT_GUI
|
||||||
"Normal gui=NONE",
|
"Normal gui=NONE",
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
145
src/term.c
145
src/term.c
@@ -1801,9 +1801,8 @@ set_termname(char_u *term)
|
|||||||
* The termcode for the mouse is added as a side effect in option.c.
|
* The termcode for the mouse is added as a side effect in option.c.
|
||||||
*/
|
*/
|
||||||
{
|
{
|
||||||
char_u *p;
|
char_u *p = (char_u *)"";
|
||||||
|
|
||||||
p = (char_u *)"";
|
|
||||||
# ifdef FEAT_MOUSE_XTERM
|
# ifdef FEAT_MOUSE_XTERM
|
||||||
if (use_xterm_like_mouse(term))
|
if (use_xterm_like_mouse(term))
|
||||||
{
|
{
|
||||||
@@ -1944,6 +1943,7 @@ set_termname(char_u *term)
|
|||||||
# define HMT_PTERM 16
|
# define HMT_PTERM 16
|
||||||
# define HMT_URXVT 32
|
# define HMT_URXVT 32
|
||||||
# define HMT_SGR 64
|
# define HMT_SGR 64
|
||||||
|
# define HMT_SGR_REL 128
|
||||||
static int has_mouse_termcode = 0;
|
static int has_mouse_termcode = 0;
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -1987,6 +1987,8 @@ set_mouse_termcode(
|
|||||||
# ifdef FEAT_MOUSE_SGR
|
# ifdef FEAT_MOUSE_SGR
|
||||||
if (n == KS_SGR_MOUSE)
|
if (n == KS_SGR_MOUSE)
|
||||||
has_mouse_termcode |= HMT_SGR;
|
has_mouse_termcode |= HMT_SGR;
|
||||||
|
else if (n == KS_SGR_MOUSE_RELEASE)
|
||||||
|
has_mouse_termcode |= HMT_SGR_REL;
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
has_mouse_termcode |= HMT_NORMAL;
|
has_mouse_termcode |= HMT_NORMAL;
|
||||||
@@ -2034,6 +2036,8 @@ del_mouse_termcode(
|
|||||||
# ifdef FEAT_MOUSE_SGR
|
# ifdef FEAT_MOUSE_SGR
|
||||||
if (n == KS_SGR_MOUSE)
|
if (n == KS_SGR_MOUSE)
|
||||||
has_mouse_termcode &= ~HMT_SGR;
|
has_mouse_termcode &= ~HMT_SGR;
|
||||||
|
else if (n == KS_SGR_MOUSE_RELEASE)
|
||||||
|
has_mouse_termcode &= ~HMT_SGR_REL;
|
||||||
else
|
else
|
||||||
# endif
|
# endif
|
||||||
has_mouse_termcode &= ~HMT_NORMAL;
|
has_mouse_termcode &= ~HMT_NORMAL;
|
||||||
@@ -3786,9 +3790,9 @@ add_termcode(char_u *name, char_u *string, int flags)
|
|||||||
}
|
}
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* Check termcode "code[len]" for ending in ;*X, <Esc>O*X or <M-O>*X.
|
* Check termcode "code[len]" for ending in ;*X or *X.
|
||||||
* The "X" can be any character.
|
* The "X" can be any character.
|
||||||
* Return 0 if not found, 2 for ;*X and 1 for O*X and <M-O>*X.
|
* Return 0 if not found, 2 for ;*X and 1 for *X.
|
||||||
*/
|
*/
|
||||||
static int
|
static int
|
||||||
termcode_star(char_u *code, int len)
|
termcode_star(char_u *code, int len)
|
||||||
@@ -3798,7 +3802,7 @@ termcode_star(char_u *code, int len)
|
|||||||
{
|
{
|
||||||
if (len >= 5 && code[len - 3] == ';')
|
if (len >= 5 && code[len - 3] == ';')
|
||||||
return 2;
|
return 2;
|
||||||
if ((len >= 4 && code[len - 3] == 'O') || code[len - 3] == 'O' + 128)
|
else
|
||||||
return 1;
|
return 1;
|
||||||
}
|
}
|
||||||
return 0;
|
return 0;
|
||||||
@@ -3940,6 +3944,7 @@ check_termcode(
|
|||||||
int offset;
|
int offset;
|
||||||
char_u key_name[2];
|
char_u key_name[2];
|
||||||
int modifiers;
|
int modifiers;
|
||||||
|
char_u *modifiers_start = NULL;
|
||||||
int key;
|
int key;
|
||||||
int new_slen;
|
int new_slen;
|
||||||
int extra;
|
int extra;
|
||||||
@@ -4065,6 +4070,7 @@ check_termcode(
|
|||||||
* But only when the 'K' flag is in 'cpoptions'.
|
* But only when the 'K' flag is in 'cpoptions'.
|
||||||
*/
|
*/
|
||||||
slen = termcodes[idx].len;
|
slen = termcodes[idx].len;
|
||||||
|
modifiers_start = NULL;
|
||||||
if (cpo_koffset && offset && len < slen)
|
if (cpo_koffset && offset && len < slen)
|
||||||
continue;
|
continue;
|
||||||
if (STRNCMP(termcodes[idx].code, tp,
|
if (STRNCMP(termcodes[idx].code, tp,
|
||||||
@@ -4125,7 +4131,7 @@ check_termcode(
|
|||||||
{
|
{
|
||||||
/* Skip over the digits, the final char must
|
/* Skip over the digits, the final char must
|
||||||
* follow. */
|
* follow. */
|
||||||
for (j = slen - 2; j < len && isdigit(tp[j]); ++j)
|
for (j = slen - 2; j < len && (isdigit(tp[j]) || tp[j] == ';'); ++j)
|
||||||
;
|
;
|
||||||
++j;
|
++j;
|
||||||
if (len < j) /* got a partial sequence */
|
if (len < j) /* got a partial sequence */
|
||||||
@@ -4133,8 +4139,10 @@ check_termcode(
|
|||||||
if (tp[j - 1] != termcodes[idx].code[slen - 1])
|
if (tp[j - 1] != termcodes[idx].code[slen - 1])
|
||||||
continue; /* no match */
|
continue; /* no match */
|
||||||
|
|
||||||
|
modifiers_start = tp + slen - 2;
|
||||||
|
|
||||||
/* Match! Convert modifier bits. */
|
/* Match! Convert modifier bits. */
|
||||||
n = atoi((char *)tp + slen - 2) - 1;
|
n = atoi((char *)modifiers_start) - 1;
|
||||||
if (n & 1)
|
if (n & 1)
|
||||||
modifiers |= MOD_MASK_SHIFT;
|
modifiers |= MOD_MASK_SHIFT;
|
||||||
if (n & 2)
|
if (n & 2)
|
||||||
@@ -4156,7 +4164,7 @@ check_termcode(
|
|||||||
|
|
||||||
#ifdef FEAT_TERMRESPONSE
|
#ifdef FEAT_TERMRESPONSE
|
||||||
if (key_name[0] == NUL
|
if (key_name[0] == NUL
|
||||||
/* Mouse codes of DEC, pterm, and URXVT start with <ESC>[. When
|
/* Mouse codes of DEC and pterm start with <ESC>[. When
|
||||||
* detecting the start of these mouse codes they might as well be
|
* detecting the start of these mouse codes they might as well be
|
||||||
* another key code or terminal response. */
|
* another key code or terminal response. */
|
||||||
# ifdef FEAT_MOUSE_DEC
|
# ifdef FEAT_MOUSE_DEC
|
||||||
@@ -4164,9 +4172,6 @@ check_termcode(
|
|||||||
# endif
|
# endif
|
||||||
# ifdef FEAT_MOUSE_PTERM
|
# ifdef FEAT_MOUSE_PTERM
|
||||||
|| key_name[0] == KS_PTERM_MOUSE
|
|| key_name[0] == KS_PTERM_MOUSE
|
||||||
# endif
|
|
||||||
# ifdef FEAT_MOUSE_URXVT
|
|
||||||
|| key_name[0] == KS_URXVT_MOUSE
|
|
||||||
# endif
|
# endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -4509,6 +4514,7 @@ check_termcode(
|
|||||||
# endif
|
# endif
|
||||||
# ifdef FEAT_MOUSE_SGR
|
# ifdef FEAT_MOUSE_SGR
|
||||||
|| key_name[0] == KS_SGR_MOUSE
|
|| key_name[0] == KS_SGR_MOUSE
|
||||||
|
|| key_name[0] == KS_SGR_MOUSE_RELEASE
|
||||||
# endif
|
# endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
@@ -4592,85 +4598,57 @@ check_termcode(
|
|||||||
|
|
||||||
# if defined(FEAT_MOUSE_URXVT) || defined(FEAT_MOUSE_SGR)
|
# if defined(FEAT_MOUSE_URXVT) || defined(FEAT_MOUSE_SGR)
|
||||||
if (key_name[0] == KS_URXVT_MOUSE
|
if (key_name[0] == KS_URXVT_MOUSE
|
||||||
|| key_name[0] == KS_SGR_MOUSE)
|
|| key_name[0] == KS_SGR_MOUSE
|
||||||
|
|| key_name[0] == KS_SGR_MOUSE_RELEASE)
|
||||||
{
|
{
|
||||||
for (;;)
|
/* URXVT 1015 mouse reporting mode:
|
||||||
{
|
* Almost identical to xterm mouse mode, except the values
|
||||||
/* URXVT 1015 mouse reporting mode:
|
* are decimal instead of bytes.
|
||||||
* Almost identical to xterm mouse mode, except the values
|
*
|
||||||
* are decimal instead of bytes.
|
* \033[%d;%d;%dM
|
||||||
*
|
* ^-- row
|
||||||
* \033[%d;%d;%dM
|
* ^----- column
|
||||||
* ^-- row
|
* ^-------- code
|
||||||
* ^----- column
|
*
|
||||||
* ^-------- code
|
* SGR 1006 mouse reporting mode:
|
||||||
*
|
* Almost identical to xterm mouse mode, except the values
|
||||||
* SGR 1006 mouse reporting mode:
|
* are decimal instead of bytes.
|
||||||
* Almost identical to xterm mouse mode, except the values
|
*
|
||||||
* are decimal instead of bytes.
|
* \033[<%d;%d;%dM
|
||||||
*
|
* ^-- row
|
||||||
* \033[<%d;%d;%dM
|
* ^----- column
|
||||||
* ^-- row
|
* ^-------- code
|
||||||
* ^----- column
|
*
|
||||||
* ^-------- code
|
* \033[<%d;%d;%dm : mouse release event
|
||||||
*
|
* ^-- row
|
||||||
* \033[<%d;%d;%dm : mouse release event
|
* ^----- column
|
||||||
* ^-- row
|
* ^-------- code
|
||||||
* ^----- column
|
*/
|
||||||
* ^-------- code
|
p = modifiers_start;
|
||||||
*/
|
if (p == NULL)
|
||||||
p = tp + slen;
|
return -1;
|
||||||
|
|
||||||
mouse_code = getdigits(&p);
|
mouse_code = getdigits(&p);
|
||||||
if (*p++ != ';')
|
if (*p++ != ';')
|
||||||
return -1;
|
return -1;
|
||||||
|
|
||||||
/* when mouse reporting is SGR, add 32 to mouse code */
|
/* when mouse reporting is SGR, add 32 to mouse code */
|
||||||
if (key_name[0] == KS_SGR_MOUSE)
|
if (key_name[0] == KS_SGR_MOUSE
|
||||||
mouse_code += 32;
|
|| key_name[0] == KS_SGR_MOUSE_RELEASE)
|
||||||
|
mouse_code += 32;
|
||||||
|
|
||||||
mouse_col = getdigits(&p) - 1;
|
if (key_name[0] == KS_SGR_MOUSE_RELEASE)
|
||||||
if (*p++ != ';')
|
mouse_code |= MOUSE_RELEASE;
|
||||||
return -1;
|
|
||||||
|
|
||||||
mouse_row = getdigits(&p) - 1;
|
mouse_col = getdigits(&p) - 1;
|
||||||
if (key_name[0] == KS_SGR_MOUSE && *p == 'm')
|
if (*p++ != ';')
|
||||||
mouse_code |= MOUSE_RELEASE;
|
return -1;
|
||||||
else if (*p != 'M')
|
|
||||||
return -1;
|
|
||||||
p++;
|
|
||||||
|
|
||||||
slen += (int)(p - (tp + slen));
|
mouse_row = getdigits(&p) - 1;
|
||||||
|
|
||||||
/* skip this one if next one has same code (like xterm
|
/* The modifiers were the mouse coordinates, not the
|
||||||
* case) */
|
* modifier keys (alt/shift/ctrl/meta) state. */
|
||||||
j = termcodes[idx].len;
|
modifiers = 0;
|
||||||
if (STRNCMP(tp, tp + slen, (size_t)j) == 0)
|
|
||||||
{
|
|
||||||
int slen2;
|
|
||||||
int cmd_complete = 0;
|
|
||||||
|
|
||||||
/* check if the command is complete by looking for the
|
|
||||||
* 'M' */
|
|
||||||
for (slen2 = slen; slen2 < len; slen2++)
|
|
||||||
{
|
|
||||||
if (tp[slen2] == 'M'
|
|
||||||
|| (key_name[0] == KS_SGR_MOUSE
|
|
||||||
&& tp[slen2] == 'm'))
|
|
||||||
{
|
|
||||||
cmd_complete = 1;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
p += j;
|
|
||||||
if (cmd_complete && getdigits(&p) == mouse_code)
|
|
||||||
{
|
|
||||||
slen += j; /* skip the \033[ */
|
|
||||||
continue;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
# endif
|
# endif
|
||||||
|
|
||||||
@@ -4680,6 +4658,7 @@ check_termcode(
|
|||||||
#endif
|
#endif
|
||||||
#ifdef FEAT_MOUSE_SGR
|
#ifdef FEAT_MOUSE_SGR
|
||||||
|| key_name[0] == KS_SGR_MOUSE
|
|| key_name[0] == KS_SGR_MOUSE
|
||||||
|
|| key_name[0] == KS_SGR_MOUSE_RELEASE
|
||||||
#endif
|
#endif
|
||||||
)
|
)
|
||||||
{
|
{
|
||||||
|
|||||||
@@ -115,7 +115,6 @@ SCRIPTS_MORE4 = \
|
|||||||
test17.out \
|
test17.out \
|
||||||
test30.out \
|
test30.out \
|
||||||
test32.out \
|
test32.out \
|
||||||
test58.out \
|
|
||||||
test59.out \
|
test59.out \
|
||||||
test72.out \
|
test72.out \
|
||||||
test78.out \
|
test78.out \
|
||||||
|
|||||||
@@ -123,7 +123,7 @@ SCRIPT = test1.out test3.out test4.out test5.out \
|
|||||||
# (this should be changed in order to preserve the original filename) - should
|
# (this should be changed in order to preserve the original filename) - should
|
||||||
# be fixed. VMS allows just one dot in the filename
|
# be fixed. VMS allows just one dot in the filename
|
||||||
#
|
#
|
||||||
# test58, test59: Failed/Hangs - VMS does not support spell files (file names
|
# test59: Failed/Hangs - VMS does not support spell files (file names
|
||||||
# with too many dots).
|
# with too many dots).
|
||||||
#
|
#
|
||||||
# test72: bug - Vim hangs at :rename (while rename works well otherwise)
|
# test72: bug - Vim hangs at :rename (while rename works well otherwise)
|
||||||
@@ -148,7 +148,7 @@ SCRIPT_WIN = test50.out test52.out
|
|||||||
.ENDIF
|
.ENDIF
|
||||||
|
|
||||||
.IFDEF WANT_SPELL
|
.IFDEF WANT_SPELL
|
||||||
SCRIPT_SPELL = test58.out test59.out
|
SCRIPT_SPELL = test59.out
|
||||||
.ENDIF
|
.ENDIF
|
||||||
|
|
||||||
.IFDEF WANT_MZSCH
|
.IFDEF WANT_MZSCH
|
||||||
|
|||||||
@@ -1,656 +0,0 @@
|
|||||||
Tests for spell checking. vim: set ft=vim :
|
|
||||||
|
|
||||||
STARTTEST
|
|
||||||
:so small.vim
|
|
||||||
:"
|
|
||||||
:" Don't want to depend on the locale from the environment
|
|
||||||
:set enc=latin1
|
|
||||||
:e!
|
|
||||||
:"
|
|
||||||
:" Check using z= in new buffer (crash fixed by patch 7.4a.028).
|
|
||||||
:set maxmem=512 spell
|
|
||||||
iasdz=:"
|
|
||||||
:"
|
|
||||||
:" Function to test .aff/.dic with list of good and bad words.
|
|
||||||
:func TestOne(aff, dic)
|
|
||||||
set spellfile=
|
|
||||||
$put =''
|
|
||||||
$put ='test '. a:aff . '-' . a:dic
|
|
||||||
" Generate a .spl file from a .dic and .aff file.
|
|
||||||
exe '1;/^' . a:aff . 'affstart/+1,/^' . a:aff . 'affend/-1w! Xtest.aff'
|
|
||||||
exe '1;/^' . a:dic . 'dicstart/+1,/^' . a:dic . 'dicend/-1w! Xtest.dic'
|
|
||||||
mkspell! Xtest Xtest
|
|
||||||
" use that spell file
|
|
||||||
set spl=Xtest.latin1.spl spell
|
|
||||||
" list all valid words
|
|
||||||
spelldump
|
|
||||||
%yank
|
|
||||||
quit
|
|
||||||
$put
|
|
||||||
$put ='-------'
|
|
||||||
" find all bad words and suggestions for them
|
|
||||||
exe '1;/^' . a:aff . 'good:'
|
|
||||||
normal 0f:]s
|
|
||||||
let prevbad = ''
|
|
||||||
while 1
|
|
||||||
let [bad, a] = spellbadword()
|
|
||||||
if bad == '' || bad == prevbad || bad == 'badend'
|
|
||||||
break
|
|
||||||
endif
|
|
||||||
let prevbad = bad
|
|
||||||
let lst = spellsuggest(bad, 3)
|
|
||||||
normal mm
|
|
||||||
$put =bad
|
|
||||||
$put =string(lst)
|
|
||||||
normal `m]s
|
|
||||||
endwhile
|
|
||||||
endfunc
|
|
||||||
:"
|
|
||||||
:call TestOne('1', '1')
|
|
||||||
:$put =soundfold('goobledygoook')
|
|
||||||
:$put =soundfold('k<>op<6F>r<EFBFBD>n<EFBFBD>ven')
|
|
||||||
:$put =soundfold('oeverloos gezwets edale')
|
|
||||||
:"
|
|
||||||
:"
|
|
||||||
:" and now with SAL instead of SOFO items; test automatic reloading
|
|
||||||
gg:/^affstart_sal/+1,/^affend_sal/-1w! Xtest.aff
|
|
||||||
:mkspell! Xtest Xtest
|
|
||||||
:$put =soundfold('goobledygoook')
|
|
||||||
:$put =soundfold('k<>op<6F>r<EFBFBD>n<EFBFBD>ven')
|
|
||||||
:$put =soundfold('oeverloos gezwets edale')
|
|
||||||
:"
|
|
||||||
:" also use an addition file
|
|
||||||
gg:/^addstart/+1,/^addend/-1w! Xtest.latin1.add
|
|
||||||
:mkspell! Xtest.latin1.add.spl Xtest.latin1.add
|
|
||||||
:set spellfile=Xtest.latin1.add
|
|
||||||
/^test2:
|
|
||||||
]s:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
:set spl=Xtest_us.latin1.spl
|
|
||||||
/^test2:
|
|
||||||
]smm:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
`m]s:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
:set spl=Xtest_gb.latin1.spl
|
|
||||||
/^test2:
|
|
||||||
]smm:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
`m]s:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
:set spl=Xtest_nz.latin1.spl
|
|
||||||
/^test2:
|
|
||||||
]smm:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
`m]s:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
:set spl=Xtest_ca.latin1.spl
|
|
||||||
/^test2:
|
|
||||||
]smm:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
`m]s:let [str, a] = spellbadword()
|
|
||||||
:$put =str
|
|
||||||
:unlet str a
|
|
||||||
:"
|
|
||||||
:" Postponed prefixes
|
|
||||||
:call TestOne('2', '1')
|
|
||||||
:"
|
|
||||||
:" Compound words
|
|
||||||
:call TestOne('3', '3')
|
|
||||||
:call TestOne('4', '4')
|
|
||||||
:call TestOne('5', '5')
|
|
||||||
:call TestOne('6', '6')
|
|
||||||
:call TestOne('7', '7')
|
|
||||||
:"
|
|
||||||
:" NOSLITSUGS
|
|
||||||
:call TestOne('8', '8')
|
|
||||||
:" Numbers
|
|
||||||
:call TestOne('9', '9')
|
|
||||||
:"
|
|
||||||
:" clean up for valgrind
|
|
||||||
:delfunc TestOne
|
|
||||||
:set spl= enc=latin1
|
|
||||||
:"
|
|
||||||
gg:/^test output:/,$wq! test.out
|
|
||||||
ENDTEST
|
|
||||||
|
|
||||||
1affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
TRY esianrtolcdugmphbyfvkwjkqxz-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'ESIANRTOLCDUGMPHBYFVKWJKQXZ
|
|
||||||
|
|
||||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
|
|
||||||
SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ<59><5A><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?
|
|
||||||
|
|
||||||
MIDWORD '-
|
|
||||||
|
|
||||||
KEP =
|
|
||||||
RAR ?
|
|
||||||
BAD !
|
|
||||||
|
|
||||||
PFX I N 1
|
|
||||||
PFX I 0 in .
|
|
||||||
|
|
||||||
PFX O Y 1
|
|
||||||
PFX O 0 out .
|
|
||||||
|
|
||||||
SFX S Y 2
|
|
||||||
SFX S 0 s [^s]
|
|
||||||
SFX S 0 es s
|
|
||||||
|
|
||||||
SFX N N 3
|
|
||||||
SFX N 0 en [^n]
|
|
||||||
SFX N 0 nen n
|
|
||||||
SFX N 0 n .
|
|
||||||
|
|
||||||
REP 3
|
|
||||||
REP g ch
|
|
||||||
REP ch g
|
|
||||||
REP svp s.v.p.
|
|
||||||
|
|
||||||
MAP 9
|
|
||||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP e<><65><EFBFBD><EFBFBD>
|
|
||||||
MAP i<><69><EFBFBD><EFBFBD>
|
|
||||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP u<><75><EFBFBD><EFBFBD>
|
|
||||||
MAP n<>
|
|
||||||
MAP c<>
|
|
||||||
MAP y<><79>
|
|
||||||
MAP s<>
|
|
||||||
1affend
|
|
||||||
|
|
||||||
1good: wrong OK puts. Test the end
|
|
||||||
bad: inputs comment ok Ok. test d<><64>l end the
|
|
||||||
badend
|
|
||||||
|
|
||||||
1dicstart
|
|
||||||
123456
|
|
||||||
test/NO
|
|
||||||
# comment
|
|
||||||
wrong
|
|
||||||
Comment
|
|
||||||
OK
|
|
||||||
uk
|
|
||||||
put/ISO
|
|
||||||
the end
|
|
||||||
deol
|
|
||||||
d<EFBFBD><EFBFBD>r
|
|
||||||
1dicend
|
|
||||||
|
|
||||||
affstart_sal
|
|
||||||
SET ISO8859-1
|
|
||||||
TRY esianrtolcdugmphbyfvkwjkqxz-<2D><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>'ESIANRTOLCDUGMPHBYFVKWJKQXZ
|
|
||||||
|
|
||||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
|
|
||||||
MIDWORD '-
|
|
||||||
|
|
||||||
KEP =
|
|
||||||
RAR ?
|
|
||||||
BAD !
|
|
||||||
|
|
||||||
PFX I N 1
|
|
||||||
PFX I 0 in .
|
|
||||||
|
|
||||||
PFX O Y 1
|
|
||||||
PFX O 0 out .
|
|
||||||
|
|
||||||
SFX S Y 2
|
|
||||||
SFX S 0 s [^s]
|
|
||||||
SFX S 0 es s
|
|
||||||
|
|
||||||
SFX N N 3
|
|
||||||
SFX N 0 en [^n]
|
|
||||||
SFX N 0 nen n
|
|
||||||
SFX N 0 n .
|
|
||||||
|
|
||||||
REP 3
|
|
||||||
REP g ch
|
|
||||||
REP ch g
|
|
||||||
REP svp s.v.p.
|
|
||||||
|
|
||||||
MAP 9
|
|
||||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP e<><65><EFBFBD><EFBFBD>
|
|
||||||
MAP i<><69><EFBFBD><EFBFBD>
|
|
||||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP u<><75><EFBFBD><EFBFBD>
|
|
||||||
MAP n<>
|
|
||||||
MAP c<>
|
|
||||||
MAP y<><79>
|
|
||||||
MAP s<>
|
|
||||||
|
|
||||||
SAL AH(AEIOUY)-^ *H
|
|
||||||
SAL AR(AEIOUY)-^ *R
|
|
||||||
SAL A(HR)^ *
|
|
||||||
SAL A^ *
|
|
||||||
SAL AH(AEIOUY)- H
|
|
||||||
SAL AR(AEIOUY)- R
|
|
||||||
SAL A(HR) _
|
|
||||||
SAL <20>^ *
|
|
||||||
SAL <20>^ *
|
|
||||||
SAL BB- _
|
|
||||||
SAL B B
|
|
||||||
SAL CQ- _
|
|
||||||
SAL CIA X
|
|
||||||
SAL CH X
|
|
||||||
SAL C(EIY)- S
|
|
||||||
SAL CK K
|
|
||||||
SAL COUGH^ KF
|
|
||||||
SAL CC< C
|
|
||||||
SAL C K
|
|
||||||
SAL DG(EIY) K
|
|
||||||
SAL DD- _
|
|
||||||
SAL D T
|
|
||||||
SAL <20>< E
|
|
||||||
SAL EH(AEIOUY)-^ *H
|
|
||||||
SAL ER(AEIOUY)-^ *R
|
|
||||||
SAL E(HR)^ *
|
|
||||||
SAL ENOUGH^$ *NF
|
|
||||||
SAL E^ *
|
|
||||||
SAL EH(AEIOUY)- H
|
|
||||||
SAL ER(AEIOUY)- R
|
|
||||||
SAL E(HR) _
|
|
||||||
SAL FF- _
|
|
||||||
SAL F F
|
|
||||||
SAL GN^ N
|
|
||||||
SAL GN$ N
|
|
||||||
SAL GNS$ NS
|
|
||||||
SAL GNED$ N
|
|
||||||
SAL GH(AEIOUY)- K
|
|
||||||
SAL GH _
|
|
||||||
SAL GG9 K
|
|
||||||
SAL G K
|
|
||||||
SAL H H
|
|
||||||
SAL IH(AEIOUY)-^ *H
|
|
||||||
SAL IR(AEIOUY)-^ *R
|
|
||||||
SAL I(HR)^ *
|
|
||||||
SAL I^ *
|
|
||||||
SAL ING6 N
|
|
||||||
SAL IH(AEIOUY)- H
|
|
||||||
SAL IR(AEIOUY)- R
|
|
||||||
SAL I(HR) _
|
|
||||||
SAL J K
|
|
||||||
SAL KN^ N
|
|
||||||
SAL KK- _
|
|
||||||
SAL K K
|
|
||||||
SAL LAUGH^ LF
|
|
||||||
SAL LL- _
|
|
||||||
SAL L L
|
|
||||||
SAL MB$ M
|
|
||||||
SAL MM M
|
|
||||||
SAL M M
|
|
||||||
SAL NN- _
|
|
||||||
SAL N N
|
|
||||||
SAL OH(AEIOUY)-^ *H
|
|
||||||
SAL OR(AEIOUY)-^ *R
|
|
||||||
SAL O(HR)^ *
|
|
||||||
SAL O^ *
|
|
||||||
SAL OH(AEIOUY)- H
|
|
||||||
SAL OR(AEIOUY)- R
|
|
||||||
SAL O(HR) _
|
|
||||||
SAL PH F
|
|
||||||
SAL PN^ N
|
|
||||||
SAL PP- _
|
|
||||||
SAL P P
|
|
||||||
SAL Q K
|
|
||||||
SAL RH^ R
|
|
||||||
SAL ROUGH^ RF
|
|
||||||
SAL RR- _
|
|
||||||
SAL R R
|
|
||||||
SAL SCH(EOU)- SK
|
|
||||||
SAL SC(IEY)- S
|
|
||||||
SAL SH X
|
|
||||||
SAL SI(AO)- X
|
|
||||||
SAL SS- _
|
|
||||||
SAL S S
|
|
||||||
SAL TI(AO)- X
|
|
||||||
SAL TH @
|
|
||||||
SAL TCH-- _
|
|
||||||
SAL TOUGH^ TF
|
|
||||||
SAL TT- _
|
|
||||||
SAL T T
|
|
||||||
SAL UH(AEIOUY)-^ *H
|
|
||||||
SAL UR(AEIOUY)-^ *R
|
|
||||||
SAL U(HR)^ *
|
|
||||||
SAL U^ *
|
|
||||||
SAL UH(AEIOUY)- H
|
|
||||||
SAL UR(AEIOUY)- R
|
|
||||||
SAL U(HR) _
|
|
||||||
SAL V^ W
|
|
||||||
SAL V F
|
|
||||||
SAL WR^ R
|
|
||||||
SAL WH^ W
|
|
||||||
SAL W(AEIOU)- W
|
|
||||||
SAL X^ S
|
|
||||||
SAL X KS
|
|
||||||
SAL Y(AEIOU)- Y
|
|
||||||
SAL ZZ- _
|
|
||||||
SAL Z S
|
|
||||||
affend_sal
|
|
||||||
|
|
||||||
2affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
|
|
||||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
|
|
||||||
PFXPOSTPONE
|
|
||||||
|
|
||||||
MIDWORD '-
|
|
||||||
|
|
||||||
KEP =
|
|
||||||
RAR ?
|
|
||||||
BAD !
|
|
||||||
|
|
||||||
PFX I N 1
|
|
||||||
PFX I 0 in .
|
|
||||||
|
|
||||||
PFX O Y 1
|
|
||||||
PFX O 0 out [a-z]
|
|
||||||
|
|
||||||
SFX S Y 2
|
|
||||||
SFX S 0 s [^s]
|
|
||||||
SFX S 0 es s
|
|
||||||
|
|
||||||
SFX N N 3
|
|
||||||
SFX N 0 en [^n]
|
|
||||||
SFX N 0 nen n
|
|
||||||
SFX N 0 n .
|
|
||||||
|
|
||||||
REP 3
|
|
||||||
REP g ch
|
|
||||||
REP ch g
|
|
||||||
REP svp s.v.p.
|
|
||||||
|
|
||||||
MAP 9
|
|
||||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP e<><65><EFBFBD><EFBFBD>
|
|
||||||
MAP i<><69><EFBFBD><EFBFBD>
|
|
||||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP u<><75><EFBFBD><EFBFBD>
|
|
||||||
MAP n<>
|
|
||||||
MAP c<>
|
|
||||||
MAP y<><79>
|
|
||||||
MAP s<>
|
|
||||||
2affend
|
|
||||||
|
|
||||||
2good: puts
|
|
||||||
bad: inputs comment ok Ok end the. test d<><64>l
|
|
||||||
badend
|
|
||||||
|
|
||||||
addstart
|
|
||||||
/regions=usgbnz
|
|
||||||
elequint/2
|
|
||||||
elekwint/3
|
|
||||||
addend
|
|
||||||
|
|
||||||
test2:
|
|
||||||
elequint test elekwint test elekwent asdf
|
|
||||||
|
|
||||||
Test rules for compounding.
|
|
||||||
|
|
||||||
3affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
|
|
||||||
COMPOUNDMIN 3
|
|
||||||
COMPOUNDRULE m*
|
|
||||||
NEEDCOMPOUND x
|
|
||||||
3affend
|
|
||||||
|
|
||||||
3dicstart
|
|
||||||
1234
|
|
||||||
foo/m
|
|
||||||
bar/mx
|
|
||||||
m<EFBFBD>/m
|
|
||||||
la/mx
|
|
||||||
3dicend
|
|
||||||
|
|
||||||
3good: foo m<> foobar foofoobar barfoo barbarfoo
|
|
||||||
bad: bar la foom<6F> barm<72> m<>foo m<>bar m<>m<EFBFBD> lala m<>la lam<61> foola labar
|
|
||||||
badend
|
|
||||||
|
|
||||||
|
|
||||||
Tests for compounding.
|
|
||||||
|
|
||||||
4affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
|
|
||||||
FOL <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
LOW <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
UPP <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
|
|
||||||
COMPOUNDRULE m+
|
|
||||||
COMPOUNDRULE sm*e
|
|
||||||
COMPOUNDRULE sm+
|
|
||||||
COMPOUNDMIN 3
|
|
||||||
COMPOUNDWORDMAX 3
|
|
||||||
COMPOUNDFORBIDFLAG t
|
|
||||||
|
|
||||||
COMPOUNDSYLMAX 5
|
|
||||||
SYLLABLE a<>e<EFBFBD>i<EFBFBD>o<EFBFBD><6F><EFBFBD>u<EFBFBD><75><EFBFBD>y/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui
|
|
||||||
|
|
||||||
MAP 9
|
|
||||||
MAP a<><61><EFBFBD><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP e<><65><EFBFBD><EFBFBD>
|
|
||||||
MAP i<><69><EFBFBD><EFBFBD>
|
|
||||||
MAP o<><6F><EFBFBD><EFBFBD><EFBFBD>
|
|
||||||
MAP u<><75><EFBFBD><EFBFBD>
|
|
||||||
MAP n<>
|
|
||||||
MAP c<>
|
|
||||||
MAP y<><79>
|
|
||||||
MAP s<>
|
|
||||||
|
|
||||||
NEEDAFFIX x
|
|
||||||
|
|
||||||
PFXPOSTPONE
|
|
||||||
|
|
||||||
MIDWORD '-
|
|
||||||
|
|
||||||
SFX q N 1
|
|
||||||
SFX q 0 -ok .
|
|
||||||
|
|
||||||
SFX a Y 2
|
|
||||||
SFX a 0 s .
|
|
||||||
SFX a 0 ize/t .
|
|
||||||
|
|
||||||
PFX p N 1
|
|
||||||
PFX p 0 pre .
|
|
||||||
|
|
||||||
PFX P N 1
|
|
||||||
PFX P 0 nou .
|
|
||||||
4affend
|
|
||||||
|
|
||||||
4dicstart
|
|
||||||
1234
|
|
||||||
word/mP
|
|
||||||
util/am
|
|
||||||
pro/xq
|
|
||||||
tomato/m
|
|
||||||
bork/mp
|
|
||||||
start/s
|
|
||||||
end/e
|
|
||||||
4dicend
|
|
||||||
|
|
||||||
4good: word util bork prebork start end wordutil wordutils pro-ok
|
|
||||||
bork borkbork borkborkbork borkborkborkbork borkborkborkborkbork
|
|
||||||
tomato tomatotomato startend startword startwordword startwordend
|
|
||||||
startwordwordend startwordwordwordend prebork preborkbork
|
|
||||||
preborkborkbork
|
|
||||||
nouword
|
|
||||||
bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomato
|
|
||||||
endstart endend startstart wordend wordstart
|
|
||||||
preborkprebork preborkpreborkbork
|
|
||||||
startwordwordwordwordend borkpreborkpreborkbork
|
|
||||||
utilsbork startnouword
|
|
||||||
badend
|
|
||||||
|
|
||||||
Test affix flags with two characters
|
|
||||||
|
|
||||||
5affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
|
|
||||||
FLAG long
|
|
||||||
|
|
||||||
NEEDAFFIX !!
|
|
||||||
|
|
||||||
COMPOUNDRULE ssmm*ee
|
|
||||||
|
|
||||||
NEEDCOMPOUND xx
|
|
||||||
COMPOUNDPERMITFLAG pp
|
|
||||||
|
|
||||||
SFX 13 Y 1
|
|
||||||
SFX 13 0 bork .
|
|
||||||
|
|
||||||
SFX a1 Y 1
|
|
||||||
SFX a1 0 a1 .
|
|
||||||
|
|
||||||
SFX a<> Y 1
|
|
||||||
SFX a<> 0 a<> .
|
|
||||||
|
|
||||||
PFX zz Y 1
|
|
||||||
PFX zz 0 pre/pp .
|
|
||||||
|
|
||||||
PFX yy Y 1
|
|
||||||
PFX yy 0 nou .
|
|
||||||
5affend
|
|
||||||
|
|
||||||
5dicstart
|
|
||||||
1234
|
|
||||||
foo/a1a<31>!!
|
|
||||||
bar/zz13ee
|
|
||||||
start/ss
|
|
||||||
end/eeyy
|
|
||||||
middle/mmxx
|
|
||||||
5dicend
|
|
||||||
|
|
||||||
5good: fooa1 fooa<6F> bar prebar barbork prebarbork startprebar
|
|
||||||
start end startend startmiddleend nouend
|
|
||||||
bad: foo fooa2 prabar probarbirk middle startmiddle middleend endstart
|
|
||||||
startprobar startnouend
|
|
||||||
badend
|
|
||||||
|
|
||||||
6affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
|
|
||||||
FLAG caplong
|
|
||||||
|
|
||||||
NEEDAFFIX A!
|
|
||||||
|
|
||||||
COMPOUNDRULE sMm*Ee
|
|
||||||
|
|
||||||
NEEDCOMPOUND Xx
|
|
||||||
|
|
||||||
COMPOUNDPERMITFLAG p
|
|
||||||
|
|
||||||
SFX N3 Y 1
|
|
||||||
SFX N3 0 bork .
|
|
||||||
|
|
||||||
SFX A1 Y 1
|
|
||||||
SFX A1 0 a1 .
|
|
||||||
|
|
||||||
SFX A<> Y 1
|
|
||||||
SFX A<> 0 a<> .
|
|
||||||
|
|
||||||
PFX Zz Y 1
|
|
||||||
PFX Zz 0 pre/p .
|
|
||||||
6affend
|
|
||||||
|
|
||||||
6dicstart
|
|
||||||
1234
|
|
||||||
mee/A1A<31>A!
|
|
||||||
bar/ZzN3Ee
|
|
||||||
lead/s
|
|
||||||
end/Ee
|
|
||||||
middle/MmXx
|
|
||||||
6dicend
|
|
||||||
|
|
||||||
6good: meea1 meea<65> bar prebar barbork prebarbork leadprebar
|
|
||||||
lead end leadend leadmiddleend
|
|
||||||
bad: mee meea2 prabar probarbirk middle leadmiddle middleend endlead
|
|
||||||
leadprobar
|
|
||||||
badend
|
|
||||||
|
|
||||||
7affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
|
|
||||||
FLAG num
|
|
||||||
|
|
||||||
NEEDAFFIX 9999
|
|
||||||
|
|
||||||
COMPOUNDRULE 2,77*123
|
|
||||||
|
|
||||||
NEEDCOMPOUND 1
|
|
||||||
COMPOUNDPERMITFLAG 432
|
|
||||||
|
|
||||||
SFX 61003 Y 1
|
|
||||||
SFX 61003 0 meat .
|
|
||||||
|
|
||||||
SFX 391 Y 1
|
|
||||||
SFX 391 0 a1 .
|
|
||||||
|
|
||||||
SFX 111 Y 1
|
|
||||||
SFX 111 0 a<> .
|
|
||||||
|
|
||||||
PFX 17 Y 1
|
|
||||||
PFX 17 0 pre/432 .
|
|
||||||
7affend
|
|
||||||
|
|
||||||
7dicstart
|
|
||||||
1234
|
|
||||||
mee/391,111,9999
|
|
||||||
bar/17,61003,123
|
|
||||||
lead/2
|
|
||||||
tail/123
|
|
||||||
middle/77,1
|
|
||||||
7dicend
|
|
||||||
|
|
||||||
7good: meea1 meea<65> bar prebar barmeat prebarmeat leadprebar
|
|
||||||
lead tail leadtail leadmiddletail
|
|
||||||
bad: mee meea2 prabar probarmaat middle leadmiddle middletail taillead
|
|
||||||
leadprobar
|
|
||||||
badend
|
|
||||||
|
|
||||||
Test NOSLITSUGS
|
|
||||||
|
|
||||||
8affstart
|
|
||||||
SET ISO8859-1
|
|
||||||
|
|
||||||
NOSPLITSUGS
|
|
||||||
8affend
|
|
||||||
|
|
||||||
8dicstart
|
|
||||||
1234
|
|
||||||
foo
|
|
||||||
bar
|
|
||||||
faabar
|
|
||||||
8dicend
|
|
||||||
|
|
||||||
8good: foo bar faabar
|
|
||||||
bad: foobar barfoo
|
|
||||||
badend
|
|
||||||
|
|
||||||
|
|
||||||
Test Numbers
|
|
||||||
|
|
||||||
9affstart
|
|
||||||
9affend
|
|
||||||
|
|
||||||
9dicstart
|
|
||||||
1234
|
|
||||||
foo
|
|
||||||
bar
|
|
||||||
9dicend
|
|
||||||
|
|
||||||
9good: 0b1011 0777 1234 0x01ff
|
|
||||||
badend
|
|
||||||
|
|
||||||
|
|
||||||
test output:
|
|
||||||
@@ -1,289 +0,0 @@
|
|||||||
test output:
|
|
||||||
|
|
||||||
test 1-1
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
Comment
|
|
||||||
deol
|
|
||||||
d<EFBFBD><EFBFBD>r
|
|
||||||
input
|
|
||||||
OK
|
|
||||||
output
|
|
||||||
outputs
|
|
||||||
outtest
|
|
||||||
put
|
|
||||||
puts
|
|
||||||
test
|
|
||||||
testen
|
|
||||||
testn
|
|
||||||
the end
|
|
||||||
uk
|
|
||||||
wrong
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['put', 'uk', 'OK']
|
|
||||||
inputs
|
|
||||||
['input', 'puts', 'outputs']
|
|
||||||
comment
|
|
||||||
['Comment', 'outtest', 'the end']
|
|
||||||
ok
|
|
||||||
['OK', 'uk', 'put']
|
|
||||||
Ok
|
|
||||||
['OK', 'Uk', 'Put']
|
|
||||||
test
|
|
||||||
['Test', 'testn', 'testen']
|
|
||||||
d<EFBFBD><EFBFBD>l
|
|
||||||
['deol', 'd<><64>r', 'test']
|
|
||||||
end
|
|
||||||
['put', 'uk', 'test']
|
|
||||||
the
|
|
||||||
['put', 'uk', 'test']
|
|
||||||
gebletegek
|
|
||||||
kepereneven
|
|
||||||
everles gesvets etele
|
|
||||||
kbltykk
|
|
||||||
kprnfn
|
|
||||||
*fls kswts tl
|
|
||||||
elekwent
|
|
||||||
elequint
|
|
||||||
elekwint
|
|
||||||
elekwint
|
|
||||||
elekwent
|
|
||||||
elequint
|
|
||||||
elekwent
|
|
||||||
elequint
|
|
||||||
elekwint
|
|
||||||
|
|
||||||
test 2-1
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
Comment
|
|
||||||
deol
|
|
||||||
d<EFBFBD><EFBFBD>r
|
|
||||||
OK
|
|
||||||
put
|
|
||||||
input
|
|
||||||
output
|
|
||||||
puts
|
|
||||||
outputs
|
|
||||||
test
|
|
||||||
outtest
|
|
||||||
testen
|
|
||||||
testn
|
|
||||||
the end
|
|
||||||
uk
|
|
||||||
wrong
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['put', 'uk', 'OK']
|
|
||||||
inputs
|
|
||||||
['input', 'puts', 'outputs']
|
|
||||||
comment
|
|
||||||
['Comment']
|
|
||||||
ok
|
|
||||||
['OK', 'uk', 'put']
|
|
||||||
Ok
|
|
||||||
['OK', 'Uk', 'Put']
|
|
||||||
end
|
|
||||||
['put', 'uk', 'deol']
|
|
||||||
the
|
|
||||||
['put', 'uk', 'test']
|
|
||||||
test
|
|
||||||
['Test', 'testn', 'testen']
|
|
||||||
d<EFBFBD><EFBFBD>l
|
|
||||||
['deol', 'd<><64>r', 'test']
|
|
||||||
|
|
||||||
test 3-3
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
foo
|
|
||||||
m<EFBFBD>
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['foo', 'm<>']
|
|
||||||
bar
|
|
||||||
['barfoo', 'foobar', 'foo']
|
|
||||||
la
|
|
||||||
['m<>', 'foo']
|
|
||||||
foom<EFBFBD>
|
|
||||||
['foo m<>', 'foo', 'foofoo']
|
|
||||||
barm<EFBFBD>
|
|
||||||
['barfoo', 'm<>', 'barbar']
|
|
||||||
m<EFBFBD>foo
|
|
||||||
['m<> foo', 'foo', 'foofoo']
|
|
||||||
m<EFBFBD>bar
|
|
||||||
['foobar', 'barbar', 'm<>']
|
|
||||||
m<EFBFBD>m<EFBFBD>
|
|
||||||
['m<> m<>', 'm<>']
|
|
||||||
lala
|
|
||||||
[]
|
|
||||||
m<EFBFBD>la
|
|
||||||
['m<>', 'm<> m<>']
|
|
||||||
lam<EFBFBD>
|
|
||||||
['m<>', 'm<> m<>']
|
|
||||||
foola
|
|
||||||
['foo', 'foobar', 'foofoo']
|
|
||||||
labar
|
|
||||||
['barbar', 'foobar']
|
|
||||||
|
|
||||||
test 4-4
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
bork
|
|
||||||
prebork
|
|
||||||
end
|
|
||||||
pro-ok
|
|
||||||
start
|
|
||||||
tomato
|
|
||||||
util
|
|
||||||
utilize
|
|
||||||
utils
|
|
||||||
word
|
|
||||||
nouword
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['end', 'bork', 'word']
|
|
||||||
wordutilize
|
|
||||||
['word utilize', 'wordutils', 'wordutil']
|
|
||||||
pro
|
|
||||||
['bork', 'word', 'end']
|
|
||||||
borkborkborkborkborkbork
|
|
||||||
['bork borkborkborkborkbork', 'borkbork borkborkborkbork', 'borkborkbork borkborkbork']
|
|
||||||
tomatotomatotomato
|
|
||||||
['tomato tomatotomato', 'tomatotomato tomato', 'tomato tomato tomato']
|
|
||||||
endstart
|
|
||||||
['end start', 'start']
|
|
||||||
endend
|
|
||||||
['end end', 'end']
|
|
||||||
startstart
|
|
||||||
['start start']
|
|
||||||
wordend
|
|
||||||
['word end', 'word', 'wordword']
|
|
||||||
wordstart
|
|
||||||
['word start', 'bork start']
|
|
||||||
preborkprebork
|
|
||||||
['prebork prebork', 'preborkbork', 'preborkborkbork']
|
|
||||||
preborkpreborkbork
|
|
||||||
['prebork preborkbork', 'preborkborkbork', 'preborkborkborkbork']
|
|
||||||
startwordwordwordwordend
|
|
||||||
['startwordwordwordword end', 'startwordwordwordword', 'start wordwordwordword end']
|
|
||||||
borkpreborkpreborkbork
|
|
||||||
['bork preborkpreborkbork', 'bork prebork preborkbork', 'bork preborkprebork bork']
|
|
||||||
utilsbork
|
|
||||||
['utilbork', 'utils bork', 'util bork']
|
|
||||||
startnouword
|
|
||||||
['start nouword', 'startword', 'startborkword']
|
|
||||||
|
|
||||||
test 5-5
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
bar
|
|
||||||
barbork
|
|
||||||
end
|
|
||||||
fooa1
|
|
||||||
fooa<EFBFBD>
|
|
||||||
nouend
|
|
||||||
prebar
|
|
||||||
prebarbork
|
|
||||||
start
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['bar', 'end', 'fooa1']
|
|
||||||
foo
|
|
||||||
['fooa1', 'fooa<6F>', 'bar']
|
|
||||||
fooa2
|
|
||||||
['fooa1', 'fooa<6F>', 'bar']
|
|
||||||
prabar
|
|
||||||
['prebar', 'bar', 'bar bar']
|
|
||||||
probarbirk
|
|
||||||
['prebarbork']
|
|
||||||
middle
|
|
||||||
[]
|
|
||||||
startmiddle
|
|
||||||
['startmiddleend', 'startmiddlebar']
|
|
||||||
middleend
|
|
||||||
[]
|
|
||||||
endstart
|
|
||||||
['end start', 'start']
|
|
||||||
startprobar
|
|
||||||
['startprebar', 'start prebar', 'startbar']
|
|
||||||
startnouend
|
|
||||||
['start nouend', 'startend']
|
|
||||||
|
|
||||||
test 6-6
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
bar
|
|
||||||
barbork
|
|
||||||
end
|
|
||||||
lead
|
|
||||||
meea1
|
|
||||||
meea<EFBFBD>
|
|
||||||
prebar
|
|
||||||
prebarbork
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['bar', 'end', 'lead']
|
|
||||||
mee
|
|
||||||
['meea1', 'meea<65>', 'bar']
|
|
||||||
meea2
|
|
||||||
['meea1', 'meea<65>', 'lead']
|
|
||||||
prabar
|
|
||||||
['prebar', 'bar', 'leadbar']
|
|
||||||
probarbirk
|
|
||||||
['prebarbork']
|
|
||||||
middle
|
|
||||||
[]
|
|
||||||
leadmiddle
|
|
||||||
['leadmiddleend', 'leadmiddlebar']
|
|
||||||
middleend
|
|
||||||
[]
|
|
||||||
endlead
|
|
||||||
['end lead', 'lead', 'end end']
|
|
||||||
leadprobar
|
|
||||||
['leadprebar', 'lead prebar', 'leadbar']
|
|
||||||
|
|
||||||
test 7-7
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
bar
|
|
||||||
barmeat
|
|
||||||
lead
|
|
||||||
meea1
|
|
||||||
meea<EFBFBD>
|
|
||||||
prebar
|
|
||||||
prebarmeat
|
|
||||||
tail
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['bar', 'lead', 'tail']
|
|
||||||
mee
|
|
||||||
['meea1', 'meea<65>', 'bar']
|
|
||||||
meea2
|
|
||||||
['meea1', 'meea<65>', 'lead']
|
|
||||||
prabar
|
|
||||||
['prebar', 'bar', 'leadbar']
|
|
||||||
probarmaat
|
|
||||||
['prebarmeat']
|
|
||||||
middle
|
|
||||||
[]
|
|
||||||
leadmiddle
|
|
||||||
['leadmiddlebar']
|
|
||||||
middletail
|
|
||||||
[]
|
|
||||||
taillead
|
|
||||||
['tail lead', 'tail']
|
|
||||||
leadprobar
|
|
||||||
['leadprebar', 'lead prebar', 'leadbar']
|
|
||||||
|
|
||||||
test 8-8
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
bar
|
|
||||||
faabar
|
|
||||||
foo
|
|
||||||
-------
|
|
||||||
bad
|
|
||||||
['bar', 'foo']
|
|
||||||
foobar
|
|
||||||
['faabar', 'foo bar', 'bar']
|
|
||||||
barfoo
|
|
||||||
['bar foo', 'bar', 'foo']
|
|
||||||
|
|
||||||
test 9-9
|
|
||||||
# file: Xtest.latin1.spl
|
|
||||||
bar
|
|
||||||
foo
|
|
||||||
-------
|
|
||||||
@@ -612,5 +612,19 @@ func Test_complete_func_mess()
|
|||||||
set completefunc=
|
set completefunc=
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_complete_CTRLN_startofbuffer()
|
||||||
|
new
|
||||||
|
call setline(1, [ 'organize(cupboard, 3, 2);',
|
||||||
|
\ 'prioritize(bureau, 8, 7);',
|
||||||
|
\ 'realize(bannister, 4, 4);',
|
||||||
|
\ 'moralize(railing, 3,9);'])
|
||||||
|
let expected=['cupboard.organize(3, 2);',
|
||||||
|
\ 'bureau.prioritize(8, 7);',
|
||||||
|
\ 'bannister.realize(4, 4);',
|
||||||
|
\ 'railing.moralize(3,9);']
|
||||||
|
call feedkeys("qai\<c-n>\<c-n>.\<esc>3wdW\<cr>q3@a", 'tx')
|
||||||
|
call assert_equal(expected, getline(1,'$'))
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
|||||||
@@ -1835,6 +1835,73 @@ func Xproperty_tests(cchar)
|
|||||||
call test_garbagecollect_now()
|
call test_garbagecollect_now()
|
||||||
let m = g:Xgetlist({'context' : 1})
|
let m = g:Xgetlist({'context' : 1})
|
||||||
call assert_equal(["red", "blue", "green"], m.context)
|
call assert_equal(["red", "blue", "green"], m.context)
|
||||||
|
|
||||||
|
" Test for setting/getting items
|
||||||
|
Xexpr ""
|
||||||
|
let qfprev = g:Xgetlist({'nr':0})
|
||||||
|
call g:Xsetlist([], ' ', {'title':'Green',
|
||||||
|
\ 'items' : [{'filename':'F1', 'lnum':10}]})
|
||||||
|
let qfcur = g:Xgetlist({'nr':0})
|
||||||
|
call assert_true(qfcur.nr == qfprev.nr + 1)
|
||||||
|
let l = g:Xgetlist({'items':1})
|
||||||
|
call assert_equal('F1', bufname(l.items[0].bufnr))
|
||||||
|
call assert_equal(10, l.items[0].lnum)
|
||||||
|
call g:Xsetlist([], 'a', {'items' : [{'filename':'F2', 'lnum':20},
|
||||||
|
\ {'filename':'F2', 'lnum':30}]})
|
||||||
|
let l = g:Xgetlist({'items':1})
|
||||||
|
call assert_equal('F2', bufname(l.items[2].bufnr))
|
||||||
|
call assert_equal(30, l.items[2].lnum)
|
||||||
|
call g:Xsetlist([], 'r', {'items' : [{'filename':'F3', 'lnum':40}]})
|
||||||
|
let l = g:Xgetlist({'items':1})
|
||||||
|
call assert_equal('F3', bufname(l.items[0].bufnr))
|
||||||
|
call assert_equal(40, l.items[0].lnum)
|
||||||
|
call g:Xsetlist([], 'r', {'items' : []})
|
||||||
|
let l = g:Xgetlist({'items':1})
|
||||||
|
call assert_equal(0, len(l.items))
|
||||||
|
|
||||||
|
" Save and restore the quickfix stack
|
||||||
|
call g:Xsetlist([], 'f')
|
||||||
|
call assert_equal(0, g:Xgetlist({'nr':'$'}).nr)
|
||||||
|
Xexpr "File1:10:Line1"
|
||||||
|
Xexpr "File2:20:Line2"
|
||||||
|
Xexpr "File3:30:Line3"
|
||||||
|
let last_qf = g:Xgetlist({'nr':'$'}).nr
|
||||||
|
call assert_equal(3, last_qf)
|
||||||
|
let qstack = []
|
||||||
|
for i in range(1, last_qf)
|
||||||
|
let qstack = add(qstack, g:Xgetlist({'nr':i, 'all':1}))
|
||||||
|
endfor
|
||||||
|
call g:Xsetlist([], 'f')
|
||||||
|
for i in range(len(qstack))
|
||||||
|
call g:Xsetlist([], ' ', qstack[i])
|
||||||
|
endfor
|
||||||
|
call assert_equal(3, g:Xgetlist({'nr':'$'}).nr)
|
||||||
|
call assert_equal(10, g:Xgetlist({'nr':1, 'items':1}).items[0].lnum)
|
||||||
|
call assert_equal(20, g:Xgetlist({'nr':2, 'items':1}).items[0].lnum)
|
||||||
|
call assert_equal(30, g:Xgetlist({'nr':3, 'items':1}).items[0].lnum)
|
||||||
|
call g:Xsetlist([], 'f')
|
||||||
|
|
||||||
|
" Swap two quickfix lists
|
||||||
|
Xexpr "File1:10:Line10"
|
||||||
|
Xexpr "File2:20:Line20"
|
||||||
|
Xexpr "File3:30:Line30"
|
||||||
|
call g:Xsetlist([], 'r', {'nr':1,'title':'Colors','context':['Colors']})
|
||||||
|
call g:Xsetlist([], 'r', {'nr':2,'title':'Fruits','context':['Fruits']})
|
||||||
|
let l1=g:Xgetlist({'nr':1,'all':1})
|
||||||
|
let l2=g:Xgetlist({'nr':2,'all':1})
|
||||||
|
let l1.nr=2
|
||||||
|
let l2.nr=1
|
||||||
|
call g:Xsetlist([], 'r', l1)
|
||||||
|
call g:Xsetlist([], 'r', l2)
|
||||||
|
let newl1=g:Xgetlist({'nr':1,'all':1})
|
||||||
|
let newl2=g:Xgetlist({'nr':2,'all':1})
|
||||||
|
call assert_equal(':Fruits', newl1.title)
|
||||||
|
call assert_equal(['Fruits'], newl1.context)
|
||||||
|
call assert_equal('Line20', newl1.items[0].text)
|
||||||
|
call assert_equal(':Colors', newl2.title)
|
||||||
|
call assert_equal(['Colors'], newl2.context)
|
||||||
|
call assert_equal('Line10', newl2.items[0].text)
|
||||||
|
call g:Xsetlist([], 'f')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
func Test_qf_property()
|
func Test_qf_property()
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
" Test spell checking
|
" Test spell checking
|
||||||
" TODO: move test58 tests here
|
|
||||||
|
|
||||||
if !has('spell')
|
if !has('spell')
|
||||||
finish
|
finish
|
||||||
@@ -33,7 +32,7 @@ func Test_spellreall()
|
|||||||
set spell
|
set spell
|
||||||
call assert_fails('spellrepall', 'E752:')
|
call assert_fails('spellrepall', 'E752:')
|
||||||
call setline(1, ['A speling mistake. The same speling mistake.',
|
call setline(1, ['A speling mistake. The same speling mistake.',
|
||||||
\ 'Another speling mistake.'])
|
\ 'Another speling mistake.'])
|
||||||
call feedkeys(']s1z=', 'tx')
|
call feedkeys(']s1z=', 'tx')
|
||||||
call assert_equal('A spelling mistake. The same speling mistake.', getline(1))
|
call assert_equal('A spelling mistake. The same speling mistake.', getline(1))
|
||||||
call assert_equal('Another speling mistake.', getline(2))
|
call assert_equal('Another speling mistake.', getline(2))
|
||||||
@@ -44,3 +43,726 @@ func Test_spellreall()
|
|||||||
set spell&
|
set spell&
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func Test_zz_basic()
|
||||||
|
call LoadAffAndDic(g:test_data_aff1, g:test_data_dic1)
|
||||||
|
call RunGoodBad("wrong OK puts. Test the end",
|
||||||
|
\ "bad: inputs comment ok Ok. test d\xE9\xF4l end the",
|
||||||
|
\["Comment", "deol", "d\xE9\xF4r", "input", "OK", "output", "outputs", "outtest", "put", "puts",
|
||||||
|
\ "test", "testen", "testn", "the end", "uk", "wrong"],
|
||||||
|
\[
|
||||||
|
\ ["bad", ["put", "uk", "OK"]],
|
||||||
|
\ ["inputs", ["input", "puts", "outputs"]],
|
||||||
|
\ ["comment", ["Comment", "outtest", "the end"]],
|
||||||
|
\ ["ok", ["OK", "uk", "put"]],
|
||||||
|
\ ["Ok", ["OK", "Uk", "Put"]],
|
||||||
|
\ ["test", ["Test", "testn", "testen"]],
|
||||||
|
\ ["d\xE9\xF4l", ["deol", "d\xE9\xF4r", "test"]],
|
||||||
|
\ ["end", ["put", "uk", "test"]],
|
||||||
|
\ ["the", ["put", "uk", "test"]],
|
||||||
|
\ ]
|
||||||
|
\ )
|
||||||
|
|
||||||
|
call assert_equal("gebletegek", soundfold('goobledygoook'))
|
||||||
|
call assert_equal("kepereneven", soundfold('k<>op<6F>r<EFBFBD>n<EFBFBD>ven'))
|
||||||
|
call assert_equal("everles gesvets etele", soundfold('oeverloos gezwets edale'))
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" Postponed prefixes
|
||||||
|
func Test_zz_prefixes()
|
||||||
|
call LoadAffAndDic(g:test_data_aff2, g:test_data_dic1)
|
||||||
|
call RunGoodBad("puts",
|
||||||
|
\ "bad: inputs comment ok Ok end the. test d\xE9\xF4l",
|
||||||
|
\ ["Comment", "deol", "d\xE9\xF4r", "OK", "put", "input", "output", "puts", "outputs", "test", "outtest", "testen", "testn", "the end", "uk", "wrong"],
|
||||||
|
\ [
|
||||||
|
\ ["bad", ["put", "uk", "OK"]],
|
||||||
|
\ ["inputs", ["input", "puts", "outputs"]],
|
||||||
|
\ ["comment", ["Comment"]],
|
||||||
|
\ ["ok", ["OK", "uk", "put"]],
|
||||||
|
\ ["Ok", ["OK", "Uk", "Put"]],
|
||||||
|
\ ["end", ["put", "uk", "deol"]],
|
||||||
|
\ ["the", ["put", "uk", "test"]],
|
||||||
|
\ ["test", ["Test", "testn", "testen"]],
|
||||||
|
\ ["d\xE9\xF4l", ["deol", "d\xE9\xF4r", "test"]],
|
||||||
|
\ ])
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
"Compound words
|
||||||
|
func Test_zz_compound()
|
||||||
|
call LoadAffAndDic(g:test_data_aff3, g:test_data_dic3)
|
||||||
|
call RunGoodBad("foo m\xEF foobar foofoobar barfoo barbarfoo",
|
||||||
|
\ "bad: bar la foom\xEF barm\xEF m\xEFfoo m\xEFbar m\xEFm\xEF lala m\xEFla lam\xEF foola labar",
|
||||||
|
\ ["foo", "m\xEF"],
|
||||||
|
\ [
|
||||||
|
\ ["bad", ["foo", "m\xEF"]],
|
||||||
|
\ ["bar", ["barfoo", "foobar", "foo"]],
|
||||||
|
\ ["la", ["m\xEF", "foo"]],
|
||||||
|
\ ["foom\xEF", ["foo m\xEF", "foo", "foofoo"]],
|
||||||
|
\ ["barm\xEF", ["barfoo", "m\xEF", "barbar"]],
|
||||||
|
\ ["m\xEFfoo", ["m\xEF foo", "foo", "foofoo"]],
|
||||||
|
\ ["m\xEFbar", ["foobar", "barbar", "m\xEF"]],
|
||||||
|
\ ["m\xEFm\xEF", ["m\xEF m\xEF", "m\xEF"]],
|
||||||
|
\ ["lala", []],
|
||||||
|
\ ["m\xEFla", ["m\xEF", "m\xEF m\xEF"]],
|
||||||
|
\ ["lam\xEF", ["m\xEF", "m\xEF m\xEF"]],
|
||||||
|
\ ["foola", ["foo", "foobar", "foofoo"]],
|
||||||
|
\ ["labar", ["barbar", "foobar"]],
|
||||||
|
\ ])
|
||||||
|
|
||||||
|
call LoadAffAndDic(g:test_data_aff4, g:test_data_dic4)
|
||||||
|
call RunGoodBad("word util bork prebork start end wordutil wordutils pro-ok bork borkbork borkborkbork borkborkborkbork borkborkborkborkbork tomato tomatotomato startend startword startwordword startwordend startwordwordend startwordwordwordend prebork preborkbork preborkborkbork nouword",
|
||||||
|
\ "bad: wordutilize pro borkborkborkborkborkbork tomatotomatotomato endstart endend startstart wordend wordstart preborkprebork preborkpreborkbork startwordwordwordwordend borkpreborkpreborkbork utilsbork startnouword",
|
||||||
|
\ ["bork", "prebork", "end", "pro-ok", "start", "tomato", "util", "utilize", "utils", "word", "nouword"],
|
||||||
|
\ [
|
||||||
|
\ ["bad", ["end", "bork", "word"]],
|
||||||
|
\ ["wordutilize", ["word utilize", "wordutils", "wordutil"]],
|
||||||
|
\ ["pro", ["bork", "word", "end"]],
|
||||||
|
\ ["borkborkborkborkborkbork", ["bork borkborkborkborkbork", "borkbork borkborkborkbork", "borkborkbork borkborkbork"]],
|
||||||
|
\ ["tomatotomatotomato", ["tomato tomatotomato", "tomatotomato tomato", "tomato tomato tomato"]],
|
||||||
|
\ ["endstart", ["end start", "start"]],
|
||||||
|
\ ["endend", ["end end", "end"]],
|
||||||
|
\ ["startstart", ["start start"]],
|
||||||
|
\ ["wordend", ["word end", "word", "wordword"]],
|
||||||
|
\ ["wordstart", ["word start", "bork start"]],
|
||||||
|
\ ["preborkprebork", ["prebork prebork", "preborkbork", "preborkborkbork"]],
|
||||||
|
\ ["preborkpreborkbork", ["prebork preborkbork", "preborkborkbork", "preborkborkborkbork"]],
|
||||||
|
\ ["startwordwordwordwordend", ["startwordwordwordword end", "startwordwordwordword", "start wordwordwordword end"]],
|
||||||
|
\ ["borkpreborkpreborkbork", ["bork preborkpreborkbork", "bork prebork preborkbork", "bork preborkprebork bork"]],
|
||||||
|
\ ["utilsbork", ["utilbork", "utils bork", "util bork"]],
|
||||||
|
\ ["startnouword", ["start nouword", "startword", "startborkword"]],
|
||||||
|
\ ])
|
||||||
|
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
"Test affix flags with two characters
|
||||||
|
func Test_zz_affix()
|
||||||
|
call LoadAffAndDic(g:test_data_aff5, g:test_data_dic5)
|
||||||
|
call RunGoodBad("fooa1 fooa\xE9 bar prebar barbork prebarbork startprebar start end startend startmiddleend nouend",
|
||||||
|
\ "bad: foo fooa2 prabar probarbirk middle startmiddle middleend endstart startprobar startnouend",
|
||||||
|
\ ["bar", "barbork", "end", "fooa1", "fooa\xE9", "nouend", "prebar", "prebarbork", "start"],
|
||||||
|
\ [
|
||||||
|
\ ["bad", ["bar", "end", "fooa1"]],
|
||||||
|
\ ["foo", ["fooa1", "fooa\xE9", "bar"]],
|
||||||
|
\ ["fooa2", ["fooa1", "fooa\xE9", "bar"]],
|
||||||
|
\ ["prabar", ["prebar", "bar", "bar bar"]],
|
||||||
|
\ ["probarbirk", ["prebarbork"]],
|
||||||
|
\ ["middle", []],
|
||||||
|
\ ["startmiddle", ["startmiddleend", "startmiddlebar"]],
|
||||||
|
\ ["middleend", []],
|
||||||
|
\ ["endstart", ["end start", "start"]],
|
||||||
|
\ ["startprobar", ["startprebar", "start prebar", "startbar"]],
|
||||||
|
\ ["startnouend", ["start nouend", "startend"]],
|
||||||
|
\ ])
|
||||||
|
|
||||||
|
call LoadAffAndDic(g:test_data_aff6, g:test_data_dic6)
|
||||||
|
call RunGoodBad("meea1 meea\xE9 bar prebar barbork prebarbork leadprebar lead end leadend leadmiddleend",
|
||||||
|
\ "bad: mee meea2 prabar probarbirk middle leadmiddle middleend endlead leadprobar",
|
||||||
|
\ ["bar", "barbork", "end", "lead", "meea1", "meea\xE9", "prebar", "prebarbork"],
|
||||||
|
\ [
|
||||||
|
\ ["bad", ["bar", "end", "lead"]],
|
||||||
|
\ ["mee", ["meea1", "meea\xE9", "bar"]],
|
||||||
|
\ ["meea2", ["meea1", "meea\xE9", "lead"]],
|
||||||
|
\ ["prabar", ["prebar", "bar", "leadbar"]],
|
||||||
|
\ ["probarbirk", ["prebarbork"]],
|
||||||
|
\ ["middle", []],
|
||||||
|
\ ["leadmiddle", ["leadmiddleend", "leadmiddlebar"]],
|
||||||
|
\ ["middleend", []],
|
||||||
|
\ ["endlead", ["end lead", "lead", "end end"]],
|
||||||
|
\ ["leadprobar", ["leadprebar", "lead prebar", "leadbar"]],
|
||||||
|
\ ])
|
||||||
|
|
||||||
|
call LoadAffAndDic(g:test_data_aff7, g:test_data_dic7)
|
||||||
|
call RunGoodBad("meea1 meea\xE9 bar prebar barmeat prebarmeat leadprebar lead tail leadtail leadmiddletail",
|
||||||
|
\ "bad: mee meea2 prabar probarmaat middle leadmiddle middletail taillead leadprobar",
|
||||||
|
\ ["bar", "barmeat", "lead", "meea1", "meea\xE9", "prebar", "prebarmeat", "tail"],
|
||||||
|
\ [
|
||||||
|
\ ["bad", ["bar", "lead", "tail"]],
|
||||||
|
\ ["mee", ["meea1", "meea\xE9", "bar"]],
|
||||||
|
\ ["meea2", ["meea1", "meea\xE9", "lead"]],
|
||||||
|
\ ["prabar", ["prebar", "bar", "leadbar"]],
|
||||||
|
\ ["probarmaat", ["prebarmeat"]],
|
||||||
|
\ ["middle", []],
|
||||||
|
\ ["leadmiddle", ["leadmiddlebar"]],
|
||||||
|
\ ["middletail", []],
|
||||||
|
\ ["taillead", ["tail lead", "tail"]],
|
||||||
|
\ ["leadprobar", ["leadprebar", "lead prebar", "leadbar"]],
|
||||||
|
\ ])
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Test_zz_NOSLITSUGS()
|
||||||
|
call LoadAffAndDic(g:test_data_aff8, g:test_data_dic8)
|
||||||
|
call RunGoodBad("foo bar faabar", "bad: foobar barfoo",
|
||||||
|
\ ["bar", "faabar", "foo"],
|
||||||
|
\ [
|
||||||
|
\ ["bad", ["bar", "foo"]],
|
||||||
|
\ ["foobar", ["faabar", "foo bar", "bar"]],
|
||||||
|
\ ["barfoo", ["bar foo", "bar", "foo"]],
|
||||||
|
\ ])
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" Numbers
|
||||||
|
func Test_zz_Numbers()
|
||||||
|
call LoadAffAndDic(g:test_data_aff9, g:test_data_dic9)
|
||||||
|
call RunGoodBad("0b1011 0777 1234 0x01ff", "",
|
||||||
|
\ ["bar", "foo"],
|
||||||
|
\ [
|
||||||
|
\ ])
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
function FirstSpellWord()
|
||||||
|
call feedkeys("/^start:\n", 'tx')
|
||||||
|
normal ]smm
|
||||||
|
let [str, a] = spellbadword()
|
||||||
|
return str
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
function SecondSpellWord()
|
||||||
|
normal `m]s
|
||||||
|
let [str, a] = spellbadword()
|
||||||
|
return str
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
"Test with SAL instead of SOFO items; test automatic reloading
|
||||||
|
func Test_zz_sal_and_addition()
|
||||||
|
set enc=latin1
|
||||||
|
set spellfile=
|
||||||
|
call writefile(g:test_data_aff_sal, "Xtest.aff")
|
||||||
|
mkspell! Xtest Xtest
|
||||||
|
set spl=Xtest.latin1.spl spell
|
||||||
|
call assert_equal('kbltykk', soundfold('goobledygoook'))
|
||||||
|
call assert_equal('kprnfn', soundfold('k<>op<6F>r<EFBFBD>n<EFBFBD>ven'))
|
||||||
|
call assert_equal('*fls kswts tl', soundfold('oeverloos gezwets edale'))
|
||||||
|
|
||||||
|
"also use an addition file
|
||||||
|
call writefile(["/regions=usgbnz", "elequint/2", "elekwint/3"], "Xtest.latin1.add")
|
||||||
|
mkspell! Xtest.latin1.add.spl Xtest.latin1.add
|
||||||
|
|
||||||
|
bwipe!
|
||||||
|
call setline(1, ["start: elequint test elekwint test elekwent asdf"])
|
||||||
|
|
||||||
|
set spellfile=Xtest.latin1.add
|
||||||
|
call assert_equal("elekwent", FirstSpellWord())
|
||||||
|
|
||||||
|
set spl=Xtest_us.latin1.spl
|
||||||
|
call assert_equal("elequint", FirstSpellWord())
|
||||||
|
call assert_equal("elekwint", SecondSpellWord())
|
||||||
|
|
||||||
|
set spl=Xtest_gb.latin1.spl
|
||||||
|
call assert_equal("elekwint", FirstSpellWord())
|
||||||
|
call assert_equal("elekwent", SecondSpellWord())
|
||||||
|
|
||||||
|
set spl=Xtest_nz.latin1.spl
|
||||||
|
call assert_equal("elequint", FirstSpellWord())
|
||||||
|
call assert_equal("elekwent", SecondSpellWord())
|
||||||
|
|
||||||
|
set spl=Xtest_ca.latin1.spl
|
||||||
|
call assert_equal("elequint", FirstSpellWord())
|
||||||
|
call assert_equal("elekwint", SecondSpellWord())
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" Check using z= in new buffer (crash fixed by patch 7.4a.028).
|
||||||
|
func Test_zeq_crash()
|
||||||
|
new
|
||||||
|
set maxmem=512 spell
|
||||||
|
call feedkeys('iasdz=:\"', 'tx')
|
||||||
|
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func LoadAffAndDic(aff_contents, dic_contents)
|
||||||
|
set enc=latin1
|
||||||
|
set spellfile=
|
||||||
|
call writefile(a:aff_contents, "Xtest.aff")
|
||||||
|
call writefile(a:dic_contents, "Xtest.dic")
|
||||||
|
" Generate a .spl file from a .dic and .aff file.
|
||||||
|
mkspell! Xtest Xtest
|
||||||
|
" use that spell file
|
||||||
|
set spl=Xtest.latin1.spl spell
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func ListWords()
|
||||||
|
spelldump
|
||||||
|
%yank
|
||||||
|
quit
|
||||||
|
return split(@", "\n")
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func TestGoodBadBase()
|
||||||
|
exe '1;/^good:'
|
||||||
|
normal 0f:]s
|
||||||
|
let prevbad = ''
|
||||||
|
let result = []
|
||||||
|
while 1
|
||||||
|
let [bad, a] = spellbadword()
|
||||||
|
if bad == '' || bad == prevbad || bad == 'badend'
|
||||||
|
break
|
||||||
|
endif
|
||||||
|
let prevbad = bad
|
||||||
|
let lst = spellsuggest(bad, 3)
|
||||||
|
normal mm
|
||||||
|
|
||||||
|
call add(result, [bad, lst])
|
||||||
|
normal `m]s
|
||||||
|
endwhile
|
||||||
|
return result
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func RunGoodBad(good, bad, expected_words, expected_bad_words)
|
||||||
|
bwipe!
|
||||||
|
call setline(1, ["good: ", a:good, a:bad, " badend "])
|
||||||
|
let words = ListWords()
|
||||||
|
call assert_equal(a:expected_words, words[1:-1])
|
||||||
|
let bad_words = TestGoodBadBase()
|
||||||
|
call assert_equal(a:expected_bad_words, bad_words)
|
||||||
|
bwipe!
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
let g:test_data_aff1 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ",
|
||||||
|
\"",
|
||||||
|
\"FOL \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"LOW \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"UPP \xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xFF",
|
||||||
|
\"",
|
||||||
|
\"SOFOFROM abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ\xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF\xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xBF",
|
||||||
|
\"SOFOTO ebctefghejklnnepkrstevvkesebctefghejklnnepkrstevvkeseeeeeeeceeeeeeeedneeeeeeeeeeepseeeeeeeeceeeeeeeedneeeeeeeeeeep?",
|
||||||
|
\"",
|
||||||
|
\"MIDWORD\t'-",
|
||||||
|
\"",
|
||||||
|
\"KEP =",
|
||||||
|
\"RAR ?",
|
||||||
|
\"BAD !",
|
||||||
|
\"",
|
||||||
|
\"PFX I N 1",
|
||||||
|
\"PFX I 0 in .",
|
||||||
|
\"",
|
||||||
|
\"PFX O Y 1",
|
||||||
|
\"PFX O 0 out .",
|
||||||
|
\"",
|
||||||
|
\"SFX S Y 2",
|
||||||
|
\"SFX S 0 s [^s]",
|
||||||
|
\"SFX S 0 es s",
|
||||||
|
\"",
|
||||||
|
\"SFX N N 3",
|
||||||
|
\"SFX N 0 en [^n]",
|
||||||
|
\"SFX N 0 nen n",
|
||||||
|
\"SFX N 0 n .",
|
||||||
|
\"",
|
||||||
|
\"REP 3",
|
||||||
|
\"REP g ch",
|
||||||
|
\"REP ch g",
|
||||||
|
\"REP svp s.v.p.",
|
||||||
|
\"",
|
||||||
|
\"MAP 9",
|
||||||
|
\"MAP a\xE0\xE1\xE2\xE3\xE4\xE5",
|
||||||
|
\"MAP e\xE8\xE9\xEA\xEB",
|
||||||
|
\"MAP i\xEC\xED\xEE\xEF",
|
||||||
|
\"MAP o\xF2\xF3\xF4\xF5\xF6",
|
||||||
|
\"MAP u\xF9\xFA\xFB\xFC",
|
||||||
|
\"MAP n\xF1",
|
||||||
|
\"MAP c\xE7",
|
||||||
|
\"MAP y\xFF\xFD",
|
||||||
|
\"MAP s\xDF",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic1 = [
|
||||||
|
\"123456",
|
||||||
|
\"test/NO",
|
||||||
|
\"# comment",
|
||||||
|
\"wrong",
|
||||||
|
\"Comment",
|
||||||
|
\"OK",
|
||||||
|
\"uk",
|
||||||
|
\"put/ISO",
|
||||||
|
\"the end",
|
||||||
|
\"deol",
|
||||||
|
\"d\xE9\xF4r",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff2 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"",
|
||||||
|
\"FOL \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"LOW \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"UPP \xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xFF",
|
||||||
|
\"",
|
||||||
|
\"PFXPOSTPONE",
|
||||||
|
\"",
|
||||||
|
\"MIDWORD\t'-",
|
||||||
|
\"",
|
||||||
|
\"KEP =",
|
||||||
|
\"RAR ?",
|
||||||
|
\"BAD !",
|
||||||
|
\"",
|
||||||
|
\"PFX I N 1",
|
||||||
|
\"PFX I 0 in .",
|
||||||
|
\"",
|
||||||
|
\"PFX O Y 1",
|
||||||
|
\"PFX O 0 out [a-z]",
|
||||||
|
\"",
|
||||||
|
\"SFX S Y 2",
|
||||||
|
\"SFX S 0 s [^s]",
|
||||||
|
\"SFX S 0 es s",
|
||||||
|
\"",
|
||||||
|
\"SFX N N 3",
|
||||||
|
\"SFX N 0 en [^n]",
|
||||||
|
\"SFX N 0 nen n",
|
||||||
|
\"SFX N 0 n .",
|
||||||
|
\"",
|
||||||
|
\"REP 3",
|
||||||
|
\"REP g ch",
|
||||||
|
\"REP ch g",
|
||||||
|
\"REP svp s.v.p.",
|
||||||
|
\"",
|
||||||
|
\"MAP 9",
|
||||||
|
\"MAP a\xE0\xE1\xE2\xE3\xE4\xE5",
|
||||||
|
\"MAP e\xE8\xE9\xEA\xEB",
|
||||||
|
\"MAP i\xEC\xED\xEE\xEF",
|
||||||
|
\"MAP o\xF2\xF3\xF4\xF5\xF6",
|
||||||
|
\"MAP u\xF9\xFA\xFB\xFC",
|
||||||
|
\"MAP n\xF1",
|
||||||
|
\"MAP c\xE7",
|
||||||
|
\"MAP y\xFF\xFD",
|
||||||
|
\"MAP s\xDF",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff3 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"",
|
||||||
|
\"COMPOUNDMIN 3",
|
||||||
|
\"COMPOUNDRULE m*",
|
||||||
|
\"NEEDCOMPOUND x",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic3 = [
|
||||||
|
\"1234",
|
||||||
|
\"foo/m",
|
||||||
|
\"bar/mx",
|
||||||
|
\"m\xEF/m",
|
||||||
|
\"la/mx",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff4 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"",
|
||||||
|
\"FOL \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"LOW \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"UPP \xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xFF",
|
||||||
|
\"",
|
||||||
|
\"COMPOUNDRULE m+",
|
||||||
|
\"COMPOUNDRULE sm*e",
|
||||||
|
\"COMPOUNDRULE sm+",
|
||||||
|
\"COMPOUNDMIN 3",
|
||||||
|
\"COMPOUNDWORDMAX 3",
|
||||||
|
\"COMPOUNDFORBIDFLAG t",
|
||||||
|
\"",
|
||||||
|
\"COMPOUNDSYLMAX 5",
|
||||||
|
\"SYLLABLE a\xE1e\xE9i\xEDo\xF3\xF6\xF5u\xFA\xFC\xFBy/aa/au/ea/ee/ei/ie/oa/oe/oo/ou/uu/ui",
|
||||||
|
\"",
|
||||||
|
\"MAP 9",
|
||||||
|
\"MAP a\xE0\xE1\xE2\xE3\xE4\xE5",
|
||||||
|
\"MAP e\xE8\xE9\xEA\xEB",
|
||||||
|
\"MAP i\xEC\xED\xEE\xEF",
|
||||||
|
\"MAP o\xF2\xF3\xF4\xF5\xF6",
|
||||||
|
\"MAP u\xF9\xFA\xFB\xFC",
|
||||||
|
\"MAP n\xF1",
|
||||||
|
\"MAP c\xE7",
|
||||||
|
\"MAP y\xFF\xFD",
|
||||||
|
\"MAP s\xDF",
|
||||||
|
\"",
|
||||||
|
\"NEEDAFFIX x",
|
||||||
|
\"",
|
||||||
|
\"PFXPOSTPONE",
|
||||||
|
\"",
|
||||||
|
\"MIDWORD '-",
|
||||||
|
\"",
|
||||||
|
\"SFX q N 1",
|
||||||
|
\"SFX q 0 -ok .",
|
||||||
|
\"",
|
||||||
|
\"SFX a Y 2",
|
||||||
|
\"SFX a 0 s .",
|
||||||
|
\"SFX a 0 ize/t .",
|
||||||
|
\"",
|
||||||
|
\"PFX p N 1",
|
||||||
|
\"PFX p 0 pre .",
|
||||||
|
\"",
|
||||||
|
\"PFX P N 1",
|
||||||
|
\"PFX P 0 nou .",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic4 = [
|
||||||
|
\"1234",
|
||||||
|
\"word/mP",
|
||||||
|
\"util/am",
|
||||||
|
\"pro/xq",
|
||||||
|
\"tomato/m",
|
||||||
|
\"bork/mp",
|
||||||
|
\"start/s",
|
||||||
|
\"end/e",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff5 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"",
|
||||||
|
\"FLAG long",
|
||||||
|
\"",
|
||||||
|
\"NEEDAFFIX !!",
|
||||||
|
\"",
|
||||||
|
\"COMPOUNDRULE ssmm*ee",
|
||||||
|
\"",
|
||||||
|
\"NEEDCOMPOUND xx",
|
||||||
|
\"COMPOUNDPERMITFLAG pp",
|
||||||
|
\"",
|
||||||
|
\"SFX 13 Y 1",
|
||||||
|
\"SFX 13 0 bork .",
|
||||||
|
\"",
|
||||||
|
\"SFX a1 Y 1",
|
||||||
|
\"SFX a1 0 a1 .",
|
||||||
|
\"",
|
||||||
|
\"SFX a\xE9 Y 1",
|
||||||
|
\"SFX a\xE9 0 a\xE9 .",
|
||||||
|
\"",
|
||||||
|
\"PFX zz Y 1",
|
||||||
|
\"PFX zz 0 pre/pp .",
|
||||||
|
\"",
|
||||||
|
\"PFX yy Y 1",
|
||||||
|
\"PFX yy 0 nou .",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic5 = [
|
||||||
|
\"1234",
|
||||||
|
\"foo/a1a\xE9!!",
|
||||||
|
\"bar/zz13ee",
|
||||||
|
\"start/ss",
|
||||||
|
\"end/eeyy",
|
||||||
|
\"middle/mmxx",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff6 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"",
|
||||||
|
\"FLAG caplong",
|
||||||
|
\"",
|
||||||
|
\"NEEDAFFIX A!",
|
||||||
|
\"",
|
||||||
|
\"COMPOUNDRULE sMm*Ee",
|
||||||
|
\"",
|
||||||
|
\"NEEDCOMPOUND Xx",
|
||||||
|
\"",
|
||||||
|
\"COMPOUNDPERMITFLAG p",
|
||||||
|
\"",
|
||||||
|
\"SFX N3 Y 1",
|
||||||
|
\"SFX N3 0 bork .",
|
||||||
|
\"",
|
||||||
|
\"SFX A1 Y 1",
|
||||||
|
\"SFX A1 0 a1 .",
|
||||||
|
\"",
|
||||||
|
\"SFX A\xE9 Y 1",
|
||||||
|
\"SFX A\xE9 0 a\xE9 .",
|
||||||
|
\"",
|
||||||
|
\"PFX Zz Y 1",
|
||||||
|
\"PFX Zz 0 pre/p .",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic6 = [
|
||||||
|
\"1234",
|
||||||
|
\"mee/A1A\xE9A!",
|
||||||
|
\"bar/ZzN3Ee",
|
||||||
|
\"lead/s",
|
||||||
|
\"end/Ee",
|
||||||
|
\"middle/MmXx",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff7 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"",
|
||||||
|
\"FLAG num",
|
||||||
|
\"",
|
||||||
|
\"NEEDAFFIX 9999",
|
||||||
|
\"",
|
||||||
|
\"COMPOUNDRULE 2,77*123",
|
||||||
|
\"",
|
||||||
|
\"NEEDCOMPOUND 1",
|
||||||
|
\"COMPOUNDPERMITFLAG 432",
|
||||||
|
\"",
|
||||||
|
\"SFX 61003 Y 1",
|
||||||
|
\"SFX 61003 0 meat .",
|
||||||
|
\"",
|
||||||
|
\"SFX 391 Y 1",
|
||||||
|
\"SFX 391 0 a1 .",
|
||||||
|
\"",
|
||||||
|
\"SFX 111 Y 1",
|
||||||
|
\"SFX 111 0 a\xE9 .",
|
||||||
|
\"",
|
||||||
|
\"PFX 17 Y 1",
|
||||||
|
\"PFX 17 0 pre/432 .",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic7 = [
|
||||||
|
\"1234",
|
||||||
|
\"mee/391,111,9999",
|
||||||
|
\"bar/17,61003,123",
|
||||||
|
\"lead/2",
|
||||||
|
\"tail/123",
|
||||||
|
\"middle/77,1",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff8 = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"",
|
||||||
|
\"NOSPLITSUGS",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic8 = [
|
||||||
|
\"1234",
|
||||||
|
\"foo",
|
||||||
|
\"bar",
|
||||||
|
\"faabar",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff9 = [
|
||||||
|
\ ]
|
||||||
|
let g:test_data_dic9 = [
|
||||||
|
\"1234",
|
||||||
|
\"foo",
|
||||||
|
\"bar",
|
||||||
|
\ ]
|
||||||
|
let g:test_data_aff_sal = [
|
||||||
|
\"SET ISO8859-1",
|
||||||
|
\"TRY esianrtolcdugmphbyfvkwjkqxz-\xEB\xE9\xE8\xEA\xEF\xEE\xE4\xE0\xE2\xF6\xFC\xFB'ESIANRTOLCDUGMPHBYFVKWJKQXZ",
|
||||||
|
\"",
|
||||||
|
\"FOL \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"LOW \xE0\xE1\xE2\xE3\xE4\xE5\xE6\xE7\xE8\xE9\xEA\xEB\xEC\xED\xEE\xEF\xF0\xF1\xF2\xF3\xF4\xF5\xF6\xF8\xF9\xFA\xFB\xFC\xFD\xFE\xDF\xFF",
|
||||||
|
\"UPP \xC0\xC1\xC2\xC3\xC4\xC5\xC6\xC7\xC8\xC9\xCA\xCB\xCC\xCD\xCE\xCF\xD0\xD1\xD2\xD3\xD4\xD5\xD6\xD8\xD9\xDA\xDB\xDC\xDD\xDE\xDF\xFF",
|
||||||
|
\"",
|
||||||
|
\"MIDWORD\t'-",
|
||||||
|
\"",
|
||||||
|
\"KEP =",
|
||||||
|
\"RAR ?",
|
||||||
|
\"BAD !",
|
||||||
|
\"",
|
||||||
|
\"PFX I N 1",
|
||||||
|
\"PFX I 0 in .",
|
||||||
|
\"",
|
||||||
|
\"PFX O Y 1",
|
||||||
|
\"PFX O 0 out .",
|
||||||
|
\"",
|
||||||
|
\"SFX S Y 2",
|
||||||
|
\"SFX S 0 s [^s]",
|
||||||
|
\"SFX S 0 es s",
|
||||||
|
\"",
|
||||||
|
\"SFX N N 3",
|
||||||
|
\"SFX N 0 en [^n]",
|
||||||
|
\"SFX N 0 nen n",
|
||||||
|
\"SFX N 0 n .",
|
||||||
|
\"",
|
||||||
|
\"REP 3",
|
||||||
|
\"REP g ch",
|
||||||
|
\"REP ch g",
|
||||||
|
\"REP svp s.v.p.",
|
||||||
|
\"",
|
||||||
|
\"MAP 9",
|
||||||
|
\"MAP a\xE0\xE1\xE2\xE3\xE4\xE5",
|
||||||
|
\"MAP e\xE8\xE9\xEA\xEB",
|
||||||
|
\"MAP i\xEC\xED\xEE\xEF",
|
||||||
|
\"MAP o\xF2\xF3\xF4\xF5\xF6",
|
||||||
|
\"MAP u\xF9\xFA\xFB\xFC",
|
||||||
|
\"MAP n\xF1",
|
||||||
|
\"MAP c\xE7",
|
||||||
|
\"MAP y\xFF\xFD",
|
||||||
|
\"MAP s\xDF",
|
||||||
|
\"",
|
||||||
|
\"SAL AH(AEIOUY)-^ *H",
|
||||||
|
\"SAL AR(AEIOUY)-^ *R",
|
||||||
|
\"SAL A(HR)^ *",
|
||||||
|
\"SAL A^ *",
|
||||||
|
\"SAL AH(AEIOUY)- H",
|
||||||
|
\"SAL AR(AEIOUY)- R",
|
||||||
|
\"SAL A(HR) _",
|
||||||
|
\"SAL \xC0^ *",
|
||||||
|
\"SAL \xC5^ *",
|
||||||
|
\"SAL BB- _",
|
||||||
|
\"SAL B B",
|
||||||
|
\"SAL CQ- _",
|
||||||
|
\"SAL CIA X",
|
||||||
|
\"SAL CH X",
|
||||||
|
\"SAL C(EIY)- S",
|
||||||
|
\"SAL CK K",
|
||||||
|
\"SAL COUGH^ KF",
|
||||||
|
\"SAL CC< C",
|
||||||
|
\"SAL C K",
|
||||||
|
\"SAL DG(EIY) K",
|
||||||
|
\"SAL DD- _",
|
||||||
|
\"SAL D T",
|
||||||
|
\"SAL \xC9< E",
|
||||||
|
\"SAL EH(AEIOUY)-^ *H",
|
||||||
|
\"SAL ER(AEIOUY)-^ *R",
|
||||||
|
\"SAL E(HR)^ *",
|
||||||
|
\"SAL ENOUGH^$ *NF",
|
||||||
|
\"SAL E^ *",
|
||||||
|
\"SAL EH(AEIOUY)- H",
|
||||||
|
\"SAL ER(AEIOUY)- R",
|
||||||
|
\"SAL E(HR) _",
|
||||||
|
\"SAL FF- _",
|
||||||
|
\"SAL F F",
|
||||||
|
\"SAL GN^ N",
|
||||||
|
\"SAL GN$ N",
|
||||||
|
\"SAL GNS$ NS",
|
||||||
|
\"SAL GNED$ N",
|
||||||
|
\"SAL GH(AEIOUY)- K",
|
||||||
|
\"SAL GH _",
|
||||||
|
\"SAL GG9 K",
|
||||||
|
\"SAL G K",
|
||||||
|
\"SAL H H",
|
||||||
|
\"SAL IH(AEIOUY)-^ *H",
|
||||||
|
\"SAL IR(AEIOUY)-^ *R",
|
||||||
|
\"SAL I(HR)^ *",
|
||||||
|
\"SAL I^ *",
|
||||||
|
\"SAL ING6 N",
|
||||||
|
\"SAL IH(AEIOUY)- H",
|
||||||
|
\"SAL IR(AEIOUY)- R",
|
||||||
|
\"SAL I(HR) _",
|
||||||
|
\"SAL J K",
|
||||||
|
\"SAL KN^ N",
|
||||||
|
\"SAL KK- _",
|
||||||
|
\"SAL K K",
|
||||||
|
\"SAL LAUGH^ LF",
|
||||||
|
\"SAL LL- _",
|
||||||
|
\"SAL L L",
|
||||||
|
\"SAL MB$ M",
|
||||||
|
\"SAL MM M",
|
||||||
|
\"SAL M M",
|
||||||
|
\"SAL NN- _",
|
||||||
|
\"SAL N N",
|
||||||
|
\"SAL OH(AEIOUY)-^ *H",
|
||||||
|
\"SAL OR(AEIOUY)-^ *R",
|
||||||
|
\"SAL O(HR)^ *",
|
||||||
|
\"SAL O^ *",
|
||||||
|
\"SAL OH(AEIOUY)- H",
|
||||||
|
\"SAL OR(AEIOUY)- R",
|
||||||
|
\"SAL O(HR) _",
|
||||||
|
\"SAL PH F",
|
||||||
|
\"SAL PN^ N",
|
||||||
|
\"SAL PP- _",
|
||||||
|
\"SAL P P",
|
||||||
|
\"SAL Q K",
|
||||||
|
\"SAL RH^ R",
|
||||||
|
\"SAL ROUGH^ RF",
|
||||||
|
\"SAL RR- _",
|
||||||
|
\"SAL R R",
|
||||||
|
\"SAL SCH(EOU)- SK",
|
||||||
|
\"SAL SC(IEY)- S",
|
||||||
|
\"SAL SH X",
|
||||||
|
\"SAL SI(AO)- X",
|
||||||
|
\"SAL SS- _",
|
||||||
|
\"SAL S S",
|
||||||
|
\"SAL TI(AO)- X",
|
||||||
|
\"SAL TH @",
|
||||||
|
\"SAL TCH-- _",
|
||||||
|
\"SAL TOUGH^ TF",
|
||||||
|
\"SAL TT- _",
|
||||||
|
\"SAL T T",
|
||||||
|
\"SAL UH(AEIOUY)-^ *H",
|
||||||
|
\"SAL UR(AEIOUY)-^ *R",
|
||||||
|
\"SAL U(HR)^ *",
|
||||||
|
\"SAL U^ *",
|
||||||
|
\"SAL UH(AEIOUY)- H",
|
||||||
|
\"SAL UR(AEIOUY)- R",
|
||||||
|
\"SAL U(HR) _",
|
||||||
|
\"SAL V^ W",
|
||||||
|
\"SAL V F",
|
||||||
|
\"SAL WR^ R",
|
||||||
|
\"SAL WH^ W",
|
||||||
|
\"SAL W(AEIOU)- W",
|
||||||
|
\"SAL X^ S",
|
||||||
|
\"SAL X KS",
|
||||||
|
\"SAL Y(AEIOU)- Y",
|
||||||
|
\"SAL ZZ- _",
|
||||||
|
\"SAL Z S",
|
||||||
|
\ ]
|
||||||
|
|||||||
@@ -4,6 +4,8 @@ if !has("syntax")
|
|||||||
finish
|
finish
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
source view_util.vim
|
||||||
|
|
||||||
func GetSyntaxItem(pat)
|
func GetSyntaxItem(pat)
|
||||||
let c = ''
|
let c = ''
|
||||||
let a = ['a', getreg('a'), getregtype('a')]
|
let a = ['a', getreg('a'), getregtype('a')]
|
||||||
@@ -458,3 +460,40 @@ func Test_syntax_hangs()
|
|||||||
set redrawtime&
|
set redrawtime&
|
||||||
bwipe!
|
bwipe!
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
|
||||||
|
func Test_conceal()
|
||||||
|
if !has('conceal')
|
||||||
|
return
|
||||||
|
endif
|
||||||
|
|
||||||
|
new
|
||||||
|
call setline(1, ['', '123456'])
|
||||||
|
syn match test23 "23" conceal cchar=X
|
||||||
|
syn match test45 "45" conceal
|
||||||
|
|
||||||
|
set conceallevel=0
|
||||||
|
call assert_equal('123456 ', ScreenLines(2, 7)[0])
|
||||||
|
call assert_equal([[0, ''], [0, ''], [0, ''], [0, ''], [0, ''], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||||
|
|
||||||
|
set conceallevel=1
|
||||||
|
call assert_equal('1X 6 ', ScreenLines(2, 7)[0])
|
||||||
|
call assert_equal([[0, ''], [1, 'X'], [1, 'X'], [1, ' '], [1, ' '], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||||
|
|
||||||
|
set conceallevel=1
|
||||||
|
set listchars=conceal:Y
|
||||||
|
call assert_equal([[0, ''], [1, 'X'], [1, 'X'], [1, 'Y'], [1, 'Y'], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||||
|
call assert_equal('1XY6 ', ScreenLines(2, 7)[0])
|
||||||
|
|
||||||
|
set conceallevel=2
|
||||||
|
call assert_match('1X6 ', ScreenLines(2, 7)[0])
|
||||||
|
call assert_equal([[0, ''], [1, 'X'], [1, 'X'], [1, ''], [1, ''], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||||
|
|
||||||
|
set conceallevel=3
|
||||||
|
call assert_match('16 ', ScreenLines(2, 7)[0])
|
||||||
|
call assert_equal([[0, ''], [1, ''], [1, ''], [1, ''], [1, ''], [0, '']], map(range(1, 6), 'synconcealed(2, v:val)[0:1]'))
|
||||||
|
|
||||||
|
syn clear
|
||||||
|
set conceallevel&
|
||||||
|
bw!
|
||||||
|
endfunc
|
||||||
|
|||||||
@@ -172,5 +172,21 @@ func Test_stop_all_in_callback()
|
|||||||
call assert_equal(0, len(info))
|
call assert_equal(0, len(info))
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
func FeedkeysCb(timer)
|
||||||
|
call feedkeys("hello\<CR>", 'nt')
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func InputCb(timer)
|
||||||
|
call timer_start(10, 'FeedkeysCb')
|
||||||
|
let g:val = input('?')
|
||||||
|
call Resume()
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Test_input_in_timer()
|
||||||
|
let g:val = ''
|
||||||
|
call timer_start(10, 'InputCb')
|
||||||
|
call Standby(1000)
|
||||||
|
call assert_equal('hello', g:val)
|
||||||
|
endfunc
|
||||||
|
|
||||||
" vim: shiftwidth=2 sts=2 expandtab
|
" vim: shiftwidth=2 sts=2 expandtab
|
||||||
|
|||||||
@@ -1363,6 +1363,64 @@ func Test_bitwise_functions()
|
|||||||
call assert_fails("call invert({})", 'E728:')
|
call assert_fails("call invert({})", 'E728:')
|
||||||
endfunc
|
endfunc
|
||||||
|
|
||||||
|
" Test trailing text after :endfunction {{{1
|
||||||
|
func Test_endfunction_trailing()
|
||||||
|
call assert_false(exists('*Xtest'))
|
||||||
|
|
||||||
|
exe "func Xtest()\necho 'hello'\nendfunc\nlet done = 'yes'"
|
||||||
|
call assert_true(exists('*Xtest'))
|
||||||
|
call assert_equal('yes', done)
|
||||||
|
delfunc Xtest
|
||||||
|
unlet done
|
||||||
|
|
||||||
|
exe "func Xtest()\necho 'hello'\nendfunc|let done = 'yes'"
|
||||||
|
call assert_true(exists('*Xtest'))
|
||||||
|
call assert_equal('yes', done)
|
||||||
|
delfunc Xtest
|
||||||
|
unlet done
|
||||||
|
|
||||||
|
" trailing line break
|
||||||
|
exe "func Xtest()\necho 'hello'\nendfunc\n"
|
||||||
|
call assert_true(exists('*Xtest'))
|
||||||
|
delfunc Xtest
|
||||||
|
|
||||||
|
set verbose=1
|
||||||
|
exe "func Xtest()\necho 'hello'\nendfunc \" garbage"
|
||||||
|
call assert_notmatch('W22:', split(execute('1messages'), "\n")[0])
|
||||||
|
call assert_true(exists('*Xtest'))
|
||||||
|
delfunc Xtest
|
||||||
|
|
||||||
|
exe "func Xtest()\necho 'hello'\nendfunc garbage"
|
||||||
|
call assert_match('W22:', split(execute('1messages'), "\n")[0])
|
||||||
|
call assert_true(exists('*Xtest'))
|
||||||
|
delfunc Xtest
|
||||||
|
set verbose=0
|
||||||
|
|
||||||
|
function Foo()
|
||||||
|
echo 'hello'
|
||||||
|
endfunction | echo 'xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'
|
||||||
|
delfunc Foo
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
func Test_delfunction_force()
|
||||||
|
delfunc! Xtest
|
||||||
|
delfunc! Xtest
|
||||||
|
func Xtest()
|
||||||
|
echo 'nothing'
|
||||||
|
endfunc
|
||||||
|
delfunc! Xtest
|
||||||
|
delfunc! Xtest
|
||||||
|
endfunc
|
||||||
|
|
||||||
|
" Test using bang after user command {{{1
|
||||||
|
func Test_user_command_with_bang()
|
||||||
|
command -bang Nieuw let nieuw = 1
|
||||||
|
Ni!
|
||||||
|
call assert_equal(1, nieuw)
|
||||||
|
unlet nieuw
|
||||||
|
delcommand Nieuw
|
||||||
|
endfunc
|
||||||
|
|
||||||
"-------------------------------------------------------------------------------
|
"-------------------------------------------------------------------------------
|
||||||
" Modelines {{{1
|
" Modelines {{{1
|
||||||
" vim: ts=8 sw=4 tw=80 fdm=marker
|
" vim: ts=8 sw=4 tw=80 fdm=marker
|
||||||
|
|||||||
@@ -1780,6 +1780,7 @@ theend:
|
|||||||
ex_function(exarg_T *eap)
|
ex_function(exarg_T *eap)
|
||||||
{
|
{
|
||||||
char_u *theline;
|
char_u *theline;
|
||||||
|
char_u *line_to_free = NULL;
|
||||||
int j;
|
int j;
|
||||||
int c;
|
int c;
|
||||||
int saved_did_emsg;
|
int saved_did_emsg;
|
||||||
@@ -2093,10 +2094,15 @@ ex_function(exarg_T *eap)
|
|||||||
line_arg = p + 1;
|
line_arg = p + 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else if (eap->getline == NULL)
|
|
||||||
theline = getcmdline(':', 0L, indent);
|
|
||||||
else
|
else
|
||||||
theline = eap->getline(':', eap->cookie, indent);
|
{
|
||||||
|
vim_free(line_to_free);
|
||||||
|
if (eap->getline == NULL)
|
||||||
|
theline = getcmdline(':', 0L, indent);
|
||||||
|
else
|
||||||
|
theline = eap->getline(':', eap->cookie, indent);
|
||||||
|
line_to_free = theline;
|
||||||
|
}
|
||||||
if (KeyTyped)
|
if (KeyTyped)
|
||||||
lines_left = Rows - 1;
|
lines_left = Rows - 1;
|
||||||
if (theline == NULL)
|
if (theline == NULL)
|
||||||
@@ -2130,8 +2136,29 @@ ex_function(exarg_T *eap)
|
|||||||
/* Check for "endfunction". */
|
/* Check for "endfunction". */
|
||||||
if (checkforcmd(&p, "endfunction", 4) && nesting-- == 0)
|
if (checkforcmd(&p, "endfunction", 4) && nesting-- == 0)
|
||||||
{
|
{
|
||||||
if (line_arg == NULL)
|
char_u *nextcmd = NULL;
|
||||||
vim_free(theline);
|
|
||||||
|
if (*p == '|')
|
||||||
|
nextcmd = p + 1;
|
||||||
|
else if (line_arg != NULL && *skipwhite(line_arg) != NUL)
|
||||||
|
nextcmd = line_arg;
|
||||||
|
else if (*p != NUL && *p != '"' && p_verbose > 0)
|
||||||
|
give_warning2(
|
||||||
|
(char_u *)_("W22: Text found after :endfunction: %s"),
|
||||||
|
p, TRUE);
|
||||||
|
if (nextcmd != NULL)
|
||||||
|
{
|
||||||
|
/* Another command follows. If the line came from "eap" we
|
||||||
|
* can simply point into it, otherwise we need to change
|
||||||
|
* "eap->cmdlinep". */
|
||||||
|
eap->nextcmd = nextcmd;
|
||||||
|
if (line_to_free != NULL)
|
||||||
|
{
|
||||||
|
vim_free(*eap->cmdlinep);
|
||||||
|
*eap->cmdlinep = line_to_free;
|
||||||
|
line_to_free = NULL;
|
||||||
|
}
|
||||||
|
}
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -2202,24 +2229,15 @@ ex_function(exarg_T *eap)
|
|||||||
|
|
||||||
/* Add the line to the function. */
|
/* Add the line to the function. */
|
||||||
if (ga_grow(&newlines, 1 + sourcing_lnum_off) == FAIL)
|
if (ga_grow(&newlines, 1 + sourcing_lnum_off) == FAIL)
|
||||||
{
|
|
||||||
if (line_arg == NULL)
|
|
||||||
vim_free(theline);
|
|
||||||
goto erret;
|
goto erret;
|
||||||
}
|
|
||||||
|
|
||||||
/* Copy the line to newly allocated memory. get_one_sourceline()
|
/* Copy the line to newly allocated memory. get_one_sourceline()
|
||||||
* allocates 250 bytes per line, this saves 80% on average. The cost
|
* allocates 250 bytes per line, this saves 80% on average. The cost
|
||||||
* is an extra alloc/free. */
|
* is an extra alloc/free. */
|
||||||
p = vim_strsave(theline);
|
p = vim_strsave(theline);
|
||||||
if (p != NULL)
|
if (p == NULL)
|
||||||
{
|
goto erret;
|
||||||
if (line_arg == NULL)
|
((char_u **)(newlines.ga_data))[newlines.ga_len++] = p;
|
||||||
vim_free(theline);
|
|
||||||
theline = p;
|
|
||||||
}
|
|
||||||
|
|
||||||
((char_u **)(newlines.ga_data))[newlines.ga_len++] = theline;
|
|
||||||
|
|
||||||
/* Add NULL lines for continuation lines, so that the line count is
|
/* Add NULL lines for continuation lines, so that the line count is
|
||||||
* equal to the index in the growarray. */
|
* equal to the index in the growarray. */
|
||||||
@@ -2418,6 +2436,7 @@ errret_2:
|
|||||||
ga_clear_strings(&newlines);
|
ga_clear_strings(&newlines);
|
||||||
ret_free:
|
ret_free:
|
||||||
vim_free(skip_until);
|
vim_free(skip_until);
|
||||||
|
vim_free(line_to_free);
|
||||||
vim_free(fudi.fd_newkey);
|
vim_free(fudi.fd_newkey);
|
||||||
vim_free(name);
|
vim_free(name);
|
||||||
did_emsg |= saved_did_emsg;
|
did_emsg |= saved_did_emsg;
|
||||||
@@ -2799,7 +2818,8 @@ ex_delfunction(exarg_T *eap)
|
|||||||
{
|
{
|
||||||
if (fp == NULL)
|
if (fp == NULL)
|
||||||
{
|
{
|
||||||
EMSG2(_(e_nofunc), eap->arg);
|
if (!eap->forceit)
|
||||||
|
EMSG2(_(e_nofunc), eap->arg);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (fp->uf_calls > 0)
|
if (fp->uf_calls > 0)
|
||||||
|
|||||||
@@ -764,6 +764,42 @@ 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 */
|
||||||
|
/**/
|
||||||
|
670,
|
||||||
|
/**/
|
||||||
|
669,
|
||||||
|
/**/
|
||||||
|
668,
|
||||||
|
/**/
|
||||||
|
667,
|
||||||
|
/**/
|
||||||
|
666,
|
||||||
|
/**/
|
||||||
|
665,
|
||||||
|
/**/
|
||||||
|
664,
|
||||||
|
/**/
|
||||||
|
663,
|
||||||
|
/**/
|
||||||
|
662,
|
||||||
|
/**/
|
||||||
|
661,
|
||||||
|
/**/
|
||||||
|
660,
|
||||||
|
/**/
|
||||||
|
659,
|
||||||
|
/**/
|
||||||
|
658,
|
||||||
|
/**/
|
||||||
|
657,
|
||||||
|
/**/
|
||||||
|
656,
|
||||||
|
/**/
|
||||||
|
655,
|
||||||
|
/**/
|
||||||
|
654,
|
||||||
|
/**/
|
||||||
|
653,
|
||||||
/**/
|
/**/
|
||||||
652,
|
652,
|
||||||
/**/
|
/**/
|
||||||
|
|||||||
Reference in New Issue
Block a user