Skip to content

Commit 6500a0c

Browse files
committed
Merge remote-tracking branch 'vim/master'
2 parents 80a7ca9 + 4b6172e commit 6500a0c

File tree

93 files changed

+1475
-671
lines changed

Some content is hidden

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

93 files changed

+1475
-671
lines changed

runtime/doc/builtin.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*builtin.txt* For Vim version 9.0. Last change: 2022 Sep 30
1+
*builtin.txt* For Vim version 9.0. Last change: 2022 Oct 10
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -1882,10 +1882,10 @@ cursor({list})
18821882
|setcursorcharpos()|.
18831883

18841884
Does not change the jumplist.
1885-
{lnum} is used like with |getline()|.
1885+
{lnum} is used like with |getline()|, except that if {lnum} is
1886+
zero, the cursor will stay in the current line.
18861887
If {lnum} is greater than the number of lines in the buffer,
18871888
the cursor will be positioned at the last line in the buffer.
1888-
If {lnum} is zero, the cursor will stay in the current line.
18891889
If {col} is greater than the number of bytes in the line,
18901890
the cursor will be positioned at the last character in the
18911891
line.

runtime/doc/eval.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*eval.txt* For Vim version 9.0. Last change: 2022 Sep 17
1+
*eval.txt* For Vim version 9.0. Last change: 2022 Oct 07
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar

runtime/doc/options.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7211,6 +7211,8 @@ A jump table for the options with a short description can be found at |Q_op|.
72117211
c don't give |ins-completion-menu| messages. For example,
72127212
"-- XXX completion (YYY)", "match 1 of 2", "The only match",
72137213
"Pattern not found", "Back at original", etc.
7214+
C don't give messages while scanning for ins-completion items,
7215+
for instance "scanning tags"
72147216
q use "recording" instead of "recording @a"
72157217
F don't give the file info when editing a file, like `:silent`
72167218
was used for the command; note that this also affects messages

runtime/doc/rileft.txt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,11 @@ encoded for every character (or group of characters) are not supported either
3535
as this kind of support is out of the scope of a simple addition to an
3636
existing editor (and it's not sanctioned by Unicode either).
3737

38+
As many people working on the code do not use the right-to-left mode, this
39+
feature may not work in some situations. If you can describe what is wrong
40+
and how it would work when fixed, please create an issue on github, see
41+
|bug-reports|.
42+
3843

3944
Highlights
4045
----------

runtime/doc/terminal.txt

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -288,9 +288,8 @@ way to kill or interrupt the job. For example: >
288288
289289
So long as the job is running the window behaves like it contains a modified
290290
buffer. Trying to close the window with `CTRL-W :quit` fails. When using
291-
`CTRL-W :quit!` the job is ended. The text in the window is lost. The buffer
292-
still exists, but getting it in a window with `:buffer` will show an empty
293-
buffer.
291+
`CTRL-W :quit!` the job is ended. The text in the window is lost, the buffer
292+
is deleted. With `CTRL-W :bunload!` the buffer remains but will be empty.
294293

295294
Trying to close the window with `CTRL-W :close` also fails. Using
296295
`CTRL-W :close!` will close the window and make the buffer hidden.

runtime/doc/textprop.txt

Lines changed: 13 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -225,7 +225,7 @@ prop_add({lnum}, {col}, {props})
225225
GetLnum()->prop_add(col, props)
226226
<
227227
*prop_add_list()*
228-
prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
228+
prop_add_list({props}, [{item}, ...])
229229
Similar to prop_add(), but attaches a text property at
230230
multiple positions in a buffer.
231231

@@ -237,12 +237,18 @@ prop_add_list({props}, [[{lnum}, {col}, {end-lnum}, {end-col}], ...])
237237
type name of the text property type
238238
All fields except "type" are optional.
239239

240-
The second argument is a List of Lists where each list
241-
specifies the starting and ending position of the text. The
242-
first two items {lnum} and {col} specify the starting position
243-
of the text where the property will be attached and the last
244-
two items {end-lnum} and {end-col} specify the position just
245-
after the text.
240+
The second argument is a List of items, where each {item} is a
241+
list that specifies the starting and ending position of the
242+
text: [{lnum}, {col}, {end-lnum}, {end-col}]
243+
or: [{lnum}, {col}, {end-lnum}, {end-col}, {id}]
244+
245+
The first two items {lnum} and {col} specify the starting
246+
position of the text where the property will be attached.
247+
The next two items {end-lnum} and {end-col} specify the
248+
position just after the text.
249+
An optional fifth item {id} can be used to give a different ID
250+
to a property. When omitted the ID from {props} is used,
251+
falling back to zero if none are present.
246252

247253
It is not possible to add a text property with a "text" field
248254
here.

runtime/doc/vim9.txt

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
*vim9.txt* For Vim version 9.0. Last change: 2022 Oct 03
1+
*vim9.txt* For Vim version 9.0. Last change: 2022 Oct 11
22

33

44
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -962,6 +962,8 @@ In compiled Vim9 script you get:
962962
3
963963
Generally, you should not change the list that is iterated over. Make a copy
964964
first if needed.
965+
When looping over a list of lists, the nested lists can be changed. The loop
966+
variable is "final", it cannot be changed but what its value can be changed.
965967
*E1306*
966968
The depth of loops, :for and :while loops added together, cannot exceed 10.
967969

runtime/filetype.vim

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -369,6 +369,9 @@ au BufNewFile,BufRead *.ch call dist#ft#FTchange()
369369
" ChordPro
370370
au BufNewFile,BufRead *.chopro,*.crd,*.cho,*.crdpro,*.chordpro setf chordpro
371371

372+
" Clang-tidy
373+
au BufNewFile,BufRead .clang-tidy setf yaml
374+
372375
" Clean
373376
au BufNewFile,BufRead *.dcl,*.icl setf clean
374377

@@ -1750,6 +1753,9 @@ au BufNewFile,BufRead *.sed setf sed
17501753
" SubRip
17511754
au BufNewFile,BufRead *.srt setf srt
17521755

1756+
" SubStation Alpha
1757+
au BufNewFile,BufRead *.ass,*.ssa setf ssa
1758+
17531759
" svelte
17541760
au BufNewFile,BufRead *.svelte setf svelte
17551761

src/autocmd.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2096,6 +2096,7 @@ apply_autocmds_group(
20962096
|| event == EVENT_DIRCHANGED
20972097
|| event == EVENT_DIRCHANGEDPRE
20982098
|| event == EVENT_MODECHANGED
2099+
|| event == EVENT_MENUPOPUP
20992100
|| event == EVENT_USER
21002101
|| event == EVENT_WINCLOSED
21012102
|| event == EVENT_WINSCROLLED)

src/buffer.c

Lines changed: 17 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -538,7 +538,8 @@ close_buffer(
538538
unload_buf = TRUE;
539539

540540
#ifdef FEAT_TERMINAL
541-
if (bt_terminal(buf) && (buf->b_nwindows == 1 || del_buf))
541+
// depending on how we get here b_nwindows may already be zero
542+
if (bt_terminal(buf) && (buf->b_nwindows <= 1 || del_buf))
542543
{
543544
CHECK_CURBUF;
544545
if (term_job_running(buf->b_term))
@@ -550,6 +551,11 @@ close_buffer(
550551

551552
// Wiping out or unloading a terminal buffer kills the job.
552553
free_terminal(buf);
554+
555+
// A terminal buffer is wiped out when job has finished.
556+
del_buf = TRUE;
557+
unload_buf = TRUE;
558+
wipe_buf = TRUE;
553559
}
554560
else
555561
{
@@ -565,10 +571,16 @@ close_buffer(
565571
}
566572
else
567573
{
568-
// A terminal buffer is wiped out if the job has finished.
569-
del_buf = TRUE;
570-
unload_buf = TRUE;
571-
wipe_buf = TRUE;
574+
if (del_buf || unload_buf)
575+
{
576+
// A terminal buffer is wiped out if the job has finished.
577+
// We only do this when there's an intention to unload the
578+
// buffer. This way, :hide and other similar commands won't
579+
// wipe the buffer.
580+
del_buf = TRUE;
581+
unload_buf = TRUE;
582+
wipe_buf = TRUE;
583+
}
572584
}
573585
CHECK_CURBUF;
574586
}

0 commit comments

Comments
 (0)