Commit Graph

18038 Commits

Author SHA1 Message Date
e978b4534a Farewell to Bram and dedicate upcoming Vim 9.1 to him (#12749)
* Dedicate upcoming Vim 9.1 to Bram

Also replace in a few more places Brams email address and mention new
maintainers.

* Remove Bram from any Maintainer role

* runtime: Align Header

* it's mailing list not mailinglist
2023-08-13 10:33:05 +02:00
9c30f43899 patch 9.0.1702: Undo test is flaky
Problem:  Undo test is flaky.
Solution: Apply filter and change time to "1 second ago" in both dumps.

closes: #12771

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.1702
2023-08-13 10:31:27 +02:00
2f339aad6c Add syntax & ftplugin for pymanifest (#12773) 2023-08-13 10:26:20 +02:00
f9c4c2f97d Update iss syntax file (#11890)
- Add 'ExternalSize:' parameter
- Add 'setntfscompression' files flag
- Fix escaped left brace highlight
- Fix 'String:' parameter highlight
- Remove trailing whitespace
2023-08-13 10:25:41 +02:00
57a02ccf4c patch 9.0.1701: vim9 crash when class member overridden
Problem: vim9 crash when class member overridden
Solution: Use method_count field instead

closes: #12676
closes: #12677

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
v9.0.1701
2023-08-13 10:19:38 +02:00
32f586eec1 patch 9.0.1700: Cannot compile with dynamic perl < 5.38
Problem: Cannot compile with dynamic perl < 5.38 (after 9.0.1681)
Solution: Fix if_perl/dyn from perl 5.32 to 5.38

closes: #12755

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: K.Takata <kentkt@csc.jp>
v9.0.1700
2023-08-13 10:15:05 +02:00
6c313bbb04 patch 9.0.1699: compile warning for xdiff/xutils on MS-Windows
Problem: compile warning for xdiff/xutils on MS-Windows
Solution: add explicit type cast from size_t to long

closes: #12531

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Mike Williams <mikew@globalgraphics.com>
v9.0.1699
2023-08-12 20:50:55 +02:00
7fe1089904 patch 9.0.1698: Test_map_restore_sid fails in GUI
Problem: Test_map_restore_sid fails in GUI
Solution: Feed an unsimplified Ctrl-B

closes: #12770

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.1698
2023-08-12 20:44:21 +02:00
73b8209266 patch 9.0.1697: incsearch test not sufficient
Problem: incsearch test not sufficient (after 9.0.1691)
Solution: add an additional test

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
v9.0.1697
2023-08-12 20:17:26 +02:00
8878653a44 patch 9.0.1696: sodium_mlock may still fail in CI
Problem: sodium_mlock may still fail in CI
Solution: Catch E1230 in testscript and skip test

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.1696
2023-08-12 09:41:23 +02:00
f1cc4d55b9 patch 9.0.1695: Crash with overlong textprop above
Problem: Crash with overlong textprop above
Solution: Consider only positive padding

closes: #12665
closes: #12661

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.1695
2023-08-12 00:14:14 +02:00
bacc83009b patch 9.0.1694: wrong mapping applied when replaying a char search
Problem: wrong mapping applied when replaying a char search
Solution: Store a NOP after the ESC

closes: #12708
closes: #6350

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.1694
2023-08-12 00:09:31 +02:00
2d63e4b3cc patch 9.0.1693: Ctrl-Q not handled like Ctrl-V in replace mode
Problem: Ctrl-Q not handled like Ctrl-V in replace mode
Solution: Handle Ctrl-Q like Ctrl-V

closes: #12686
closes: #12684

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.1693
2023-08-12 00:03:57 +02:00
db4fd29063 patch 9.0.1692: Android not handling AI_V4MAPPED ai_flag
Problem: Android not handling AI_V4MAPPED ai_flag
Solution: don't set AI_V4MAPPED flag when on Android, since
          Android's getaddrinfo returns EAI_BADFLAGS if ai_flags
          contains it

closes: #12613

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: cions <gh.cions@gmail.com>
v9.0.1692
2023-08-11 23:53:13 +02:00
7b7b4cb6f2 patch 9.0.1691: wrong viewport restored for incsearch and smoothscroll
Problem: wrong viewport restored for incsearch and smoothscroll
Solution: Save and restore skipcol as well

closes: #12713

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.1691
2023-08-11 23:48:27 +02:00
f6cdab3704 patch 9.0.1690: popup_create() not aborting on errors
Problem: popup_create() not aborting on errors
Solution: check for errors in arguments given and abort if an error
          occurred

closes: #12711

Signed-off-by: Christian Brabandt <cb@256bit.org>
v9.0.1690
2023-08-11 23:42:02 +02:00
288bf26c53 patch 9.0.1689: python 3.12 produces warnings and fails test
Problem: python 3.12 produces warnings and fails test
Solution: Make use of raw strings in python3 tests

closes: #12765

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Zdenek Dohnal <zdohnal@redhat.com>
v9.0.1689
2023-08-11 23:32:23 +02:00
ca6ac99077 patch 9.0.1688: cannot store custom data in quickfix list
Problem: cannot store custom data in quickfix list
Solution: add `user_data` field for the quickfix list

closes: #11818

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tom Praschan <13141438+tom-anders@users.noreply.github.com>
v9.0.1688
2023-08-11 23:26:12 +02:00
7e0bae024d patch 9.0.1687: mapset() not properly handling script ID
Problem: mapset() not properly handling script ID
Solution: replace_termcodes() may accept a script ID

closes: #12699
closes: #12697

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.1687
2023-08-11 23:16:10 +02:00
cd4e4e169a .cirrus.yml: skip pkg update for FreeBSD 13.1 (#12767) 2023-08-11 23:10:02 +02:00
d8f981138a Add commentstring for nix file format (#12696) 2023-08-11 23:07:50 +02:00
5fee111149 patch 9.0.1686: undotree() only works for the current buffer
Problem:    undotree() only works for the current buffer
Solution:   Add an optional "buffer number" parameter to undotree().  If
            omitted, use the current buffer for backwards compatibility.

closes: #4001
closes: #12292

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Devin J. Pohly <djpohly@gmail.com>
v9.0.1686
2023-08-11 22:53:39 +02:00
422b9dcbfa patch 9.0.1685: silence Python 3.11 depreciations for gcc
Problem: Python 3.11 interface throws deprecation warnings
Solution: ignore those warnings for gcc and clang

Python 3.11 deprecation warnings are already silenced for clang using
the pragma
```
 # pragma clang diagnostic ignored "-Wdeprecated-declarations"
```

However those warnings are also emitted when using gcc. To avoid them
for both compilers, change use the __GNUC__ ifdef, which is defined for
gcc as well as clang.

Additionally, instead of using the "clang diagnostic ignored" pragma,
let's make use of 'GCC diagnostic ignored' which is again supported by
clang and GCC

closes: #12610

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
v9.0.1685
2023-08-11 22:38:48 +02:00
b00df7aa38 patch 9.0.1684: Update libvterm to rev 839
Problem: libvterm slightly outdated
Solution: Update libvterm from rev 818 to rev 839

Notable fix: libvterm now handles DECSM/DECRM with multiple arguents,
so several ncurses programs (e.g. nnn) can enable mouse properly when
run in Vim's terminal in XTerm.

closes: #12746

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
v9.0.1684
2023-08-11 21:15:08 +02:00
8f5a8d8a8b Update CODEOWNERS (#12760) 2023-08-11 19:30:55 +02:00
21aaff3faa Update my name and email in runtime files (#12763) 2023-08-11 19:30:27 +02:00
dd0ad25988 Update syntax/dosini.vim to the latest version (#12764)
The latest version is in https://github.com/xuhdev/syntax-dosini.vim/blob/master/syntax/dosini.vim. I've sent the file to Bram at the end of June, unfortunately it wasn't able to make into the Vim repository. RIP!
2023-08-11 19:29:20 +02:00
81b8bf5b4a Update the vimscript code for restoring cursor position
Using xxd(1) to filter and edit binary files causes the input files
to have dual nature, so to speak, which effectively makes restoring
the cursor position broken.  Fix that by ignoring the "xxd" file type
in the code that restores the cursor position.

Interactive rebasing in git causes files to be edited in vim, which,
similarly to commit messages, are rarely the same as the last one
edited.  Thus, also add "gitrebase" to the list of file types for
which the cursor position isn't restored.

While there, refactor the code a bit to possibly save a few CPU cycles
and to keep the line lengths in check, and use the long form of the
commands and variables, to make the code slightly more consistent and
more understandable to newcomers.

Update the relevant comments in the code and the associated parts of
the documentation, to keep them in sync with the updated code.

Remove some redundant trailing whitespace as well, as spotted.
2023-08-10 06:43:14 +02:00
6a500661a9 Improve the vimscript code in ":h hex-editing"
Save and restore the view position before and after saving the buffer,
respectively, to keep the current view of the xxd(1)'s hex dump
unchanged after doing ":w", which previously caused the window to
scroll back to the very beginning of the buffer.  I believe it's
needless to say how annoying and counterproductive that was.

Get rid of the "Press ENTER or type command to continue" message, which
was previously displayed after opening larger binary files.  The use
of "silent" and "redraw" commands is tailored specifically to avoid
screen flickering, e.g. when doing ":w", which is caused by the buffer
being filtered by an external command.

Increase the number of octets per line, produced by xxd(1), from the
default value of 16 to 32.  This puts bigger chunks of the hex dump
on the screen and makes the whole thing much more usable.

While there, reformat the code to make it more readable, and use the
long form of the commands and variables to make the code slightly more
consistent and more understandable to newcomers.
2023-08-10 06:43:14 +02:00
6efb198033 Updated runtime files
This is a collection of various PRs from github that all require a minor
patch number:

1) https://github.com/vim/vim/pull/12612

    Do not conflate dictionary key with end of block

2) https://github.com/vim/vim/pull/12729:

    When saving and restoring 'undolevels', the constructs `&undolevels` and
    `:set undolevels` are problematic.

    The construct `&undolevels` reads an unpredictable value; it will be the
    local option value (if one has been set), or the global option value
    (otherwise), making it unsuitable for saving a value for later
    restoration.

    Similarly, if a local option value has been set for 'undolevels',
    temporarily modifying the option via `:set undolevels` changes the local
    value as well as the global value, requiring extra work to restore both
    values.

    Saving and restoring the option value in one step via the construct
    `:let &undolevels = &undolevels` appears to make no changes to the
    'undolevels' option, but if a local option has been set to a different
    value than the global option, it has the unintended effect of changing
    the global 'undolevels' value to the local value.

    Update the documentation to explain these issues and recommend explicit
    use of global and local option values when saving and restoring.  Update
    some unit tests to use `g:undolevels`.

3) https://github.com/vim/vim/pull/12702:

    Problem:    Pip requirements files are not recognized.
    Solution:   Add a pattern to match pip requirements files.

4) https://github.com/vim/vim/pull/12688:

    Add indent file and tests for ABB Rapid

5) https://github.com/vim/vim/pull/12668:

    Use Lua 5.1 numeric escapes in tests and add to CI

    Only Lua 5.2+ and LuaJIT understand hexadecimal escapes in strings.  Lua
    5.1 only supports decimal escapes:

    > A character in a string can also be specified by its numerical value
    > using the escape sequence \ddd, where ddd is a sequence of up to three
    > decimal digits. (Note that if a numerical escape is to be followed by a
    > digit, it must be expressed using exactly three digits.) Strings in Lua
    > can contain any 8-bit value, including embedded zeros, which can be
    > specified as '\0'.

    To make sure this works with Lua 5.4 and Lua 5.1 change the Vim CI to
    run with Lua 5.1 as well as Lua 5.4

6) https://github.com/vim/vim/pull/12631:

    Add hurl filetype detection

7) https://github.com/vim/vim/pull/12573:

    Problem:   Files for haskell persistent library are not recognized
    Solution:  Add pattern persistentmodels for haskell persistent library

closes: #12612
closes: #12729
closes: #12702
closes: #12688
closes: #12668
closes: #12631
closes: #12573

Co-authored-by: lacygoill <lacygoill@lacygoill.me>
Co-authored-by: Michael Henry <drmikehenry@drmikehenry.com>
Co-authored-by: ObserverOfTime <chronobserver@disroot.org>
Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Co-authored-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Jacob Pfeifer <jacob@pfeifer.dev>
Co-authored-by: Borys Lykah <lykahb@fastmail.com>
v9.0.1683
2023-08-10 06:19:18 +02:00
6019fed0c5 patch 9.0.1682: sodium encryption is not portable
Problem: crypt: sodium encryption is not portable
Solution: use little-endian byte order for sodium encrypted files

As mentioned in #12586, sodium encryption only works on little ending
architectures, because reading and writing the sodium encryption
parameters are stored in the encrypted files in an arch-dependent way.

This of course fails for big-endian architectures like s390.

So make sure to use little-endian byte order when reading and writing
sodium encrypted files.

fixes: #12586
closes: 12655
v9.0.1682
2023-08-09 21:35:38 +02:00
92f076e53e Update krl and add rapid syntax files (#12750) 2023-08-09 20:35:35 +02:00
6ec7808c4a Add security policy (#12687)
* Add security policy

Currently is hard to find where to report security issues,
the only mention of it is in the issue template.

4c0089d696/.github/ISSUE_TEMPLATE/bug_report.yml (L12-L15)

Adding a SECURITY.md file will make it easier to find,
it will be displayed in https://github.com/vim/vim/security.

* Mention that reports are private
2023-08-09 20:11:37 +02:00
c41b3c9f95 defaults.vim: Update comment to simplify reverting augroup
closes: #12673
2023-08-09 20:07:26 +02:00
1d7caa58e3 patch 9.0.1681: Build Failure with Perl 5.38
Problem: Build Failure with Perl 5.38
Solution: Fix Build Failure

closes: #12543, closes: #12575
v9.0.1681
2023-08-09 19:58:58 +02:00
335c584940 patch 9.0.1680: sodium test fails in Github CI
Problem:    sodium test fails in Github CI
Solution:   Catch sodium_mlock() errors and do not error out

sodium_mlock() seems to fail consistently on the Github CI. Perhaps
[sodium_mlock()](https://libsodium.gitbook.io/doc/memory_management#text-locking-memory)
is called too often or with too much memory by the runners so
that this starts failing.

Let's just try to catch this and skip the test, when this starts
happening.

closes: #12751
v9.0.1680
2023-08-09 18:16:16 +02:00
c2bd205254 Change "the" to "then" under ':help bufload()' (#12662) 2023-08-09 18:10:59 +02:00
64dea84bb0 Manpager: apply g flag conditionally to s command (#12679)
Problem: The `s` command with `g` flag only substitutes
         one occurrence when `gdefault` is set.
Solution: Use `g` flag conditionally.
2023-08-09 18:00:36 +02:00
bd76c89e31 update matchit (#12611) 2023-08-09 17:39:53 +02:00
0401933a5b Fix alignment in filetype.txt (#12618)
There are three spaces because the "<" is concealed.
2023-08-09 17:39:05 +02:00
077ade4f67 feat: recognize geojson extension as json filetype (#12636) 2023-08-09 17:36:40 +02:00
b69b9d5e17 Add filetype detection for eyaml files (#12659)
https://github.com/voxpupuli/hiera-eyaml/ uses and produces the eyaml
format, which is simply yaml with some encrypted values.

It's convenient to edit the file without decrypting when not touching
encrypted values (or when you don't have access to the decryption key),
which is why vim should treat those files as yaml files.
2023-08-09 17:18:36 +02:00
958e15bb1c Highlight editorconfig properties with dashes (#12691)
Problem: editorconfig properties with dashes are not highlighted
Solution: update the property pattern to include dashes
2023-08-09 17:05:39 +02:00
2eb413f89b detect filetype for *.vsh and *.vv files (#12692)
Co-authored-by: Turiiya <34311583+tobealive@users.noreply.github.com>
2023-08-09 17:04:59 +02:00
44ff25d524 PyPA manifest files are not recognized (#12707)
Problem:    PyPA manifest files are not recognized.
Solution:   Add a pattern to match PyPA manifest files.
2023-08-09 16:52:33 +02:00
7159ac7fec Unison support (#12715) 2023-08-09 16:50:52 +02:00
8967f6c4b9 feat(heex): borrow matchit support from html (#12717)
* feat(heex): borrow matchit support from html

Makes % support behave the same in heex as in html. For example, quickly moving the cursor between opening and closing tags.

* Remove unnecessary line; define b:undo_ftplugin first

* Remove b:html_set_match_words
2023-08-09 16:49:44 +02:00
a13eb2b147 Add WebGPU Shading Language (WGSL) filetype (#12723)
The current W3C Working Draft for the WebGPU Shading Language (WGSL) specifies
'text/wgsl' media type for WGSL modules with the '.wgsl' file extension:
https://www.w3.org/TR/WGSL/#text-wgsl-media-type

It has also been registered at the Internet Assigned Numbers Authority (IANA):
https://www.iana.org/assignments/media-types/text/wgsl

Neovim's nvim-lspconfig already associates wgsl language servers
with 'filetype wgsl':
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#wgsl_analyzer

However currenly setting 'filetype wgsl' for *.wgsl files by defalut in Neovim
is blocked by adding this filetype to the vim project first:
https://github.com/neovim/neovim/pull/23331

This commit adds this missing wgsl filetype.
2023-08-09 16:49:01 +02:00
8f566fdb1e update .wast files syntax highlighting (#12741) 2023-08-09 16:45:52 +02:00
84bc00e9b5 patch 9.0.1679: Cleanup Tests from leftover files
Problem:    Tests may leave leftover files around
Solution:   Clean up tests and remove files

There were a few failures in 'linux (huge, gcc, testgui, true, true)'
e.g. here: https://github.com/vim/vim/actions/runs/5497376153/jobs/10018060156

,----
| Error detected while processing command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[585]..function RunTheTest[54]..Test_lvimgrep_crash[16]..TestTimeout[12]..VimLeavePre Autocommands for "*"..function EarlyExit[7]..FinishTesting:
| line   70:
| E445: Other window contains changes
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txt
| E937: Attempt to delete a buffer that is in use: Xtest_stable_xxd.txtmalloc(): unsorted double linked list corrupted
`----

Which is puzzling, because the Xtest_stable_xxd file should have been
long gone after test_crypt.vim is run (and definitely no longer be
staying around in test_quickfix.vim).

So try to clean up properly after a test script is run, just in case any
X<file> is still around. During testing, a found a few leftover files,
which I also fixed in the relevant test-file.

Unfortunately, the test workflow 'linux (huge, gcc, testgui, true,
true)' now seems to fail with 'E1230: Encryption: sodium_mlock()' in
test_crypt.vim. Hopefully this is only temporary.
v9.0.1679
2023-08-08 20:39:55 +02:00