0
0
mirror of https://github.com/vim/vim.git synced 2025-07-26 11:04:33 -04:00

19886 Commits

Author SHA1 Message Date
Ubaldo Tiberi
c3837a46ff
runtime(termdebug): fix a few issues
Fix a few minor issues:
1. filename with whitespaces issue should be fixed now, fixes: #12357
2. ":Termdebug args" should work now, fixes: #15254

closes: #15261

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
2024-07-14 16:58:32 +02:00
Christian Brabandt
bb5d27dc79
patch 9.1.0585: tests: test_cpoptions leaves swapfiles around
Problem:  tests: test_cpoptions leaves swapfiles around
Solution: Use :bw! instead of :close!

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0585
2024-07-14 16:03:41 +02:00
John Marriott
b3b2beea5e
patch 9.1.0584: Warning about redeclaring f_id() non-static
Problem:  Warning about redeclaring f_id() non-static
Solution: Declare f_id() static (John Marriott)

closes: #15257

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0584
2024-07-14 11:15:07 +02:00
Christian Brabandt
27c55984de
runtime(doc): Add hint how to load termdebug from vimrc
fixes: #15256

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-14 10:41:08 +02:00
Mohamed Akram
6d6dffa611
runtime(doc): document global insert behavior
This is a partial revert of 8f3f58f since this issue was fixed in #15120.

related: #15120

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-14 10:34:25 +02:00
Jonas Dujava
28145e005d
patch 9.1.0583: filetype: *.pdf_tex files are not recognized
Problem:  filetype: *.pdf_tex files are not recognized
Solution: Detect '*.pdf_tex' files as tex filetype
          (Jonas Dujava)

Those files are generated by inkscape, when exporting, see e.g.
https://inkscape.org/doc/inkscape-man.html

closes: #15250

Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0583
2024-07-14 10:26:19 +02:00
zeertzjq
7d664bf0eb
patch 9.1.0582: Printed line doesn't overwrite colon when pressing Enter in Ex mode
Problem:  Printed line no longer overwrites colon when pressing Enter in
          Ex mode (after 9.1.0573).
Solution: Restore the behavior of pressing Enter in Ex mode.
          (zeertzjq)

closes: #15258

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0582
2024-07-14 10:22:54 +02:00
zeertzjq
d9be94cf03
patch 9.1.0581: Various lines are indented inconsistently
Problem:  style: Various lines are indented inconsistently
Solution: Retab these lines and correct some comments.
          (zeertzjq)

closes: #15259

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0581
2024-07-14 10:20:20 +02:00
zeertzjq
90a800274d
patch 9.1.0580: :lmap mapping for keypad key not applied when typed in Select mode
Problem:  An :lmap mapping for a printable keypad key is not applied
          when typing it in Select mode.
Solution: Change keypad key to ASCII after setting vgetc_char.
          (zeertzjq)

closes: #15245

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0580
2024-07-13 19:06:44 +02:00
zeertzjq
d1b5ea984d
patch 9.1.0579: Ex command is still executed after giving E1247
Problem:  Ex command is still executed after giving E1247.
Solution: Indicate the error properly and set cmd to NULL.
          (zeertzjq)

closes: #15241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0579
2024-07-13 19:04:10 +02:00
Yinzuo Jiang
360c51208e
patch 9.1.0578: no tests for :Tohtml
Problem:  no tests for :Tohtml
Solution: Add two basic tests (Yinzuo Jiang)

closes: #15240

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0578
2024-07-13 19:02:10 +02:00
zeertzjq
69a28f6c08
patch 9.1.0577: Unnecessary checks for v:sizeoflong in test_put.vim
Problem:  Unnecessary checks for v:sizeoflong in test_put.vim.  They are
          no longer necessary as patch 8.2.3661 has changed the count to
          be within 32-bit integer limit.
Solution: Remove the checks (zeertzjq).

closes: #15239

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0577
2024-07-13 18:59:47 +02:00
Ken Takata
71de259e78
patch 9.1.0576: tests: still an issue with test_gettext_make
Problem:  tests: still an issue with test_gettext_make
          (after v9.1.0570)
Solution: Compare the getenv() output against v:null to verify
          that $GETTEXT_PATH was set or not (Ken Takata)

closes: #15236

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0576
2024-07-13 18:56:25 +02:00
zeertzjq
1a3dd7dc78
patch 9.1.0575: Wrong comments in alt_tabpage()
Problem:  Wrong comments in alt_tabpage()
          (after v9.1.0572)
Solution: Correct the comments (zeertzjq).

closes: #15235

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0575
2024-07-13 18:53:54 +02:00
Mohamed Akram
8c446da349
patch 9.1.0574: ex: wrong handling of commands after bar
Problem:  ex: wrong handling of commands after bar
Solution: for :append, :insert and :change use the text after the bar
          as input for those commands. This is what POSIX requests.
          (Mohamed Akram)

See the POSIX Spec:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 12.c

closes: #15229

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0574
2024-07-13 18:49:55 +02:00
Christian Brabandt
c5e24ee24b
runtime(doc): add a note for netrw bug reports
fixes: #15242

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-13 18:19:03 +02:00
Mohamed Akram
c25a7084e9
patch 9.1.0573: ex: no implicit print for single addresses
Problem:  ex: no implicit print for single addresses
Solution: explicitly print even during single addresses,
          as requested by POSIX (Mohamed Akram)

See the POSIX behaviour here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/ex.html#tag_20_40_13_03
Section 6b

closes: #15230

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0573
2024-07-12 20:18:54 +02:00
Christian Brabandt
cb7928812e
runtime(vim): make &indentexpr available from the outside
closes: #14936

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 20:02:31 +02:00
LemonBoy
5247b0b92e
patch 9.1.0572: cannot specify tab page closing behaviour
Problem:  cannot specify tab page closing behaviour
          (Gianluca Pacchiella)
Solution: Add the 'tabclose' option (LemonBoy).

fixes: #5967
closes: #15204

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0572
2024-07-12 19:36:53 +02:00
Mohamed Akram
74703f1086
runtime(doc): remove obsolete Ex insert behavior
related: #15120
closes: #15228

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 18:53:07 +02:00
Ken Takata
231bb03946
patch 9.1.0571: tests: Test_gui_lowlevel_keyevent is flaky
Problem:  tests: Test_gui_lowlevel_keyevent is flaky
Solution: mark as flaky (Ken Takata)

Test_gui_lowlevel_keyevent is failing on vim-win32-installer recently.
Mark it as flaky for now.

closes: #15223

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0571
2024-07-12 07:48:32 +02:00
Eisuke Kawashima
57f7d75591
runtime(logindefs): update syntax with new keywords
* add keywords
* enforce octal format for permissions

closes: #15222

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 07:46:43 +02:00
Ken Takata
8a7563bbea
patch 9.1.0570: tests: test_gettext_make can be improved
Problem:  tests: test_gettext_make can be improved
          (after v9.1.0559)
Solution: Improve the test
          (Ken Takata)

* Remove unnecessary comment.
* Check the gettext feature.
* Check whether %GETTEXT_PATH% is set.
* Check the return code of the make command.
* Use heredoc.

closes: #15221

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0570
2024-07-12 07:35:36 +02:00
igna_martinoli
7347642633
runtime(filetype): Fix Prolog file detection regex
Problem: filetype: .pro file detection for Prolog is broken
Solution: fixed the regex to only match on the tested
          cases (igna_martinoli)

fixes: #10835
closes: #15206

Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-12 07:33:32 +02:00
zeertzjq
1ee7420460
patch 9.1.0569: fnamemodify() treats ".." and "../" differently
Problem:  fnamemodify() treats ".." and "../" differently.
Solution: Expand ".." properly like how "/.." is treated in 8.2.3388.
          (zeertzjq)

closes: #15218

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0569
2024-07-12 07:29:14 +02:00
Riley Bruins
fc533c9f06
runtime(mojo): include mojo ftplugin and indent script
Taken from excerpts of the Python ftplugin and adapted,
indent script simply sources the python indent script.

closes: #15171

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 22:51:48 +02:00
LemonBoy
a20bf69a3b
patch 9.1.0568: Cannot expand paths from 'cdpath' setting
Problem:  Cannot expand paths from 'cdpath' setting
          (Daniel Hahler)
Solution: Implement 'cdpath' completion, add the new 'dir_in_path'
          completion type (LemonBoy)

fixes #374
closes: #15205

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0568
2024-07-11 22:45:42 +02:00
zeertzjq
764526e279
patch 9.1.0567: Cannot use relative paths as findfile() stop directories
Problem:  Cannot use relative paths as findfile() stop directories.
Solution: Change a relative path to an absolute path.
          (zeertzjq)

related: #15200
closes: #15202

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0567
2024-07-11 22:26:01 +02:00
zeertzjq
e6ab23bd4a
patch 9.1.0566: Stop dir in findfile() doesn't work properly w/o trailing slash
Problem:  Stop directory in findfile() doesn't work properly without a
          trailing slash.
Solution: Always use fnamencmp(), not fnamecmp().

related: #15200
related: #15202

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0566
2024-07-11 22:25:54 +02:00
zeertzjq
68819afb2c
patch 9.1.0565: Stop directory doesn't work properly in 'tags'
Problem:  Stop directory doesn't work properly in 'tags'.
          (Jesse Pavel)
Solution: Also move the stop directory forward by one byte.
          (zeertzjq)

This doesn't support relative stop directories yet, as they are not
supported in other places like findfile() either.

fixes: #15200
related: #15202

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0565
2024-07-11 22:25:42 +02:00
Ernie Rael
0512425891
patch 9.1.0564: id() can be faster
Problem:  id() can be made faster
Solution: don't use printf(), use clever shift of pointer
          (Ernie Rael)

closes: #15207

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0564
2024-07-11 22:16:28 +02:00
Shougo Matsushita
8367884909
patch 9.1.0563: Cannot process any Key event
Problem:  Cannot process any Key event
Solution: Add the KeyInputPre autocmd
          (Shougo Matsushita)

closes: #15182

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0563
2024-07-11 22:05:12 +02:00
zeertzjq
e7b98ab96e
patch 9.1.0562: tests: inconsistency in test_findfile.vim
Problem:  tests: inconsistency in test_findfile.vim, it saves and
          restores 'shellslash', but doesn't actually set it
Solution: Set shellslash explicitly (zeertzjq)

closes: #15217

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0562
2024-07-11 21:48:09 +02:00
Christian Brabandt
7a22cb8141
runtime(fstab): Add missing keywords to fstab syntax
Added overlay, tracefs and fixed the "none" keyword in the fstab syntax definition.

closes: #15217

Signed-off-by: Radu Dineiu <radu.dineiu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-11 21:45:41 +02:00
Christian Brabandt
b7e09b0442
patch 9.1.0561: netbeans: variable used un-initialized (Coverity)
Problem:  netbeans: variable used un-initialized (Coverity)
          (after v9.1.0557)
Solution: properly initialize exarg_T struct for use with netbeans

The actual exarg.cmdidx doesn't really matter, but let's use something,
that is not affected by the recent changes (going through the buffer
list) and use CMD_USER.

closes: #15211

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0561
2024-07-11 21:41:23 +02:00
Christ van Willegen
8252ef134f
patch 9.1.0560: bindtextdomain() does not indicate an error
Problem:  bindtextdomain() does not indicate an error
          (after v9.1.509)
Solution: return false on failure (OOM).
          (Chris van Willegen)

closes: #15116

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0560
2024-07-11 21:36:21 +02:00
RestorerZ
965091001f
patch 9.1.0559: translation of vim scripts can be improved
Problem:  translation of vim scripts can be improved
          (after v9.1.0509)
Solution: improve documentation, add tests, include missing
          libraries for the Windows CI
          (RestorerZ)

closes: #15100

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0559
2024-07-11 21:14:15 +02:00
igna_martinoli
50dc83cf92
patch 9.1.0558: filetype: prolog detection can be improved
Problem:  filetype: prolog detection can be improved
Solution: Improved the Prolog file detection regex and added tests for
          all cases. (igna_martinoli)

fixes: #10835
closes: #15206

Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0558
2024-07-10 21:25:04 +02:00
LemonBoy
893eeeb445
patch 9.1.0557: moving in the buffer list doesn't work as documented
Problem:  moving in the buffer list doesn't work as documented
          (SenileFelineS)
Solution: Skip non-help buffers, when run from normal buffers, else
          only move from help buffers to the next help buffer (LemonBoy)

As explained in the help section for :bnext and :bprev the commands
should jump from help buffers to help buffers (and from regular ones to
regular ones).

fixes: #4478
closes: #15198

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0557
2024-07-10 20:20:48 +02:00
zeertzjq
7a85e343d2
runtime(doc): fix inconsistencies in :h file-searching
closes: #15201

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-10 20:07:10 +02:00
zeertzjq
2e7d89b398
patch 9.1.0556: :bwipe doesn't remove file from jumplist of other tabpages
Problem:  :bwipe doesn't remove file from jumplist and tagstack of other
          tabpages. Time complexity of mark_forget_file() is O(n^2) when
          removing all entries (after v9.1.0554)
Solution: Use FOR_ALL_TAB_WINDOWS().  Start the loops over the arrays
          from the end instead of the start (zeertzjq)

closes: #15199

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0556
2024-07-10 19:36:36 +02:00
Christian Brabandt
a3a14d5469
runtime(htmlangular): correct comment
related: #15190

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-10 19:33:33 +02:00
Christian Brabandt
c03f631b7b
patch 9.1.0555: filetype: angular ft detection is still problematic
Problem:  filetype: angular ft detection is still problematic
          (after 9.1.0551)
Solution: detect htmlangular filetype only by inspecting the content,
          do not try to determine it from a generic name like
          '*.component.html'

For the reasons mentioned here:

https://github.com/vim/vim/pull/13594#issuecomment-1834465890

related: #15190
related: #13594
related: #13604

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0555
2024-07-10 19:31:00 +02:00
LemonBoy
4ff3a9b1e3
patch 9.1.0554: :bw leaves jumplist and tagstack data around
Problem:  :bw leaves jumplist and tagstack data around
          (Paul "Joey" Clark)
Solution: Wipe jumplist and tagstack references to the wiped buffer
          (LemonBoy)

As documented the :bwipeout command brutally deletes all the references
to the buffer, so let's make it delete all the entries in the jump list
and tag stack referring to the wiped-out buffer.

fixes: #8201
closes: #15185

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0554
2024-07-09 20:03:24 +02:00
Tomodachi94
d33a518025
patch 9.1.0553: filetype: *.mcmeta files are not recognized
Problem:  filetype: *.mcmeta files are not recognized
Solution: Detect '*.mcmeta' files as json filetype
          (Tomodachi94)

"pack.mcmeta" was added to the JSON tests because that is the most common
filename with that extension.

There are currently 34,000 instances of this file extension on GitHub:
https://github.com/search?q=path%3A*.mcmeta&type=code&p=2

.zip files with this extension have downloads in the millions on sites
like CurseForge:
https://www.curseforge.com/minecraft/search?page=1&pageSize=20&sortBy=relevancy&class=texture-packs

Further reading about the file extension:
https://minecraft.wiki/w/Tutorials/Creating_a_resource_pack#Creating_a_.MCMETA_file

closes: #15189

Signed-off-by: Tomodachi94 <tomodachi94@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0553
2024-07-09 19:55:40 +02:00
Christian Brabandt
8fc23bb8a4
patch 9.1.0552: No test for antlr4 filetype
Problem:  No test for antlr4 filetype
          (after 9.1.0550)
Solution: Add a simple filename test

related: #15191

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0552
2024-07-09 19:52:20 +02:00
Dennis van den Berg
1ad194c0df
patch 9.1.0551: filetype: htmlangular files are not properly detected
Problem:  filetype: htmlangular files are not properly detected
Solution: Use the new htmlangular filetype for angular files, because
          since angular v17, those are no longer valid HTML files.
          (Dennis van den Berg)

Since Angular 17, the new Control Flow Syntax is not valid HTML. This PR
adds a new filetype detection for the HTML templates of Angular.

It first checks the filename. The Angular convention is to use
*.component.html for the template. However, this is not mandatory.

If the filename does not match, it will check the contents of the file
if it contains:

  - One of the Control-Flow blocks: @if, @for, @switch, @defer
  - A structural directive: *ngIf, *ngFor, *ngSwitch, *ngTemplateOutlet
  - Builtin Angular elements: ng-template or ng-content
  - String interpolation: {{ something }}

This enables the Angular LSP to attach only to htmlangular filetypes, as
well as language parsers, such as tree-sitter.

closes: #15190

Signed-off-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0551
2024-07-09 19:44:32 +02:00
Yinzuo Jiang
4a7a4a3675
patch 9.1.0550: filetype: antlr4 files are not recognized
Problem:  filetype: antlr4 files are not recognized
Solution: Detect '*.g4' as antlr4 filetype, include a simple antlr4
          syntax and filetype plugin (Yinzuo Jiang)

closes: #15191

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0550
2024-07-09 19:11:18 +02:00
glepnir
600a12d08e
patch 9.1.0549: fuzzycollect regex based completion not working as expected
Problem:  fuzzycollect regex based completion not working as expected
Solution: Revert Patch v9.1.0503 (glepnir)

closes: #15192

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.1.0549
2024-07-09 18:51:29 +02:00
Boyang Du
7298565c85
runtime(doc): autocmd_add() accepts a list not a dict
closes: #15180

Signed-off-by: Boyang Du <boyang@synopsys.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 18:47:09 +02:00