Skip to content

Commit ac46984

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 41d097c + e88fc7a commit ac46984

51 files changed

Lines changed: 953 additions & 318 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

runtime/doc/eval.txt

Lines changed: 59 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -2316,6 +2316,9 @@ searchpos({pattern} [, {flags} [, {stopline} [, {timeout}]]])
23162316
server2client({clientid}, {string})
23172317
Number send reply string
23182318
serverlist() String get a list of available servers
2319+
setbufline( {expr}, {lnum}, {line})
2320+
Number set line {lnum} to {line} in buffer
2321+
{expr}
23192322
setbufvar({expr}, {varname}, {val})
23202323
none set {varname} in buffer {expr} to {val}
23212324
setcharsearch({dict}) Dict set character search from {dict}
@@ -2407,6 +2410,7 @@ term_wait({buf} [, {time}]) Number wait for screen to be updated
24072410
test_alloc_fail({id}, {countdown}, {repeat})
24082411
none make memory allocation fail
24092412
test_autochdir() none enable 'autochdir' during startup
2413+
test_feedinput() none add key sequence to input buffer
24102414
test_garbagecollect_now() none free memory right now for testing
24112415
test_ignore_error({expr}) none ignore a specific error
24122416
test_null_channel() Channel null value for testing
@@ -4632,18 +4636,20 @@ getqflist([{what}]) *getqflist()*
46324636
returns only the items listed in {what} as a dictionary. The
46334637
following string items are supported in {what}:
46344638
context get the context stored with |setqflist()|
4639+
efm errorformat to use when parsing "lines". If
4640+
not present, then the 'erroformat' option
4641+
value is used.
46354642
id get information for the quickfix list with
46364643
|quickfix-ID|; zero means the id for the
4637-
current list or the list specifed by 'nr'
4644+
current list or the list specifed by "nr"
46384645
items quickfix list entries
4646+
lines use 'errorformat' to extract items from a list
4647+
of lines and return the resulting entries.
4648+
Only a |List| type is accepted. The current
4649+
quickfix list is not modified.
46394650
nr get information for this quickfix list; zero
4640-
means the current quickfix list and '$' means
4651+
means the current quickfix list and "$" means
46414652
the last quickfix list
4642-
text use 'errorformat' to extract items from the
4643-
text and return the resulting entries. The
4644-
value can be a string with one line or a list
4645-
with multiple lines. The current quickfix list
4646-
is not modified.
46474653
title get the list title
46484654
winid get the |window-ID| (if opened)
46494655
all all of the above quickfix properties
@@ -4671,6 +4677,7 @@ getqflist([{what}]) *getqflist()*
46714677
Examples: >
46724678
:echo getqflist({'all': 1})
46734679
:echo getqflist({'nr': 2, 'title': 1})
4680+
:echo getqflist({'lines' : ["F1:10:L10"]})
46744681
<
46754682

46764683
getreg([{regname} [, 1 [, {list}]]]) *getreg()*
@@ -6858,6 +6865,19 @@ serverlist() *serverlist()*
68586865
Example: >
68596866
:echo serverlist()
68606867
<
6868+
setbufline({expr}, {lnum}, {text}) *setbufline()*
6869+
Set line {lnum} to {text} in buffer {expr}. To insert
6870+
lines use |append()|.
6871+
6872+
For the use of {expr}, see |bufname()| above.
6873+
6874+
{lnum} is used like with |setline()|.
6875+
This works like |setline()| for the specified buffer.
6876+
On success 0 is returned, on failure 1 is returned.
6877+
6878+
If {expr} is not a valid buffer or {lnum} is not valid, an
6879+
error message is given.
6880+
68616881
setbufvar({expr}, {varname}, {val}) *setbufvar()*
68626882
Set option or local variable {varname} in buffer {expr} to
68636883
{val}.
@@ -6926,13 +6946,19 @@ setfperm({fname}, {mode}) *setfperm()* *chmod*
69266946

69276947
setline({lnum}, {text}) *setline()*
69286948
Set line {lnum} of the current buffer to {text}. To insert
6929-
lines use |append()|.
6949+
lines use |append()|. To set lines in another buffer use
6950+
|setbufline()|.
6951+
69306952
{lnum} is used like with |getline()|.
69316953
When {lnum} is just below the last line the {text} will be
69326954
added as a new line.
6955+
69336956
If this succeeds, 0 is returned. If this fails (most likely
6934-
because {lnum} is invalid) 1 is returned. Example: >
6957+
because {lnum} is invalid) 1 is returned.
6958+
6959+
Example: >
69356960
:call setline(5, strftime("%c"))
6961+
69366962
< When {text} is a |List| then line {lnum} and following lines
69376963
will be set to the items in the list. Example: >
69386964
:call setline(5, ['aaa', 'bbb', 'ccc'])
@@ -7064,35 +7090,38 @@ setqflist({list} [, {action}[, {what}]]) *setqflist()*
70647090
is created. The new quickfix list is added after the current
70657091
quickfix list in the stack and all the following lists are
70667092
freed. To add a new quickfix list at the end of the stack,
7067-
set "nr" in {what} to '$'.
7093+
set "nr" in {what} to "$".
70687094

70697095
If the optional {what} dictionary argument is supplied, then
70707096
only the items listed in {what} are set. The first {list}
70717097
argument is ignored. The following items can be specified in
70727098
{what}:
70737099
context any Vim type can be stored as a context
7074-
text use 'errorformat' to extract items from the
7075-
text and add the resulting entries to the
7076-
quickfix list {nr}. The value can be a string
7077-
with one line or a list with multiple lines.
7100+
efm errorformat to use when parsing text from
7101+
"lines". If this is not present, then the
7102+
'errorformat' option value is used.
70787103
id quickfix list identifier |quickfix-ID|
70797104
items list of quickfix entries. Same as the {list}
70807105
argument.
7106+
lines use 'errorformat' to parse a list of lines and
7107+
add the resulting entries to the quickfix list
7108+
{nr} or {id}. Only a |List| value is supported.
70817109
nr list number in the quickfix stack; zero
7082-
means the current quickfix list and '$' means
7110+
means the current quickfix list and "$" means
70837111
the last quickfix list
70847112
title quickfix list title text
70857113
Unsupported keys in {what} are ignored.
70867114
If the "nr" item is not present, then the current quickfix list
70877115
is modified. When creating a new quickfix list, "nr" can be
70887116
set to a value one greater than the quickfix stack size.
70897117
When modifying a quickfix list, to guarantee that the correct
7090-
list is modified, 'id' should be used instead of 'nr' to
7118+
list is modified, "id" should be used instead of "nr" to
70917119
specify the list.
70927120

70937121
Examples: >
7094-
:call setqflist([], 'r', {'title': 'My search'})
7095-
:call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
7122+
:call setqflist([], 'r', {'title': 'My search'})
7123+
:call setqflist([], 'r', {'nr': 2, 'title': 'Errors'})
7124+
:call setqflist([], 'a', {'id':myid, 'lines':["F1:10:L10"]})
70967125
<
70977126
Returns zero for success, -1 for failure.
70987127

@@ -7723,6 +7752,7 @@ synIDattr({synID}, {what} [, {mode}]) *synIDattr()*
77237752
"standout" "1" if standout
77247753
"underline" "1" if underlined
77257754
"undercurl" "1" if undercurled
7755+
"strike" "1" if strikethrough
77267756

77277757
Example (echoes the color of the syntax item under the
77287758
cursor): >
@@ -8141,6 +8171,12 @@ term_start({cmd}, {options}) *term_start()*
81418171
have "%d" where the buffer number goes,
81428172
e.g. "10split|buffer %d"; when not
81438173
specified "botright sbuf %d" is used
8174+
"eof_chars" Text to send after all buffer lines were
8175+
written to the terminal. When not set
8176+
CTRL-D is used. For Python use CTRL-Z or
8177+
"exit()". For a shell use "exit". A CR
8178+
is always added.
8179+
{only on MS-Windows}
81448180

81458181
{only available when compiled with the |+terminal| feature}
81468182

@@ -8161,6 +8197,11 @@ test_autochdir() *test_autochdir()*
81618197
Set a flag to enable the effect of 'autochdir' before Vim
81628198
startup has finished.
81638199

8200+
test_feedinput({string}) *test_feedinput()*
8201+
Characters in {string} are queued for processing as if they
8202+
were typed by the user. This uses a low level input buffer.
8203+
This function works only when with |+unix| or GUI is running.
8204+
81648205
test_garbagecollect_now() *test_garbagecollect_now()*
81658206
Like garbagecollect(), but executed right away. This must
81668207
only be called directly to avoid any structure to exist

runtime/doc/options.txt

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4228,6 +4228,7 @@ A jump table for the options with a short description can be found at |Q_op|.
42284228
s standout (termcap entry "so" and "se")
42294229
u underline (termcap entry "us" and "ue")
42304230
c undercurl (termcap entry "Cs" and "Ce")
4231+
t strikethrough (termcap entry "Ts" and "Te")
42314232
n no highlighting
42324233
- no highlighting
42334234
: use a highlight group

runtime/doc/syntax.txt

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -4699,13 +4699,14 @@ the same syntax file on all terminals, and use the optimal highlighting.
46994699

47004700
*bold* *underline* *undercurl*
47014701
*inverse* *italic* *standout*
4702-
*nocombine*
4702+
*nocombine* *strikethrough*
47034703
term={attr-list} *attr-list* *highlight-term* *E418*
47044704
attr-list is a comma separated list (without spaces) of the
47054705
following items (in any order):
47064706
bold
47074707
underline
47084708
undercurl not always available
4709+
strikethrough not always available
47094710
reverse
47104711
inverse same as reverse
47114712
italic
@@ -4716,8 +4717,8 @@ term={attr-list} *attr-list* *highlight-term* *E418*
47164717
Note that "bold" can be used here and by using a bold font. They
47174718
have the same effect.
47184719
"undercurl" is a curly underline. When "undercurl" is not possible
4719-
then "underline" is used. In general "undercurl" is only available in
4720-
the GUI. The color is set with |highlight-guisp|.
4720+
then "underline" is used. In general "undercurl" and "strikethrough"
4721+
is only available in the GUI. The color is set with |highlight-guisp|.
47214722

47224723
start={term-list} *highlight-start* *E422*
47234724
stop={term-list} *term-list* *highlight-stop*
@@ -4882,7 +4883,8 @@ guifg={color-name} *highlight-guifg*
48824883
guibg={color-name} *highlight-guibg*
48834884
guisp={color-name} *highlight-guisp*
48844885
These give the foreground (guifg), background (guibg) and special
4885-
(guisp) color to use in the GUI. "guisp" is used for undercurl.
4886+
(guisp) color to use in the GUI. "guisp" is used for undercurl and
4887+
strikethrough.
48864888
There are a few special names:
48874889
NONE no color (transparent)
48884890
bg use normal background color

runtime/doc/terminal.txt

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,14 @@ Syntax ~
133133
height.
134134
++cols={width} Use {width} for the terminal window
135135
width.
136+
++eof={text} when using [range], text to send after
137+
the last line was written. The default
138+
is to send CTRL-D. A CR is appended.
139+
E.g. for a shell use "++eof=exit" and
140+
for Python "++eof=exit()". Special
141+
codes can be used like with `:map`,
142+
e.g. "<C-Z>" for CTRL-Z.
143+
{only on MS-Windows}
136144

137145
If you want to use more options use the |term_start()|
138146
function.
@@ -141,11 +149,13 @@ When the buffer associated with the terminal is unloaded or wiped out the job
141149
is killed, similar to calling `job_stop(job, "kill")`
142150

143151
So long as the job is running the window behaves like it contains a modified
144-
buffer. Trying to close the window with `CTRL-W :close` or `CTRL-W :hide`
145-
fails, unless "!" is added, in which case the job is ended. The text in the
146-
window is lost. The buffer still exists, but getting it in a window with
147-
`:buffer` will show an
148-
empty buffer.
152+
buffer. Trying to close the window with `CTRL-W :quit` fails. When using
153+
`CTRL-W :quit!` the job is ended. The text in the window is lost. The buffer
154+
still exists, but getting it in a window with `:buffer` will show an empty
155+
buffer.
156+
157+
Trying to close the window with `CTRL-W :close` also fails. Using
158+
`CTRL-W :close!` will close the window and make the buffer hidden.
149159

150160
You can use `CTRL-W :hide` to close the terminal window and make the buffer
151161
hidden, the job keeps running. The `:buffer` command can be used to turn the

runtime/doc/visual.txt

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -314,8 +314,8 @@ Visual-block Insert *v_b_I*
314314
With a blockwise selection, I{string}<ESC> will insert {string} at the start
315315
of block on every line of the block, provided that the line extends into the
316316
block. Thus lines that are short will remain unmodified. TABs are split to
317-
retain visual columns.
318-
See |v_b_I_example|.
317+
retain visual columns. Works only for adding text to a line, not for
318+
deletions. See |v_b_I_example|.
319319

320320
Visual-block Append *v_b_A*
321321
With a blockwise selection, A{string}<ESC> will append {string} to the end of
@@ -331,6 +331,7 @@ See |v_b_A_example|.
331331
Note: "I" and "A" behave differently for lines that don't extend into the
332332
selected block. This was done intentionally, so that you can do it the way
333333
you want.
334+
Works only for adding text to a line, not for deletions.
334335

335336
Visual-block change *v_b_c*
336337
All selected text in the block will be replaced by the same text string. When

src/Make_cyg_ming.mak

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,10 @@ endif
7676
# Set to yes to enable terminal support.
7777
TERMINAL=no
7878

79+
ifndef CTAGS
80+
# this assumes ctags is Exuberant ctags
81+
CTAGS = ctags -I INIT+ --fields=+S
82+
endif
7983

8084
# Link against the shared version of libstdc++ by default. Set
8185
# STATIC_STDCPLUS to "yes" to link against static version instead.
@@ -885,6 +889,12 @@ xxd/xxd.exe: xxd/xxd.c
885889
GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
886890
$(MAKE) -C GvimExt -f Make_ming.mak CROSS=$(CROSS) CROSS_COMPILE=$(CROSS_COMPILE) CXX='$(CXX)' STATIC_STDCPLUS=$(STATIC_STDCPLUS)
887891

892+
tags: notags
893+
$(CTAGS) *.c *.cpp *.h if_perl.xs
894+
895+
notags:
896+
-$(DEL) tags
897+
888898
clean:
889899
-$(DEL) $(OUTDIR)$(DIRSLASH)*.o
890900
-$(DEL) $(OUTDIR)$(DIRSLASH)*.res

src/Make_mvc.mak

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -344,7 +344,8 @@ FEATURES = HUGE
344344
!endif
345345

346346
!ifndef CTAGS
347-
CTAGS = ctags
347+
# this assumes ctags is Exuberant ctags
348+
CTAGS = ctags -I INIT+ --fields=+S
348349
!endif
349350

350351
!ifndef CSCOPE
@@ -1220,7 +1221,7 @@ GvimExt/gvimext.dll: GvimExt/gvimext.cpp GvimExt/gvimext.rc GvimExt/gvimext.h
12201221

12211222

12221223
tags: notags
1223-
$(CTAGS) *.c *.cpp *.h if_perl.xs proto\*.pro
1224+
$(CTAGS) *.c *.cpp *.h if_perl.xs
12241225

12251226
notags:
12261227
- if exist tags del tags

src/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2139,6 +2139,7 @@ test_arglist \
21392139
test_autocmd \
21402140
test_backspace_opt \
21412141
test_breakindent \
2142+
test_bufline \
21422143
test_bufwintabinfo \
21432144
test_cd \
21442145
test_cdo \

src/auto/configure

Lines changed: 17 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7557,20 +7557,34 @@ $as_echo_n "checking --enable-terminal argument... " >&6; }
75577557
# Check whether --enable-terminal was given.
75587558
if test "${enable_terminal+set}" = set; then :
75597559
enableval=$enable_terminal; enable_terminal="yes"
7560+
else
7561+
enable_terminal="auto"
75607562
fi
75617563

7562-
if test "$enable_terminal" = "yes"; then
7564+
if test "$enable_terminal" = "yes" || test "$enable_terminal" = "auto" -a "x$features" = "xhuge" ; then
75637565
if test "x$features" = "xtiny" -o "x$features" = "xsmall"; then
75647566
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: cannot use terminal emulator with tiny or small features" >&5
75657567
$as_echo "cannot use terminal emulator with tiny or small features" >&6; }
75667568
enable_terminal="no"
75677569
else
7568-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
7570+
if test "$enable_terminal" = "auto"; then
7571+
enable_terminal="yes"
7572+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to yes" >&5
7573+
$as_echo "defaulting to yes" >&6; }
7574+
else
7575+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5
75697576
$as_echo "yes" >&6; }
7577+
fi
75707578
fi
75717579
else
7572-
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
7580+
if test "$enable_terminal" = "auto"; then
7581+
enable_terminal="no"
7582+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: defaulting to no" >&5
7583+
$as_echo "defaulting to no" >&6; }
7584+
else
7585+
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5
75737586
$as_echo "no" >&6; }
7587+
fi
75747588
fi
75757589
if test "$enable_terminal" = "yes"; then
75767590
$as_echo "#define FEAT_TERMINAL 1" >>confdefs.h

0 commit comments

Comments
 (0)