Compare commits

...

3418 Commits

Author SHA1 Message Date
87757c6b0a patch 9.1.1552: [security]: path traversal issue in tar.vim
Problem:  [security]: path traversal issue in tar.vim
          (@ax)
Solution: warn the user for such things, drop leading /, don't
          forcefully overwrite files when writing temporary files,
          refactor autoload/tar.vim

tar.vim: drop leading / in path names

A tar archive containing files with leading `/` may cause confusions as
to where the content is extracted.  Let's make sure we drop the leading
`/` and use a relative path instead.

Also while at it, had to refactor it quite a bit and increase the
minimum supported Vim version to v9. Also add a test for some basic tar
functionality

closes: #17733
2025-07-15 21:58:08 +02:00
586294a041 patch 9.1.1551: [security]: path traversal issue in zip.vim
Problem:  [security]: path traversal issue in zip.vim (@ax)
Solution: drop leading ../ on write of zipfiles, don't forcefully
          overwrite existing files

A zip plugin which contains filenames with leading '../'  may cause
confusion as to where the content will be extracted.  Let's drop such
things and make sure we use a relative filename instead and don't
forcefully overwrite temporary files. Also, warn the user of such
things.

related: #17733

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:57:48 +02:00
3f9d2378bd patch 9.1.1550: defaults: 'showcmd' is not enabled in non-compatible mode on Unix
Problem:  defaults: 'showcmd' is not enabled in non-compatible mode on
          Unix
Solution: Always enable 'showcmd' in non-compatible mode, drop it from
          defaults.vim.

'showcmd' was already always enabled in Vim compatible mode except for
UNIX environments. So let's just enable it always, there is no good
reason why UNIX platforms should be handled differently than other
platforms, especially since `defaults.vim` did enable this option
anyhow.

closes: #17739

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:26:25 +02:00
d128889b30 patch 9.1.1549: filetype: pkl files are not recognized
Problem:  filetype: pkl files are not recognized
Solution: detect *.pkl files as pkl filetype, include
          a filetype plugin (Riley Bruins)

References:
https://pkl-lang.org/
https://github.com/apple/pkl

closes: #17751

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:21:29 +02:00
0992f62fc1 patch 9.1.1548: filetype: OpenFGA files are not recognized
Problem:  filetype: OpenFGA files are not recognized
Solution: detect *.fga files as fga filetype, include an fga filetype
          plugin (Riley Bruins)

References:
https://github.com/openfga
https://marketplace.visualstudio.com/items?itemName=openfga.openfga-vscode

closes: #17752

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:17:02 +02:00
9a667b4dba runtime(swig): add 'comments', 'commentstring' in filetype plugin
Reference:
https://www.swig.org/Doc1.3/SWIG.html#SWIG_nn5

closes: #17753

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:13:41 +02:00
30df42557c runtime(twig): include twig filetype plugin
closes: #17754

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:09:43 +02:00
690a42d54e patch 9.1.1547: Wayland: missing ifdef
Problem:  Wayland: missing ifdef
Solution: Add #ifdef around ch_log() call
          (Foxe Chen)

closes: #17763

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:06:37 +02:00
5d552d652b translation: ignore vim.pot creation date, regenerate it, rm allfiles
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 21:03:39 +02:00
8de753148f patch 9.1.1546: Vim9: error with has() and short circuit evaluation
Problem:  Vim9: error with has() and short circuit evaluation
Solution: Only eval, if ctx_skip is not SKIP_YES (Yegappan Lakshmanan).

fixes: #17750
closes: #17755

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:30:52 +02:00
edce68912e runtime(python2): Highlight b-strings in Python 2.7
related: #14033
related: #17726

closes: #17757

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:23:59 +02:00
3ab6941713 runtime(doc): Tweak documentation
closes: #17759

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:06:49 +02:00
f10fa3928c patch 9.1.1545: typo in os_unix.c
Problem:  Typo in os_unix.c
Solution: Correct the typo (Foxe Chen)

closes: #17761

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-15 20:02:57 +02:00
a24f5be86d runtime(python): highlight bytes in python
- Highlight bytes literals
- Do not highlight Unicode escape sequences in bytes literals

fixes: #14033
fixes: #17726
closes: #17728

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:30:59 +02:00
baa781a4c3 runtime(python2): highlight unicode strings in python2
fixes: #14033
fixes: #17726
closes: #17729

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:21:44 +02:00
836e54f5de patch 9.1.1544: :retab cannot be limited to indentation only
Problem:  :retab cannot be limited to indentation only
Solution: add the optional -indentonly parameter
          (Hirohito Higashi)

closes: #17730

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:11:34 +02:00
e85a66a4d4 runtime(erlang): Add support for triple-quoted strings and docstrings
Erlang recently added the `-moduledoc` attribute as well as triple
quoted strings and the `~` prefix for binary strings, see [1].

Erlang also added nominal types. See EEP-69 [2].

This commit removes the documentation of "g:erlang_highlight_bifs" and
"g:erlang_highlight_special_atoms", which are not longer supported.
"g:erlang_old_style_highlight" is kept undocumented (as it should not be
used by new users).

This commit contains the modifications in the following PR and commits:

- vim-erlang/vim-erlang-runtime#58
- vim-erlang/vim-erlang-runtime@43d18d3
- vim-erlang/vim-erlang-runtime@ac88ebf
- vim-erlang/vim-erlang-runtime@19c1be9
- vim-erlang/vim-erlang-runtime@7f5cefc
- vim-erlang/vim-erlang-runtime@976b10b

[1]: https://www.erlang.org/doc/system/documentation.html
[2]: https://www.erlang.org/eeps/eep-0069

closes: #17687

Co-authored-by: Johannes Christ <jc@jchri.st>
Signed-off-by: Csaba Hoch <csaba@cursorinsight.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 22:03:06 +02:00
d0bf380efa patch 9.1.1543: Wayland: clipboard appears to not be working
Problem:  Wayland: clipboard appears to not be working
          (Fuad Veliev)
Solution: Explicitly set selection each time (Foxe Chen)

fixes: #17732
closes: #17740

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 21:54:23 +02:00
6865bdc914 patch 9.1.1542: Coverity complains about uninitialized variable
Problem:  Coverity complains about uninitialized variable
          (Tony Mechelynck)
Solution: Initialize variables

closes: #17717

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 21:46:46 +02:00
ada6b27ff1 patch 9.1.1541: Vim9: error when last enum value ends with a comma
Problem:  Vim9: error when last enum value ends with a comma
Solution: Allow trailing commas in enum values (Yegappan Lakshmanan).

closes: #17744

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-14 21:27:34 +02:00
1341176e7b runtime(vim): Update help syntax file, improve highlighting of included Vim examples
- Take over as file maintainer.
- Improve highlighting of legacy script examples by using :syn-iskeyword
  with the default 'iskeyword' value. Vim9 script examples are not
  supported yet.
- Match admonition labels in more contexts.
- Match URLs in more contexts.

fixes #17721
closes: #17731

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 17:53:26 +02:00
f6a308c65b patch 9.1.1540: completion: menu state wrong on interruption
Problem:  completion: menu state wrong on interruption
          (Maxim Kim)
Solution: Call show_pum() if completion was interrupted
          (Girish Palya).

Popup menu was not built after fuzzy sorting, so internal state wasn't
reflected on screen.

No test. Couldn't get the terminal test to trigger both interruption and
refresh together.

fixes: #17725
closes: #17736

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 17:01:57 +02:00
fe1d3c8af7 patch 9.1.1539: completion: messages don't respect 'shm' setting
Problem:  completion: messages don't respect 'shm' setting
Solution: Turn off completion messages when 'shortmess' includes "c"
          (Girish Palya).

`:set shortmess+=c` is intended to reduce noise during completion by
suppressing messages.
Previously, some completion messages still appeared regardless of this setting.

This change ensures that **all** completion-related messages are suppressed
when `'c'` is present in `'shortmess'`.

Not entirely sure if the original behavior was intentional. If there's a
reason certain messages were always shown, feel free to close this without
merging.

closes: #17737

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 16:53:53 +02:00
ce1d1969f3 runtime(vim): Update base syntax, improve :match highlighting
- Match the range prefix separately as a count.
- Match an explicit count of 1, rarely used but seen in the wild.
- Allow whitespace between the count and command.

closes: #17717

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 09:05:23 +02:00
2ab4f907a2 translation(it): update Italian message translations
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 08:31:33 +02:00
59bd74ed4c translation: include vim.pot in the repository
Translators would like to work with the vim.pot file directly, without
having to clone and potentially build vim.

So let's include it.

closes: #17734

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 08:26:57 +02:00
6f85cec4fb runtime(python): update rendering of Unicode named literals in syntax script
This change:

* enforces that the alias starts with a letter
* allows the other words in an alias to be separated by either a space
  or a hyphen, but not both or double separators
* allows only a letter after space, possibly followed by letters or
  digits
* allows both letters and digits after a hyphen

Tested with:

    a = '\N{Cyrillic Small Letter Zhe} is pronounced as zh in pleasure'
    b = '\N{NO-BREAK SPACE} is needed here'
    # ... other tests here
    r = '\N{HENTAIGANA LETTER E-1} is a Japanese hiragana letter archaic ye'
    s = '\N{CUNEIFORM SIGN NU11 TENU} is a correction alias'
    t = '\N{RECYCLING SYMBOL FOR TYPE-1 PLASTICS} base shape is a triangle'
    print(a)
    print(b)
    print(r)
    print(s)
    print(t)

The tests confirm the behavior and are selected from real Unicode
tables/aliases to check these combinations based on the specification.

fixes: #17323
closes: #17735

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-13 08:23:24 +02:00
68ee1cf7de translation(ru): Update messages translation
closes: #17719

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-11 19:40:39 +02:00
7306e8fcdb tests: string options in gen_opt_test.vim not fully sorted
Problem:  tests: string options in gen_opt_test.vim aren't fully sorted.
Solution: Sort the string options alphabetically.  Also make description
          of 'maxsearchcount' start with lower-case for consistency with
          other options, update documentation for searchcount().

closes: #17720

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-11 19:17:07 +02:00
41adebe572 check.vim: detect trailing whitespace
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 21:01:27 +02:00
87406c33c7 runtime(help_ru): Update help_ru syntax script
closes: #17718

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:52:18 +02:00
6ac2e4aa0a runtime(vim): Update base syntax, improve function call highlighting
- Match more function calls.
- Contain function call syntax groups.
- Improve differentiation between Ex commands and builtin functions with
  the same name.  Remove special cases.  Command modifiers are not
  currently well differentiated from functions.

closes: #17712

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:50:06 +02:00
ea528a9482 patch 9.1.1537: helptoc: still some issues when markdown code blocks
Problem:  helptoc: still some issues when parsing markdown code blocks
          (VimWei)
Solution: assign nextline to curline before starting the next loop
          iteration; when processing fenced code blocks, flip the
          skip_fence variable, update the test to be more comprehensive

related: https://github.com/vim/vim/issues/17699#issuecomment-3055603968
closes: #17716

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:44:51 +02:00
48d7f5b5a3 patch 9.1.1536: tests: test_plugin_comment uses wrong :Check command
Problem:  tests: test_plugin_comment.vim uses :CheckScreenDump check but
          doesn't actually use a screen dump.
Solution: Use :CheckRunVimInTerminal instead, remove a few empty lines.

test_plugin_comment.vim uses :CheckScreenDump to test for the screen
dump feature in each single test case.

However, since we are not actually using any screen dumps, it would be
more correct to use :CheckRunVimInTerminal, since this is the actual
command that we want to run.

And instead of verifying this for each single test, let's just do it
once when sourcing the file. While doing this, also remove some white
spaces.

closes: #17711

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:40:09 +02:00
b7b7fa04bf patch 9.1.1535: the maximum search count uses hard-coded value 99
Problem:  The maximum search count uses a hard-coded value of 99
          (Andres Monge, Joschua Kesper)
Solution: Make it configurable using the 'maxsearchcount' option.

related: #8855
fixes: #17527
closes: #17695

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:34:41 +02:00
bda2e4eb16 patch 9.1.1534: unnecessary code in tabpanel.c
Problem:  unnecessary code in tabpanel.c
Solution: remove it (Hirohito Higashi)

closes: #17713

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-10 20:16:14 +02:00
6715b3510e patch 9.1.1533: helptoc: does not handle code sections in markdown well
Problem:  helptoc: does not handle code sections in markdown well
          (VimWei)
Solution: Skip over fenced code sections (lacygoill), add a test.

fixes: #17699
closes: #17710

Co-authored-by: lagygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 20:26:07 +02:00
3987eac572 runtime(doc): clarify how ex ranges are adjusted when acting on folds
closes: #17696

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 19:59:22 +02:00
a46e9e45a9 translation(ru): update vim-ru according to patch 9.1.1485
closes: #17709

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 19:45:43 +02:00
43855b7396 translation(ru): update vimtutor-ru man according to commit 5bbdd0b
closes: #17708

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 19:43:51 +02:00
49b89bb172 translation(ru): Update main readme.ru.txt according to commit 2bfd1ee
closes: #17707

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 19:41:21 +02:00
41ee98c3c5 runtime(filetype): fix incorrect pattern and break early
- Using `\n` is incorrect, as result of getline() does not contain line
  breaks and only uses `\n` for NUL bytes.
- Return when b:asmsyntax is set, like many other filetypes.

closes: #17706

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 18:23:52 +02:00
bda55df3b8 Revert "runtime(haskell): Add single quote to iskeyword in ftplugin (#8191)"
This reverts commit 5e6e4042b1.

related: #8191

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-09 18:18:22 +02:00
c4bca1de0b patch 9.1.1532: termdebug: not enough ways to configure breakpoints
Problem:  termdebug: not enough ways to configure breakpoints
Solution: add the termdebug_config['signs'] config setting, rework the
          termdebug test cases (Dimitry Ishenko)

Allow to configure custom breakpoint signs so one can do something like
this:

```vim
let g:termdebug_config['signs'] = ['>1', '>2', '>3', '>4', '>5', '>6', '>7', '>8', '>9']
let g:termdebug_config['sign'] = '>>'
```

where the first 9 breakpoints will have their own signs and the rest
will be the same (>>).

While at it, rework the test for the termdebug plugin:

- Added test for g:termdebug_config['signs'].
- Added test for g:termdebug_config['sign'].
- Moved test for g:termdebug_config['sign_decimal'] into
  Test_termdebug_basic()

closes: #17694

Signed-off-by: Dimitry Ishenko <dimitry.ishenko@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 23:13:14 +02:00
8331310c06 patch 9.1.1531: confusing error with nested legacy function
Problem:  confusing error with nested legacy function
          (lacygoill)
Solution: clarify error message E1117 with :def or :func (Hirohito Higashi)

fixes: #17697
closes: #17702

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 23:07:21 +02:00
1adada0158 patch 9.1.1530: Missing version change in v9.1.1529
Problem:  Missing version change from v9.1.1529
Solution: Update version.c with latest patch

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 23:04:36 +02:00
dbe45be625 patch 9.1.1529: Win32: the toolbar in the GUI is old and dated
Problem:  Win32: the toolbar in the GUI is old and dated
Solution: Include improved icons from Fatcow (CC by 3.0)
          (RestorerZ)

closes: vim/vim-win32-installer#372
closes: #17698

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 23:00:13 +02:00
f2ec8d4afc patch 9.1.1528: completion: crash with getcompletion()
Problem:  completion: crash with getcompletion()
          (zeertzjq)
Solution: Don't set may_expand_pattern in f_getcompletion(),
          unset may_expand_pattern() once it is not longer needed
          (Girish Palya).

fixes: #17680
closes: #17686

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 22:12:37 +02:00
2ffd35fe8f patch 9.1.1527: Vim9: Crash with string compound assignment
Problem:  Vim9: Crash when using string compound assignment with wrong
          data type (lacygoill)
Solution: verify expected member type (Hirohito Higashi)

fixes: #17675
closes: #17693

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 21:49:56 +02:00
32a1b26ef3 runtime(filetype): improve asm heuristics and move into FTasmsyntax()
fixes: #17474
closes: #17683

Signed-off-by: Wu Yongwei <wuyongwei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 21:42:37 +02:00
93c2d5bf7f patch 9.1.1526: completion: search completion match may differ in case
Problem:  completion: search completion match may differ in case
          (techntools)
Solution: add "exacttext" to 'wildoptions' value (Girish Palya)

This flag does the following:

exacttext
      When this flag is present, search pattern completion
      (e.g., in |/|, |?|, |:s|, |:g|, |:v|, and |:vim|)
      shows exact buffer text as menu items, without
      preserving regex artifacts like position
      anchors (e.g., |/\<|). This provides more intuitive
      menu items that match the actual buffer text. However,
      searches may be less accurate since the pattern is not
      preserved exactly.
      By default, Vim preserves the typed pattern (with
      anchors) and appends the matched word. This preserves
      search correctness, especially when using regular
      expressions or with 'smartcase' enabled. However, the
      case of the appended matched word may not exactly
      match the case of the word in the buffer.

fixes: #17654
closes: #17667

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-08 21:29:02 +02:00
b3eaae21b9 runtime(netrw): restore blank line cleanup after file listing
Problem:  v182 refactoring removed blank line cleanup (g/^$/d) from
          s:LocalListing(), causing empty lines between directories
          and files.
Solution: Add the missing cleanup after append() in s:PerformListing()
          (uma-chan).

closes: #17672

Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
Signed-off-by: uma-chan <127664533+i9wa4@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 22:04:11 +02:00
eb380b991c patch 9.1.1525: tests: testdir/ is a bit messy
Problem:  tests: testdir is a bit messy
Solution: move test scripts into testdir/util/ directory

src/testdir/ has become a dumping ground mixing test cases with utility
functions. Let's fix this by moving all utility functions into the
testdir/util/ directory

Also a few related changes had to be done:
- Update Filelist
- update README.txt and mention the new directory layout
- fix shadowbuild by linking the util directory into the shadow dir

closes: #17677

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 20:53:55 +02:00
b0905e269d patch 9.1.1524: tests: too many imports in the test suite
Problem:  tests: too many imports in the test suite
Solution: Clean up the imported scripts

Most tests make use of check.vim, so let's just source it once in
runtest.vim instead of having each test manually source it.

runtest.vim already sources shared.vim, which again sources
view_util.vim, so we don't need to source those two common
dependencies in all the other tests

And then check.vim sources term_util.vim already, so we can in addition
drop sourcing it explicitly in each single test script.

Note: test_expand_func.vim had to be updated to account for the changed
number of sourced files.

And finally check.vim uses line-continuation so let's also explicitly
enable line continuation via the 'cpo' option value.

related: #17677

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 20:39:29 +02:00
a4874d4d36 patch 9.1.1523: tests: test_clipmethod fails in non X11 environment
Problem:  tests: test_clipmethod fails in non X11 environment
Solution: test that $DISPLAY is available

related: #17677

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 20:07:06 +02:00
bcb06c92c4 patch 9.1.1522: tests: still some ANSI escape sequences in test output
Problem:  tests: still some ANSI escape sequences in test messages output
Solution: update the cleanup regexp to also handle those ANSI escape
          sequences: `<esc>|2h` and `<esc>|31H` like in this log output:

```
2025-07-05T20:02:47.6350409Z <esc>|2hExecuted 171 tests in   4.739708 seconds<esc>|31H
```

related: #17677

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 20:03:03 +02:00
0cd7f3536b patch 9.1.1521: completion: pum does not reset scroll pos on reopen with 'noselect'
Problem:  When 'wildmode' is set to include "noselect", the popup menu (pum)
          incorrectly retained its scroll position when reopened. This
          meant that after scrolling down through the menu with `<C-n>`,
          reopening the menu (e.g., by retyping the command and
          triggering completion again) would show the menu starting from
          the previously scrolled position, rather than from the top.
          This could confuse users, as the first visible item would not
          be the first actual match in the list.

Solution: Ensure that the popup menu resets its scroll position to the
          top when reopened (Girish Palya).

closes: #17673

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 19:47:53 +02:00
af22007784 patch 9.1.1520: completion: search completion doesn't handle 'smartcase' well
Problem:  When using `/` or `?` in command-line mode with 'ignorecase' and
          'smartcase' enabled, the completion menu could show items that
          don't actually match any text in the buffer due to case mismatches

Solution: Instead of validating menu items only against the user-typed
          pattern, the new logic also checks whether the completed item
          matches actual buffer content. If needed, it retries the match
          using a lowercased version of the candidate, respecting
          smartcase semantics.

closes: #17665

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 19:42:10 +02:00
faed074ab7 patch 9.1.1519: tests: Test_termdebug_decimal_breakpoints() may fail
Problem:  Test_termdebug_decimal_breakpoints() fails with List index out
          of range, because when adding the second breakpoint, the
          cursor is still on the very first line (a header include line)
          and therefore gdb refuses to set the breakpoint with:
          `msg="No compiled code for line 1 in file XTD_decimal.c"`
Solution: Run the program, so that it will break at the very first
          defined breakpoint and then once we are in the program,
          set further breakpoints

closes: #17689

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 19:38:27 +02:00
57d6d00433 runtime(doc): Add documentation style
closes: #17627

Co-authored-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-07 19:19:48 +02:00
e2c0f81dd0 patch 9.1.1518: getcompletiontype() may crash
Problem:  getcompletiontype() crashes when no completion is available
          (after v9.1.1509).
Solution: Don't call set_expand_context() (zeertzjq)

fixes: #17681
closes: #17684

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 20:26:56 +02:00
d6a5edd613 runtime(optwin): add missing values for tabpanel option
closes: #17685

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 20:17:36 +02:00
89cce31ebc translation(tr): Update Turkish translations
closes: #17688

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 20:12:20 +02:00
f79695c2d8 runtime(doc): fix a few typos introduced in 0ae9e19540
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 18:27:22 +02:00
244198f039 runtime(autopkgtest): add ftplugin file for autopkgtest
closes: #17679

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 18:01:18 +02:00
e9d331d173 runtime(autopkgtest): add syntax file for autopkgtest
related: #17679

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 18:00:28 +02:00
48c823ca01 runtime(debcontrol): move kernel/architecture definitions to shared/debarchitectures.vim
related: #17679

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 17:59:40 +02:00
5bcc492649 patch 9.1.1517: filetype: autopkgtest files are not recognized
Problem:  filetype: autopkgtest files are not recognized
Solution: detect */debian/tests/control files as autopkgtest filetype
          (James McCoy)

Autopkgtest is a Debian tool for testing installed versions of packages
when other, related packages are updated.

Reference:
- https://www.debian.org/doc/debian-policy/autopkgtest.txt

related: #17679

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 17:57:35 +02:00
08e5b128b8 patch 9.1.1516: tests: no test that 'incsearch' is updated after search completion
Problem:  tests: no test that 'incsearch' is updated after accepting
          search completion.
Solution: Add a test case (zeertzjq).

closes: #17682

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 11:06:44 +02:00
21449ee49c patch 9.1.1515: Coverity complains about potential unterminated strings
Problem:    memcpy() in ExpandRTDir_int() may create unterminated strings
Solution:   Use vim_snprintf() to construct complete paths safely
            (glepnir).

related: neovim/neovim#34795
closes: #17669

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 11:02:51 +02:00
b7b4bb36aa patch 9.1.1514: Coverity complains about the use of tmpfile()
Problem:  coverity complains about the use of tmpfile()
Solution: use vim_tempname() instead to create anonym file

related: #17097
closes: #17674

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 10:39:59 +02:00
88be7a6c68 patch 9.1.1513: resizing Vim window causes unexpected internal window width
Problem:  resizing Vim window causes unexpected internal window width
          (chdiza, after v9.1.1465)
Solution: move the column calculation around (Hirohito Higashi)

fixes: #17657
fixes: #17595
closes: #17668

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 10:34:48 +02:00
0ae9e19540 runtime(doc): add a section for options influencing search
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-06 10:26:01 +02:00
7a734b7148 tests: fix typo in comment (after v9.1.1511)
related: #17660

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 17:02:04 +02:00
5911ac5023 runtime(vim): Update base-syntax, match :filetype in functions
closes: #17671

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 16:48:02 +02:00
ba11e78f1d patch 9.1.1512: completion: can only complete from keyword characters
Problem:  completion: can only complete from keyword characters
Solution: remove this restriction, allow completion functions when
          called from i_CTRL-N/i_CTRL-P to be triggered from non-keyword
          characters (Girish Palya)

Previously, functions specified in the `'complete'` option were
restricted to starting completion only from keyword characters (as
introduced in PR 17065). This change removes that restriction.

With this change, user-defined functions (e.g., `omnifunc`, `userfunc`)
used in `'complete'` can now initiate completion even when triggered
from non-keyword characters. This makes it easier to reuse existing
functions alongside other sources without having to consider whether the
cursor is on a keyword or non-keyword character, or worry about where
the replacement should begin (i.e., the `findstart=1` return value).

The logic for both the “collection” and “filtering” phases now fully
respects each source’s specified start column. This also extends to
fuzzy matching, making completions more predictable.

Internally, this builds on previously merged infrastructure that tracks
per-source metadata. This PR focuses on applying that metadata to
compute the leader string and insertion text appropriately for each
match.

Also, a memory corruption has been fixed in prepare_cpt_compl_funcs().

closes: #17651

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 16:11:44 +02:00
96076bf41e patch 9.1.1511: tests: two edit tests change v:testing from 1 to 0
Problem:  tests: two edit tests change v:testing from 1 to 0.
Solution: Don't change v:testing in these two tests, since it's already
          set to 1 in runtest.vim (zeertzjq).

closes: #17660

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:39:56 +02:00
5e34eec6f8 patch 9.1.1510: Search completion may use invalid memory
Problem:  Search completion may use invalid memory (after 9.1.1490).
Solution: Don't get two line pointers at the same time (zeertzjq).

closes: #17661

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:37:17 +02:00
96b3ef2389 patch 9.1.1509: patch 9.1.1505 was not good
Problem:  Patch 9.1.1505 was not good
Solution: Revert "patch 9.1.1505: not possible to return completion type
          for :ex command" and instead add the getcompletiontype()
          function (Hirohito Higashi).

related: #17606
closes: #17662

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:34:24 +02:00
a8b86605f3 runtime(vim): Update base-syntax, match escape sequences in :command blocks
- Match escape sequences in :command replacement blocks.
- Match :substitute after escape sequences (a temporary fix until Ex
  commands are contained).

fixes: #17326
closes: #17663

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:21:46 +02:00
f9d87fa6ba runtime(go): fix b:undo_ftplugin
last `unmap` can cause the error "E31: No such mapping" when
`doaudocmd FileType go` if appending other commands to `b:undo_ftplugin` i.e.
the space and the next bar as `let b:undo_ftplugin .= ' | setl ...'`.

closes: #17664

Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-05 15:18:41 +02:00
a494ce1c64 patch 9.1.1508: string manipulation can be improved in cmdexpand.c
Problem:  String manipulation can be improved in cmdexpand.c
Solution: Refactor cmdexpand.c to remove calls to
          STRLEN()/STRMOVE()/STRCAT() (John Marriott)

This commit does the following:

In function nextwild():
  - slightly refactor the for loop to remove an array access
  - call STRLEN() and store it's result for reuse
  - move some variables closer to where they are used, renaming some on
    the way

In function ExpandOne():
  - move some calculations outside of the for loops
  - factor out calls to STRCAT() (which has an inherent STRLEN() call) in
    the for loop
  - move some variables closer to where they are used

In function expand_files_and_dirs():
  - factor out calls to STRMOVE() (which has an inherent STRLEN() call)

In function get_filetypecmd_arg():
  - move declarations of the string arrays into the blocks where they are
    used

In function get_breakadd_arg():
  - move declaration of the string array into the block where it is
    used

In function globpath():
  - factor out calls to STRLEN() and STRCAT()
  - move some variables closer to where they are used

And finally some minor cosmetic style changes

closes: #17639

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 21:28:50 +02:00
c233c2e6a5 runtime(vim): Update base-syntax and generator, match all default highlight groups
- Match Conceal, ComplMatchIns, MsgArea, Terminal, and User[1-9]
  highlight groups.
- Generate the vimGroup syntax group from runtime/syncolor.vim.
- Match :SynColor and :SynLink as special user commands.

fixes #17467
closes: #17556

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:59:11 +02:00
a9b5e4af43 runtime(vim): Update base-syntax and generator, generate command modifiers
Generate Ex command modifiers from the modifier table in src/ex_docmd.c

closes: #17564

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:47:50 +02:00
4ade668fb6 patch 9.1.1507: symlinks are resolved on :cd commands
Problem:  File paths change from symlink to target path after :cd command
          when editing files through symbolic links
Solution: Add "~" flag to 'cpoptions' to control symlink resolution.
          When not included (default), symlinks are resolved maintaining
          backward compatibility. When included, symlinks are preserved
          providing the improved behavior. (glepnir)

related: neovim/neovim#15695
closes: #17628

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:44:50 +02:00
0d50d6089d runtime(postscr): Correct some standard font names in syntax
closes: #17647

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:31:52 +02:00
29ebebd343 runtime(optwin): show 'guiligatures' option also on MS-Windows builds
closes: #17650

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:27:37 +02:00
29b29c6b30 patch 9.1.1506: tests: missing cleanup in Test_search_cmdline_incsearch_highlight()
Problem:  tests: missing cleanup test_override('char_avail', 0) in
          Test_search_cmdline_incsearch_highlight().
Solution: Add the missing cleanup (zeertzjq).

closes: #17655

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 20:02:02 +02:00
5d2354fc07 patch 9.1.1505: not possible to return completion type for :ex command
Problem:  not possible to return command-line completion type for :ex
          command
Solution: make getcmdcompltype() accept an optional and return the
          command-line completion for that arg (Shougo Matsushita).

closes: #17606

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-03 19:57:00 +02:00
20eb68a8f2 patch 9.1.1504: filetype: numbat files are not recognized
Problem:  filetype: numbat files are not recognized
Solution: detect *.nbt files as numbat filetype (0xadk)

References:
- https://github.com/sharkdp/numbat
- https://github.com/sharkdp/numbat/tree/master/numbat/modules

closes: #17643

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 19:46:05 +02:00
b46e3aa0fa patch 9.1.1503: filetype: haxe files are not recognized
Problem:  filetype: haxe files are not recognized
Solution: detect *.hx files as haxe filetype (0xadk)

References:
- https://haxe.org/
- https://code.haxe.org/category/beginner/hello-world.html

closes: #17644

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 19:41:11 +02:00
fdcdded4d5 patch 9.1.1502: filetype: quickbms files are not recognized
Problem:  filetype: quickbms files are not recognized
Solution: detect *.bms files as quickbms filetype
          (0xadk)

Reference:
- https://aluigi.altervista.org/quickbms.htm

closes: #17645

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 19:33:36 +02:00
b211916e0a patch 9.1.1501: filetype: flix files are not recognized
Problem:  filetype: flix files are not recognized
Solution: detect *.flix files as flix filetype
          (0xadk)

References:
- https://flix.dev/
- https://doc.flix.dev/introduction.html

closes: #17646

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 18:55:55 +02:00
5ecee30dcd runtime(go): add section movement mappings to ftplugin
closes: #17641

Signed-off-by: Rob B <github@0x7e.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-02 18:47:50 +02:00
651edf33eb runtime(doc): Tweak documentation style
closes: #17638

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-01 22:07:50 +02:00
b84ab0288f patch 9.1.1500: if_python: typo in python error variable
Problem:  if_python: typo in python error variable
Solution: fix typo (Damien Lejay)

closes: #17640

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-01 21:57:59 +02:00
54585fd04c patch 9.1.1499: MS-Windows: no indication of ARM64 architecture
Problem:  MS-Windows: no indication of ARM64 architecture
Solution: Add ARM64 to version output and include in nsis installer
          (RestorerZ)

related: vim/vim-win32-installer#381
closes: #17642

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-07-01 21:30:21 +02:00
523f9f5898 runtime(tutor): regenerate utf-8 version of French vimtutor manpage
related: #17546

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-30 20:28:46 +02:00
ba479348d4 runtime(netrw): upstream snapshot of v183
relevant commits:
- distribution: remove NetrwSettings.vim

closes: #17635

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-30 20:26:03 +02:00
a5b744ef93 runtime(vim): Update base-syntax, improve :syn-sync line defaults
Set minlines and maxlines to 100 and 200 respectively.  Set these after
the script interface syntax files have been loaded to ensure the values
set in those are overridden.

fixes #17580
closes: #17614

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-30 20:22:38 +02:00
fa16c7ab3f patch 9.1.1498: completion: 'complete' funcs behave different to 'omnifunc'
Problem:  completion: Functions specified in the 'complete' option did
          not have the leader string removed when called with findstart = 0,
          unlike 'omnifunc' behavior
Solution: update behaviour and make behaviour consistent (Girish Palya)

closes: #17636

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-30 20:18:14 +02:00
e92989b07a patch 9.1.1497: Link error with shm_open()
Problem:  Link error with shm_open()
          (gcanat, after v9.1.1485)
Solution: use AC_LINK_IFELSE instead of AC_COMPILE_IFELSE

fixes: #17634

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 22:39:14 +02:00
66b72f48c3 patch 9.1.1496: terminal: still not highlighting empty cells correctly
Problem:  terminal: still not highlighting empty cells correctly
          (Yousef Mohammed, after v9.1.1489)
Solution: Use vcol instead of col

closes: #17632

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 22:22:05 +02:00
2bfd1ee161 README: mention POSIX vi as a goal of this project
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 18:29:27 +02:00
7a4cf4b256 patch 9.1.1495: Wayland: uses $XDG_SEAT to determine seat
Problem:  Wayland: uses $XDG_SEAT to determine seat to use
          (dr0bz, after v9.1.1485)
Solution: Do not try to determine the seat from $XDG_SEAT, remove the
          code that checks for this environment variable (Foxe Chen).

related: https://github.com/vim/vim/issues/5157#issuecomment-3015248239
closes: #17625

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 18:00:46 +02:00
1c0746829e ci: Use tmate for debugging Github Actions CI
closes: #17631

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 17:57:32 +02:00
73aa24ea72 ci: disable installing netbeans on Windows runners
It causes CI to fail because the netbeans package has been moved

related: tunisiano187/Chocolatey-packages#3916
related: #17631

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 17:57:00 +02:00
d419fa2115 patch 9.1.1494: runtime(tutor): no French translation for Chapter 2
Problem:  runtime(tutor): no French translation for Chapter 2
Solution: add and refine French translation of tutor2, update French
          vimtutor manpage (Damien Lejay)

- Add runtime/tutor/tutor2.fr.utf-8
- Improve translation based on review
- Update references in tutor1.fr and vimtutor-fr.1
- Adjust MAINTAINERS accordingly

closes: #17546

Co-authored-by: Gabriel Dupras <57042631+gdupras@users.noreply.github.com>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 17:51:33 +02:00
30dcd0e1fd runtime(tutor): apply fixes to runtime/tutor/tutor2
- Fix minor typos and formatting
- Restore accidentally removed file
- Normalize <C-r> to <CTRL-R>
- Apply reviewer suggestions

related: #17546

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 17:49:09 +02:00
5e35184241 translation(it): updated Italian manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 17:37:43 +02:00
7cf35bc1be patch 9.1.1493: manually comparing positions on buffer
Problem:  manually comparing positions on buffer
          (after v9.1.1490)
Solution: use the LTOREQ_POS() macro, fix a few other minor style issues
          (glepnir)

closes: #17629

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 16:51:40 +02:00
44a2e3c5d4 nsis: copy tutor directory recursively
fixes: vim/vim-win32-installer#382
closes: #17630

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-29 16:23:33 +02:00
bbeaa94e0e patch 9.1.1492: tests: failure when Wayland compositor fails to start
Problem:  tests: failure when Wayland compositor fails to start
Solution: instead of throwing an error causing a failure, throw
          "Skipped", so that the Vim test suite continues and does not
          fail

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 21:03:25 +02:00
3b03b435a2 patch 9.1.1491: missing out-of-memory checks in cmdexpand.c
Problem:  missing out-of-memory checks in cmdexpand.c
Solution: add out-of-memory checks for expand_files_and_dirs(),
          ExpandUserDefined() and ExpandUserList()
          (John Marriott)

closes: #17570

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 20:41:54 +02:00
32f4febdc8 runtime(vim): re-generate vim syntax script after v9.1.1487
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 20:23:32 +02:00
6b49fba8c8 patch 9.1.1490: 'wildchar' does not work in search contexts
Problem:  'wildchar' does not work in search contexts
Solution: implement search completion when 'wildchar' is typed
          (Girish Palya).

This change enhances Vim's command-line completion by extending
'wildmode' behavior to search pattern contexts, including:

- '/' and '?' search commands
- ':s', ':g', ':v', and ':vim' commands

Completions preserve the exact regex pattern typed by the user,
appending the completed word directly to the original input. This
ensures that all regex elements — such as '<', '^', grouping brackets
'()', wildcards '\*', '.', and other special characters — remain intact
and in their original positions.

---

**Use Case**

While searching (using `/` or `?`) for lines containing a pattern like
`"foobar"`, you can now type a partial pattern (e.g., `/f`) followed by
a trigger key (`wildchar`) to open a **popup completion menu** showing
all matching words.

This offers two key benefits:

1. **Precision**: Select the exact word you're looking for without
typing it fully.
2. **Memory aid**: When you can’t recall a full function or variable
name, typing a few letters helps you visually identify and complete the
correct symbol.

---

**What’s New**

Completion is now supported in the following contexts:

- `/` and `?` search commands
- `:s`, `:g`, `:v`, and `:vimgrep` ex-commands

---

**Design Notes**

- While `'wildchar'` (usually `<Tab>`) triggers completion, you'll have
to use `<CTRL-V><Tab>` or "\t" to search for a literal tab.
- **Responsiveness**: Search remains responsive because it checks for
user input frequently.

---

**Try It Out**

Basic setup using the default `<Tab>` as the completion trigger:

```vim
set wim=noselect,full wop=pum wmnu
```

Now type:

```
/foo<Tab>
```

This opens a completion popup for matches containing "foo".
For matches beginning with "foo" type `/\<foo<Tab>`.

---

**Optional: Autocompletion**

For automatic popup menu completion as you type in search or `:`
commands, include this in your `.vimrc`:

```vim
vim9script
set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu

autocmd CmdlineChanged [:/?] CmdComplete()

def CmdComplete()
  var [cmdline, curpos, cmdmode] = [getcmdline(), getcmdpos(),
expand('<afile>') == ':']
  var trigger_char = '\%(\w\|[*/:.-]\)$'
  var not_trigger_char = '^\%(\d\|,\|+\|-\)\+$'  # Exclude numeric range
  if getchar(1, {number: true}) == 0  # Typehead is empty, no more
pasted input
      && !wildmenumode() && curpos == cmdline->len() + 1
      && (!cmdmode || (cmdline =~ trigger_char && cmdline !~
not_trigger_char))
    SkipCmdlineChanged()
    feedkeys("\<C-@>", "t")
    timer_start(0, (_) => getcmdline()->substitute('\%x00', '',
'ge')->setcmdline())  # Remove <C-@>
  endif
enddef

def SkipCmdlineChanged(key = ''): string
  set ei+=CmdlineChanged
  timer_start(0, (_) => execute('set ei-=CmdlineChanged'))
  return key == '' ? '' : ((wildmenumode() ? "\<C-E>" : '') .. key)
enddef

**Optional: Preserve history recall behavior**
cnoremap <expr> <Up> SkipCmdlineChanged("\<Up>")
cnoremap <expr> <Down> SkipCmdlineChanged("\<Down>")

**Optional: Customize popup height**
autocmd CmdlineEnter : set bo+=error | exec $'set ph={max([10,
winheight(0) - 4])}'
autocmd CmdlineEnter [/?] set bo+=error | set ph=8
autocmd CmdlineLeave [:/?] set bo-=error ph&
```

closes: #17570

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 19:59:36 +02:00
1fa3f0c215 runtime(doc): fix :vmap example to avoid unwanted spaces with JJ
fixes: #17621
closes: #17623

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 19:19:04 +02:00
a899b27206 patch 9.1.1489: terminal: no visual highlight of empty cols with empty 'listchars'
Problem:  terminal: no visual highlight of empty cols when 'listchars'
          is empty (Yousef Mohammed)
Solution: reset wlv.win_attr when column is zero and we are drawing a
          terminal buffer

fixes: #17559
closes: #17618

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 18:44:08 +02:00
792379eedf patch 9.1.1488: configure: using obsolete macro AC_PROG_GCC_TRADITIONAL
Problem:  configure: using obsolete macro AC_PROG_GCC_TRADITIONAL
Solution: drop it from configure.ac, regenerate auto/configure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 18:37:49 +02:00
b657310bd3 runtime(doc): Fix modeline in wayland.txt
related: #17619

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 18:34:48 +02:00
76866af3a5 patch 9.1.1487: :cl doesn't invoke :clist
Problem:  :cl doesn't invoke :clist
          (after v9.1.1485)
Solution: fix order of definition in ex_cmds.h
          (Hirohito Higashi)

closes: #17619

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 18:29:45 +02:00
73b9650519 patch 9.1.1486: documentation issues with Wayland
Problem:  documentation issues with Wayland
          (after v9.1.1485)
Solution: Tweak documentation style. Capitalize the first letter of
          Wayland (Hirohito Higashi)

related: #17619

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 18:18:21 +02:00
d3d54f473f Maintainers: Update MAINTAINERS file
closes: #17622

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-28 18:13:02 +02:00
b90c2395b2 patch 9.1.1485: missing Wayland clipboard support
Problem:  missing Wayland clipboard support
Solution: make it work (Foxe Chen)

fixes: #5157
closes: #17097

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-27 21:10:35 +02:00
03125277e9 runtime(pandoc): sync syntax script with upstream
closes: #17598

Signed-off-by: Jake Zimmerman <zimmerman.jake@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-27 18:38:34 +02:00
ef925556cb runtime(netrw): upstream snapshot of v182
relevant commits:
- refactor: cleanup netrw#BrowseX
- fix: correctly handle symlinks in treeview
- chore: add minimalrc for reproducing issues
- refactor: simplify s:NetrwInit with the 'newer' assignment syntax
- refactor: remove balloon functionality
- Tune local file listing especially for Windows network drives
- interim fix for browse open with multiple windows

closes: #17616

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-27 18:28:17 +02:00
223189389a patch 9.1.1484: tests: Turkish locale tests fails on Mac
Problem:  tests: Turkish locale tests fails on Mac
          (after v9.1.1480)
Solution: skip the test Test_pos_percentage_in_turkish_locale() on Mac

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-26 23:06:23 +02:00
81f9815831 patch 9.1.1483: not possible to translation position in buffer
Problem:  not possible to translation position in buffer
Solution: use _() macro to mark the output as translatable
          (Emir SARI)

Row/Column indicator separator is currently not customizable. Some
languages have a space after the comma as the usual practice, plus this
would help translators use a custom separator like colons if necessary.

Additionally, after a save, the line and the byte indicator is also
hardcoded, this enables i18n for that as well.

closes: #17608

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-26 20:38:16 +02:00
fe803c8c04 patch 9.1.1482: scrolling with 'splitkeep' and line()
Problem:  Topline is preemptively updated by line() in WinResized
          autocmd with 'splitkeep' != "cursor".
Solution: Set `skip_update_topline` when 'splitkeep' != "cursor".
          (Luuk van Baal)

related: neovim/neovim#34666
closes: #17613

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-26 20:34:15 +02:00
26ebe21caa runtime(doc): mismatch between the :uniq document's description and examples
closes: #17612

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-26 20:31:24 +02:00
5d14da3690 runtime(diff): fix regex for matching no-eol match
closes: #17610

Signed-off-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-26 20:29:18 +02:00
2249cc0a47 runtime(netrw): remove the fun from netrw :)
closes: #17584

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-25 21:23:43 +02:00
1c471ac548 runtime(doc): update description of :uniq command
The examples mention the [u] flag, so at least the [u] flag should be
introduced before the examples.

Slightly reword the sentence about trailing/leading white space.

closes: #17604

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-25 21:07:25 +02:00
037c32e428 runtime(vim): Update base-syntax, match unamed register alias
The unamed register may be referenced as both @" and @@.

Remove the unused vimPlainRegister syntax group.

fixes: #17603.
closes: #17605

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-25 20:58:50 +02:00
42d2c5e803 patch 9.1.1481: gcc complains about uninitialized variable
Problem:  gcc complains about uninitialized variable
          (Tony Mechelynck, after v9.1.1476)
Solution: initialize variable

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-25 20:54:11 +02:00
fa0b069728 runtime(doc): improve documentation style in editing.txt
Usually, Vim's document provides example code after explanations.
However some part of the editing.txt doesn't follow the style, therefore
this commit modifies it so that it follows the usual style.

closes: #17607

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-25 20:46:34 +02:00
1c2c4ecb4c patch 9.1.1480: Turkish translation outdated
Problem:  Turkish translation outdated
Solution: Update Turkish translations, enable disabled test from
          v9.1.1479 (Emir SARI)

closes: #17597

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-25 20:32:27 +02:00
8fe9e55a7d patch 9.1.1479: regression when displaying localized percentage position
Problem:  regression when displaying localized percentage position
          (after v9.1.1291)
Solution: calculate percentage first (Emir SARI)

Cleanups made in ec032de broke the Turkish percent display, failing to
prepend it properly in cases between 0 and 10. In Turkish, the percent
sign is prepended to the number, so it was displaying it as `% 5`
(should have been `%5`), while displaying numbers bigger than 9 properly.

related: #17597

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-25 20:22:43 +02:00
468c62e4fd translation(it): update Italian manpage for vimtutor
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-24 21:17:25 +02:00
ca793e60db runtime(vim): Update base-syntax, match :uniq command
closes: #17601

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-24 20:23:34 +02:00
fc378a88d8 patch 9.1.1478: Unused assignment in ex_uniq()
Problem:  Unused assignment in ex_uniq() (after v9.1.1476)
Solution: Remove the assignment and the wrong comments above
          (zeertzjq).

closes: #17596

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-24 20:02:28 +02:00
a931371694 runtime(vim): Update base-syntax, match OR operator in :echo and :execute
Don't match the OR operator in expressions as a trailing bar.

closes: #17533

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-23 21:51:44 +02:00
74f0a77bb9 patch 9.1.1476: no easy way to deduplicate text
Problem:  no easy way to deduplicate text
Solution: add the :uniq ex command
          (Hirohito Higashi)

closes: #17538

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-23 21:42:36 +02:00
159d392427 runtime(java): Complement the recognition of type parameter sections
In addition to matching type parameter sections of generic
classes and records and interfaces, match such sections of
generic methods and constructors.  As before, opt for it by
defining "g:java_highlight_generics"; the diamond form still
does not qualify for this kind of recognition.

And make section patterns agree with one another in syntax
items.

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5
https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.4.4
https://docs.oracle.com/javase/specs/jls/se21/html/jls-8.html#jls-8.8.4

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-23 20:02:14 +02:00
1be5b375c4 patch 9.1.1476: missing out-of-memory checks in cmdexpand.c
Problem:  missing out-of-memory checks in cmdexpand.c
Solution: add missing out-of-memory checks, re-order code
          (John Marriott)

This commit does the following:
- in cmdline_pum_create() add out-of-memory check call of ALLOC_MULT()
- in expand_cmdline() move check for out-of-memory to cover both
  assignments of file_str
- in nextwild() don't free `p2` until after it's last use.

closes: #17592

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-23 19:57:29 +02:00
5bbdd0b082 runtime(doc): vimtutor starts Vim in nocompatible mode
closes: #17593

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-23 19:52:42 +02:00
a9b95c3d33 runtime(doc): remove wrong documentation of the :digraph command
fixes: #17583

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-22 20:32:15 +02:00
cd68f21f60 patch 9.1.1475: completion: regression when "nearest" in 'completeopt'
Problem:  completion: regression when "nearest" in 'completeopt'
Solution: fix compare function (Girish Palya)

closes: #17577

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-22 20:23:54 +02:00
1cbe3e89c9 runtime(comment): add <Plug>-mappings
vim9script <expr> mappings relying on imports cannot be evaluated
outside of the script file with the imports, so do not work with plugins
like vim-which-key, which evaluates <expr> mappings to apply them.

Using <Plug> mappings is one way to address this, and has the added
benefit of reading like a description for users finding the mappings.

fixes: #17523
closes: #17563

Signed-off-by: Mark Woods <mwoods.online.ie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-22 20:20:34 +02:00
c877057e81 runtime(openPlugin): add <Plug>-mappings
vim9script <scriptcmd> mappings relying on imports cannot be evaluated
outside of the script file with the imports, so do not work with plugins
like vim-which-key, which applies the mappings using feedkeys().

Using <Plug> mappings is one way to address this, and has the added
benefit of reading like a description for users finding the mappings.

related: #17563

Signed-off-by: Mark Woods <mwoods.online.ie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-22 20:20:23 +02:00
46b02602d6 patch 9.1.1474: missing out-of-memory check in mark.c
Problem:  missing out-of-memory check in mark.c
Solution: bail out, if mark_line() returns NULL
          (John Marriott)

closes: #17578

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-22 19:44:27 +02:00
8d9d2b222d runtime(tutor): Make all tutor files utf-8 only
In this commit, all legacy encodings for tutor files are removed.

* All the tutor files `tutor1.xx` and `tutor2.xx` are now `utf-8`
* All `README.xx.txt` files are now `utf-8`
* All makefiles are removed, as they are no longer needed
* The `tutor.vim` script is simplified
* The `README` indicates `utf-8` as a requirement
* update vimtutor.bat file

In 2025, there is no realistic scenario where a beginner starts the Vim
9.1 tutor on a machine that lacks UTF-8 support.
This change will ease the maintenance of the tutor files. Cf #17562 for
an example.

closes: #17582
closes: #17586

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-22 19:42:43 +02:00
dcff497373 runtime(vim): Update base-syntax, match bare mark ranges
Remove unmatchable :normal {mark,register} matches. The arg to :normal
is now handled separately and contained marks and registers are no
longer matched.

closes: #17571

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-22 18:47:49 +02:00
99b9847bd8 runtime(vim): Update base-syntax, fix Vim9 :import expression comment handling
The required space in Vim9 continuation comments (#\ comment) was
accidentally removed in commit 6acca4b as trailing whitespace.

closes: #17573

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-20 18:59:21 +02:00
d75ab0cbf5 patch 9.1.1473: inconsistent range arg for :diffget/diffput
Problem:  inconsistent range arg for :diffget/diffput
Solution: fix the range specification, place the cursor for :diffput and
          :diffget consistently on the last line (Yee Cheng Chin)

Previously, `:<range>diffget` only allowed using 1 or above in the range
value, making it impossible to use the command for a diff block at the
beginning of the file. Fix the range specification so the user can now
use 0 to specify the space before the first line. This allows
`:0,$+1diffget` to work to retrieve all the changes from the other file
instead of missing the first diff block. Also do this for `:diffput`.

Also, make `:diffput` work more similar to `:diffget`. Make it so that
if the cursor is on the last line and a new line is inserted in the
other file, doing `:diffput` will select that diff block below the line,
just like `:diffget` would.

Also clean up the logic a little bit for edge cases and for handling
line matched diff blocks better.

closes: #17579

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-20 18:44:18 +02:00
476b65ebac runtime(doc): mention using <script> instead of <sfile> in :autocmd
fixes: #17569

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-19 19:40:51 +02:00
c50f4d07c4 patch 9.1.1472: if_python: PySequence_Fast_{GET_SIZE,GET_ITEM} removed
Problem:  if_python: PySequence_Fast_{GET_SIZE,GET_ITEM} removed with
          python3.14 in stable ABI
Solution: use PySequence_{Size,GetItem} instead (Zdenek Dohnal)

Python 3.14 removed those two functions from stable API because of
reasoning these function shouldn't be part of stable API at the first
place.

Moving to PySequence_GetSize and PySequence_GetItem fixes the build
failure when Vim is built with dynamic Python and stable API for Python
3.8.

closes: #17575

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-19 19:35:32 +02:00
5fbe72edda patch 9.1.1471: completion: inconsistent ordering with CTRL-P
Problem:  completion: inconsistent ordering with CTRL-P
          (zeertzjq)
Solution: reset compl_curr_match when using CTRL-P (Girish Palya)

fixes: #17425
closes: #17434

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 19:15:45 +02:00
1c00af2a24 runtime(doc): Remove obsolete labelling from 'h' occasion in :help 'highlight'
The 'h' occasion is now used for "matched text of currently inserted
completion" (defaulting to ComplMatchIns).

closes: #17572

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 19:12:07 +02:00
8b92af645c runtime(hgcommit): set comments and commentstring options in filetype plugin
closes: #17480

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:47:57 +02:00
736cd18671 runtime(ishd): set comments and commentstring options in filetype plugin
closes: #17490

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:46:12 +02:00
e4c157b9c1 runtime(nroff,groff): update commentstyle in filetype plugins
closes: #17516

Signed-off-by: jtmr05 <62111562+jtmr05@users.noreply.github.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:41:14 +02:00
8e83105798 patch 9.1.1470: use-after-free with popup callback on error
Problem:  use-after-free with popup callback on error
          (Brian Carbone, lifepillar)
Solution: check if the popup window is valid before accessing it

fixes: #17558
closes: #17565

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:33:31 +02:00
9d065a4862 patch 9.1.1469: potential buffer-underflow with invalid hl_id
Problem:  potential buffer-underflow with invalid hl_id (mugitya03)
Solution: assert that the return-code of syn_get_final_id() if > 0

As a safety check, syn_get_final_id() may return zero when either the
provided hl_id is zero or larger than expected.

However, many callers of syn_get_final_id() do not check that the return
value is larger than zero but re-use the returned highlight id directly
like this:

  hl_id = syn_get_final_id(hl_id);
  sgp = &HL_TABLE()[hl_id - 1];	    // index is ID minus one

in which case, this would cause a buffer underrun and an access violation.

Let's use assert(hl_id > 0); to make sure that hl_id is larger than
zero.

Note to myself: I'll need to compile releases builds using -DNDEBUG once
a new release will be made

fixes: #17475
closes: #17512

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:31:19 +02:00
03e5ee25fd patch 9.1.1468: filetype: bright(er)script files are not recognized
Problem:  filetype: bright(er)script files are not recognized
Solution: detect *.bs files as brighterscript filetype and *.brs as
          brightscript filetype, include filetype plugins (Riley Bruins)

closes: #17566

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:23:05 +02:00
fff0132399 patch 9.1.1467: too many strlen() calls
Problem:  too many strlen() calls
Solution: Change expand_env() to return string length
          (John Marriott)

This commit does the following changes:
- In expand_env_esc():
  - return the length of the returned dst string.
  - refactor to remove some calls to STRLEN() and STRCAT()
  - add check for out-of-memory condition.
- Change call sites in various source files to use the return value

closes: #17561

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:20:11 +02:00
8311e7d6b4 runtime(vim): fix incorrect highlighting of User autocmds
There is no pattern after the user event name. The user event name is
the pattern.

closes: #17568

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-18 18:02:47 +02:00
48295111e5 patch 9.1.1466: filetype: not all lex files are recognized
Problem:  filetype: not all lex files are recognized
Solution: detect *.ll as lex, llvm or lifelines filetype, depending on
          the content (Eisuke Kawashima)

closes: #17560

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-17 20:30:52 +02:00
acd04b2fd7 patch 9.1.1465: tabpanel: not correctly drawn with 'equalalways'
Problem:  tabpanel: not correctly drawn with 'equalalways'
Solution: call win_equal() (Hirohito Higashi)

closes: #17554

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 20:26:08 +02:00
b7ebe610cc translation(de): update German messages translation
closes: #17555

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 20:23:00 +02:00
234c728c53 runtime(optwin): fix tabpanel typo in optwin
related: #17555

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 20:22:30 +02:00
cb27992cda patch 9.1.1464: gv does not work in operator-pending mode
Problem:  gv does not work in operator-pending mode
          (liushapku)
Solution: remove the check for checkclearop in nv_gv_cmd()
          (phanium)

fixes: #3666
closes: #17551

Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 20:19:15 +02:00
93318a9933 patch 9.1.1463: Integer overflow in getmarklist() after linewise operation
Problem:  Integer overflow in getmarklist() after linewise operation.
Solution: Don't add 1 to MAXCOL (zeertzjq)

related: neovim/neovim#34524
closes: #17552

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 20:10:38 +02:00
8ae8b304ee patch 9.1.1462: missing change from patch v9.1.1461
Problem:  missing change from patch v9.1.1461
Solution: change wrong TPL_LCOL macro in a few more places

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 20:07:54 +02:00
152a450d88 runtime(sh): reset g:sh_fold_enabled after outputting its value in syntax script
fixes: #10701
closes: #17557

Signed-off-by: hakkadaikon <hakkadaikon@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 19:54:37 +02:00
7841ca185d runtime(vimtutor): vimtutor throws Access Denied Error on MS-Windows
Problem:  MS-Windows: vimtutor throws Access Denied Error
Solution: switch the order of redirects. First redirect stdout, than
          stderr to stdout, Try to access $TEMP before current directory
          (which is usually c:\Program Files\vim\vim91\ and not writable
          for normal users)

closes: #17550

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 19:48:03 +02:00
e5c96e344c patch 9.1.1461: tabpanel: tabpanel vanishes with popup menu
Problem:  tabpanel: tabpanel vanishes with popup menu
Solution: remove pum-related test in tabpanel_leftcol(), refactor a few
          related functions (Hirohito Higashi)

This commit does the following:
- Delete unnecessary pum-related checks in the tabpanel_leftcol()
  function
- remove pum-related check in tabpanel_leftcol()
- The argument of the TPL_LCOL() macro has been deleted.
- The argument of the tabpanel_leftcol() function has been changed
  to void
- The return type of the `win_comp_pos()` function has been changed to
  void

closes: #17549

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-16 19:39:24 +02:00
e5297e39b3 patch 9.1.1460: MS-Windows: too many strlen() calls in os_win32.c
Problem:  MS-Windows: too many strlen() calls in os_win32.c
Solution: refactor code and remove calls to strlen() and wcscat()
          (John Marriott)

This commit does the following changes:
- in mch_get_exe_name():
  - refactor to remove call to wcsrchr().
  - refactor to replace calls to wcscat() with wcscpy().
  - move variables closer to where they are used.
  - change test to make sure that concatenating path and exe_pathw
    will fit inside the environment string (taking into account that
    path may be NULL).
- in executable_exists():
  - add namelen argument.
  - use string_T to store some strings.
  - refactor to remove calls to STRLEN() (via STRCAT()).
- in mch_getperm():
  - move call to mch_stat() into return statement and drop unneeded
    variable.
- in mch_wrename():
  - refactor to use wide character comparisons.
- some cosmetic code styling changes (removing extraneous spaces, etc).

closes: 17542

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-15 16:50:38 +02:00
f548ec46e4 runtime(keymaps): Add Azerbaijani keymap
closes: #17541

Signed-off-by: Rasul Samadzade <rasul.samadzade@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-15 16:33:35 +02:00
6897f18ee6 patch 9.1.1459: xxd: coloring output is inefficient
Problem:  xxd prints color escape sequences for every octet
          even if the color doesn't change
Solution: use separate arrays for colors and text and only
          print escape sequences when the color changes
          (Emanuel Krollmann)

fixes: #15122
closes: #17535

Signed-off-by: Emanuel Krollmann <E.Krollmann@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-15 16:24:09 +02:00
f5aa269f2d patch 9.1.1458: tabpanel: tabs not properly updated with 'stpl'
Problem:  tabpanel: tabs not properly updated with 'stpl'
Solution: remember the Column offset per tabpage
          (Hirohito Higashi)

fixes: #17519
closes: #17544

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-15 16:09:22 +02:00
631a50ceb9 runtime(doc): mention cannot ignored events in eventignorewin
closes: #17545

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-15 16:05:10 +02:00
7e47c1e735 runtime(netrw): remove g:netrw_quiet and reindent to 4 spaces
closes: #17539

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-15 15:26:44 +02:00
aef2e53cf8 runtime(comment): handle special chars ^$[ robustly
Make sure comment toggling works when 'commentstring' contains
any of the following regex special characters by escaping them:

^ $ [

closes: #17537

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-13 20:18:50 +02:00
1ded411a41 runtime(debcontrol): add hurd-amd64 architecture to syntax script
closes: #17525

Signed-off-by: Yuqian Yang <crupest@crupest.life>
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-13 20:11:42 +02:00
d296af94d0 runtime(masm): set 'com' and 'cms' options in ftplugin
closes: #17484

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 22:07:40 +02:00
85f0711b4e runtime(zimbu): set 'commentstring' option in ftplugin
closes: #17478

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 22:05:31 +02:00
91af4c4180 runtime(doc): improve the wording of 'sts', 'varts' and 'varsts' values
closes: #17522

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 21:56:19 +02:00
f5e3b5c04f runtime(netrw): refactor netrw#ErrorMsg -> netrw#msg#Notify
closes: #17526

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 21:51:42 +02:00
2eb995b569 runtime(defaults): Update the "Last Changes" header in defaults.vim
This change was forgotten from commit 6f6c0dba9f

closes: #17536

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 21:40:45 +02:00
a9657c8952 patch 9.1.1457: compile warning with tabpanelopt
Problem:  compile warning with tabpanelopt
Solution: declare arg as UNUSED (John Marriott)

closes: #17528

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 21:37:18 +02:00
532a5fb131 patch 9.1.1456: comment plugin fails toggling if 'cms' contains \
Problem:  comment plugin fails toggling if 'cms' contains \
Solution: escape backslash (Maxim Kim)

groff could be commented using \" or \# and comment plugin fails to
uncomment such things.

NOTE: if newstyle comment would be introduced, e.g. .\#
for groff test would need to be adjusted.

closes: #17530

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 21:31:00 +02:00
16e9b477ab runtime(doc): remove an obsolete item from todo.txt
I cannot reproduce this defect.  The replication instructions refer to
Mercurial version numbers and I no longer use Mercurial for my Vim
source.  I tried comparing various Git versions of the example file,
src/if_cscope.c, and still couldn't reproduce the defect.  Also, I use
Vim's diff mode a lot and haven't seen such a problem in a long time.
I am confident that it has been fixed.

Therefore, the item should be removed from todo.txt.

closes: #17534

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-12 21:15:07 +02:00
ae31d7bfb4 patch 9.1.1455: Haiku: dailog objects created with no reference
Problem:  Haiku: dailog objects created with no reference
Solution: delete the objects before returning (jinyaoguo)

In the functions gui_mch_dialog() and gui_mch_font_dialog(), Dialog
objects are created but never escape the function scope. The call to
dialog->Go() only returns a boolean value and does not retain any
reference to the Dialog object itself, which may lead to potential
memory leak.

Fix this by deleting the object after using it.

closes: #17501

Signed-off-by: jinyaoguo <guo846@purdue.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-11 21:30:01 +02:00
51289207f8 runtime(vim): Update base-syntax, improve function definition matching
- Fix highlighting of function names including /fu\%[nction]/ (E.g.,
  s:func(), foo.fu(), fu.func())
- Match :delfunction argument.

Reported by Aliaksei Budavei.

closes: #17428

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-11 21:16:14 +02:00
6cc9bd4001 patch 9.1.1454: tests: no test for pum at line break position
Problem:  Missing test case for pum display on a wrapped line.
Solution: Add a test case to cover pum behavior at line break positions.
          (glepnir)

closes: #17520

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-11 21:14:02 +02:00
5923216f79 runtime(openPlugin): Open should open file names with spaces in Windows
Use <f-args> instead of <q-args> in commands:

- :Open
- :Launch
- :URLOpen

fixes #17468
closes: #17517

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-11 21:12:27 +02:00
053aee01f7 runtime(doc): add more pointers to 'completeopt'
Before this commit, I had trouble finding information about configuring
the insert mode completion. In particular, it was not clear that the
'wildopt' config that I already had in my vimrc does not apply here.

Also, `insert.txt` barely mentioned 'completeopt' except when
describing popups (I was more interested in bash-like behavior
where the unique prefix of all completions is completed first).

I'm hoping these edits will make the relevant docs easier to find.

closes: #17515

Signed-off-by: Ilya Grigoriev <ilyagr@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-11 21:07:35 +02:00
600cd88cdf runtime(netrw): remove comment separators
closes: #17514

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-11 20:42:41 +02:00
e965b7ac5f patch 9.1.1453: tests: Test_geometry() may fail
Problem:  tests: Test_geometry() may fail
          (Gary Johnson)
Solution: allow a slightly smaller value when checking the number of
          lines.

fixes: #17491

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 21:29:43 +02:00
6701480c43 runtime(filetype): Use s:StarSetf for all patterns ending in *
Problem:  Some filetype autocmds with patterns ending in * do not skip
          filenames matching g:ignored_patterns.
Solution: Move these autocmds to the appropriate section and call
          s:StarSetf() to set the filetype.

- Affected filetypes: dosini, execline, foam, messages, nginx, tmux.
- Convert foam filetype patterns to use wildcard matching.

closes: #17422

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 21:15:22 +02:00
bfa16364f1 runtime(doc): update documentation on tabstop settings
Unify the treatment of tabstop, correct errors and deprecate smarttab
usage.

closes: #17444

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 21:12:31 +02:00
274efcc7e6 runtime(vim): Update base-syntax, contain let-heredocs
Limit heredoc matches to assignment statements.  Matching these at the
top level is very slow.

closes: #17473

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 21:02:43 +02:00
138fb951e0 runtime(reva): set 'cms' option in ftplugin, update URL
closes: #17488

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 21:00:07 +02:00
a0316cd299 runtime(abap): set 'comments' and 'commentstring' option in ftplugin
Reference:
https://en.wikipedia.org/wiki/ABAP#Comments

closes: #17489

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:57:14 +02:00
ecf8f15884 patch 9.1.1452: completion: redundant check for completion flags
Problem:  completion: redundant check for completion flags
Solution: refactor code slightly (glepnir)

refactor: nest fuzzy completion logic to avoid duplicate flag checks

- Combine COT_FUZZY checks into single nested condition
- Reduce redundant bitwise operations in ins_compl_new_leader()

closes: #17494

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:52:41 +02:00
30b4ddf925 patch 9.1.1451: tabpanel rendering artifacts when scrolling
Problem:  tabpanel rendering artifacts when scrolling
Solution: update scrolling logic (Hirohito Higashi)

fixes: #17495
closes: #17496

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:42:06 +02:00
1319009d59 runtime(netrw): get rid of s:Strlen() and use strdisplaywidth()
closes: #17498

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:39:50 +02:00
c413ac7068 runtime(java): Match raw-, non-generic-, and generic-type names of "java.lang"
And only match innermost element types of parameterised
array types.

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.8
https://docs.oracle.com/javase/specs/jls/se21/html/jls-6.html#jls-6.1
https://docs.oracle.com/javase/specs/jls/se21/html/jls-10.html

closes: #17499

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:37:39 +02:00
572d46035f runtime(gdshader): add comments and commentstring to ftplugin
closes: #17500

Co-authored-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:35:03 +02:00
a304e49790 patch 9.1.1450: Session has wrong arglist with :tcd and :arglocal
Problem:  Session has wrong arglist with :tcd and :arglocal.
Solution: Also use absolute path for :argadd when there is tabpage-local
          directory (zeertzjq).

related: neovim/neovim#34405
closes: #17503

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:31:44 +02:00
30cf017f2a runtime(8th): updated 8th syntax script
closes: #17505

Signed-off-by: Ron Aaron <ron@aaron-tech.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:27:57 +02:00
ed4eb74f7a patch 9.1.1449: typo in pum_display()
Problem:  typo in pum_display()
Solution: update the comment, remove empty new lines
          (glepnir)

closes: #17506

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:23:42 +02:00
72c3ca9f8d CI: update Cirrus runner to FreeBSD 14.3
closes: #17508

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:22:10 +02:00
3ca6776a57 patch 9.1.1448: tabpanel is not displayed correctly when msg_scrolled
Problem:  tabpanel is not displayed correctly when msg_scrolled
Solution: remove the msg_scrolled condition (Hirohito Higashi)

fixes: #17502
closes: #17510

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:20:22 +02:00
91782b4aeb patch 9.1.1447: completion: crash when backspacing with fuzzy completion
Problem:  completion: crash when backspacing with fuzzy completion
Solution: Don't dereference compl_first_match when it's NULL
          (zeertzjq).

related: neovim/neovim#34419
closes: #17511

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-10 20:06:53 +02:00
446a98f0b6 runtime(rpl): set commentstring option in ftplugin
closes: #17487

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 21:10:11 +02:00
9e9fe66437 runtime(postscr): set commentstring option in ftplugin
closes: #17486

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 21:08:33 +02:00
de535cfe77 runtime(occam): set commentstring option in ftplugin
closes: #17485

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 21:06:23 +02:00
df630970bf runtime(lprolog): set com, cms options for lambda prolog
closes: #17481

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 21:03:04 +02:00
aa9fc8eb94 runtime(vue): set 'com' and 'cms' options in ftplugin
closes: #17479

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 20:57:02 +02:00
601cfa9a23 patch 9.1.1446: filetype: cuda-gdb config files are not recognized
Problem:  filetype: cuda-gdb config files are not recognized
Solution: detect .cuda-gdbinit and cuda-gdbinit files as gdb filetype
          (Wu Zhenyu)

closes: #17471

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 20:48:24 +02:00
328332b0b0 patch 9.1.1445: negative matchfuzzy scores although there is a match
Problem:  negative matchfuzzy scores although there is a match
          (Maxim Kim)
Solution: reset the score if a match has been found but the score is
          negative (Girish Palya)

The fuzzy algorithm may miss some matches in long strings due to recursion
limits. As a result, the score can end up negative even when matches exist.
In such cases, reset the score to ensure it is non-negative.

fixes: ##17449
closes: #17469

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 20:43:03 +02:00
de1c7ac432 patch 9.1.1444: Unused assignment in set_fuzzy_score()
Problem:  Unused assignment in set_fuzzy_score() (after 9.1.1441).
Solution: Remove it (zeertzjq).

closes: #17472

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 20:34:57 +02:00
82a96e3dc0 patch 9.1.1443: potential buffer underflow in insertchar()
Problem:  potential buffer underflow in insertchar()
Solution: verify that end_len is larger than zero
          (jinyaoguo)

When parsing the end-comment leader, end_len can be zero if
copy_option_part() writes no characters. The existing check
unconditionally accessed lead_end[end_len-1], causing potential
underflow when end_len == 0.

This change adds an end_len > 0 guard to ensure we only index lead_end
if there is at least one character.

closes: #17476

Signed-off-by: jinyaoguo <guo846@purdue.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 20:31:17 +02:00
69565e3618 patch 9.1.1442: tests: Test_diff_fold_redraw() is insufficient
Problem:  tests: Test_diff_fold_redraw() is insufficient
          (after v9.1.1439, Christ van Willegen)
Solution: improve the test (Gary Johnson)

The original Test_diff_fold_redraw() function, added 2025-06-08 at patch
9.1.1439, had a bug and didn't do a very good job of testing the fold
behavior.  This new version is simpler and more thorough.

The bug was that it checked the fold state of one window twice instead
of checking both windows.

closes: #17492

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 20:19:35 +02:00
09a62e6f64 runtime(netrw): cleanup Decho related comments
closes: #17465

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-09 16:04:05 +02:00
b8ee1cf56e patch 9.1.1441: completion: code can be improved
Problem:  completion: code can be improved
Solution: remove reposition_match() and use mergesort_list(),
          for fuzzy completion, sort by fuzzy score immediately after
          setting a new leader (Girish Palya)

closes: #17460

Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-08 16:20:06 +02:00
80a7921a02 runtime(nginx): Add NGINX directive for background cache updates
Docs: https://nginx.org/en/docs/http/ngx_http_proxy_module.html#proxy_cache_background_update

closes: #17458

Signed-off-by: S0AndS0 <strangerthanbland@gmail.com>
Signed-off-by: Chris Aumann <me@chr4.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-08 16:15:00 +02:00
9cb27a57c8 patch 9.1.1440: too many strlen() calls in os_win32.c
Problem:  too many strlen() calls in os_win32.c
Solution: refactor code and remove calls to strlen()
          (John Marriott)

The following changes have been made:
- In mch_init_g():
  - refactor to remove calls to STRLEN().
  - use vim_strnsave() instead of vim_strsave().
  - set a flag if vimrun_path is stored in allocated memory so it can be
     freed at exit.
- In mch_exit() free vimrun_path if it was stored in allocated memory.
- In fname_case() make a small optimisation by measuring the length of
  name only if needed.
- In copy_extattr() make a small optimisation by replacing call to
  STRCAT() with STRCPY().

closes: #17462

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-08 16:05:53 +02:00
3fa0d3514b patch 9.1.1439: Last diff folds not merged
Problem:  Last diff folds not merged (after v8.1.1922)
Solution: loop over all windows in the current tabpage and update all
          folds (Gary Johnson)

This commit fixes a bug where the last two folds of a diff are not
merged when the last difference between the two diff'd buffers is
resolved.

Normally, when two buffers are diff'd, folding is used to show only the
text that differs and to hide the text that is the same between the two
buffers.  When a difference is resolved by making a block of text the
same in both buffers, the folds are updated to merge that block with the
folds above and below it into one closed fold.

That updating of the folds did not occur when the block of text was the
last diff block in the buffers.

The bug was introduced by this patch on August 24, 2019:

    patch 8.1.1922: in diff mode global operations can be very slow

    Problem:    In diff mode global operations can be very slow.
    Solution:   Do not call diff_redraw() many times, call it once when
		redrawing.  And also don't update folds multiple times.

Unfortunately, folds were then not updated often enough.

The problem was fixed by adding a short loop to the ex_diffgetput()
function in diff.c to update all the folds in the current tab when the
last difference is removed.

A test for this was added to test_diffmode.vim.  Two of the reference
screen dumps for another test in that file,
Test_diffget_diffput_linematch(), had to be changed to have all the
folds closed rather than to have the last diff block remain open.

closes: #17457

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-08 16:00:06 +02:00
c4eb1cb17b patch 9.1.1438: tests: Test_breakindent_list_split() fails
Problem:  tests: Test_breakindent_list_split() fails
          (Phạm Bình An)
Solution: Always reset "&columns" and "&lines" for GUI builds
          (Aliaksei Budavei)

Ensure that "&columns" and "&lines" are always set to their
default values before calling "SetUp()", if any, for EACH
test run by a GUI build to avoid yet-to-be-run tests from
inheriting possibly changed values (after window resizing)
and leading to broken assumptions about available estate and
occasional test failures.

fixes: #17453
closes: #17447

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-08 15:52:42 +02:00
0174d8f386 patch 9.1.1437: MS-Windows: internal compile error in uc_list()
Problem:  MS-Windows: internal compile error in uc_list() with VS 17.14
          (ibear)
Solution: refactor code slightly (Mike Williams)

fixes: #17402
closes: #17464

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-08 15:41:52 +02:00
8f7256a5ee runtime(doc): fix some style issues and remove obsolete docs
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-07 18:31:42 +02:00
834bb85172 runtime(vim): vimHLGroup is not highlighted correctly
Problem: vimHLGroup is not highlighted in "hi def link"
          and "hi clear" commands
Solution: highlight vimHLGroup similarly to vimGroup
          (Eisuke Kawashima)

closes: #17450

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-07 17:59:11 +02:00
6acca4bc59 runtime(vim): remove trailing whitespace in Vim syntax generator
related: #17450

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-07 17:56:57 +02:00
ce2769b5fe patch 9.1.1436: GUI control code is displayed on the console on startup
Problem:  GUI control code is displayed on the console on startup
Solution: check if Vim is starting up (Hirohito Higashi)

closes: #17456

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-07 17:49:35 +02:00
2897a8d040 CI: bump xcode to 16.4
closes: #17446

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-07 17:45:21 +02:00
d1a975ae64 runtime(netrw): upstream snapshot of v181
closes: #17461

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-07 17:35:18 +02:00
eb59129d2c runtime(typescript): remove Fixedgq() function from indent script
Problem:
1. The `Fixedgq()` function is broken (see #17412)
2. The `'formatexpr'` for Typescript is not documented, which causes
   confusion to users when they try to set `'formatprg'`, since
   `'formatexpr'` always takes precedence over `'formatprg'`. See also
   https://github.com/HerringtonDarkholme/yats.vim/issues/209
3. Typescript already has a very good and popular formatter called
   `prettier`, that can be easily integrated to Vim via `'formatprg'`
   (see #16989). I don't think there are any good reasons to reinvent a
   half-baked version in Vim.

Solution:  Remove the Fixedgq() 'formatexpr' function.

fixes: #17412
closes: #17452

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-05 21:21:35 +02:00
002548b81e runtime(doc): Add missing 'wfb' (winfixbuf) tag
closes: #17455

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-05 21:18:09 +02:00
8cd42a58b4 patch 9.1.1435: completion: various flaws in fuzzy completion
Problem:  completion: various flaws in fuzzy completion
Solution: fix the issues (Girish Palya)

- Remove the brittle `qsort()` on `compl_match_array`.
- Add a stable, non-recursive `mergesort` for the internal doubly
  linked list of matches.
- The sort now happens directly on the internal representation (`compl_T`),
  preserving sync with external structures and making sorting stable.
- Update fuzzy match logic to enforce `max_matches` limits after
  sorting.
- Remove `trim_compl_match_array()`, which is no longer necessary.
- Fixe test failures by correctly setting `selected` index and
  maintaining match consistency.
- Introduce `mergesort_list()` in `misc2.c`, which operates generically
  over doubly linked lists.
- Remove `pum_score` and `pum_idx` variables

fixes: #17387
closes: #17430

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-05 21:09:24 +02:00
738df3887f patch 9.1.1434: MS-Windows: missing out-of-memory checks in os_win32.c
Problem:  MS-Windows: missing out-of-memory checks in os_win32.c
Solution: Add out-of-memory checks to os_win32.c (John Marriott)

closes: #17441

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-05 20:49:39 +02:00
8f751d56f4 patch 9.1.1433: Unnecessary :if when writing session
Problem:  Unnecessary :if in session where both branches have the same
          effect (after 9.1.1431).
Solution: Remove the superfluous :if (zeertzjq).

closes: #17448

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-05 20:25:51 +02:00
1cccdebc0f runtime(vim): Update base-syntax, improve Vim9 block start pattern
The opening curly brace must be followed by whitespace, comment or
trailing bar.

closes: #17454

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-05 20:23:07 +02:00
a2dd40c057 runtime(openPlugin): Add URLOpen to not expand special chars
closes: #17424

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-04 21:59:01 +02:00
dfed077e06 runtime(doc): fix small errors from rev 2090405de5
- update the netrw window to current version (and trim it slightly to 80
  chars)
- remove a trailing double quote

Co-authored-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-04 21:40:21 +02:00
08896dd330 patch 9.1.1432: GTK GUI: Buffer menu does not handle unicode correctly
Problem:  GTK GUI: Buffer menu does not handle unicode correctly
Solution: Get rid of the BMHash() function (SUN Haitao)

fixes: #17403
closes: #17405

Signed-off-by: SUN Haitao <sunhaitao@devtaste.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-04 21:25:31 +02:00
d6c9ac97a0 runtime(doc): clarify the effect of 'smarttab'
closes: #17426

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-04 21:19:18 +02:00
0ca5966196 patch 9.1.1431: Hit-Enter Prompt when loading session files
Problem:  Hit-Enter Prompt when loading session files
Solution: use set+= for 'shortmess' to keep the existing flags
          (Miguel Barro)

closes: #17445

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-04 21:03:27 +02:00
bb78ea23c6 runtime(mbsync): Add support for TLSType in syntax script
closes: #17438

Signed-off-by: Filippo Bonazzi <filippo.bonazzi@suse.com>
Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-04 20:13:57 +02:00
862cb37544 patch 9.1.1430: tabpanel may flicker in the GUI
Problem:  tabpanel may flicker in the GUI
Solution: call scroll_start() and scroll_region_reset()
          (Hirohito Higashi)

fixes: #17440
closes: #17442

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-04 20:05:59 +02:00
c2c9132420 runtime(new-tutor): update the "correct" text in tutor.tutor.json
Change from "Document '&variable'" to the expected correct result
"TODO: Document '&variable'"

closes: #17417

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-03 21:20:00 +02:00
a1522f7c0d patch 9.1.1429: dragging outside the tabpanel changes tabpagenr
Problem:  dragging outside the tabpanel changes tabpagenr (char101)
Solution: set in_tab_line and in_tabpanel variables (Hirohito Higashi)

fixes: #17385
closes: #17431

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-03 21:09:06 +02:00
86d46a7018 patch 9.1.1428: completion: register completion needs cleanup
Problem:  completion: register completion needs cleanup
Solution: slightly refactor get_register_completion()
          (glepnir)

closes: #17432

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-03 21:04:44 +02:00
b29e37133d patch 9.1.1427: rendering artifacts with the tabpanel
Problem:  rendering artifacts with the tabpanel
          (char101)
Solution: prevent double redraw, use Columns instead of frame width
          (Hirohito Higashi)

fixes: #17429
closes: #17435

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-03 20:57:57 +02:00
2090405de5 runtime(doc): make examples verbatim to prevent conceal/tag parsing
closes: #17437

Signed-off-by: Yochem van Rosmalen <git@yochem.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-03 20:54:33 +02:00
bfeefc474a runtime(doc): clarify the effect of exclusive single char selections
closes: #17410

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-02 19:56:57 +02:00
d5fdfa5c9c patch 9.1.1426: completion: register contents not completed
Problem:  CTRL-X CTRL-R only completes individual words from registers,
          making it difficult to insert complete register content.
Solution: Add consecutive CTRL-X CTRL-R support - first press completes
          words, second press completes full register lines, similar to
          CTRL-X CTRL-L and CTRL-X CTRL-P behavior (glepnir).

closes: #17395

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-02 19:45:41 +02:00
3993cd619a runtime(vim): Update base-syntax, bug fixes
- Contain :profdel arguments.
- Fix string highlighting immediately after lambda -> operators.

Reported by Aliaksei Budavei.

closes: #17427

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-02 19:31:10 +02:00
3b9b95dc63 patch 9.1.1425: tabpanel: there are still some problems with the tabpanel
Problem:  tabpanel: there are still some problems with the tabpanel with
          column handling
Solution: fix the problems and refactor Tabpanel feature (Hirohito
          Higashi).

fixes: #17423
fixes: #17332
closes: #17336

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 20:22:55 +02:00
6c40df09e0 patch 9.1.1424: PMenu selection broken with multi-line selection and limits
Problem:  PMenu selection broken with multi-line selection and limits
          (Maxim Kim)
Solution: update completion match index when limiting the completion
          sources (Girish Palya)

fixes: #17394
closes: #17401

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 20:11:59 +02:00
cba66cf894 patch 9.1.1423: :tag command not working correctly using Vim9 Script
Problem:  :tag command not working correctly using Vim9 Script
Solution: inject a ':' before the numeric address, to make the command
          valid in Vim9 context

fixes: #17415
closes: #17418

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 19:47:03 +02:00
98c29dbfd1 patch 9.1.1422: scheduling of complete function can be improved
Problem:  scheduling of complete function can be improved
Solution: call user completion functions earlier when just determining
          the insertion column (Girish Palya)

This change improves the scheduling behavior of async user-defined
completion functions (such as `F{func}`, `F`, or `'o'` values in the
`'complete'` option), particularly benefiting LSP clients.

Currently, these user functions are invoked twice:

1. First with `findstart = 1` to determine the completion start
   position.
2. Then with `findstart = 0` to retrieve the actual matches.

Previously, both calls were executed back-to-back. With this change, the
first call (`findstart = 1`) is performed earlier—before any matches are
gathered from other sources.

This adjustment gives event-driven completion sources (e.g., LSP
clients) more time to send their requests while Vim concurrently
collects matches from other sources like the current buffer.

Not sure about the real-world performance gains, but this approach
should, in theory, improve responsiveness and reduce latency for
asynchronous completions.

To test, try using yegappan LSP client:

```vim
set cpt+=o^10
autocmd VimEnter * g:LspOptionsSet({ autoComplete: false, omniComplete: true })
```

If you prefer to use 'native' auto-completion (without plugins), try the
following configuration:

```vim
set cot=menuone,popup,noselect,nearest
autocmd TextChangedI * InsComplete()
def InsComplete()
  if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$'
    SkipTextChangedI()
    feedkeys("\<c-n>", "n")
  endif
enddef
inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedI()<cr><c-e>
inoremap <silent> <c-y> <c-r>=<SID>SkipTextChangedI()<cr><c-y>
def SkipTextChangedI(): string
  set eventignore+=TextChangedI
  timer_start(1, (_) => {
    set eventignore-=TextChangedI
  })
  return ''
enddef
inoremap <silent><expr> <tab> pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr> <s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
```

closes: #17396

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 19:40:00 +02:00
95ea0b0f8d runtime(doc): make 'shiftwidth' setting more precise
closes: #17414

Signed-off-by: Damien Lejay <damien@lejay.be>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 19:10:36 +02:00
a541f1de2b patch 9.1.1421: tests: need a test for the new-style tutor.tutor
Problem:  tests: need a test for the new-style tutor.tutor, patch
          9.1.1384 broke the expected positions for the signs
Solution: Update all number keys in tutor.tutor.json to match the
          correct line numbers in tutor.tutor, replace tabs by spaces,
          add a screen-dump test to verify it does not regress
          (Pham Bình An)

closes: #17416

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 18:58:09 +02:00
b577ad50d0 runtime(java): Match annotation- and interface-type names of "java.lang"
Complement the documented support for the recognition of all
public types of the "java.lang" package (":help java.vim").
(The original syntax item generator may have, inadvertently,
contributed via suppressing "NullPointerException"s to not
having annotation and interface types qualify in general.)

Also, re-link usage instructions for the alternative syntax
item generator to a rolling "master"'s version.

closes: #17419

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 18:29:37 +02:00
0aaf6f8bbb runtime(vim): Update base-syntax, improve :profile highlighting
Match full :profile and :profdel commands.

closes: #17420

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-06-01 18:26:39 +02:00
086b3b5b79 runtime(vim): Update base-syntax, improve :mark and :substitute highlighting
- Match full :mark and :k commands.
- Match 2 and 3 letter :s repeat commands.
- Match :s [count] argument.

closes: #17408

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-31 17:52:48 +02:00
54a09e7e86 patch 9.1.1420: tests: could need some more tests for shebang lines
Problem:  tests: could need some more tests for shebang lines
Solution: add more shebang patterns to test_filetype.vim
          (Eisuke Kawashima)

closes: #17409

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-31 12:30:59 +02:00
055cca88c4 runtime(java): Reference a modern syntax item generator for type names
And generalise the sourcing of "javaid.vim" for Java
buffers.

Resolves zzzyxwvut/java-vim#10.
closes: #17411

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-31 12:25:15 +02:00
8cc6d8b187 patch 9.1.1419: It is difficult to ignore all but some events
Problem:  It is difficult to ignore all but some events.
Solution: Add support for a "-" prefix syntax in '(win)eventignore' that
          subtracts an event from the ignored set if present
          (Luuk van Baal).

closes: #17392

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-31 12:10:31 +02:00
647d7f7389 runtime(doc): fix typo in tag for helptoc package
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-31 12:06:49 +02:00
77959dc644 runtime(doc): CI fails with trailing whitespace error in usr_30.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-30 20:14:16 +02:00
6b2c1ad054 runtime(doc): clarify behaviour of set maxcombine=0
related: #17400

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-30 17:43:42 +02:00
a54baccdd5 runtime(doc): update todo list
It is now possible to use omni-completion by adding the "o" flag to
'complete'

fixes: #17393

Co-authored-by: Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-30 17:38:30 +02:00
a4a3f712e2 runtime(doc): clarify tabstop settings and guidance
closes: #17381

Signed-off-by: Damien Lejay <damien@lejay.be>
Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-05-30 17:36:37 +02:00
570e71a277 runtime(vim): Update base-syntax, improve :set highlighting
- Match comments and trailing bar after :set without args.
- Match the <...> form for key code options.
- Remove orphaned vim_ex_python[3x]* dump files (Aliaksei Budavei).

closes: #17397

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-30 16:17:30 +02:00
d65cdadb7b runtime(doc): Fix typos and language in documentation for tabpanel.
closes: #17407

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-30 16:05:58 +02:00
5199567fd0 patch 9.1.1418: configures GUI auto detection favors GTK2
Problem:  configures GUI auto detection favors GTK2
Solution: make configure favor GTK3 over GTK2 for the GUI
          when auto detecting the gui toolkit (Drew Vogel).

Prior to these changes if the dev packages for both GTK2 and GTK3 were
installed, the `--enable-gui=auto` would used GTK2. After these changes
it will use GTK3. Users can still use `--enable-gui=gtk2` to
specifically select GTK2.

In addition to the prioritization change, this also brings some cleanups
to the GTK autoconf code:

* The `AM_PATH_GTK` macro had an unused third argument that has been
  removed.
* The `AM_PATH_GTK` macro checked the `SKIP_GTK2` & `SKIP_GTK3`
  variables but the code that decided whether to call it also checked
  those. Now just the calling code does so.
* The `AM_PATH_GTK` macro set a default minimum version based on
  `SKIP_GTK2` and `SKIP_GTK3` but the calling code was also expected to
  pass a version. Now the calling code _must_ pass a version.
* The GTK test program previous used `gtk_(major|minor|micro)_version`
  as all of: a C variable name, a C macro provided only by GTK2, and an
  autoconf variable name. It also needlessly parsed a `x.y.z` version
  string when the same string was already parsed by autoconf + sed. Now
  the parsed values are used directly in the test program.
* The GTK test program previous created a test program `conf.gtktest`
  which was cleaned up by the autoconf script. This appeared to be a
  crude way to debug whether an erroring configure run had actually run
  the test program. Instead the autoconf script now outputs more messaging
  and the user can check `config.log` to determine the status of the
  configure script.

I'm not an autoconf expert and I don't have access to some of the older
systems we try to support with gvim. So I would very much appreciate if
anyone could run this on their systems to ensure it doesn't misbehave.

While my motivation here is mainly to further establish GTK3 as the
primary GUI mode, this should at least partially address the concern
described in #15437.

Here are a few test runs with both GTK 2 and GTK 3 installed:

```
    --with-features=huge \
    --enable-gui \
    --enable-gtk3-check=no \
    --enable-gtktest \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... yes
checking whether or not to look for GNOME... no
checking whether or not to look for GTK+ 3... no
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-2.0... found
checking for GTK - version >= 2.2.0... yes; found version 2.24.33
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
    --enable-gui \
    --enable-gtk2-check=no \
    --enable-gtktest \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... no
checking whether or not to look for GTK+ 3... yes
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... yes
checking whether or not to look for GNOME... no
checking whether or not to look for GTK+ 3... yes
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
    --disable-gtktest \
```

```
checking --enable-gui argument... yes/auto - automatic GUI support
checking whether or not to look for GTK+ 2... yes
checking whether or not to look for GNOME... no
checking whether or not to look for GTK+ 3... yes
checking whether or not to look for Motif... yes
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test disabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
```

```
    --with-features=huge \
    --enable-gui=gtk2 \
```

```
checking --enable-gui argument... GTK+ 2.x GUI support
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-2.0... found
checking for GTK - version >= 2.2.0... yes; found version 2.24.33
checking ability to compile GTK test program... yes
```

```
    --with-features=huge \
    --enable-gui=gtk3 \
```

```
checking --enable-gui argument... GTK+ 3.x GUI support
checking for pkg-config... /usr/bin/pkg-config
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... found
checking for GTK - version >= 3.0.0... yes; found version 3.24.49
checking ability to compile GTK test program... yes
```

And here is a similar run with the GTK 3 dev package removed:

```
    --with-features=huge \
    --enable-gui=gtk3 \
    --enable-fail-if-missing \
```

```
checking --disable-gtktest argument... gtk test enabled
checking for pkg-config gtk+-3.0... no; consider installing your distro
GTK -dev package
configure: error: pkg-config could not find gtk+-3.0
```

closes: #17369

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-28 21:17:15 +02:00
49864aecd0 patch 9.1.1417: missing info about register completion in complete_info()
Problem:  missing info about register completion in complete_info()
          (after v9.1.1408)
Solution: update documentation and mention that register is used as
          source, add a test (glepnir)

closes: #17389

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-28 20:42:42 +02:00
19ef6b0b4b patch 9.1.1416: completion limits not respected for fuzzy completions
Problem:  completion limits not respected when using fuzzy completion
          (Maxim Kim)
Solution: trim completion array (Girish Palya)

fixes: #17379
closes: #17386

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-28 20:33:12 +02:00
0bc8709a63 runtime(doc): Correct allowed flags after :substitute repeat
closes: #17391

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-28 20:23:29 +02:00
ac83b3c373 patch 9.1.1415: potential use-after free when there is an error in 'tabpanel'
Problem:  potential use-after free when there is an error in 'tabpanel'
          option (@char101, after v9.1.1391)
Solution: check if p_tpl has been set to null before accessing it again.

While at it slightly change starts_with_percent_and_bang() and use the
existing opt_name and opt_scope variables.

fixes: #17364
closes: #17388

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-27 20:49:34 +02:00
f0c7090a38 runtime(doc): trailing whitespace in options.txt, delete it.
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 21:18:19 +02:00
e99987d3c0 translation(hy): renamed am.po -> hy.po for armenian lang translations
According to ISO-639, the correct 2 letter language code is HY not AM,
so let's rename am.po.

Also, add hy.po to the CHECKFILES Make target and convert the file to
Unix lineformat.

closes: #17380

Signed-off-by: Gagik Hakobyan <hakgagik@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 21:11:51 +02:00
a6172f8c5c runtime(doc): Correct allowed characters at :help 'filetype'
closes: #17366

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 20:32:35 +02:00
2c7ccaab87 patch 9.1.1414: MS-Windows: compile warnings in os_win32.c
Problem:  MS-Windows: compile warnings in os_win32.c
Solution: update function declarations, correctly access param arg in
          set_flag() using (sig_atomic_t) cast (John Marriott)

closes: #17368

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 20:25:38 +02:00
318ff9c362 patch 9.1.1413: spurious CursorHold triggered in GUI on startup
Problem:  spurious CursorHold triggered in GUI on startup
Solution: init global did_cursorhold flag to true
          (Gary Johnson)

When Vim is started in GUI mode, the CursorHold autocommand event is
triggered 'updatetime' milliseconds later, even when the user has not
pressed a key.  This is different from the behavior of Vim in terminal
mode, which does not trigger a CursorHold autocommand event at startup,
and contradicts the description of the CursorHold event in ":help
CursorHold", which states that the event is "[n]ot triggered until the
user has pressed a key".

The fix is to change the initial value of did_cursorhold from FALSE to
TRUE.  While it is true that the CursorDone event has not been done yet
at startup, it should appear to have been done until the user presses
a key.

fixes #17350
closes: #17382

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 20:10:25 +02:00
a004e5108c patch 9.1.1412: tests: Test_tabpanel_tabonly() fails on larger screens
Problem:  tests: Test_tabpanel_tabonly() fails on larger screens
Solution: re-generate screendump file for 78 column large terminal

closes: #17376

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 19:54:07 +02:00
a88c5bdcce patch 9.1.1411: crash when calling non-existing function for tabpanel
Problem:  crash when calling non-existing function for tabpanel (Yamagi,
          after v9.1.1391)
Solution: check if there was an error and if there was, set tabpanel
          option to empty to prevent showing errors on every redraw

fixes: #17364
closes: #17375
closes: #17371

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 19:51:03 +02:00
7c621052c3 patch 9.1.1410: out-of-bounds access with 'completefunc'
Problem:  out-of-bounds access with 'completefunc' (csetc)
Solution: check if it is safe to advance cpt_sources_index
          (Girish Palya)

fixes: #17363
closes: #17374

Co-authored-by: @csetc
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 19:41:59 +02:00
14f6da5ba8 patch 9.1.1409: using f-flag in 'complete' conflicts with Neovim
Problem:  using f-flag in 'complete' conflicts with Neovims filename
          completion (glepnir, after v9.1.1301).
Solution: use upper-case "F" flag for completion functions
          (Girish Palya).

fixes: #17347
closes: #17378

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 19:04:25 +02:00
0546068aae patch 9.1.1408: not easily possible to complete from register content
Problem:  not easily possible to complete from register content
Solution: add register-completion submode using i_CTRL-X_CTRL-R
          (glepnir)

closes: #17354

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-26 18:25:57 +02:00
69c3493adc runtime(doc): clarify license conditions for distributed runtime files
related: #17372

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-25 17:07:51 +02:00
c8b7e6129a runtime: Add license information for HCL and Terraform runtime files
fixes: #17372
closes: #17377

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-25 17:01:45 +02:00
5717ee33db patch 9.1.1407: Can't use getpos('v') in OptionSet when using setbufvar()
Problem:  Can't use getpos('v') in OptionSet when using setbufvar().
Solution: Don't reset Visual selection when switching to the same
          buffer (zeertzjq).

closes: #17373

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-25 16:59:50 +02:00
9772025d24 patch 9.1.1406: crash when importing invalid tuple
Problem:  crash when importing invalid tuple
          (Yang LUO, Yanju Chen)
Solution: set type to VAR_UNKNOWN, so that it isn't freed
          (Yegappan Lakshmanan)

closes: #17362

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-23 17:39:44 +02:00
9ff1e598e8 patch 9.1.1405: tests: no test for mapping with special keys in session file
Problem:  tests: no test for mapping with special keys in session file.
Solution: Add a special keys to an existing test.  Also test with UTF-8
          characters containing 0x80 or 0x9b bytes (zeertzjq).

closes: #17360

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-23 17:16:17 +02:00
e8302da74a patch 9.1.1404: wrong link to Chapter 2 in new-tutor
Problem:  wrong link to Chapter 2 in vim-01-beginner.tutor
Solution: Fix the link to Chapter 2, add test for links in tutor files
          (Phạm Bình An)

In order to write the test, I expose the function `s:GlobTutorials` as
`tutor#GlobTutorials` and make it also accept a `locale` argument.

closes: #17356

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-22 22:53:28 +02:00
f4b2fce71c runtime(vim): Update base-syntax, fix missing luaParenError error
We shouldn't assume that the luaParenError syntax group is present in
the, possibly custom, included file or that it hasn't already been
removed.  However, issue #11277 has been fixed so it no longer needs to
be cleared.

Fixes comment https://github.com/vim/vim/pull/15375#issuecomment-2899791944

related: #15375
closes: #17357

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-22 22:48:58 +02:00
598bbb1941 patch 9.1.1403: expansion of 'tabpanelopt' value adds wrong values
Problem:  expansion of 'tabpanelopt' value adds wrong values
          (Shane-XB-Qian, after v9.1.1391)
Solution: update tabpanelopt expansion function and expand only valid
          values (Hirohito Higashi)

related: #17263
closes: #17359

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-22 22:41:05 +02:00
5b07aff2f6 patch 9.1.1402: multi-byte mappings not properly stored in session file
Problem:  multi-byte mappings not properly stored in session file
Solution: unescape the mapping before writing out the mapping, prefer
          single-byte mapping name if possible (Miguel Barro)

closes: #17355

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-22 22:34:31 +02:00
1a8be6b447 runtime(syntax-tests): rename kornshell syntax tests and regenerate 00 dumps
related: #17348

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-22 21:55:58 +02:00
b0691b46bd runtime(sh): Fix various syntax highlighting problems in ksh93 scripts
- Fixed syntax highlighting for ksh93 namespace variables starting
  with '${.'
- Added support for the alarm, eloop, fds, mkservice, pids, poll and
  sha2sum builtins (which are indeed ksh93 builtins, albeit whether or
  not they are available depends on the ksh release and the compiled
  SHOPT options).
- Added support for the many Unix commands provided by ksh93's libcmd
  as builtin commands (since these are general commands, scripts for
  other shells like bash will also highlight these).
  - The dumps for the sh_0{2,5,6,8,9}.sh were recreated due to this
    change affecting commands those scripts call (e.g. 'wc').
- Enabled ${parameter/pattern/string} and friends for ksh syntax.
- Enabled case modification for ksh. See also:
  https://github.com/ksh93/ksh/commit/c1762e03
- Enabled ;;& support for ksh. See also:
  https://github.com/ksh93/ksh/commit/fc89d20a
- Added many special ksh variables using 93u+m's data/variables.c
  as a reference.

If vim can't figure out which ksh release is in play using e.g.
the hashbang path, in such a case a generic default that enables
everything and the kitchen sink will be used. Otherwise, features will
be disabled if it's absolutely known a certain feature will not be
present. Examples:
   - ERRNO is ksh88 specific, so that is locked to ksh88.
   - Only 93u+m (assumed for generic) has SRANDOM, and only 93u+m
     and 93v- have case modification support.
   - 93u+ and 93v- have VPATH and CSWIDTH variables (the latter
     is vestigal, but still present in the hardcoded variable table).
   - 93v- and ksh2020 have (buggy and near unusable) implementations
     of compgen and complete.
   - Only mksh provides function substitutions, i.e. ${|command;}.

This took the better part of my day to implement. It seems to work well
enough though. (Also had to regenerate the dumps again while testing
it, as now there are dup scripts with mere hashbang differences, used
solely for testing syntax highlighting differences.)

closes: #17348

Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-21 21:21:14 +02:00
56b1207e66 patch 9.1.1401: list not materialized in prop_list()
Problem:  list not materialized in prop_list()
          (Nickwiz)
Solution: materialize list before accessing it

fixes: #17298
closes: #17349

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-21 21:01:40 +02:00
1307743697 patch 9.1.1400: [security]: use-after-free when evaluating tuple fails
Problem:  [security]: use-after-free when evaluating tuple fails
Solution: return early in case of an error (Yegappan Lakshmanan)

closes: #17351

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-21 20:54:27 +02:00
681f1c914f patch 9.1.1399: tests: test_codestyle fails for auto-generated files
Problem:  tests: test_codestyle fails for auto-generated files.
          While those files are already ignored in Test_source_Files(),
          the newly added Test_indent_of_source_files() does not filter
          those out and causes test failures on appveyor.
Solution: factor out the generation of all c files into a common function
          and filter out auto-generated files if_ole.h, iid_ole.c and
          dlldata.c

closes: #17352

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-21 20:50:11 +02:00
719ec0fe15 runtime(tar): preserve pwd when reading and writing tar files
While at it, use `:lcd` to temporarily set the window local directory
instead of `:cd` for the global working directory.

fixes: #17334
closes: #17339

Signed-off-by: Michele Sorcinelli <michelesr@autistici.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-19 19:48:04 +02:00
5a8f9958e2 runtime(doc): remove outdated Contribution section in pi_tutor
Problem:  The Github repo link in the Contribution section has been
          archived for 5 years. So people who want to contribute to the
          tutor plugin should just send PR to Vim repo, similar to most
          other Vim features, so there is no need for a Contribution
          section in the plugin doc.

Solution: Replace it with an Original Author note at the beginning of
          the help document.

closes: #17341

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-19 19:34:44 +02:00
5ad53ca99f runtime(muttrc): fix mangled keywords in syntax script
Regression introduced in commit 10f23e10a9 ("Update syntax/muttrc.vim to
latest mutt (#12797)", 2023-08-15)

Affected keywords:
  invresume_draft_files
  invresume_edited_draft_files
  mailcap_path
  mark_macro_prefix

closes: #17344

Signed-off-by: Markus Heidelberg <markus.heidelberg@web.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-19 19:31:23 +02:00
7b5550fac7 runtime(vim): Update base-syntax, improve :import highlighting
- Match "autoload" as a keyword in :import commands.
- Match an expression argument for the filename.

closes: #15375

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-18 20:37:34 +02:00
0816f17e9a patch 9.1.1398: completion: trunc does not follow Pmenu highlighting attributes
Problem:  When items are combined with user-defined highlight attributes
          (e.g., strikethrough), trunc inherits these attributes, making
          the text difficult to read.
Solution: trunc now uses the original Pmenu and PmenuSel highlight
          attributes (glepnir)

closes: #17340

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-18 20:14:53 +02:00
a577e4289c runtime(vim): Update base-syntax, improve script-interface command highlighting
- Normalise interface heredoc highlighting with that used for
  :let-heredocs.
- Remove interface feature testing.  The Lua and Python interface
  command scripts are now highlighted by default.  Loading all syntax
  files incurs an undesirable load-time burden so highlighting of the
  less popular MzScheme, Perl, Ruby and Tcl interfaces is disabled by
  default.  g:vimsyn_embed can still be used to customise the supported
  interfaces.
- Always highlight interface ex-commands as valid commands, even when
  the corresponding command-script highlighting is disabled.
- Highlight simple command-script statements as well as heredocs.
- Remove error highlighting of heredoc and statement command-script
  regions when an interface is disabled.  These are now highlighted as
  plain text.
- Allow indented heredoc end tokens when "trim" is specified.
- Match interface heredocs in :def functions.
- Fix runaway vimEmbedError regions.  These regions have been removed.
- Use python2 syntax for :python, and :pythonx when 'pyxversion' is
  appropriately set.

closes: #15522

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-17 16:29:13 +02:00
2a1e253e26 patch 9.1.1397: tabpanel not correctly updated on :tabonly
Problem:  tabpanel not correctly updated on :tabonly
          (Maxim Kim)
Solution: force a redraw, take 'equalalways' into account
          (Naruhiko Nishino)

related: https://github.com/vim/vim/pull/17330#issuecomment-2888146370
closes: #17337

Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-17 16:19:24 +02:00
7b9eb6389d patch 9.1.1396: 'errorformat' is a global option
Problem:  The 'grepformat' option is global option, but it would be
          useful to have it buffer-local, similar to 'errorformat' and
          other quickfix related options (Dani Dickstein)
Solution: Add the necessary code to support global-local 'grepformat',
          allowing different buffers to parse different grep output
          formats (glepnir)

fixes: #17316
closes: #17315

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-16 19:49:23 +02:00
670d0c1468 patch 9.1.1395: search_stat not reset when pattern differs in case
Problem:  search_stat not reset when pattern differs in case
          (tahzibijafar)
Solution: use STRNCMP instead of MB_STRNICMP macro

There was a long standing todo comment, that using MB_STRNICMP is wrong.
So let's change it to STRNCMP() instead. Even if it not handle
multi-byte characters correctly, then Vim will rather recompute the
search stat, instead of re-using the old (and possibly wrong) value.

fixes: #17312
closes: #17314

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-16 19:38:50 +02:00
c659e4a516 patch 9.1.1394: tabpanel not correctly redrawn on tabonly
Problem:  tabpanel not correctly redrawn on tabonly
          (Maxim Kim, after v9.1.1391)
Solution: force redraw of the tabpanel, tweak style
          (Hirohito Higashi)

fixes: #17322
closes: #17330

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-16 19:36:56 +02:00
ba19b65899 runtime(doc): fix typo in description of :redrawtabpanel
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-15 20:16:04 +02:00
Kat
6451e5f517 runtime(gleam): add @Spell clusters to syntax script
closes: #17324

Signed-off-by: Kat <65649991+00-kat@users.noreply.github.com>
Signed-off-by: Kirill Morozov <kirill@robotix.pro>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-15 20:10:48 +02:00
1aa68dffbf runtime(pandoc): update YAML metadata block parsing in compiler runtime
Previously the incorrect regexp forced title to be a single letter
because of using '+' instead of the '\+' regexp modifier.

closes: #17321

Signed-off-by: Alexander Abrosimov <alexander.n.abrosimov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-15 20:06:29 +02:00
31be82e66d patch 9.1.1393: missing test for switching buffers and reusing curbuf
Problem:  The check in buf_freeall that restores curwin subtly prevents
          leaving an unloaded buffer in a window when reusing curbuf, if
          autocommands switch to a different buffer.
Solution: Add a test case that covers this. Also ensure splitting isn't
          possible, as that could do the same (Sean Dewar)

closes: #17325

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-15 19:59:37 +02:00
c49cb93a86 patch 9.1.1392: missing patch number
Problem:  missing patch number
          (Tony Mechelynck)
Solution: add missing patche number

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 23:32:13 +02:00
be5bd4d629 patch 9.1.1391: Vim does not have a vertical tabpanel
Problem:  Vim does not have a tabpanel
Solution: include the tabpanel feature
          (Naruhiko Nishino, thinca)

closes: #17263

Co-authored-by: thinca <thinca@gmail.com>
Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 21:20:28 +02:00
7200eae212 git: git: ignore more style changes from v9.1.1390
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 21:03:39 +02:00
e89aef3f65 patch 9.1.1390: style: more wrong indentation
Problem:  style: more wrong indentation
Solution: reformat a few more places
          (Yegappan Lakshmanan)

closes: #17309

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 20:31:55 +02:00
08db2f4f28 patch 9.1.1389: completion: still some issue when 'isexpand' contains a space
Problem:  Cannot get completion startcol when space is not the first
          trigger character (after v9.1.1383)
Solution: Detect the next comma followed by a space in the option string
          and use in next compare loop (glepnir)

closes: #17311

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 20:26:19 +02:00
c6c72d165c patch 9.1.1388: Scrolling one line too far with 'nosmoothscroll' page scrolling
Problem:  One-off error in "count" to make "w_skipcol" zero with
          'nosmoothscroll' page scrolling when last virtual line
          in a buffer line is exactly the entire window width.
          (Hirohito Higashi)
Solution: Properly compute the smallest integer value necessary
          to make "w_skipcol" zero (Luuk van Baal)

fixes: #17317
closes: #17318

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 20:21:55 +02:00
0077282c82 patch 9.1.1387: memory leak when buflist_new() fails to reuse curbuf
Problem:  buflist_new() leaks ffname and fails to reuse curbuf when
          autocommands from buf_freeall change curbuf. Plus, a new
          buffer is not allocated in this case, despite what the comment
          above claims.
Solution: Remove the condition so ffname is not leaked and so a new
          buffer is allocated like before v8.2.4791. It should not be
          possible for undo_ftplugin or buf_freeall autocommands to
          delete the buffer as they set b_locked, but to stay consistent
          with other uses of buf_freeall, guard against that anyway
          (Sean Dewar).

Note that buf is set to NULL if it was deleted to guard against the (rare)
possibility of messing up the "buf != curbuf" condition below if a new buffer
happens to be allocated at the same address.

closes: #17319

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 20:16:52 +02:00
c952fd1b24 patch 9.1.1386: MS-Windows: some minor problems building on AARCH64
Problem:  MS-Windows: some minor problems building on AARCH64
Solution: Update Make_cyg_ming with aarch64 specific changes,
          document how to build on aarch64 using msys2 packages

closes: #17048

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-14 20:14:30 +02:00
acf0ebe8a8 patch 9.1.1385: inefficient loop for 'nosmoothscroll' scrolling
Problem:  Loop that ensures "w_skipcol" is zero with 'nosmoothscroll'
	  for (half)-page scrolling is inefficient.
Solution: Calculate the required "count" instead of looping until
	  "w_skipcol" is zero (Luuk van Baal).

fixes: #17301
closes: #17306

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-12 20:47:00 +02:00
13bea589a2 patch 9.1.1384: still some problem with the new tutors filetype plugin
Problem:  still some problem with the new tutors filetype plugin
Solution: refactor code to enable/disable tutor mode into
          tutor#EnableInteractive() function, include a test
          (Phạm Bình An)

I find it annoying that Tutor's interactive mode is always on (or debug
mode is off) even when I open a tutor file with :edit command.
I think it makes more sense to make this "interactive mode":

- Always on when it is opened with :Tutor command
- Off otherwise

For more references, see `:help` feature, it is a much better than
:Tutor, since I don't have to run `:let g:help_debug = 1` just to be able
to edit and save a help file

Therefore, I remove `g:tutor_debug`

closes: #17299

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-12 20:39:24 +02:00
8d0e42b710 patch 9.1.1383: completion: 'isexpand' option does not handle space char correct
Problem:  When a space character is used as a trigger in 'isexpand' option
          it doesn't get recognized because skip_to_option_part() skips
          spaces after a comma, treating them as option separators
          rather than option value (after v9.1.1341)
Solution: manually set the part to a space character (glepnir).

closes: #17305

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-12 20:28:28 +02:00
e62244f22d runtime(getscript): CI: failure on powershell
Problem:  The CheckVimScriptURL() function does not work properly on
          pwershell. Most likely this is because curl is aliased to
          Invoke-WebRequest on Powershell and redirection seems to work
          slightly different
Solution: Disable CheckVimScriptURL() on Powershell and then simplify
          the curl download logic

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-11 18:30:24 +02:00
411730e277 patch 9.1.1382: if_ruby: unused compiler warnings from ruby internals
Problem:  if_ruby: unused compiler warnings from ruby internals
Solution: disable -Wunused-parameter for if_ruby internal code
          (Philip H.)

closes: #17297

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-11 15:01:31 +02:00
74e8f28b5c runtime(getscript): check for network errors
related: #17249

Co-authored-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-11 14:57:26 +02:00
5a18ccf490 patch 9.1.1381: completion: cannot return to original text
Problem:  Cannot return to the original text after selecting the next
          item when the currently selected item is the last one.
Solution: When continuing to move down past the last item, locate the
          original completion at the head/tail nodes of the completed
          linked list (glepnir).

closes: #17300

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-11 13:48:33 +02:00
d4110e0695 patch 9.1.1380: 'eventignorewin' only checked for current buffer
Problem:  When an autocommand executes for a non-current buffer,
          'eventignorewin' is only checked from the buffer's last
          wininfo (overwrites win_ignore in the loop), not from the
          value of 'eventignorewin' in all windows showing the buffer as
          described (after v9.1.1084)

Solution: Fix the check and don't use wininfo, as that may only contain
          windows that recently showed the buffer. Consider all the
          buffer's windows in all tabpages (Sean Dewar).

closes: #17294

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-11 13:45:21 +02:00
7344024536 runtime(java): Search type and method declarations with "&inc" and "&def"
=============== LIMITATIONS AND OBSERVATIONS ===============

* Remember that external-type names can only be found when
  they match filenames resolvable in "&path" with "import"
  declarations; load the source file of an external type to
  look up its nested types and sibling top types, if any.

* Strive to narrow the search by assigning only relevant
  pathnames for directories *or* an archive to "&path", e.g.
  ":set path-=/usr/include".

* Use "{Visual}gf" on fully-qualified names.

* Accept the fact that "&define" cannot contain end-of-line
  characters (":help definition-search").  A declaration
  whose matchable header is not contained within a line can
  be found iff all of its non-optional components belong to
  the same line; for types, such components are a keyword,
  e.g. "class", followed by a run of blank characters and
  an identifier, e.g. "Test"; for methods: a return type,
  e.g. "String", or a keyword "void", followed by a run of
  blank characters and an identifier, e.g. "toString", that
  is followed by "(".

* The members of the "java.lang" package are usually not
  associated with "import" declarations; to look up their
  declarations, load a source file for a member of that
  package, and then use, on a simple name of interest for
  a member, either "[-Ctrl-d" etc. for local declarations
  or "gf" for external declarations, assuming that "." *or*
  the appropriate pathname for a JDK archive is assigned to
  "&path".

* Follow the above instruction made for the "java.lang"
  members for any type whose simple name is not associated
  with an "import" declaration, i.e. a member type of the
  same package that is declared in another compilation unit.

* Append the "$" character to "&iskeyword" when looking up
  declarations of generated code.

See zzzyxwvut/java-vim#4.

closes: #17281

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 21:44:07 +02:00
dc7ed8f946 runtime(html): Optionally fold tags with the "expr" method
Tag folding poses a few difficulties.  Many elements, e.g.
"blockquote", are always delimited by start and end tags;
end tags for some elements, e.g. "p", can be omitted in
certain contexts; void elements, e.g. "hr", have no end tag.
Although the rules for supporting omissible end tags are
ad-hoc and involved, they apply to elements in scope.
Assuming syntactical wellformedness, an end tag can be
associated with its nearest matching start tag discoverable
in scope and towards the beginning of a file, whereas all
unbalanced tags and inlined tags can be disregarded.

For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <p>Paragraph #1.		<!--  = : 2 -->
    <p>				<!-- >3 : 3 -->
      Paragraph #2.		<!--  = : 3 -->
    </p>			<!-- <3 : 3 -->
    <p>Paragraph #3.</p>	<!--  = : 2 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

(HTML comments here, "<!-- ... -->", record two values for
each folded line that are separated by ":", a value obtained
from "&foldexpr" and a value obtained from "foldlevel()".)

Innermost foldedable tags will be flattened.  For example:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre><code>		<!-- >4 : 4 -->
[CODE SNIPPET]			<!--  = : 4 -->
      </code></pre>		<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

No folding will be requested for the "<code>"-"</code>" tag
pair and reflected by "&foldexpr" because such a fold would
have claimed the same lines that the immediate fold of the
"<pre>"-"</pre>" tag already claims.

Run-on folded tags may confuse Vim.  When a file such as:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET #1]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
				<!--  = : 3 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET #2]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div>			<!-- <3 : 3 -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

is reformatted as follows:
------------------------------------------------------------
<!DOCTYPE html>
<html lang="en">		<!-- >1 : 1 -->
  <body>			<!-- >2 : 2 -->
    <div class="block">		<!-- >3 : 3 -->
      <pre>			<!-- >4 : 4 -->
	<code>			<!-- >5 : 5 -->
[CODE SNIPPET #1]		<!--  = : 5 -->
	</code>			<!-- <5 : 5 -->
      </pre>			<!-- <4 : 4 -->
    </div><div class="block"><pre><code> <!-- <3 : 3 -->
[CODE SNIPPET #2]		<!--  = : 2 ? -->
	</code>			<!-- <5 : 2 ? -->
      </pre>			<!-- <4 : 2 ? -->
    </div>			<!-- <3 : 2 ? -->
  </body>			<!-- <2 : 2 -->
</html>				<!-- <1 : 1 -->
------------------------------------------------------------

"&foldexpr" values will not be used as is for the lines
between (and including) "[CODE SNIPPET #2]" and "</div>".
(Cf. v9.1.0002.)

Having syntax highlighting in effect, tag folding using the
"fold-expr" method can be enabled with:
------------------------------------------------------------
	let g:html_expr_folding = 1
------------------------------------------------------------

By default, tag folding will be redone from scratch after
each occurrence of a TextChanged or an InsertLeave event.
Such frequency may not be desired, especially for large
files, and this recomputation can be disabled with:
------------------------------------------------------------
	let g:html_expr_folding_without_recomputation = 1
        doautocmd FileType
------------------------------------------------------------

To force another recomputation, do:
------------------------------------------------------------
	unlet! b:foldsmap
	normal zx
------------------------------------------------------------

References:
https://web.archive.org/web/20250328105626/https://html.spec.whatwg.org/multipage/syntax.html#optional-tags
https://en.wikipedia.org/wiki/Dangling_else

closes: #17141

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 21:40:41 +02:00
3704b5b58a runtime(tutor): improve tutor.vim plugin and filetype plugin
- Set g:tutor_debug on startup if it doesn't exist so that users can get
  cmdline completion when interactively setting it.
- set b:undo_ftplugin in filetype plugin
- set default runtime file headers

closes: #17274

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 21:20:57 +02:00
839b79eeb3 runtime(sh): Update syntax, improve wildcard character class matching
- Default to POSIX supported classes.
- Add a KornShell specific class list.
- Remove "or" from the Bash class list, presumably a typo.

closes: #17293

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2025-05-10 20:57:10 +02:00
cf488ebf6c patch 9.1.1379: MS-Windows: error when running evim when space in path
Problem:  MS-Windows: error when running evim when space in path of Vim
Solution: properly parse quoted strings (Miguel Barro)

When vim is installed in a path with whitespaces (like
`C:\Program Files (x86)\Vim\vim91\vim.exe`). Launching `evim` or
`vim -d` will try to open the file ` (x86)\Vim\vim91\vim.exe`.

Modern versions of vim simplify shell operation by parsing its own
command line. For example on Linux all vim flavours like `evim`, `rvim`,
etc are symlinks to vim. Then vim uses the `parse_command_name()`
function to identify which version of vim it should launch.
For `evim` if a GUI is available `gvim` is launched for better user
experience. In order to launch `gvim` the original command line is
parsed to be passed *verbatim* to the new instance.
This parsing did not properly handle quoted command lines with
whitespaces such as
```
"C:\Program Files (x86)\Vim\vim91\vim.exe" -y myfile.txt
```

closes: #17295

Signed-off-by: Miguel Barro <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 20:44:33 +02:00
1b186833c1 patch 9.1.1378: sign without text overwrites number option
Problem:  When 'signcolumn' is set to `number` but a line has a sign
          without text, the line number disappears (finite-state-machine)
Solution: Verify that a sign actually contains text before rendering the
          line number (glepnir)

fixes: #17169
closes: #17282

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 14:59:08 +02:00
0553f2ff0d runtime(doc): clarify single/multibyte support for 'fillchars'
closes: #17287

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 14:56:17 +02:00
d8ebccbb10 patch 9.1.1377: patch v9.1.1370 causes some GTK warning messages
Problem:  Some GTK3 users experienced unexpectedly small windows at
          startup (after v9.1.1368, @berggeist, Tony Mechelynck)
Solution: Update window manager hints in gui_mch_open, partly revert
          v9.1.1370 (Drew Vogel)

fixes: #17279
closes: #17288

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 14:46:28 +02:00
6b7637e6bb runtime(lf): use syn iskeyword in syntax script
Sets 'syn iskeyword' in syntax/lf.vim to fix the missing lf keyword
highlighting in lines like 'map e :open; open' (first 'open' not
highlighted).

applies PR andis-sprinkis/lf-vim#21 by @joelim-work
closes: andis-sprinkis/lf-vim#14

Co-authored-by: Joe Lim <50560759+joelim-work@users.noreply.github.com>
Signed-off-by: Andis Spriņķis <andis@sprinkis.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 14:42:25 +02:00
270124f46a patch 9.1.1376: quickfix dummy buffer may remain as dummy buffer
Problem:  when failing to wipeout a quickfix dummy buffer, it will
          remain as a dummy buffer, despite being kept.
Solution: clear its dummy BF_DUMMY flag in this case (Sean Dewar).

closes: #17283

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 14:33:28 +02:00
b4074ead5c patch 9.1.1375: [security]: possible heap UAF with quickfix dummy buffer
Problem:  heap use-after-free possible when autocommands switch away from the
          quickfix dummy buffer, but leave it open in a window.
Solution: close its windows first before attempting the wipe.
          (Sean Dewar)

related: #17283

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 14:30:36 +02:00
9955c125fa CI: use deb822 style for llvm source
closes: #17285

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-10 14:25:37 +02:00
9973b39a17 runtime(doc): remove duplicate sentence in builtin.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-09 08:19:51 +02:00
314150912e typo in comment in gui.c
Problem:  typo in comment in gui.c (after v9.1.1367)
Solution: fix the typo  (Christ van Willegen)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-09 00:08:01 +02:00
17ad852a62 runtime(doc): update return types for builtin functions
fixes: #17273

credit: Github user @msoyka2024
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-09 00:05:36 +02:00
dc314053e1 patch 9.1.1374: completion: 'smartcase' not respected when filtering matches
Problem:  Currently, 'smartcase' is respected when completing keywords
          using <C-N>, <C-P>, <C-X><C-N>, and <C-X><C-P>. However, when
          a user continues typing and the completion menu is filtered
          using cached matches, 'smartcase' is not applied. This leads
          to poor-quality or irrelevant completion suggestions, as shown
          in the example below.
Solution: When filtering cached completion items after typing additional
          characters, apply case-sensitive comparison if 'smartcase' is
          enabled and the typed pattern includes uppercase characters.
          This ensures consistent and expected completion behavior.
          (Girish Palya)

closes: #17271

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-08 23:28:52 +02:00
c3fbaa086e patch 9.1.1373: 'completeopt' checking logic can be simplified
Problem:  Flag checking logic uses a temporary variable and multiple
          bitwise operations in insexpand.c
Solution: Consolidate into a single equality check using bitwise OR and
          comparison (glepnir)

closes: #17276

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-08 23:05:10 +02:00
1eb8d08738 git: ignore more style changes from v9.1.1371 and v9.1.1372
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-08 23:01:41 +02:00
a4a00a7ad0 patch 9.1.1372: style: braces issues in various files
Problem:  style: braces issues in various files
Solution: fix style (Hirohito Higashi)

closes: #17277

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-08 22:58:31 +02:00
19e1dd6b6a patch 9.1.1371: style: indentation and brace issues in insexpand.c
Problem:  style: indentation issue in insexpand.c
Solution: update style (glepnir)

closes: #17278

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-08 22:50:38 +02:00
ea67ba718d patch 9.1.1370: CI Tests favor GTK2 over GTK3
Problem:  CI Tests favor GTK2 over GTK3
Solution: Install GTK3 dependencies and debug packages for CI workflows,
          update ASAN suppression list, update required dependency
          checks for the tests (Drew Vogel)

closes: #17253

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-07 22:05:17 +02:00
9670f61d46 patch 9.1.1369: configure still using autoconf 2.71
Problem:  configure still using autoconf 2.71
Solution: regenerate with autoconf 2.72

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-07 21:44:33 +02:00
48b19b29ee patch 9.1.1368: GTK3 and GTK4 will drop numeric cursor support.
Problem:  GTK3 and GTK4 will drop numeric cursor support.
Solution: Adopt GTK3 code and use CSS cursor convention (Drew Vogel).

closes: #14610

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-07 21:36:03 +02:00
d2fcbb465d patch 9.1.1367: too many strlen() calls in gui.c
Problem:  too many strlen() calls in gui.c
Solution: refactor gui.c slightly (John Marriott)

This does the following changes:
- use macro STRCMP() instead of strcmp().
- refactor gui_outstr_nowrap() to remove call to STRLEN().
- refactor get_tabline_label() in attempt to simply it. At the same time
  use standard looping construct for iterating over windows in a tab.
  Move variables closer to where they are used. Add check that we don't
  exceed size of NameBuff.
- small optimisation in get_find_dialog_text() to measure the string
  length once.

closes: #17269

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-07 19:59:42 +02:00
38972d8b1a patch 9.1.1366: v9.1.1364 unintentionally changed sign.c and sound.c
Problem:  v9.1.1364 unintentionally changed sign.c and sound.c
Solution: revert those parts, adjust the test (Hirohito Higashi)

closes: #17264

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-06 18:13:29 +02:00
0fb6ceac4c runtime(lua): update 'path' option in filetype plugin
Problem:  Lua doesn't support importing module in path related to current
          file like JS does (https://www.reddit.com/r/lua/comments/wi0bau/whats_the_correct_way_to_run_a_lua_file_that_uses/)
Solution: Remove `.` from Lua buffer-local option `'path'`

closes: #17267

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-06 18:08:38 +02:00
87947a9a76 runtime(sh): Update syntax, match KornShell compound arrays
closes: #17268

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-06 17:59:25 +02:00
55f9e2bef9 runtime(doc): Tweak documentation style in develop.txt
closes: #17252

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-05 20:19:09 +02:00
ba0062b0c7 runtime(helptoc): the helptoc package can be improved
Adds the following changes:
- New Maintainer: Pete Kenny
- New filetypes supported (asciidoc, html, tex, vim, xhtml)
- improved Markdown support
- Sanitised ToCs and popup presentation
- Configuration improvements and options
- Add helptoc.txt help file

closes: #17255

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-05 20:15:39 +02:00
adfeb4ad95 runtime(spec): add more local macro names according to rpm 4.20
closes: #17258

Signed-off-by: fundawang <fundawang@yeah.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-05 20:12:40 +02:00
fe22867ef5 runtime(sh): Update syntax, fix single-quoted strings in parameter expansions
Ignore single-quoted backslash escape sequences in parameter expansions.

\' is not an escaped single quote in ${foo:-'word\'}.

closes: #17261

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-05 20:10:11 +02:00
13bd43c1e5 runtime(new-tutor): Update Serbian translation of chapter 1
closes: #17262

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-05 20:07:46 +02:00
51f6a78ce2 patch 9.1.1365: MS-Windows: compile warnings and too many strlen() calls
Problem:  MS-Windows: compile warnings and too many strlen() calls  in
          os_mswin.c
Solution: refactor os_mswin.c and fix the warning (John Marriott)

This change does the following:

- Fix compile warnings (clang 20.1.3) in `mch_libcall()`:
```
os_mswin.c:902:21: warning: cast from 'MYSTRPROCSTR' (aka 'char *(*)(char *)') to 'MYSTRPROCINT' (aka 'int (*)(char *)') converts to incompatible function type [-Wcast-function-type-mismatch]`
  902 |                     retval_int = ((MYSTRPROCINT)ProcAdd)((LPSTR)argstring);`
      |                                   ^~~~~~~~~~~~~~~~~~~~~`
os_mswin.c:914:21: warning: cast from 'MYINTPROCSTR' (aka 'char *(*)(int)') to 'MYINTPROCINT' (aka 'int (*)(int)') converts to incompatible function type [-Wcast-function-type-mismatch]`
  914 |                     retval_int = ((MYINTPROCINT)ProcAddI)(argint);`
      |                                   ^~~~~~~~~~~~~~~~~~~~~~`
2 warnings generated.
```

- Refactor `stat_impl()` to remove call to `STRLEN()` (via `STRCAT()`).

- Refactor `Messaging_WndProc()`, `enumWindowsGetServer()` and
  `serverSendToVim()` to remove calls to `STRLEN()`.

- Use `string_T` to store field `name` in `struct charset_pair` and
  `struct quality_pair`. This means we can dispense with some calls to
  `STRLEN()`.

- Use `ARRAY_LENGTH()` macro to determine end of array in
  `charset_id2name()` and `quality_id2name()` to be consistent with the
  rest of the code base.

closes: #17222

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-04 21:35:36 +02:00
8ac3f5dd3a git: ignore indentation changes for git-blame (after v9.1.1364)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-04 21:13:47 +02:00
562610cfa3 patch 9.1.1364: style: more indentation issues
Problem:  style: more indentation issues
Solution: fix indentation style
          (Yegappan Lakshmanan)

closes: #17256

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-04 21:10:06 +02:00
e957cba081 runtime(vim): Update base-syntax, match quote separated numbers
closes: #17250

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-04 21:01:18 +02:00
ba2ed6ac04 git: ignore indentation changes for git-blame (after v9.1.1363)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-04 20:08:45 +02:00
c2a9000bc1 patch 9.1.1363: style: inconsistent indentation in various files
Problem:  style: inconsistent indentation in various files
Solution: fix style, updated codestyle test
          (Naruhiko Nishino)

closes: #17254

Signed-off-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-04 20:05:47 +02:00
41cddfa177 patch 9.1.1362: Vim9: type ignored when adding tuple to instance list var
Problem:  Vim9: type ignored when adding tuple to instance list var
          (Lifepillar)
Solution: When getting the typval of class and object member variables,
          set the variable type (Yegappan Lakshmanan)

fixes: #17236
closes: #17244

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-03 19:11:45 +02:00
951d025af1 runtime(tutor): Add Galician language versions of tutor1 and tutor2
Both latin-1 and utf-8 versions are included.

closes: #17245

Signed-off-by: fernandovilarino <fernando@cvc.uab.es>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-03 19:07:35 +02:00
6cb1c82840 patch 9.1.1361: [security]: possible use-after-free when closing a buffer
Problem:  [security]: Possible to open more windows into a closing
          buffer without splitting, bypassing existing "b_locked_split"
          checks and triggering use-after-free
Solution: Disallow switching to a closing buffer. Editing a closing
          buffer (via ":edit", etc.) was fixed in v9.1.0764, but add an
          error message and check just "b_locked_split", as "b_locked"
          is necessary only when the buffer shouldn't be wiped, and may
          be set for buffers that are in-use but not actually closing.
          (Sean Dewar)

closes: #17246

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-03 18:37:27 +02:00
c3f48e3a76 runtime(abnf): include ABNF filetype plugin
closes: #17239

Signed-off-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-02 15:40:33 +02:00
af4a5d6e2a patch 9.1.1360: filetype: GNU Radio companion files are not recognized
Problem:  filetype: GNU Radio companion files are not recognized
Solution: detect *.grc files as xml or yaml filetype depending on the
          first line (zeertzjq).

Ref:
- https://wiki.gnuradio.org/index.php/XML_GRC
- https://wiki.gnuradio.org/index.php/YAML_GRC

closes: #17241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-02 15:35:58 +02:00
9c9200d1ea patch 9.1.1359: filetype: GNU Radio config files are not recognized
Problem:  filetype: GNU Radio config files are not recognized.
Solution: detect GNU Radio config files as confini filetype.  Only
          allow '#' as start of comment in confini syntax (zeertzjq).

Ref:
- https://wiki.gnuradio.org/index.php/Configuration_Files

closes: #17242

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-02 15:32:23 +02:00
7292c0cb15 patch 9.1.1358: if_lua: compile warnings with gcc15
Problem:  if_lua: compile warnings with gcc15
Solution: update function prototypes (lilydjwg)

see also https://github.com/ruby/ruby/pull/13202.

closes: #17243

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-02 15:17:14 +02:00
1c58019a82 runtime(vim): Update base-syntax, improve enum highlighting
Match enum values and missing class keywords.

fixes: #15970

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-01 17:43:17 +02:00
83cb8174c8 runtime(doc): update example ctags program and links
- :helptags is also a tags generating program, it deserves mentioning
- JTags seems too dead: its website has been sold, the source, binary
  can't be found anywhere.
- update link of ptags

closes: #17233

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-01 17:40:15 +02:00
6af20a9be3 patch 9.1.1357: Vim incorrectly escapes tags with "[" in a help buffer
Problem:  Vim incorrectly escapes tags containing "[" in a help buffer
Solution: check if the buffer has the "help" filetype set, instead of
          already being a help buffer (Phạm Bình An)

fixes: #17224
closes: #17232

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-01 17:30:58 +02:00
f5bfc48c05 patch 9.1.1356: Vim9: crash when unletting variable
Problem:  Vim9: crash when unletting variable
Solution: fix crash, allow to use :unlet
          (Hirohito Higashi)

closes: #17226

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-05-01 08:56:39 +02:00
f57c065e75 runtime(sh): Update syntax, highlight escaped chars in test expressions
Highlight escape characters in unquoted test expression operands.

E.g., [[ foo == \[bar\] ]]

fixes #17221

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-30 20:04:28 +02:00
ff3d4b2d49 runtime(doc): document that :b cannot handle buffer names starting with "+"
closes: #17229

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-30 19:54:52 +02:00
fb08192ca7 runtime(doc): clarify the use of 'tagfunc', update a comment in tags.c
related: #17228

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-30 19:35:09 +02:00
fa8b7db99a runtime(doc): tweak documentation style in options.txt
closes: #17229

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-30 19:12:37 +02:00
c3e71d4da6 patch 9.1.1355: The pum_redraw() function is too complex
Problem:  The pum_redraw function is too complex and difficult to
          maintain with nested loops and mixed responsibilities handling
          both RTL and LTR text rendering.
Solution: Extracted core rendering logic into dedicated helper functions
          (pum_display_rtl_text, pum_display_ltr_text, pum_draw_scrollbar,
          pum_process_item) while preserving the original behavior. This
          improves code readability and maintainability (glepnir).

closes: #17204

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-29 18:27:05 +02:00
a74d5503d5 patch 9.1.1354: tests: Test_terminalwinscroll_topline() fails on Windows
Problem:  tests: Test_terminalwinscroll_topline() fails on Windows
          (after v9.1.1348)
Solution: instead of disabling it in Github Actions runners, disable it
          for all Windows runs

related: #17196

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-29 18:21:31 +02:00
612f63bf81 patch 9.1.1353: missing change from v9.1.1350
Problem:  missing change from v9.1.1350
Solution: update the test Test_CmdlineTrigger() (Girish Palya)

related: #17217

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-28 18:29:52 +02:00
be51e90497 git: ignore reformatting commit for git-blame (after v9.1.1352)
related: #17219

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-28 18:10:29 +02:00
355db99d12 patch 9.1.1352: style: inconsistent indent in insexpand.c
Problem:  style: inconsistent indent in insexpand.c
Solution: fix indentation (Hirohito Higashi)

closes: #17219

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-28 18:07:02 +02:00
9240369774 patch 9.1.1351: Return value of getcmdline() inconsistent in CmdlineLeavePre
Problem:  Return value of getcmdline() inconsistent in CmdlineLeavePre
          when leaving cmdline in different ways (after v9.1.1329).
Solution: Trigger CmdlineLeavePre before calling abandon_cmdline() so
          that getcmdline() can return the command line (zeertzjq).

closes: #17218

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-28 18:04:00 +02:00
6220bbad4e patch 9.1.1350: tests: typo in Test_CmdlineLeavePre_cabbr()
Problem:  tests: typo in Test_CmdlineLeavePre_cabbr()
          (after v9.1.1349)
Solution: fix typo, disable failing test on Windows for now
          (Girish Palya)

closes: #17217

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-28 18:00:40 +02:00
910bfd5d38 runtime(java): Consent to HTML tags folding in Javadoc comments
HTML tags in Javadoc comments can additionally be folded
after applying
------------------------------------------------------------
	let g:html_syntax_folding = 1
	set foldmethod=syntax
------------------------------------------------------------

and giving explicit consent with
------------------------------------------------------------
	let g:java_consent_to_html_syntax_folding = 1
------------------------------------------------------------

Do not default to this kind of folding unless ALL start tags
and optional end tags are balanced in Javadoc comments;
otherwise, put up with creating runaway folds that break
syntax highlighting.

resolves: zzzyxwvut/java-vim#8.
closes: #17216

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-28 17:58:22 +02:00
e3302cf2b1 runtime(syntax-tests): Regenerate changed syntax test pages for vim
See #17213 (v9.1.1348~1).

closes: #17215

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-28 17:55:05 +02:00
46755e6b52 patch 9.1.1349: CmdlineLeavePre may trigger twice
Problem:  CmdlineLeavePre may trigger twice
          (after v9.1.1329)
Solution: check that the key was typed, trigger it when it wasn't before
          (Girish Palya)

There are two problems:
- CmdlineLeavePre may be triggered twice when a cabbr is present.
- CmdlineLeavePre fails to trigger when exiting the command-line via
  <Backspace>.

Check if the Carriage Return (Enter) key was actually typed.
Trigger the event when the command-line is exited using Backspace and
other keys.

closes: #17214

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-27 19:28:06 +02:00
b9ffbf57f8 runtime(vim): Update base-syntax, fix inline Vim9 dict comments at SOL
Match Vim9 comments at start-of-line (no leading whitespace) in
dictionaries, lists and parenthesised expressions and argument lists.

Addresses https://github.com/vim/vim/pull/14975#issuecomment-2832643115

Report and fix by Aliaksei Budavei.

closes: #17211

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-27 19:17:06 +02:00
fa9753a721 patch 9.1.1348: still E315 with the terminal feature
Problem:  still E315 with the terminal feature
          (user202729)
Solution: call update_topline() in limit_scrollback()
          (Hirohito Higashi)

fixes: #17195
closes: #17196

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-27 15:36:43 +02:00
fbe4a8f5c0 runtime(doc): Fix notation of "Vim script" and "Vim9 script"
closes: #17213

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-27 15:28:30 +02:00
411ae580a9 patch 9.1.1347: small problems with gui_w32.c
Problem:  small problems with gui_w32.c
Solution: fix compile warnings and refactor code (John Marriott)

Compiler (clang v20.1.3) warnings on `_OnMenuSelect()` and
`_OnGetDpiScaledSize()`:
```
clang -c -I. -Iproto -DWIN32 -DWINVER=0x0601 -D_WIN32_WINNT=0x0601
-DHAVE_PATHDEF -DFEAT_HUGE -DHAVE_STDINT_H -D__USE_MINGW_ANSI_STDIO
-pipe -Wall -Wno-deprecated-declarations -D_REENTRANT -U_FORTIFY_SOURCE
-D_FORTIFY_SOURCE=1 -Wall -Wextra -Wshadow -Wstrict-prototypes
-Wmissing-prototypes -Wno-deprecated-declarations
-Wno-error=missing-field-initializers -Werror=uninitialized
-Wunused-but-set-variable -DEXITFREE -DFEAT_GUI_MSWIN -DFEAT_CLIPBOARD
gui_w32.c -o gobjx86-64/gui_w32.o
gui_w32.c:5038:55: warning: comparison of integers of different signs:
'UINT' (aka 'unsigned int') and 'int' [-Wsign-compare]
 5038 |                 && GetMenuState(s_menuBar, pMenu->id, MF_BYCOMMAND) != -1)
      | ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^  ~~
gui_w32.c:5054:26: warning: unused parameter 'hwnd' [-Wunused-parameter]
 5054 | _OnGetDpiScaledSize(HWND hwnd, UINT dpi, SIZE *size)
      |                          ^
2 warnings generated.
```

This commit contains the following changes:
- Fixes Warning 1:
  The prototype of `GetMenuState()` says that it returns a UINT, but
  returns -1 on failure. Huh?!?

  Also, Microsoft says that this function has been superseded (see
  https://learn.microsoft.com/en-us/windows/win32/api/winuser/nf-winuser-getmenustate)
  and replaced by `GetMenuItemInfo()`. Both of these functions have a
  minimum support of Windows 2000.
  Therefore in `_OnMenuSelect()`, replace the call to `GetMenuState()`
  with `GetMenuItemInfo()`.

- Fixes Warning 2:
  Add `UNUSED` to the definition of `_OnGetDpiScaledSize()`.

- Simplify `logfont2name()`.
- Add small optimisations in `_OnNotify()` and `gui_mch_do_spawn()`.
- Add out-of-memory check in `gui_mch_do_spawn()`.
- Code cosmetics (see definitions of `process_message_usual_key_classic()`
  and `process_message()`).

closes: #17208

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-27 15:05:06 +02:00
ffc89e47d0 runtime(doc): clarify complete_match() and 'isexpand' option
clarify complete_match() documentation to better explain its backward
search behavior, argument handling, and return value format and add an
example of isexpand

closes: #17212

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-27 14:59:17 +02:00
c29b533cf1 runtime(vim): Update base-syntax, match continued strings and tail comments
Continued strings are currently only matched after operators, in
parenthesised expressions and in function call argument lists.

closes: #14975

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-26 20:14:15 +02:00
c5cb6b2ee4 runtime(doc): tagfunc should refer to 'complete' option
fixes: #17205

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-26 20:06:41 +02:00
c25368ba14 patch 9.1.1346: missing out-of-memory check in textformat.c
Problem:  missing out-of-memory check in textformat.c
Solution: add out-of-memory check, add small optimizations to
          internal_format() and same_leader() (John Marriott)

closes: #17200

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-25 19:14:38 +02:00
cf2642fc72 patch 9.1.1345: tests: Test_xxd_color2() test failure dump diff is misleading
Problem:  tests: Test_xxd_color2() test failure dump diff is misleading
Solution: Ensure the reference dump and the test dump are both processed the
          same (Drew Vogel).

Background:

Commit b6dc76b6fd sought to make the xxd
screendump tests compatible with non-standard `XXD` overrides. It provides a
vim script that matches a very general `xxd` command pattern but then also
removed the matching line from the reference dump. This second step was
unnecessary because `VerifyScreenDump()` runs the associated vim script against
both the reference dump and the test dump.

Problem Details:

As part of some unrelated work, the GUI tests were failing with a window size 1
column too narrow. The screendumps in `Test_xxd_color2` were failing as a
result. When I loaded the diff using `term_dumpdiff()` the associated vim
scripts are not run. As a result, the test dump contained the `xxd` invocation
on line 1 while reference dump did not. This throws the diff off, obscuring the
true issue of the GUI window being too narrow.

Verification:

In addition to the test suite, locally I've tried to recreate the issue being
fixed in b6dc76b6fd. Setting a very non-standard
`XXD` path, this test still passes:

```
XXD=/home/dvogel/opt/vim/bin/xxd TEST_FILTER=Test_xxd_color2 TERM=xterm-color make test_xxd
rm -f test_xxd.res test.log messages starttime
if test -n "${ASAN_OPTIONS}"; then \
   XXD=../xxd/xxd; export XXD; ASAN_OPTIONS="${ASAN_OPTIONS}_test_xxd" \
UBSAN_OPTIONS="${UBSAN_OPTIONS}_test_xxd" VIMRUNTIME=../../runtime  ../vim -f \
-u unix.vim --gui-dialog-file guidialog -U NONE --noplugin --not-a-term -S \
runtest.vim test_xxd.vim ; \
fi

From test_xxd.vim:
Executed Test_xxd_color2()               in   0.066049 seconds
Filtered 17 tests with $TEST_FILTER and $TEST_SKIP_PAT
Executed 1 test                          in   0.096862 seconds
```

closes: #17202

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-25 19:06:53 +02:00
35cfc3d3c4 runtime(debversions): Add questing (25.10) as Ubuntu release name
closes: #17201

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-25 19:04:20 +02:00
3accf046ec patch 9.1.1344: double free in f_complete_match() (after v9.1.1341)
Problem:  double free in f_complete_match() (after v9.1.1341)
Solution: remove additional free of trig pointer, correctly free
          regmatch.regprog and before_cursor in the error case

closes: #17203

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-25 19:01:06 +02:00
e380b5cbba patch 9.1.1343: filetype: IPython files are not recognized
Problem:  filetype: IPython files are not recognized
          (user202729)
Solution: detect *.ipy files as python filetype

fixes: #17163

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-24 22:34:46 +02:00
e36a931d9b runtime(groff,nroff): improve ftplugin
- set options in ftplugin but not in syntax
- implement ftplugin/groff.vim (wrapper of ftplugin/nroff.vim)

closes: #17174

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-24 22:26:02 +02:00
f102f4c2e8 patch 9.1.1342: Shebang filetype detection can be improved
Problem:  Shebang filetype detection can be improved
Solution: Improve detection logic (Eisuke Kawashima)

Vim does not correctly detect filetype from
  - `#!/usr/bin/env --split-string=awk -f`
  - `#!/usr/bin/env -S -i awk -f`
  - `#!/usr/bin/env -S VAR= awk -f`
So update the current detection logic to detect those cases.

closes: #17199

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-24 22:03:21 +02:00
bcd5995b40 patch 9.1.1341: cannot define completion triggers
Problem:  Cannot define completion triggers and act upon it
Solution: add the new option 'isexpand' and add the complete_match()
          function to return the completion matches according to the
          'isexpand' setting (glepnir)

Currently, completion trigger position is determined solely by the
'iskeyword' pattern (\k\+$), which causes issues when users need
different completion behaviors - such as triggering after '/' for
comments or '.' for methods. Modifying 'iskeyword' to include these
characters has undesirable side effects on other Vim functionality that
relies on keyword definitions.

Introduce a new buffer-local option 'isexpand' that allows specifying
different completion triggers and add the complete_match() function that
finds the appropriate start column for completion based on these
triggers, scanning backwards from cursor position.

This separation of concerns allows customized completion behavior
without affecting iskeyword-dependent features. The option's
buffer-local nature enables per-filetype completion triggers.

closes: #16716

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-24 21:48:35 +02:00
32f49738d1 runtime(gleam): update filetype plugin, include new compiler and syntax script
closes: #17172

Signed-off-by: Kirill Morozov <mail2kirill@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-24 21:30:59 +02:00
a3422aa317 patch 9.1.1340: cannot complete :filetype arguments
Problem:  cannot complete :filetype arguments (Phạm Bình An)
Solution: add :filetype ex command completion, add "filetypecmd"
          completion type for getcompletion()

fixes: #17165
closes: #17167

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-23 21:12:26 +02:00
031f2273cb patch 9.1.1339: missing out-of-memory checks for enc_to_utf16()/utf16_to_enc()
Problem:  missing out-of-memory checks for enc_to_utf16() and
          utf16_to_enc()
Solution: Add out-of-memory checks and fix a few other minor issues
          (John Marriott)

This change does:
-  add missing out-of-memory checks for enc_to_utf16() and
   utf16_to_enc()
-  add a small optimisation in mch_errmsg_c() and mch_msg_c() (in
   message.c) to only call STRLEN() if needed.
-  fix a memory leak in winpty_term_and_job_init() (in terminal.c).

closes: #17191

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-23 20:56:08 +02:00
ec270a5f55 patch 9.1.1338: Calling expand() interferes with cmdcomplete_info()
Problem:  Calling expand() interferes with cmdcomplete_info()
          (after 9.1.1329).
Solution: Only clear cmdline_orig when starting/ending cmdline mode
          (zeertzjq).

closes: #17192

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-23 20:50:23 +02:00
1343681aba patch 9.1.1337: Undo corrupted with 'completeopt' "preinsert" when switching buffer
Problem:  Undo corrupted with 'completeopt' "preinsert" when switching
          buffer or window.
Solution: Do not delete preinsert text when switching buffer or window.
          (zeertzjq)

related: neovim/neovim#33581
closes: #17193

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-23 20:46:35 +02:00
229f79c168 runtime(yaml): fix wrong order of undo_ftplugin suboptions
This commit fixes the following error message:
```
Compiler not supported: make inc< sw< sts<
```

1. orginal value: `setl com< cms< et< fo<| compiler make inc< sw< sts<`
2. correct value: `setl com< cms< et< fo< inc< sw< sts< | compiler make`

While at it, let's also document the g:yaml_recommended_style variable.

closes: #17179

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Vincent Law <vlaw@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 20:35:11 +02:00
7bc988067e runtime(make): do not automatically indent after a special target
prevent indentation if the previous line starts with e.g. `.PHONY:`

closes: #17183

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 20:20:46 +02:00
dd776dd5f0 patch 9.1.1336: comment plugin does not support case-insensitive 'commentstring'
Problem:  comment plugin does not support case-insensitive
          'commentstring' (char101)
Solution: Use pattern '\c' to make the regex case-insensitive
          (Maxim Kim)

fixes: #17184
closes: #17186

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 20:14:30 +02:00
362be6ba27 patch 9.1.1335: Coverity complains about Null pointer dereferences
Problem:  Coverity complains about Null pointer dereferences
Solution: before accessing ccline->cmdbuff check that ccline is not NULL

Fixes: Coverity issue 1646601
closes: #17189

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 20:06:53 +02:00
d847b241f5 patch 9.1.1334: Coverity complains about unchecked return value
Problem:  Coverity complains about unchecked return value
Solution: cast return value to (void)

Fixes: Coverity issue 1646574
related: #17189

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 20:05:46 +02:00
7dfc9e6121 patch 9.1.1333: Coverity: complains about unutilized variable
Problem:  Coverity: complains about unutilized variable
Solution: initialize typval properly
          (author)

Fixes: Coverity issue: 1646573
       tmp.v_lock is left unitialized
related: #17189

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 20:01:04 +02:00
69e6ab6db3 patch 9.1.1332: Vim9: segfault when using super within a lambda
Problem:  Vim9: segfault when using super within a lambda
          (lifepillar)
Solution: inherit the class from the current function
          (Yegappan Lakshmanan)

fixes: #17166
closes: #17185

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 19:55:38 +02:00
5c3d1e3258 patch 9.1.1331: Leaking memory with cmdcomplete()
Problem:  Leaking memory with cmdcomplete()
          (zeertzjq, after v9.1.1329)
Solution: free the memory (Girish Palya)

closes: #17190

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 19:52:16 +02:00
fa3b1043c6 runtime(vim): Update base-syntax, improve :autocmd highlighting
- Match full :autocmd, :doautocmd and :doautoall commands.
- Add filename pattern (wildcard) highlighting.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-22 19:48:13 +02:00
31b78cce6e runtime(doc): update documentation
closes: #17180

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 19:39:15 +02:00
b753d80e59 runtime(doc): clarify return type for findfile()/finddir()
closes: #17171

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 11:31:58 +02:00
926e2af42e patch 9.1.1330: may receive E315 in terminal
Problem:  may receive E315 in terminal
Solution: call check_cursor() (Hirohito Higashi)

fixes: #16024
fixes: #16211
fixes: #17099
closes: #17170

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 11:23:12 +02:00
16341e7090 CI: add sway compositor to CI tests, to prepare for better Wayland testing
closes: #17162

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 11:20:44 +02:00
92f68e26ec patch 9.1.1329: cannot get information about command line completion
Problem:  cannot get information about command line completion
Solution: add CmdlineLeavePre autocommand and cmdcomplete_info() Vim
          script function (Girish Palya)

This commit introduces two features to improve introspection and control
over command-line completion in Vim:

- Add CmdlineLeavePre autocmd event:

  A new event triggered just before leaving the command line and before
  CmdlineLeave. It allows capturing completion-related state that is
  otherwise cleared by the time CmdlineLeave fires.

- Add cmdcomplete_info() Vim script function:

  Returns a Dictionary with details about the current command-line
  completion state.

These are similar in spirit to InsertLeavePre and complete_info(),
but focused on command-line mode.

**Use case:**

In [[PR #16759](https://github.com/vim/vim/pull/16759)], two examples
demonstrate command-line completion: one for live grep, and another for
fuzzy file finding. However, both examples share two key limitations:

1. **Broken history recall (`<Up>`)**
   When selecting a completion item via `<Tab>` or `<C-n>`, the original
pattern used for searching (e.g., a regex or fuzzy string) is
overwritten in the command-line history. This makes it impossible to
recall the original query later.
   This is especially problematic for interactive grep workflows, where
it’s useful to recall a previous search and simply select a different
match from the menu.

2. **Lack of default selection on `<CR>`**
   Often, it’s helpful to allow `<CR>` (Enter) to accept the first match
in the completion list, even when no item is explicitly selected. This
behavior is particularly useful in fuzzy file finding.

----
Below are the updated examples incorporating these improvements:

**Live grep, fuzzy find file, fuzzy find buffer:**

```vim
command! -nargs=+ -complete=customlist,GrepComplete Grep VisitFile()
def GrepComplete(arglead: string, cmdline: string, cursorpos: number):
list<any>
    return arglead->len() > 1 ? systemlist($'grep -REIHns "{arglead}"' ..
       ' --exclude-dir=.git --exclude=".*" --exclude="tags" --exclude="*.swp"') : []
enddef
def VisitFile()
    if (selected_match != null_string)
        var qfitem = getqflist({lines: [selected_match]}).items[0]
        if qfitem->has_key('bufnr') && qfitem.lnum > 0
            var pos = qfitem.vcol > 0 ? 'setcharpos' : 'setpos'
            exec $':b +call\ {pos}(".",\ [0,\ {qfitem.lnum},\ {qfitem.col},\ 0]) {qfitem.bufnr}'
            setbufvar(qfitem.bufnr, '&buflisted', 1)
        endif
    endif
enddef
nnoremap <leader>g :Grep<space>
nnoremap <leader>G :Grep <c-r>=expand("<cword>")<cr>
command! -nargs=* -complete=customlist,FuzzyFind Find
execute(selected_match != '' ? $'edit {selected_match}' : '')
var allfiles: list<string>
autocmd CmdlineEnter : allfiles = null_list
def FuzzyFind(arglead: string, _: string, _: number): list<string>
    if allfiles == null_list
        allfiles = systemlist($'find {get(g:, "fzfind_root", ".")} \! \(
-path "*/.git" -prune -o -name "*.swp" \) -type f -follow')
    endif
    return arglead == '' ? allfiles : allfiles->matchfuzzy(arglead)
enddef
nnoremap <leader><space> :<c-r>=execute('let
fzfind_root="."')\|''<cr>Find<space><c-@>
nnoremap <leader>fv :<c-r>=execute('let
fzfind_root="$HOME/.vim"')\|''<cr>Find<space><c-@>
nnoremap <leader>fV :<c-r>=execute('let
fzfind_root="$VIMRUNTIME"')\|''<cr>Find<space><c-@>
command! -nargs=* -complete=customlist,FuzzyBuffer Buffer execute('b '
.. selected_match->matchstr('\d\+'))
def FuzzyBuffer(arglead: string, _: string, _: number): list<string>
    var bufs = execute('buffers', 'silent!')->split("\n")
    var altbuf = bufs->indexof((_, v) => v =~ '^\s*\d\+\s\+#')
    if altbuf != -1
        [bufs[0], bufs[altbuf]] = [bufs[altbuf], bufs[0]]
    endif
    return arglead == '' ? bufs : bufs->matchfuzzy(arglead)
enddef
nnoremap <leader><bs> :Buffer <c-@>
var selected_match = null_string
autocmd CmdlineLeavePre : SelectItem()
def SelectItem()
    selected_match = ''
    if getcmdline() =~ '^\s*\%(Grep\|Find\|Buffer\)\s'
        var info = cmdcomplete_info()
        if info != {} && info.pum_visible && !info.matches->empty()
            selected_match = info.selected != -1 ? info.matches[info.selected] : info.matches[0]
            setcmdline(info.cmdline_orig). # Preserve search pattern in history
        endif
    endif
enddef
```

**Auto-completion snippet:**

```vim
set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu
autocmd CmdlineChanged : CmdComplete()
def CmdComplete()
    var [cmdline, curpos] = [getcmdline(), getcmdpos()]
    if getchar(1, {number: true}) == 0  # Typehead is empty (no more pasted input)
            && !pumvisible() && curpos == cmdline->len() + 1
            && cmdline =~ '\%(\w\|[*/:.-]\)$' && cmdline !~ '^\d\+$'  # Reduce noise
        feedkeys("\<C-@>", "ti")
        SkipCmdlineChanged()  # Suppress redundant completion attempts
        # Remove <C-@> that get inserted when no items are available
        timer_start(0, (_) => getcmdline()->substitute('\%x00', '', 'g')->setcmdline())
    endif
enddef
cnoremap <expr> <up> SkipCmdlineChanged("\<up>")
cnoremap <expr> <down> SkipCmdlineChanged("\<down>")
autocmd CmdlineEnter : set bo+=error
autocmd CmdlineLeave : set bo-=error
def SkipCmdlineChanged(key = ''): string
    set ei+=CmdlineChanged
    timer_start(0, (_) => execute('set ei-=CmdlineChanged'))
    return key != '' ? ((pumvisible() ? "\<c-e>" : '') .. key) : ''
enddef
```

These customizable snippets can serve as *lightweight* and *native*
alternatives to picker plugins like **FZF** or **Telescope** for common,
everyday workflows. Also, live grep snippet can replace **cscope**
without the overhead of building its database.

closes: #17115

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 11:12:41 +02:00
eac45c558e patch 9.1.1328: too many strlen() calls in indent.c
Problem:  too many strlen() calls in indent.c
Solution: refactor indent.c slightly and remove strlen() calls
          (John Marriott)

closes: #17156

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 11:03:21 +02:00
2cb42efc18 patch 9.1.1327: filetype: nroff detection can be improved
Problem:  filetype: nroff detection can be improved
Solution: improve nroff detection (Eisuke Kawashima)

- explicitly check roff comments and macros typically found in manpages
- do not try to detect alphabetically-sectioned files, except for n, as
  nroff
    - l: > 'l' happens to be a section for historical reasons
         <https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=391977>
    - n: e.g. /usr/share/man/mann/Tcl.n.gz
    - o: unsure (perhaps fedora-specific)
    - p: unsure (perhaps fedora-specific)

closes: #17160

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 10:51:05 +02:00
187df69fd1 runtime(doc): cross-link :| meaning :p and explain E749
E749 is given when :print (with any range) is issued on an empty buffer,
like the one you get with :new or :enew. Furthermore, due to Vi
compatibility :| is a synonym.

As a result, mappings intended to include a <bar> separator (esp. in the
case of boolean or "||") between commands can generate E749 on startup
when placed in a vimrc if the bars are not properly encoded or escaped.
[1]. Document this failure mode and synonym near the generated error,
and cross link with :help :bar. Note that one must read or scroll quite
a bit to find the mention of :| behaving like :print!

[1]: https://vi.stackexchange.com/q/46625/10604

closes: #17173

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 10:20:36 +02:00
f39de60608 runtime(doc): style: clarify to prefer 2 spaces after a sentence
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 10:15:02 +02:00
e125ee4b9f runtime(pov): deprecate #render and #statistics in syntax script
- 3.1g: active
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.1g/Docs/povuser.pdf#page=172
- 3.5 or later: deprecated
  https://www.povray.org/ftp/pub/povray/Old-Versions/Official-3.5/Linux/povlinux.tgz
  ─ povray-3.50c/html/povdoc_172.html
  - https://www.povray.org/documentation/3.7.0/r3_3.html#r3_3_2_7_1

closes: #17177

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-21 09:45:39 +02:00
9919085491 patch 9.1.1326: invalid cursor position after 'tagfunc'
Problem:  invalid cursor position after 'tagfunc'
          (gandalf4a)
Solution: call check_cursor() after executing the 'tagfunc'

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-20 19:35:49 +02:00
7938c40b34 runtime(keymaps): update Brazilian keymaps
closes: #17161

Signed-off-by: LuMarquesIlva <luismarques0504@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-20 17:10:20 +02:00
67fe77d272 patch 9.1.1325: tests: not checking error numbers properly
Problem:  tests: not checking error numbers properly.
Solution: Add a trailing comma to avoid matching a different error
          number with the same prefix (zeertzjq)

closes: #17159

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-20 10:21:18 +02:00
2398460232 runtime(doc): clarify 'includeexpr' is not used for <cfile>
fixes: #17139

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:55:26 +02:00
3041cf67d3 runtime(filetype): improve *.h filetype detection
This commit changes *.h files to default to C (instead of C++), and
deprecates the existing `g:c_syntax_for_h` and `g:ch_syntax_for_h`
variables in favor of a unified `g:filetype_h`, like is used for other
ambiguous file extensions.

closes: #17135

Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:48:10 +02:00
5ecb452f5b runtime(indent-tests): Raise timeouts for "search*()"es
Related to #15974 and #16870.

closes: #17116

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:36:05 +02:00
4e3df44aa2 runtime(indent-tests): Annotate timed "search*()"es for tracing
related: #17116

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:35:38 +02:00
fe8508eda0 runtime(indent-tests): Instrument timed "search*()" calls
The offered "tracer.vim" script can be used to measure and
record elapsed time for explicitly annotated "search*()"es,
set off with "VIM_INDENT_TEST_TRACE_(START|END)" comment
markers, in indent plugins.

related: #17116

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:35:02 +02:00
6924eb81f4 patch 9.1.1324: undefined behaviour if X11 connection dies
Problem:  undefined behaviour if X11 connection dies
Solution: call setjmp() before the main_loop() and restore x11 state
          if the X11 connection dies (Foxe Chen)

fixes: #698
closes: #17142

Signed-off-by: Foxe Chen <chen.foxe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:25:18 +02:00
baa8c90cc0 patch 9.1.1323: b:undo_ftplugin not executed when re-using buffer
Problem:  b:undo_ftplugin not executed when re-using buffer
          (archy3)
Solution: explicitly execute b:undo_ftplugin in buflist_new() when
          re-using the current buffer

fixes: #17113
closes: #17133

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:14:11 +02:00
8167799651 CI: coverity.yml: remove python2-dev pkg and retire --enable-pythoninterp
follow-up: ded2b41326

closes: #17157

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-19 11:09:30 +02:00
54081f0ce0 runtime(nix): set iskeyword and b:match_words in ftplugin
closes: #17154

Signed-off-by: Arnie97 <arnie97@gmail.com>
Signed-off-by: Keith Smiley <keithbsmiley@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 19:34:14 +02:00
cb3b752f95 runtime(doc): clarify "nearest" value for 'completeopt'
closes: #17146

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 18:52:28 +02:00
13960a8779 CI: GCC 13 install fails, so disable that particular ppa
closes: #17149

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 18:50:50 +02:00
0ed11ba223 runtime(doc): Tweak documentation style a bit
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 18:46:23 +02:00
ded2b41326 CI: update coverity runner to Ubuntu 24.04
closes: #17150

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 18:42:24 +02:00
7e93d4c617 patch 9.1.1322: small delete register cannot paste multi-line correctly
Problem:  small delete register cannot paste multi-line correctly
          (after v8.2.2189)
Solution: caused by 032a2d050b, so make
          this logic handle charwise only (phanium)

closes: #17151

Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 18:32:52 +02:00
aee34ef23e patch 9.1.1321: filetype: MS ixx and mpp files are not recognized
Problem:  filetype: MS ixx and mpp files are not recognized
Solution: detect *.mpp and *.ixx files as c++ filetype
          (Hampus Avekvist)

closes: #17155

Signed-off-by: Hampus Avekvist <hampus.avekvist@hey.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 18:21:34 +02:00
1d96caaa4b patch 9.1.1320: filetype: alsoft config files are not recognized
Problem:  filetype: alsoft config files are not recognized
Solution: detect alsoft config files as dosini filetype
          (David Mandelberg)

References:
* code with paths to config: ReadALConfig() in
  https://github.com/kcat/openal-soft/blob/master/alc/alconfig.cpp
* example config:
  https://github.com/kcat/openal-soft/blob/master/alsoftrc.sample

closes: #17140

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 11:41:44 +02:00
98800979dc patch 9.1.1319: Various typos in the code, issue with test_inst_complete.vim
Problem:  Various typos in the code, redundant and strange use of
          :execute in test_ins_complete.vim (after 9.1.1315).
Solution: Fix typos in the code and in the documentation, use the
          executed command directly (zeertzjq).

closes: #17143

Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 10:57:33 +02:00
e9a27ef373 patch 9.1.1318: tests: test_format fails
Problem:  tests: test_format fails (after 9.1.1314).
Solution: Increase the string size.  Add missing test_format.res in
          NEW_TESTS_RES (zeertzjq).

closes: #17144

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-18 10:47:58 +02:00
ash
8f09684569 runtime(jjdescription): Don't require a space to start comments
Since jj v0.24.0 (December 2024), `JJ:` comments are recognised even
when not followed by a space.

closes: #17130

Signed-off-by: ash <ash@sorrel.sh>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-17 20:48:33 +02:00
cca5dea76e patch 9.1.1317: noisy error when restoring folds from session fails
Problem:  noisy error when restoring folds from session fails
Solution: ignore errors silently when sourcing session file.
          (Igor Lacerda)

fixes: #15813
closes: #17127

Signed-off-by: Igor Lacerda <igorlfs@ufmg.br>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-17 20:43:25 +02:00
7ddba51635 patch 9.1.1316: missing memory allocation failure in os_mswin.c
Problem:  missing memory allocation failure in os_mswin.c
Solution: check for memory allocation failure and return early.
          (John Marriott)

closes: #17134

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-17 20:35:42 +02:00
cfe502c575 patch 9.1.1315: completion: issue with fuzzy completion and 'completefuzzycollect'
Problem:  chain complete does not work when 'cot' includes fuzzy
          and 'completefuzzycollect' collects wrong next word.
          (Konfekt)
Solution: compl_startpos is not set correctly, remove next word check
          in search_for_fuzzy_match (glepnir).

fixes #17131
fixes #16942
closes: #17136

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-17 20:17:53 +02:00
06fdfa11c5 patch 9.1.1314: max allowed string width too small
Problem:  max allowed string width too small
Solution: increased MAX_ALLOWED_STRING_WIDTH from 6400 to 1MiB
          (Hirohito Higashi)

closes: #17138

Co-authored-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-17 20:13:05 +02:00
b53d4fb63e patch 9.1.1313: compile warning about uninitialized value
Problem:  compile warning about uninitialized value
          (Tony Mechelynck, after v9.1.1311)
Solution: initialize variable on declaration

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 21:12:30 +02:00
ad503fe927 patch 9.1.1312: tests: Test_backupskip() fails when HOME is defined
Problem:  tests: Test_backupskip() fails when HOME is defined
Solution: unset $HOME temporarily

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 20:25:47 +02:00
0ac1eb3555 patch 9.1.1311: completion: not possible to limit number of matches
Problem:  completion: not possible to limit number of matches
Solution: allow to limit the matches for 'complete' sources by using the
          "{flag}^{limit}" notation (Girish Palya)

This change extends the 'complete'  option to support limiting the
number of matches returned from individual completion sources.

**Rationale:** In large files, certain sources (such as the current
buffer) can generate an overwhelming number of matches, which may cause
more relevant results from other sources (e.g., LSP or tags) to be
pushed out of view. By specifying per-source match limits, the
completion menu remains balanced and diverse, improving visibility and
relevance of suggestions.

A caret (`^`) followed by a number can be appended to a source flag to
specify the maximum number of matches for that source. For example:
```
  :set complete=.^9,w,u,t^5
```
In this configuration:
- The current buffer (`.`) will return up to 9 matches.
- The tag completion (`t`) will return up to 5 matches.
- Other sources (`w`, `u`) are not limited.

This feature is fully backward-compatible and does not affect behavior
when the `^count` suffix is not used.

The caret (`^`) was chosen as the delimiter because it is least likely
to appear in file names.

closes: #17087

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 20:18:33 +02:00
1c2b258250 patch 9.1.1310: completion: redundant check for preinsert effect
Problem:  Duplicate check for preinsert effect, particularly for Ctrl_w
          and Ctrl_U.
Solution: Remove the specific check for Ctrl_w and Ctrl_U to eliminate
          redundancy (glepnir).

closes: #17129

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 19:41:19 +02:00
40daa1358c runtime(gleam): Update ftplugin, use recommended_style config variable
Wrap the setting of basic whitespace formatting options in a conditional
block, following the de facto standard.

Setting 'et', 'sts' and 'sw' can be disabled by setting
"gleam_recommended_style" to false.

Follow up to PR #17086.

closes: #17128

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 18:29:15 +02:00
031919c7ac patch 9.1.1309: tests: no test for 'pummaxwidth' with non-truncated "kind"
Problem:  tests: no test for 'pummaxwidth' with non-truncated "kind".
Solution: Add a test with "kind" and larger 'pummaxwidth' (zeertzjq).

closes: #17126

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 18:23:23 +02:00
fbbaa6ebe9 runtime: set 'cpoptions' for line-continuation in various runtime files
closes: #17121

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 18:20:59 +02:00
470317f78b runtime(tar): remove dependency on netrw#WinPath, include mapping doc
related: #17124

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-16 17:14:55 +02:00
839fd94265 runtime(netrw): remove deprecated functions
closes: #17124

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 20:28:09 +02:00
b156588eb7 patch 9.1.1308: completion: cannot order matches by distance to cursor
Problem:  During insert-mode completion, the most relevant match is often
          the one closest to the cursor—frequently just above the current line.
          However, both `<C-N>` and `<C-P>` tend to rank candidates from the
          current buffer that appear above the cursor near the bottom of the
          completion menu, rather than near the top. This ordering can feel
          unintuitive, especially when `noselect` is active, as it doesn't
          prioritize the most contextually relevant suggestions.

Solution: This change introduces a new sub-option value "nearest" for the
          'completeopt' setting. When enabled, matches from the current buffer
          are prioritized based on their proximity to the cursor position,
          improving the relevance of suggestions during completion
          (Girish Palya).

Key Details:
- Option: "nearest" added to 'completeopt'
- Applies to: Matches from the current buffer only
- Effect: Sorts completion candidates by their distance from the cursor
- Interaction with other options:
  - Has no effect if the `fuzzy` option is also present

This feature is helpful especially when working within large buffers where
multiple similar matches may exist at different locations.

You can test this feature with auto-completion using the snippet below. Try it
in a large file like `vim/src/insexpand.c`, where you'll encounter many
potential matches. You'll notice that the popup menu now typically surfaces the
most relevant matches—those closest to the cursor—at the top. Sorting by
spatial proximity (i.e., contextual relevance) often produces more useful
matches than sorting purely by lexical distance ("fuzzy").

Another way to sort matches is by recency, using an LRU (Least Recently Used)
cache—essentially ranking candidates based on how recently they were used.
However, this is often overkill in practice, as spatial proximity (as provided
by the "nearest" option) is usually sufficient to surface the most relevant
matches.

```vim
set cot=menuone,popup,noselect,nearest inf

def SkipTextChangedIEvent(): string
    # Suppress next event caused by <c-e> (or <c-n> when no matches found)
    set eventignore+=TextChangedI
    timer_start(1, (_) => {
        set eventignore-=TextChangedI
    })
    return ''
enddef

autocmd TextChangedI * InsComplete()

def InsComplete()
    if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$'
        SkipTextChangedIEvent()
        feedkeys("\<c-n>", "n")
    endif
enddef

inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedIEvent()<cr><c-e>

inoremap <silent><expr> <tab>   pumvisible() ? "\<c-n>" : "\<tab>"
inoremap <silent><expr> <s-tab> pumvisible() ? "\<c-p>" : "\<s-tab>"
```

closes: #17076

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 20:16:00 +02:00
f35bd76b31 patch 9.1.1307: make syntax does not reliably detect different flavors
Problem:  GNU extensions, such as `ifeq` and `wildcard` function, are
          highlighted in BSDmakefile
Solution: detect BSD, GNU, or Microsoft implementation according to
	  filename, user-defined global variables, or file contents

closes: #17089

Co-authored-by: Roland Hieber <rohieb@users.noreply.github.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 19:20:06 +02:00
32f2bb6e1e patch 9.1.1306: completion menu rendering can be improved
Problem:  Parts of the popup menu were rendered twice when the popup was
          at maximum width because the truncation flag was being set too
          liberally.
Solution: Make the truncation condition more precise by only setting it
          when there's exactly one character of space remaining
          (glepnir).

closes: #17108

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 19:06:58 +02:00
cf7f01252f patch 9.1.1305: completion menu active after switching windows/tabs
Problem:  When switching to another window or tab page while the
          completion menu is active, the menu stays visible, although it
          belongs to the previous window/tab page context (Evgeni
          Chasnovski).
Solution: Track the window and tab page where completion started. Detect
          changes in the main editing loop and cancel completion mode if
          the current window or tab page differs from where completion
          started.

fixes: #17090
closes: #17101

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 19:02:00 +02:00
babdb0554a patch 9.1.1304: filetype: some man files are not recognized
Problem:  filetype: some man files are not recognized
          (e.g. 1p (POSIX commands))
Solution: update the filetype detection pattern and detect more man
          files as nroff (Eisuke Kawashima)

- sections are revised referring to
    - debian-12:/etc/manpath.config
    - fedora-41:/etc/man_db.conf
- detection logic is improved
- detection test is implemented

closes: #17117

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 18:30:05 +02:00
d62377386c runtime(netrw): upstream snapshot of v180
relevant commits:
- fix(gvim): don't set previous jump
- don't overwrite copy, copydir, mkdir and move command options
- fix: correctly name deprecate function
- refactor: remove s:NetrwBufRemover
- refactor: s:NetrwDelete -> netrw#fs#Remove
- defaults!: remove g:netrw_use_errorwindow

fixes: #17114
closes: #17123

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 18:26:32 +02:00
2137710b43 patch 9.1.1303: missing out-of-memory check in linematch.c
Problem:  missing out-of-memory check in linematch.c
Solution: return early in case of memory allocation failure, move the
          pow() calculation ouside of the for() loop
          (John Marriott)

closes: #17118

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 18:15:24 +02:00
d2079cff48 patch 9.1.1302: Coverity warns about using uninitialized value
Problem:  Coverity warns about using uninitialized value
          (Coverity, Tony Mechelynck, after v9.1.1301)
Solution: initialize callback pointer to NULL

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-15 18:10:26 +02:00
cbe53191d0 patch 9.1.1301: completion: cannot configure completion functions with 'complete'
Problem:  completion: cannot configure completion functions with
          'complete'
Solution: add support for setting completion functions using the f and o
          flag for 'complete' (Girish Palya)

This change adds two new values to the `'complete'` (`'cpt'`) option:
- `f` – invokes the function specified by the `'completefunc'` option
- `f{func}` – invokes a specific function `{func}` (can be a string or `Funcref`)

These new flags extend keyword completion behavior (e.g., via `<C-N>` /
`<C-P>`) by allowing function-based sources to participate in standard keyword
completion.

**Key behaviors:**

- Multiple `f{func}` values can be specified, and all will be called in order.
- Functions should follow the interface defined in `:help complete-functions`.
- When using `f{func}`, escaping is required for spaces (with `\`) and commas
  (with `\\`) in `Funcref` names.
- If a function sets `'refresh'` to `'always'`, it will be re-invoked on every
  change to the input text. Otherwise, Vim will attempt to reuse and filter
  existing matches as the input changes, which matches the default behavior of
  other completion sources.
- Matches are inserted at the keyword boundary for consistency with other completion methods.
- If finding matches is time-consuming, `complete_check()` can be used to
  maintain responsiveness.
- Completion matches are gathered in the sequence defined by the `'cpt'`
  option, preserving source priority.

This feature increases flexibility of standard completion mechanism and may
reduce the need for external completion plugins for many users.

**Examples:**

Complete matches from [LSP](https://github.com/yegappan/lsp) client. Notice the use of `refresh: always` and `function()`.

```vim
set cpt+=ffunction("g:LspCompletor"\\,\ [5]). # maxitems = 5

def! g:LspCompletor(maxitems: number, findstart: number, base: string): any
    if findstart == 1
        return g:LspOmniFunc(findstart, base)
    endif
    return {words: g:LspOmniFunc(findstart, base)->slice(0, maxitems), refresh: 'always'}
enddef
autocmd VimEnter * g:LspOptionsSet({ autoComplete: false, omniComplete: true })
```

Complete matches from `:iabbrev`.

```vim
set cpt+=fAbbrevCompletor

def! g:AbbrevCompletor(findstart: number, base: string): any
    if findstart > 0
        var prefix = getline('.')->strpart(0, col('.') - 1)->matchstr('\S\+$')
        if prefix->empty()
            return -2
        endif
        return col('.') - prefix->len() - 1
    endif
    var lines = execute('ia', 'silent!')
    if lines =~? gettext('No abbreviation found')
        return v:none  # Suppresses warning message
    endif
    var items = []
    for line in lines->split("\n")
        var m = line->matchlist('\v^i\s+\zs(\S+)\s+(.*)$')
        if m->len() > 2 && m[1]->stridx(base) == 0
            items->add({ word: m[1], info: m[2], dup: 1 })
        endif
    endfor
    return items->empty() ? v:none :
        items->sort((v1, v2) => v1.word < v2.word ? -1 : v1.word ==# v2.word ? 0 : 1)
enddef
```

**Auto-completion:**

Vim's standard completion frequently checks for user input while searching for
new matches. It is responsive irrespective of file size. This makes it
well-suited for smooth auto-completion. You can try with above examples:

```vim
set cot=menuone,popup,noselect inf

autocmd TextChangedI * InsComplete()

def InsComplete()
    if getcharstr(1) == '' && getline('.')->strpart(0, col('.') - 1) =~ '\k$'
        SkipTextChangedIEvent()
        feedkeys("\<c-n>", "n")
    endif
enddef

inoremap <silent> <c-e> <c-r>=<SID>SkipTextChangedIEvent()<cr><c-e>

def SkipTextChangedIEvent(): string
    # Suppress next event caused by <c-e> (or <c-n> when no matches found)
    set eventignore+=TextChangedI
    timer_start(1, (_) => {
        set eventignore-=TextChangedI
    })
    return ''
enddef
```

closes: #17065

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-14 22:13:15 +02:00
10f69298b4 patch 9.1.1300: wrong detection of -inf
Problem:  wrong detection of -inf
Solution: correctly compare 4 characters and not 3
          (John Marriott)

closes: #17109

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-14 21:19:34 +02:00
4ec93fec12 runtime(doc): update enum helptext
closes: #17112

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-14 21:14:33 +02:00
836b87d699 patch 9.1.1299: filetype: mbsyncrc files are not recognized
Problem:  filetype: mbsyncrc files are not recognized
Solution: detect isyncrc and "*.mbsyncrc" files as mbsync filetype,
          include filetype and syntax plugin (Pierrick Guillaume)

mbsync is a command line application which synchronizes mailboxes;
currently Maildir and IMAP4 mailboxes are supported.
New messages, message deletions and flag changes can be propagated both ways;
the operation set can be selected in a fine-grained manner.

References:
mbsync syntax overview: mbsync manual (isync v1.4.4)
https://isync.sourceforge.io/mbsync.html

Upstream support for the mbsync filetype.
Original plugin: https://github.com/Fymyte/mbsync.vim

closes: #17103

Signed-off-by: Pierrick Guillaume <pguillaume@fymyte.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-13 18:25:33 +02:00
906f306812 CI: install xcode 16.3 on macos-15 runner
closes: #17111

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-13 18:19:56 +02:00
f4b1a60dd1 runtime(doc): update options.txt and clarify 'wildmode' further
related: #17100

Co-authored-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-13 18:09:50 +02:00
3cbd7f18e3 runtime(gleam): update Maintainer and filetype options
closes: #17086

Signed-off-by: Kirill Morozov <kirill@robotix.pro>
Signed-off-by: Trilowy <49493635+trilowy@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-13 17:58:32 +02:00
3956c5b53c patch 9.1.1298: define_function() is too long
Problem:  define_function() is too long
Solution: refactor and split up into smaller functions
          (Yegappan Lakshmanan)

closes: #17105

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-13 17:49:50 +02:00
c98250377d patch 9.1.1297: Ctrl-D scrolling can get stuck
Problem:  cursor_correct() calculates a valid cursor position which
	  is later changed by update_topline() and causes Ctrl-D
          scrolling to be stuck (Daniel Steinberg, after v9.1.0258).
Solution: Update the valid cursor position before validating topline
          (Luuk van Baal).

fixes: #17106
closes: #17110

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-13 17:45:34 +02:00
829eda7d38 runtime(new-tutor): update tutor and correct comandline completion
Problem: Some parts of the tutor are outdated.

- For example, pressing `<Tab>` after typing `:e` does not complete the
command `:edit`, but shows a completion menu with the first entry being
`:earlier`.

closes: #17107

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-13 17:44:24 +02:00
d4dbf822dc patch 9.1.1296: completion: incorrect truncation logic
Problem:  completion: incorrect truncation logic (after: v9.1.1284)
Solution: replace string allocation with direct screen rendering and
          fixe RTL/LTR truncation calculations (glepnir)

closes: #17081

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 18:39:16 +02:00
cf665ccd37 patch 9.1.1295: clientserver: does not handle :stopinsert correctly
Problem:  clientserver: When in insert mode, a :stopinsert command
          is not correctly processed (user202729)
Solution: If the :stopinsert command is received while waiting for
          input, stuff the NOP key into the type-ahead buffer and
          detect that :stopinsert was used in edit() so that the
          cursor position is decremented.

fixes: #17016
closes: #17024

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 18:09:28 +02:00
6f6c0dba9f runtime(doc): disable last-position-jump in diff mode
This has been bothering me quite for some time and I never knew why it
happened. Just today it occurred to me this might have been because of
the last-position-jump.

So I figured, let's fix it for everybody, not just me.

closes: #17092

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 18:07:39 +02:00
eded33621b runtime(doc): Improve 'wildmode' setting desciption
closes: #17100

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 18:03:32 +02:00
bc27b6e34f patch 9.1.1294: gui tabline menu does not use confirm when closing tabs
Problem:  gui tabline menu does not use confirm when closing tabs
Solution: use ":confirm tabclose" explicitly (JMcKiern)

closes: #17093

Signed-off-by: JMcKiern <jmckiern@tcd.ie>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 11:51:00 +02:00
ab2fe65fbf runtime(doc): correct backslash escaping comma example
closes: #17096

Signed-off-by: Qiming zhao <chemzqm@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 11:40:17 +02:00
0e59e67a63 patch 9.1.1293: comment plugin does not handle 'exclusive' selection for comment object
Problem:  comment plugin does not handle 'exclusive' selection for
          comment object (@mawkish)
Solution: handle special case selection='exclusive' for inline comment
          object (Maxim Kim)

fixes: #17023
closes: #17098

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 11:34:08 +02:00
c8ce81b0dc patch 9.1.1292: statusline not correctly evaluated
Problem:  statusline not correctly evaluated
          (Peter Kenny, after v9.1.1291)
Solution: revert part of patch v9.1.1291
          (Hirohito Higashi)

fixes: #17095
closes: #17094

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 11:28:18 +02:00
d82f3cae39 runtime(sh): Do not look up a "sh" utility in $PATH for "sh_13.sh"
Dash may not be installed on a BSD CI runner, list it in the
shebang line.

See #17084
closes: #17094

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-12 11:18:10 +02:00
5c84d12df1 runtime(filetype): make shell filetype detection more robust
closes: #17063

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-10 21:55:00 +02:00
ec032de646 patch 9.1.1291: too many strlen() calls in buffer.c
Problem:  too many strlen() calls in buffer.c
Solution: refactor buffer.c and remove strlen() calls
          (John Marriott)

closes: #17063

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-10 21:34:19 +02:00
06a41ad084 runtime(keymaps): include 2 Brazilian Keymaps
closes: #17072

Signed-off-by: Elsarques <luismarques0504@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-10 20:04:59 +02:00
9b171bdfd6 runtime(vim): Update-base-syntax, match full :*grep, :make, :sort and :filter commands
closes: #17082

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-10 19:59:22 +02:00
b0e19f9e1b patch 9.1.1290: tests: missing cleanup in test_filetype.vim
Problem:  tests: missing cleanup in test_filetype.vim, wrong name in
          test_plugin_matchparen
Solution: Add :bwipe corresponding to :split, rename test case

closes: #17088

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-10 19:54:16 +02:00
96a0b2a6d5 patch 9.1.1289: tests: no test for matchparen plugin with WinScrolled event
Problem:  tests: no test for matchparen plugin with WinScrolled event
Solution: add missing test

closes: #10942

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-09 19:29:18 +02:00
f9f53f5a8f runtime(remind): include remind.vim ftplugin
closes: #17085

Signed-off-by: Joe Reynolds <joereynolds952@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-09 19:27:37 +02:00
520a2c7852 runtime(vim): Update base-syntax, improve :command highlighting
- Match multiline :command definitions.
- Match custom completion funcref var names.

fixes: #17001
closes: #17067

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-08 20:50:00 +02:00
0b540c6f38 runtime(help): add omni completion and 'iskeyword' to filetype plugin
Problem:

- Help tags provide a good way to navigate the Vim documentation, but
  many help documents don't use them effectively. I think one of the
  reasons is that help writers have to look up help tags manually with
  `:help` command, which is not very convenient.
- 'iskeyword' is only set for help buffers opened by `:help` command.
  That means if I'm editing a help file, I cannot jump to tag in same
  file using `Ctrl-]` unless I manually set it, which is annoying.

Solution:

- Add omni completion for Vim help tags.
- Set 'iskeyword' for `ft-help`

closes: #17073

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-08 20:47:58 +02:00
7517a8cadf runtime(lf): improve syntax script, add filetype plugin
- Greatly improve detection and highlighting of command/shell regions,
  input-device key labels, escape sequences (@joelim-work)
- Add ftplugin for formatoptions, toggling comment areas
  (@andis-sprinkis)
- Add a few missing lf option keywords, rm. old non-working code, misc.
  formatting (@andis-sprinkis)

closes: #17078

Signed-off-by: Andis Spriņķis <andis@sprinkis.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-08 20:34:14 +02:00
b71f1309a2 patch 9.1.1288: Using wrong window in ll_resize_stack()
Problem:  Using wrong window in ll_resize_stack()
          (after v9.1.1287)
Solution: Use "wp" instead of "curwin", even though they are always the
          same value.  Fix typos in documentation (zeertzjq).

closes: #17080

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-08 20:31:21 +02:00
2525573de7 runtime(doc): rename wrong option to 'pummaxwidth'
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-08 08:36:18 +02:00
adcfb6caeb patch 9.1.1287: quickfix code can be further improved
Problem:  quickfix code can be further improved (after v9.1.1283)
Solution: slightly refactor quickfix.c (Hirohito Higashi)

- remove error message output
- adjust comments
- rename functions:
  - qf_init_quickfix_stack() --> qf_init_stack()
  - qf_resize_quickfix_stack() --> qf_resize_stack()
  - qf_resize_stack() --> qf_resize_stack_base()

Now qf_alloc_stack() can handle both quickfix/location lists.

closes: #17068

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-07 21:19:07 +02:00
e370141bf4 patch 9.1.1286: filetype: help files not detected when 'iskeyword' includes ":"
Problem:  Help files not detected when 'iskeyword' includes ":".
Solution: Do not use \< and \> in the pattern (zeertzjq).

fixes: #17069
closes: #17071

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-07 21:14:41 +02:00
5ce1e4ad4a patch 9.1.1285: Vim9: no error message for missing method after "super."
Problem:  Vim9: no error message for missing method after "super."
Solution: output an error message, add a few more tests
          (Yegappan Lakshmanan).

closes: #17070

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-07 21:09:18 +02:00
b87620466c patch 9.1.1284: not possible to configure pum truncation char
Problem:  not possible to configure the completion menu truncation
          character
Solution: add the "trunc" suboption to the 'fillchars' setting to
          configure the truncation indicator (glepnir).

closes: #17006

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-07 21:05:16 +02:00
2ffb4d0298 runtime(lua): fix whitespace style issues in lua ftplugin
related: #17049

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-07 14:10:58 +02:00
00b927b295 runtime(lua): improve foldexpr, add vim9 script version
closes: #17049

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-06 17:40:43 +02:00
2afdb3a65b runtime(doc): Fix minor typo in options.txt
closes: #17060

Signed-off-by: clach04 <clach04@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-06 17:37:12 +02:00
9cd6d82fbb runtime(fstab): set formatoptions-=t in filetype plugin
closes: #17020

Signed-off-by: Radu Dineiu <radu.dineiu@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2025-04-06 17:34:58 +02:00
9adb310cf3 runtime(svelte): add matchit support to svelte filetype plugin
closes: #17052

Signed-off-by: 231tr0n <zeltronsrikar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-06 17:28:11 +02:00
88d41ab270 patch 9.1.1283: quickfix stack is limited to 10 items
Problem:  quickfix and location-list stack is limited to 10 items
Solution: add the 'chistory' and 'lhistory' options to configure a
          larger quickfix/location list stack
          (64-bitman)

closes: #16920

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-06 17:20:39 +02:00
c54a8eb258 patch 9.1.1282: Build and test failure without job feature
Problem:  Build and test failure without job feature
          (lazypingu)
Solution: Adjust ifdefs, add CheckFeature job to tests

fixes: #17053
closes: #17059

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-06 16:15:10 +02:00
221927b2bf patch 9.1.1281: extra newline output when editing stdin
Problem:  extra newline output when editing stdin
Solution: remove outputting when reading from stdin in non-terminal mode
          (Abhijit Barik)

fixes: #16856
closes: #17047

Co-authored-by: LemonBoy <LemonBoy@users.noreply.github.com>
Signed-off-by: Abhijit Barik <Abhijit.Barik@ivanti.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-06 16:12:06 +02:00
ba73766788 patch 9.1.1280: trailing additional semicolon in get_matches_in_str()
Problem:  trailing additional semicolon in get_matches_in_str()
          (Hirohito Higashi)
Solution: remove it (Satoru Kitaguchi)

closes: #17066

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Satoru Kitaguchi <rule.the.fate.myfirststory@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-06 16:04:59 +02:00
8daae6fea9 patch 9.1.1279: Vim9: null_object and null_class are no reserved names
Problem:  Vim9: null_object and null_class are no reserved names
Solution: Add null_object and null_class as reserved names.
          (Yegappan Lakshmanan)

closes: #17054

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-05 16:03:27 +02:00
d22f43111b patch 9.1.1278: Vim9: too long functions in vim9type.c
Problem:  Vim9: too long functions in vim9type.c
Solution: refactor into separate functions
          (Yegappan Lakshmanan)

closes: #17056

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-05 15:57:12 +02:00
2f5a8c0b5b runtime(vim): Update base-syntax, match full :redir command
closes: #17057

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-05 15:55:36 +02:00
d84cbdb5a3 patch 9.1.1277: tests: trailing comment char in test_popupwin
Problem:  tests: trailing comment char in test_popupwin
Solution: remove crufty tail comment (Doug Kearns)

Remove a crufty tail comment from Test_popup_with_border_and_padding().
The line used to be in a string list and the closing quote and comma
persist.

closes: #17058

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-05 15:51:26 +02:00
9aa120f7ad patch 9.1.1276: inline word diff treats multibyte chars as word char
Problem:  inline word diff treats multibyte chars as word char
          (after 9.1.1243)
Solution: treat all non-alphanumeric characters as non-word characters
          (Yee Cheng Chin)

Previously inline word diff simply used Vim's definition of keyword to
determine what is a word, which leads to multi-byte character classes
such as emojis and CJK (Chinese/Japanese/Korean) characters all
classifying as word characters, leading to entire sentences being
grouped as a single word which does not provide meaningful information
in a diff highlight.

Fix this by treating all non-alphanumeric characters (with class number
above 2) as non-word characters, as there is usually no benefit in using
word diff on them. These include CJK characters, emojis, and also
subscript/superscript numbers. Meanwhile, multi-byte characters like
Cyrillic and Greek letters will still continue to considered as words.

Note that this is slightly inconsistent with how words are defined
elsewhere, as Vim usually considers any character with class >=2 to be
a "word".

related: #16881 (diff inline highlight)
closes: #17050

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-04 19:16:21 +02:00
b8d5c85099 runtime(doc): update WinScrolled documentation
closes: #17036

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-04 19:11:13 +02:00
2a6be83512 runtime(vim): Update base-syntax, improve :set backslash handling
Improve backslash handling in :set option values. There is no special
handling for options supporting Windows path separators yet.

See :help option-backslash.

Remove the vimSetString syntax group. Option string values cannot be
specified with a quoted string, this is a command terminating tail
comment.

fixes: #16913
closes: #17034

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:39:24 +02:00
d211558044 patch 9.1.1275: MS-Windows: Not possible to pass additional flags to Make_mvc
Problem:  MS-Windows: Not possible to pass additional flags to Make_mvc
Solution: Introduce $CI_FLAGS and use it to pass additional flags for
          the Github CI in order to treat size conversion warnings
          (C4267) as errors (Yegappan Lakshmanan)

closes: #17028

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:35:00 +02:00
6fa62085ff patch 9.1.1274: Vim9: no support for object<type> as variable type
Problem:  Vim9: no support for object<type> as variable type
Solution: add support for object<type> (Yegappan Lakshmanan)

closes: #17041

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:32:00 +02:00
f16d8b2dda patch 9.1.1273: Coverity warns about using uninitialized value
Problem:  Coverity warns about using uninitialized value
          (after 9.1.1270).
Solution: Put an empty string in "buf" when allocation fails (zeertzjq).

closes: #17040

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:21:15 +02:00
3e50a28a03 patch 9.1.1272: completion: in keyword completion Ctrl_P cannot go back after Ctrl_N
Problem:  completion: in keyword completion Ctrl_P cannot go back after
          Ctrl_N
Solution: in find_compl_when_fuzzy() always return first match of array, after Ctrl_P
          use compl_shown_match->cp_next instead of compl_first_match.
          (glepnir)

closes: #17043

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:17:06 +02:00
6099db9a60 runtime(sh): Update syntax file, command substitution opening paren at EOL
Allow the opening parenthesis of a command substitution to appear at
EOL.

This fixes the issue raised in
https://github.com/vim/vim/issues/17026#issuecomment-2774112284.

closes: #17044

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:13:39 +02:00
e74ec3f523 patch 9.1.1271: filetype: Power Query files are not recognized
Problem:  filetype: Power Query files are not recognized
Solution: detect '*.pq' as pq filetype, include pq syntax and filetype
          plugin (Anarion Dunedain)

Microsoft Power Query provides a powerful data import experience that
encompasses many features. Power Query works with desktop Analysis
Services, Excel, and Power BI workbooks, in addition to many online
services, such as Fabric, Power BI service, Power Apps, Microsoft 365
Customer Insights, and more. A core capability of Power Query is to
filter and combine, that is, to mash-up data from one or more of a rich
collection of supported data sources. Any such data mashup is expressed
using the Power Query M formula language. The M language is a
functional, case sensitive language similar to F#.

Reference:
- Power Query M formula language overview:
  https://learn.microsoft.com/en-us/powerquery-m/

closes: #17045

Signed-off-by: Anarion Dunedain <anarion80@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:08:25 +02:00
c1e019247d translation(ru): fix and updated messages translation
closes: #17046

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 21:04:57 +02:00
df68419ba0 runtime(doc): clarify the use of change marks when writing a buffer
related: #17008

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-03 12:35:51 +02:00
a359c9c25e runtime(zip): add *.whl to the list of zip extensions
This commits adds the extension *.whl to the list of zip extensions.
Wheel (WHL) files are binary distribution files for python packages.

Reference:
https://packaging.python.org/en/latest/specifications/binary-distribution-format/

fixes: #17038

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-02 20:45:57 +02:00
7fb90815a0 patch 9.1.1270: missing out-of-memory checks in buffer.c
Problem:  missing out-of-memory checks in buffer.c
Solution: handle out-of-memory situations during allocation
          (John Marriott)

closes: #17031

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-02 20:32:35 +02:00
8293574c8b runtime(doc): update pi_zip.txt with current list of zip file extensions
closes: #17037

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-02 20:28:23 +02:00
e4e4d1c381 patch 9.1.1269: completion: compl_shown_match is updated when starting keyword completion
Problem:  compl_shown_match is updated when starting keyword completion
          and does not include fuzzy matching.
Solution: Do not update compl_shown_match when starting keyword
          completion, since it is the one already selected by the
          keyword completion direction. (glepnir)

closes: #17033

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-02 20:18:25 +02:00
7f518e044f patch 9.1.1268: filetype: dax files are not recognized
Problem:  filetype: dax files are not recognized
Solution: detect "*.dax" as dax filetype, include dax filetype and
          syntax plugin (Anarion Dunedain)

Data Analysis Expressions (DAX) is a formula expression language used in
Analysis Services, Power BI, and Power Pivot in Excel. DAX formulas
include functions, operators, and values to perform advanced
calculations and queries on data in related tables and columns in
tabular data models.

DAX language overview:
- https://learn.microsoft.com/en-us/dax/dax-overview

closes: #17035

Signed-off-by: Anarion Dunedain <anarion80@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-02 19:54:31 +02:00
9301b437bc runtime(openPlugin): fix E480 when opening URLs with wildcards on Windows
This might be a bug in Windows Vim, as when using the following command
it throws E480:
```
:com! -complete=file -nargs=1 :Echo echo <q-args>
:Echo ?
E480: No match ?
```

Work-around this by using `-nargs=*` to allow more arguments, even
though this is not completely correct.

fixes: #17029

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-02 19:41:21 +02:00
de8f8f732a patch 9.1.1267: Vim9: no support for type list/dict<object<any>>
Problem:  Vim9: no support for type list/dict<object<any>>
Solution: add proper support for t_object_any
          (Yegappan Lakshmanan)

closes: #17025

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-01 20:43:36 +02:00
7b6add0b4a patch 9.1.1266: MS-Windows: type conversion warnings
Problem:  MS-Windows: type conversion warnings
Solution: cast the variables (Yegappan Lakshmanan)

closes: #17027

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-01 20:38:37 +02:00
2f4aa50c91 translation(ru): Updated messages translation
closes: #17030

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-04-01 20:36:27 +02:00
71f17fdd5f patch 9.1.1265: tests: no tests for typing normal char during completion
Problem:  tests: no tests for typing normal char during completion
Solution: add a test verifying the default behaviour (see :h
          popupmenu-completion)

related: #17019

Co-authored-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-31 20:57:13 +02:00
4ac995bf93 runtime(rust): set formatprg to rustfmt
closes: #16967

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-31 20:54:50 +02:00
b1d6db0be5 patch 9.1.1264: Vim9: error when comparing objects
Problem:  Vim9: error when comparing objects
          (lifepillar)
Solution: When comparing object types, compare their classes
          (Yegappan Lakshmanan)

fixes: #17014
closes: #17018

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-31 20:35:44 +02:00
20393bc02d runtime(doc): update last change date for diff.txt
related: #16997

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:39:41 +02:00
1c2f475850 runtime(doc): Update the tuple help text
closes: #17009

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:37:24 +02:00
583f5aee96 patch 9.1.1263: string length wrong in get_last_inserted_save()
Problem:  string length wrong in get_last_inserted_save()
          (after v9.1.1222)
Solution: when removing trailing ESC, also decrease the string length
          (Christ van Willegen)

closes: #16961

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:26:01 +02:00
f13c856154 patch 9.1.1262: heap-buffer-overflow with narrow 'pummaxwidth' value
Problem:  heap-buffer-overflow occurs with narrow 'pummaxwidth' value
          (after v9.1.1250)
Solution: test that st_end points after st pointer (Hirohito Higashi)

closes: #17005

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:19:05 +02:00
c6336acfe3 patch 9.1.1261: No test for 'pummaxwidth' non-truncated items
Problem:  No test for 'pummaxwidth' non-truncated items (after v9.1.1250)
Solution: Add shorter items to Test_pum_maxwidth_multibyte() (zeertzjq).

closes: #17007

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:07:35 +02:00
649a237bc8 runtime(debversions): Add release name for Debian 15 - duke
https://lists.debian.org/debian-devel-announce/2025/01/msg00004.html

closes: #17010

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:05:46 +02:00
53fed23cb7 patch 9.1.1260: Hang when filtering buffer with NUL bytes
Problem:  Hang when filtering buffer with NUL bytes (after 9.1.1050).
Solution: Don't subtract "written" from "lplen" repeatedly (zeertzjq).

related: neovim/neovim#33173
closes: #17011

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:01:56 +02:00
e9a369f9c3 runtime(odin): add new keywords to syntax script
closes: #17012

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 15:00:00 +02:00
a580761a45 patch 9.1.1259: some issues with comment package and tailing spaces
Problem:  some issues with comment package and tailing spaces
Solution: correctly capture trailing spaces with the ac/ic text object
          (Maxim Kim)

This commit fixes a few issues with the comment package:

1) both ac and ic incorrectly miss the last //

```
// hello trailing spaces
//
```

2) fix ac/ic with last empty comment line,
   vac should also select last line with #

```py
 # print("hello")
 # print("world")
 #
 #
$endofbuffer$
```

closes: #17013

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 14:55:26 +02:00
bb8e5ddb97 ci: Check and confirm Vim feature flags exist before testing
Vim tests for features such as python3 relies on checking the feature
flag exists by doing `has('python3')`. However, if the feature itself is
broken and the flag returns 0, the relevant tests will simply silently
get ignored and CI will passed erroneously. As a preventive measure, as
basic checks to make sure certain feature flags are correct as a basic
smoke test.

Currently only checking two types of feature flags:

1. Features that depend on system packages being installed properly
   (e.g. sodium) and could be erroneously dropped if the CI environment
   changed or a bug exists in the configure script.
2. Scripting languages. When in dynamic mode, these feature flags (e.g.
   "ruby", "python3") will return 0 when the lib cannot be found or the
   code has an initialization bug. This happened in #16964 where CI
   still passed despite Python 3 being broken.

closes: #16998

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-30 14:48:29 +02:00
1054b18291 runtime(java): Make changes for JDK 24 in syntax script
- "Demote" SecurityManager from the list of java.lang class
  types to javaLangDeprecated.
- Reintroduce supported syntax-preview-feature numbers 455
  and 476 as _new numbers_ 488 and 494, respectively.

References:
- https://openjdk.org/jeps/486 (Permanently Disable the Security Manager)
- https://openjdk.org/jeps/488 (Primitive Types in Patterns etc.)
- https://openjdk.org/jeps/494 (Module Import Declarations)

closes: #16977

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-29 09:16:30 +01:00
f2b16986a1 patch 9.1.1258: regexp: max \U and \%U value is limited by INT_MAX
Problem:  regexp: max \U and \%U value is limited by INT_MAX but gives a
          confusing error message (related: v8.1.0985).
Solution: give a better error message when the value reaches INT_MAX

When searching Vim allows to get up to 8 hex characters using the /\V
and /\%V regex atoms.  However, when using "/\UFFFFFFFF" the code point is
already above what an integer variable can hold, which is 2,147,483,647.

Since patch v8.1.0985, Vim already limited the max codepoint to INT_MAX
(otherwise it caused a crash in the nfa regex engine), but instead of
error'ing out it silently fell back to parse the number as a backslash
value and not as a codepoint value and as such this "/[\UFFFFFFFF]" will
happily find a "\" or an literal "F".  And this "/[\d127-\UFFFFFFFF]"
will error out as "reverse range in character class).

Interestingly, the max Unicode codepoint value is U+10FFFF which still
fits into an ordinary integer value,  which means, that we don't even
need to parse 8 hex characters, but 6 should have been enough.

However, let's not limit Vim to search for only max 6 hex characters
(which would be a backward incompatible change), but instead allow all 8
characters and only if the codepoint reaches INT_MAX, give a more
precise error message (about what the max unicode codepoint value is).
This allows to search for "[\U7FFFFFFE]" (will likely return "E486
Pattern not found") and "[/\U7FFFFFF]" now errors "E1517: Value too
large, max Unicode codepoint is U+10FFFF".

While this change is straight forward on architectures where long is 8
bytes, this is not so simple on Windows or 32bit architectures where long
is 4 bytes (and therefore the test fails there).  To account for that,
let's make use of the vimlong_T number type and make a few corresponding
changes in the regex engine code and cast the value to the expected data
type. This however may not work correctly on systems that doesn't have
the long long datatype (e.g. OpenVMS) and probably the test will fail
there.

fixes: #16949
closes: #16994

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-29 09:08:58 +01:00
90e52490b3 patch 9.1.1257: Mixing vim_strsize() with mb_ptr2cells() in pum_redraw()
Problem:  Mixing vim_strsize() with mb_ptr2cells() in pum_redraw().
Solution: Change vim_strsize() to mb_string2cells() (zeertzjq).

Since vim_strsize() uses ptr2cells() for the cell width of each char, it
is strange to mix it with mb_ptr2cells(), which is used both just below
and in pum_screen_puts_with_attr(), and screen_puts_len() also uses
something similar.  Meanwhile mb_string2cells() uses mb_ptr2cells() for
the cell width of each char.

Note that the vim_strsize() and mb_string2cells() actually return the
same value here, as the transstr() above makes sure the string only
contains printable chars, and ptr2cells() and mb_ptr2cells() only return
different values for unprintable chars.

closes: #17003

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-29 09:05:52 +01:00
0dc9a0bc60 runtime(lf): add lf r34 keywords to syntax script
closes: #17002

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-29 09:03:54 +01:00
0980e41161 patch 9.1.1256: if_python: duplicate tuple data entries
Problem:  if_python: duplicate tuple data entries
          (after v9.1.1239)
Solution: clean up duplicates (Yegappan Lakshmanan)

closes: #17004

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-29 08:53:12 +01:00
722fbd1554 runtime(vim): Update base-syntax, match tuples
Tuples were introduced in commit 9cb865e.  See PR #16776.

fixes: #16965
closes: #16935

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-28 19:36:37 +01:00
532c5aec6f patch 9.1.1255: missing test condition for 'pummaxwidth' setting
Problem:  missing test condition for 'pummaxwidth' setting, pummaxwidth
          not effective when width is 32 and height is 10
          (after v9.1.1250)
Solution: add missing comparison condition in pum_width()
          (glepnir)

closes: #16999

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-28 19:21:59 +01:00
aa68f8a095 patch 9.1.1254: need more tests for the comment plugin
Problem:  need more tests for the comment plugin
Solution: add a tests for the [gb]:comment_first_col setting
          (Maxim Kim)

closes: #16995

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-28 19:17:53 +01:00
ce80c59bfd patch 9.1.1253: abort when closing window with attached quickfix data
Problem:  If win_close() is called with a window that has quickfix stack
          attached to it, the corresponding quickfix buffer will be
          closed and freed after the buffer was already closed. At that
          time curwin->w_buffer points to NULL, which the CHECK_CURBUF
          will catch and abort if ABORT_ON_ERROR is defined
Solution: in wipe_qf_buffer() temporarily point curwin->w_buffer back to
          curbuf, the window will be closed anyhow, so it shouldn't
          matter that curbuf->b_nwindows isn't incremented.

closes: #16993
closes: #16985

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-28 19:13:32 +01:00
c5aad6cca5 runtime(doc): non-portable sed regex in Makefile for pi_netrw.txt rule
Previously it was using '\0' in sed which is non-portable and does not
work in macOS. Fix this by using the '$' (end-of-line) regex atom (which
needs to be doubled in the Makefile) to append at the end instead. An
alternative would have been to use '&' which is the more portable
version of '\0'.

closes: #16996

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-28 19:11:11 +01:00
5a307c361c patch 9.1.1252: typos in code and docs related to 'diffopt' "inline:"
Problem:  Typos in code and docs related to 'diffopt' "inline:".
          (after v9.1.1243)
Solution: Fix typos and slightly improve the docs.
          (zeertzjq)

closes: #16997

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-28 19:04:06 +01:00
e06b2aea43 patch 9.1.1251: if_python: build error with tuples and dynamic python
Problem:  if_python: build error with tuples and dynamic python
          (after v9.1.1239)
Solution: Fix build error and test failures (Yee Cheng Cin)

closes: #16992

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-27 20:15:26 +01:00
88d75934c3 patch 9.1.1250: cannot set the maximum popup menu width
Problem:  cannot set the maximum popup menu width
          (Lucas Mior)
Solution: add the new global option value 'pummaxwidth'
          (glepnir)

fixes: #10901
closes: #16943

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-27 20:09:07 +01:00
757c37da6d patch 9.1.1249: tests: no test that 'listchars' "eol" doesn't affect "gM"
Problem:  No test that 'listchars' "eol" doesn't affect "gM".
Solution: Add a test (zeertzjq).

closes: #16990

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-27 18:21:49 +01:00
29d11a8326 runtime(doc): group python interface related items in todo.txt
While at it, remove the item about merged PR #12032

closes: #16984

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2025-03-27 18:20:30 +01:00
45377e2096 patch 9.1.1248: compile error when building without FEAT_QUICKFIX
Problem:  compile error when building without FEAT_QUICKFIX
Solution: adjust ifdefs in popupwin.c, add CheckFeature quickfix
          to a few tests (John Marriott, Hirohito Higashi)

closes: #16940
closes: #16962

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-27 18:16:52 +01:00
7d8e7df551 patch 9.1.1247: fragile setup to get (preferred) keys from key_name_entry
Problem:  fragile setup to get (preferred) keys from key_name_entry
          (after v9.1.1179)
Solution: refactor the code further, fix a bug with "pref_name" key
          entry introduced in v9.1.1180 (Yee Cheng Chin)

The optimization introduced for using bsearch() with key_name_entry
in #16788 was fragile as it required synchronizing a non-obvious index
(e.g. IDX_KEYNAME_SWU) with the array that could be accidentally changed
by any one adding a key to it. Furthermore, the "pref_name" that was
introduced in that change was unnecessary, and in fact introduced a bug,
as we don't always want to use the canonical name.

The bug is triggered when the user triggers auto-complete using a
keycode, such as `:set <Scroll<Tab>`. The bug would end up showing two
copies of `<ScrollWheelUp>` because both entries end up using the
canonical name.

In this change, remove `pref_name`, and simply use a boolean to track
whether an entry is an alt name or not and modify logic to respect that.

Add test to make sure auto-complete works with alt names

closes: #16987

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-27 17:51:03 +01:00
4f9b1243e3 patch 9.1.1246: coverity complains about some changes in v9.1.1243
Problem:  coverity complains about some changes in v9.1.1243
Solution: remove duplicate code in diff_find_changed() (Yee Cheng Chin)

closes: #16988

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-27 17:34:50 +01:00
d9b82cfe84 patch 9.1.1245: need some more tests for curly braces evaluation
Problem:  need some more tests for curly braces evaluation
Solution: Add a test for the regression introduced by patch v9.1.1242
          (Yegappan Lakshmanan)

closes: #16986

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-27 17:31:31 +01:00
35cb38d34b patch 9.1.1244: part of patch v9.1.1242 was wrong
Problem:  part of patch v9.1.1242 was wrong
Solution: revert part of the patch

fixes: #16983
related: #16972

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 20:36:12 +01:00
14dec7b204 runtime(omnimark): update and rewrite syntax script in Vim9 script
Note: this commit rewrites the omnimark syntax script in Vim9 script and
      is therefore probably incompatible with Neovim

closes: #16979

Signed-off-by: Peter Kenny <github.com@k1w1.cyou>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 19:52:50 +01:00
9943d4790e patch 9.1.1243: diff mode is lacking for changes within lines
Problem:  Diff mode's inline highlighting is lackluster. It only
          performs a line-by-line comparison, and calculates a single
          shortest range within a line that could encompass all the
          changes. In lines with multiple changes, or those that span
          multiple lines, this approach tends to end up highlighting
          much more than necessary.

Solution: Implement new inline highlighting modes by doing per-character
          or per-word diff within the diff block, and highlight only the
          relevant parts, add "inline:simple" to the defaults (which is
          the old behaviour)

This change introduces a new diffopt option "inline:<type>". Setting to
"none" will disable all inline highlighting, "simple" (the default) will
use the old behavior, "char" / "word" will perform a character/word-wise
diff of the texts within each diff block and only highlight the
differences.

The new char/word inline diff only use the internal xdiff, and will
respect diff options such as algorithm choice, icase, and misc iwhite
options. indent-heuristics is always on to perform better sliding.

For character highlight, a post-process of the diff results is first
applied before we show the highlight. This is because a naive diff will
create a result with a lot of small diff chunks and gaps, due to the
repetitive nature of individual characters. The post-process is a
heuristic-based refinement that attempts to merge adjacent diff blocks
if they are separated by a short gap (1-3 characters), and can be
further tuned in the future for better results. This process results in
more characters than necessary being highlighted but overall less visual
noise.

For word highlight, always use first buffer's iskeyword definition.
Otherwise if each buffer has different iskeyword settings we would not
be able to group words properly.

The char/word diffing is always per-diff block, not per line, meaning
that changes that span multiple lines will show up correctly.
Added/removed newlines are not shown by default, but if the user has
'list' set (with "eol" listchar defined), the eol character will be be
highlighted correctly for the specific newline characters.

Also, add a new "DiffTextAdd" highlight group linked to "DiffText" by
default. It allows color schemes to use different colors for texts that
have been added within a line versus modified.

This doesn't interact with linematch perfectly currently. The linematch
feature splits up diff blocks into multiple smaller blocks for better
visual matching, which makes inline highlight less useful especially for
multi-line change (e.g. a line is broken into two lines). This could be
addressed in the future.

As a side change, this also removes the bounds checking introduced to
diff_read() as they were added to mask existing logic bugs that were
properly fixed in #16768.

closes: #16881

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 19:46:09 +01:00
06774a271a patch 9.1.1242: Crash when evaluating variable name
Problem:  Crash when evaluating variable name (after v9.1.0870)
Solution: calculate the strlen() directly instead of pointer
          arithmetics, fix missing assignment to lp->ll_name_end in
          get_lval() (zeertzjq)

closes: #16972
fixes: vim-airline/vim-airline#2710
related: #16066

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 19:25:57 +01:00
4dd17a90ee patch 9.1.1241: wrong preprocessort indentation in term.c
Problem:  wrong preprocessort indentation in term.c
Solution: update indentation (Hirohito Higashi)

closes: #16981

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 19:08:46 +01:00
08283b28af patch 9.1.1240: Regression with ic/ac text objects and comment plugin
Problem:  Regression with ic/ac text objects and comment plugin
Solution: Fix regression, update tests (Maxim Kim)

fix regression: sometimes ic/ac should be line-wise

```
int main() {
    // multilple comments
    // cursor is between them
}

 # dac ->

int main() {
}
```

closes: #16947
closes: #16980

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 19:05:35 +01:00
f9f4e27ad7 runtime(hyprlang): save and restore cpo setting in syntax script
fixes: #16970
closes: #16973

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 19:00:15 +01:00
052b86ba63 runtime(solidity): update syntax script with error definitions
closes: #16978

References:
- https://docs.soliditylang.org/en/latest/contracts.html#transient-storage
- https://soliditylang.org/blog/2021/04/21/custom-errors/

Signed-off-by: S0AndS0 <strangerthanbland@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 18:57:55 +01:00
721be7fd0b runtime(doc): add back help tag "pi_netrw.txt"
closes: #16974

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 18:53:46 +01:00
038be2701d patch 9.1.1239: if_python: no tuple data type support
Problem:  if_python: no tuple data type support (after v9.1.1232)
Solution: Add support for using Vim tuple in the python interface
          (Yegappan Lakshmanan)

closes: #16964

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-26 18:46:21 +01:00
9d5487f6fd runtime(doc): Add missing garbagecollect() hypertext link
closes: #16975

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-25 21:04:23 +01:00
20e46fa65b Improve contributing guide by adding a section on signing off commits
related: #16957
closes: #16976

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-25 21:02:20 +01:00
7746348c5d patch 9.1.1238: wrong cursor column with 'set splitkeep=screen'
Problem:  With ':set splitkeep=screen', cursor did't restore column
          correctly when splitting a window on a line longer than the
          last line on the screen (after v9.1.0707)
Solution: Restore cursor column in `win_fix_scroll()` since it may be
          changed in `getvcol()` after 396fd1ec29 (phanium).

Example:
```
echo longlonglongling\nshort | vim - -u NONE --cmd 'set
splitkeep=screen' +'norm $' +new +q
```

fixes: #16968
closes: #16971

Signed-off-by: phanium <91544758+phanen@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-25 20:15:31 +01:00
2726821d38 patch 9.1.1237: Compile error with C89 compiler in term.c
Problem:  Compile error with C89 compiler in term.c
          (Zoltan Arpadffy)
Solution: split out LOG_TR macro into 2 different macros. LOG_TR1 that
          takes only a single argument and LOG_TRN that takes 2
          arguments. Remove the use of ##__VA_ARGS__ since the macro is
          now always called with 2 arguments (Hirohito Higashi)

related: #16962
closes: #16969

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-25 20:08:32 +01:00
35cb03648f patch 9.1.1236: tests: test_comments leaves swapfiles around
Problem:  tests: test_comments leaves swapfiles around
Solution: use ':bw!' instead of ':close!'

closes: #16955

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-24 20:38:42 +01:00
d2232d70c8 patch 9.1.1235: cproto files are outdated
Problem:  cproto files are outdated
Solution: regenerate proto files by running make proto
          (Yegappan Lakshmanan)

closes: #16956

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-24 20:36:14 +01:00
7cedae3ec3 patch 9.1.1234: Compile error when SIZE_MAX is not defined
Problem:  Compile error when SIZE_MAX is not defined
Solution: Define SIZE_MAX (Zoltan Arpadffy)

related: #16962

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-24 20:33:08 +01:00
b42b9fc41f patch 9.1.1233: Coverity warns about NULL pointer when triggering WinResized
Problem:  Coverity warns about NULL pointer when triggering WinResized
Solution: Add OOM checks for windows_list like for scroll_dict. Remove
          void casts that are unnecessary after 9.1.1084 (zeertzjq).

closes: #16959

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-24 20:22:23 +01:00
92e109fc13 runtime(doc): Fix an omission in the documentation.
closes: #16960

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-24 20:12:37 +01:00
9cb865e95b patch 9.1.1232: Vim script is missing the tuple data type
Problem:  Vim script is missing the tuple data type
Solution: Add support for the tuple data type
          (Yegappan Lakshmanan)

closes: #16776

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-23 16:42:16 +01:00
adb703e1b9 runtime(vim): Update base-syntax, match protected constructors
Support for protected constructors was added in commit 7e89800.

closes: 16618

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-23 16:14:20 +01:00
b5459ee104 runtime(syntax-tests): Do not ignore failed screendumps
The process of preparing and submitting syntax tests is
fraught with challenges that can turn away many aspiring
contributors from ever attempting it.  (Out of 69 languages
introduced since v9.0.1627, there are only syntax tests for
Tera.)

After v9.1.1176~1, one visual clue for admitting syntax test
failures previously available with e.g. "git status" is gone
after all files under "failed/" have been made ignored for
Git and Mercurial.  There isn't a single way to go about it:
some people may move files from "failed/" to "dumps/" after
each iteration; some people may only move "good" iteration
files; when a test file is refactored to a great extent,
some people may prefer deleting all test-related files under
"dumps/" before moving files from "failed/".  The usability
of reporting, at any time, that there are some _untracked_
files under "failed/" cannot be overstated.  Without it, the
chances are greater for pushing mismatched changesets.  And
when tests fail then everyone but the author will be kept in
the dark about the cause: were some updated screendumps not
committed _or_ was a wrong version of the syntax plugin
committed?

Another file, "testdir/Xfilter" (v9.1.0763), that will be
created to establish communication from Make to Vim about
what subset of syntax tests is requested for running, should
also be not ignored but rather deleted once its contents are
read.  Unless it is explicitly deleted _after test failure_,
the file may contain new *and* old test names when another
testing attempt is under way.  And by virtue of it being
ignored, the reason for also running not requested tests
will be as ever puzzling.

Both Git and Mercurial support per-user configuration; such
wide-reaching settings hardly belong to clonable defaults.

Also, match literal dots in testname filters.

Also, discover and report _some_ disused screendump files
tracked under "dumps/".

References:
- https://git-scm.com/docs/gitignore
- https://www.mercurial-scm.org/help/topics/config#ui

closes: #16917

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-23 10:42:23 +01:00
4e7b4308fb patch 9.1.1231: filetype: SPA JSON files are not recognized
Problem:  filetype: SPA (single page application) JSON files are not
          recognized (used by pipewire and wireplumber)
Solution: detect pipewire and wireplumber configuration files as spajson
          filetype, include filetype, indent and syntax scripts for this
          new filetype (David Mandelberg).

I looked at all the files found by this command to see if the syntax
highlighting looked reasonable:

```
find {~/.config,/etc,/usr/share}/{pipewire,wireplumber} -type f -name \*.conf
```

References:
*   pipewire config files: https://docs.pipewire.org/page_config.html
*   wireplumber config files:
    https://pipewire.pages.freedesktop.org/wireplumber/daemon/configuration/conf_file.html
    and
*   https://pipewire.pages.freedesktop.org/wireplumber/daemon/locations.html

closes: #16950

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-23 10:26:00 +01:00
932a535bfa runtime(doc): update and correct str2blob() and blob2str() examples
closes: #16952

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-23 10:20:20 +01:00
e14aa3c035 runtime(hlyank): update the hlyank package
closes: #16944

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-22 15:58:59 +01:00
19d4f99a34 runtime(syntax-tests): Add non-Latin-1 character filters for C syntax tests
See pull request #14767.

Rename the Vim :keymap filter files so they're, again, associated with
the correct dump files.

closes: #16560

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-21 18:17:17 +01:00
8a63529a2f patch 9.1.1230: inconsistent CTRL-C behaviour for popup windows
Problem:  Ctrl-C closes popup windows that have a filter callback,
          but does not close popups without a filter callback.
Solution: Modified popup_do_filter() to also close popups without
          filter callback when Ctrl-C is pressed (glepnir).

fixes: #16839
closes: #16928

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-21 18:12:32 +01:00
9712a2534f patch 9.1.1229: the comment plugin can be improved
Problem:  the comment plugin can be improved
Solution: add comment text objects "ic" and "ac"
          (Maxim Kim)

closes: #16938

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-21 18:04:37 +01:00
51a06ecee0 runtime(sh): consider sh as POSIX shell by default
Also, do not set g:is_kornshell when g:is_posix is set. BSD shells are
POSIX but many are derived from the ash shell.

closes: #16939

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-21 17:52:08 +01:00
5753084042 patch 9.1.1228: completion: current position column wrong after got a match
Problem:  The current_pos.col was incorrectly updated to the length of
          the matching text. This will cause the next search to start
          from the wrong position.
Solution: current_pos has already been updated in search_str_in_line and
          does not need to be changed (glepnir)

closes: #16941

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-21 17:16:21 +01:00
83d74404bb runtime(hlyank): add the hlyank package
closes: #16919
related: #16866

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-19 21:55:59 +01:00
51ff18e319 patch 9.1.1227: no tests for the comment package
Problem:  no tests for the comment package
Solution: add some tests (Maxim Kim).

closes: #16933

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-19 20:54:12 +01:00
7a5115ce50 patch 9.1.1226: "shellcmdline" completion doesn't work with input()
Problem:  "shellcmdline" completion doesn't work with input().
Solution: Use set_context_for_wildcard_arg().  Fix indent in nextwild()
          (zeertzjq).

There are some other inconsistencies for input() completion (ref #948),
but since "shellcmdline" currently doesn't work at all, it makse sense
to at least make it work.

fixes: #16932
closes: #16934

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-19 20:29:58 +01:00
e4e0a2468c patch 9.1.1225: extra NULL check in VIM_CLEAR()
Problem:  extra NULL check in VIM_CLEAR()
Solution: remove the NULL check and rely on the NULL check in vim_free()
          instead (Hirohito Higashi).

closes: #16936

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-19 20:28:20 +01:00
40ab82b974 runtime(sh): remove invalid commented out line in syntax script
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 23:12:52 +01:00
711f4a07f3 runtime(sh): update sh indent script
fixes: #16930

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 22:36:28 +01:00
e08f10a55c patch 9.1.1224: cannot :put while keeping indent
Problem:  cannot :put while keeping indent (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 22:14:34 +01:00
11ab02c819 runtime(go): use :term for keywordprg for nvim/gvim
Problem:
- The document from `go doc` can be very long, and you can scroll if
  using `!` to run shell command in Gvim.
- I realize that I didn't fully mimic behavior of default keywordprg
  in Nvim in the last commit.

Solution:
- Use builtin terminal for keywordprg in Gvim
- In Nvim (both TUI and GUI), it should mimic the behavior of Vim
  `:term`, `:Man`, and `:help`

closes: #16911

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 21:05:35 +01:00
d5afc74403 patch 9.1.1223: wrong translation used for encoding failures
Problem:  wrong translation for encoding failures because of using
          literal "from" and "to" in the resulting error message
          (RestorerZ)
Solution: use separate error messages for errors "from" and "to"
          encoding errors.

fixes: #16898
closes: #16918

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 20:55:42 +01:00
8ac0f73eb1 patch 9.1.1222: using wrong length for last inserted string
Problem:  using wrong length for last inserted string
          (Christ van Willegen, after v9.1.1212)
Solution: use the correct length in get_last_insert_save(), make
          get_last_insert() return a string_T (John Marriott)

closes: #16921

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 20:49:01 +01:00
a3a7d10bfb patch 9.1.1221: Wrong cursor pos when leaving Insert mode just after 'autoindent'
Problem:  Wrong cursor position and '^' mark when leaving Insert mode
          just after 'autoindent' and cursor on last char of line.
Solution: Don't move cursor to NUL when it wasn't moved to the left
          (zeertzjq).

fixes: #15581
related: neovim/neovim#30165 neovim/neovim#32943
closes: #16922

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 20:41:24 +01:00
18a6853a76 patch 9.1.1220: filetype: uv.lock file not recognized
Problem:  filetype: uv.lock file not recognized
Solution: detect uv.lock file as toml filetype
          (Acaibird)

closes: #16924

Signed-off-by: Acaibird <durbannhawkey42@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 20:35:29 +01:00
c4815c157b patch 9.1.1219: Strange error with wrong type for matchfuzzy() "camelcase"
Problem:  Strange error with type for matchfuzzy() "camelcase".
Solution: Show the error "Invalid value for argument camelcase" instead
          of "Invalid argument: camelcase" (zeertzjq).

Note that using tv_get_string() will lead to confusion, as when the
value cannot be converted to a string tv_get_string() will also give an
error about that, but "camelcase" takes a boolean, not a string.  Also
don't use tv_get_string() for the "limit" argument above.

closes: #16926

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-18 20:28:00 +01:00
c00729824d patch 9.1.1218: missing out-of-memory check in filepath.c
Problem:  missing out-of-memory check in filepath.c
Solution: Add check for NULL (John Marriott)

closes: #16906

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-17 21:14:17 +01:00
85627732e0 patch 9.1.1217: tests: typos in test_matchfuzzy.vim
Problem:  tests: typos in test_matchfuzzy.vim (after 9.1.1214).
Solution: Fix the typos.  Consistently put the function call on the
          second line in assertions for camelcase (zeertzjq).

closes: #16907

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-17 21:06:02 +01:00
61b3544424 patch 9.1.1216: Pasting the '.' register multiple times may not work
Problem:  Pasting the '.' register multiple times may work incorrectly
          when the last insert starts with Ctrl-D and ends with '0'.
          (after 9.1.1212)
Solution: Restore the missing assignment (zeertzjq).

closes: #16908

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-17 21:02:50 +01:00
ad2f6b6662 runtime(keymap) Add forward slash (/) to russian-jcukenwin keymap
closes: #16912

Signed-off-by: Marat Amerov <maratamerov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-17 20:45:03 +01:00
dd3f1c0dda runtime(vim): Update base-syntax, match multiline return types
fixes #14442.
closes: #16914

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-17 20:27:13 +01:00
762a79e15c patch 9.1.1215: Patch 9.1.1213 has some issues
Problem:  Patch 9.1.1213 has some issues
Solution: revert it for now

This reverts commit 250739d442.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:39:58 +01:00
28e40a7b55 patch 9.1.1214: matchfuzzy() can be improved for camel case matches
Problem:  When searching for "Cur", CamelCase matches like "lCursor" score
          higher than exact prefix matches like Cursor, which is
          counter-intuitive (Maxim Kim).
Solution: Add a 'camelcase' option to matchfuzzy() that lets users disable
          CamelCase bonuses when needed, making prefix matches rank higher.
          (glepnir)

fixes: #16504
closes: #16797

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:29:19 +01:00
250739d442 patch 9.1.1213: cannot :put while keeping indent
Problem:  cannot :put while keeping indent
          (Peter Aronoff)
Solution: add the :iput ex command (64-bitman)

fixes: #16225
closes: #16886

Signed-off-by: 64-bitman <60551350+64-bitman@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 21:15:11 +01:00
7ceca3eb00 runtime(syntax-tests): Support "wait-free" test failure
When certain changes guarantee failure for old syntax tests,
opt for faster failure by reducing the number of screendumps
made for each file "page" to be no greater than the assigned
value of a VIM_SYNTAX_TEST_WAIT_TIME environment variable.
(This variable will be ignored and more screendumps may be
made when Make is GNU Make and a parent Makefile is used.)

Barring regressions, and assuming that v9.1.1163~1 succeeds
in providing a correct synchronisation mechanism outside of
"VerifyScreenDump()", and assuming that "readfile()" always
obtains the latest contents written by "term_dumpwrite()" in
"VerifyScreenDump()"; making a single screendump of a file
"page" and following it with a single reading of the written
screendump file should be enough to decide whether to pass
or fail a syntax test.

In addition, re-enable self testing after v9.1.1183~2.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:59:28 +01:00
34954972c2 patch 9.1.1212: too many strlen() calls in edit.c
Problem:  too many strlen() calls in edit.c
Solution: refactor edit.c and remove strlen() calls
          (John Marriott)

This commit attempts to make edit.c more efficient by:

- in truncate_spaces() pass in the length of the string.
- return a string_T from get_last_insert(), so that the length of the
  string is available to the caller.
- refactor stuff_insert():

  - replace calls to stuffReadbuff() (which calls STRLEN() on it's
    string argument) with stuffReadbuffLen() (which gets the length of
    it's string argument passed in).
  - replace call to vim_strrchr() which searches from the start of the
    string with a loop which searches from end of the string to find the
    last ESC character.

- change get_last_insert_save() to call get_last_insert() to get the
  last_insert string (the logic is in one place).

closes: #16863

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:49:52 +01:00
20d23ce93b patch 9.1.1212: filetype: logrotate'd pacmanlogs are not recognized
Problem:  filetype: logrotate'd pacmanlogs are not recognized
Solution: also detect pacman.log* files as pacmanlog filetype,
          remove BufNewFile autocmd (Eisuke Kawashima)

closes: #16873

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:37:14 +01:00
3c7d9b11c8 runtime(prql): include prql syntax script
References:
https://prql-lang.org/
https://github.com/PRQL/prql

closes: #16885

Signed-off-by: Jonathan <vanillajonathan@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:32:13 +01:00
bcf66e0141 patch 9.1.1211: TabClosedPre is triggered just before the tab is being freed
Problem:  TabClosedPre is triggered just before the tab is being freed,
          which limited its functionality.
Solution: Trigger it a bit earlier and also on :tabclose and :tabonly
          (Jim Zhou)

closes: #16890

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:24:57 +01:00
21ac3a49b5 patch 9.1.1210: translation(ru): missing Russian translation for the new tutor
Problem:  translation(ru): missing Russian translation for the new tutor
Solution: include new Russian translation, update the Makefile for
          installing the new translations (RestorerZ)

closes: #16901

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 20:03:51 +01:00
2c9f49b200 patch 9.1.1209: colorcolumn not drawn after virtual text lines
Problem:  colorcolumn not drawn after virtual text lines
Solution: show colorcolumn on correct line with virtual text by adding
          the size of p_extra to virtual column offset (Matthias)

When a line has two or more lines of virtual text above it, the color
column used to appear on the line of the second virtual text line, while
the first virtual text line and the "real" text line did not have a
color column.

The color column for "above" virtual text is positioned by taking the
offset of the size of the virtual text lines and subtracting it from the
"virtual column" that we are in. If the result equals the color column,
this column is colored.

The "virtual column" is calculated from the beginning of the first
virtual text line and continues over the newlines up to the end of the
"real" text. However, the offset from the virtual text was reset at
every line.

Adding all those offsets together leads to the color column being placed
consistently at the line of the "real" text.

related: #12004
related: #16868
closes: #16904

Signed-off-by: Matthias <matthias.rader@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 19:27:51 +01:00
ab281f8b34 patch 9.1.1208: MS-Windows: not correctly restoring alternate screen on Win 10
Problem:  MS-Windows: not correctly restoring alternate screen on Win 10
          after ssh (Daniel Viberg)
Solution: return a bit later in RestoreConsoleBuffer()
          (Christopher Plewright)

fixes: #16418
closes: #16897

Signed-off-by: Christopher Plewright <chris@createng.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 19:14:31 +01:00
1064426d15 patch 9.1.1207: MS-Windows: build warning in filepath.c
Problem:  MS-Windows: build warning in filepath.c
          (after v9.1.1204)
Solution: add type cast (John Marriott)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-16 19:06:31 +01:00
8322923b40 translation(ru): include Russian translation for chapter two of the tutorial
closes: #16900

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 10:31:10 +01:00
13dcea2df1 runtime(matchparen): line continuation causes failure in CI
so let's remove the line continuation

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 10:24:11 +01:00
63a885b650 patch 9.1.1206: tests: test_filetype fails when a file is a directory
Problem:  tests: test_filetype fails when a file is a directory
          (Eisuke Kawashima)
Solution: When encountering a directory instead of a file, skip that
          particular filetype test

fixes: #16894

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 10:19:48 +01:00
5f2a959553 runtime(doc): symlinking netrw.txt causes problems during install on Windows
So let's remove the symlink and copy the netrw documentation back into
runtime/doc directory. While at it, add a Makefile target to do this
whenever runtime/pack/dist/opt/netrw/doc/netrw.txt is updated.

fixes: #16878
fixes: #16872

Co-authored-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 10:04:39 +01:00
84a7503e29 patch 9.1.1205: completion: preinserted text not removed when closing pum
Problem:  completion: preinserted text not removed when closing pum
Solution: delete preinsert text inside in ins_compl_stop() (glepnir).

closes: #16891

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:59:22 +01:00
8021830827 runtime(tutor): updated Russian translation for tutor chapter 1
closes: #16899

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:58:02 +01:00
00a749bd90 patch 9.1.1204: MS-Windows: crash when passing long string to expand()
Problem:  MS-Windows: crash when passing long string to expand() with
          'wildignorecase'.
Solution: Use the same buflen as unix_expandpath() in dos_expandpath().
          Remove an unnecessary STRLEN() while at it (zeertzjq).

closes: #16896

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:53:32 +01:00
96395e1512 runtime(cs): Update C# runtime files
closes: #16884

Signed-off-by: Nick Jensen <nickspoon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:50:41 +01:00
47071c6076 patch 9.1.1203: matchparen keeps cursor on case label in sh filetype
Problem:  matchparen keeps cursor on case label in sh filetype
          (@categorical, after 9.1.1187).
Solution: Use :defer so that cursor is always restored, remove checks
          for older Vims, finish early if Vim does not support :defer

fixes: #16887
closes: #16888

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:43:07 +01:00
2329bd427a runtime(doc): fix a typo in gitrebase filetype
Introduced in 4d2c4b90f.

closes: #16892

Signed-off-by: skshetry <18718008+skshetry@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:34:39 +01:00
3ca914ec74 runtime(doc): Tweak documentation style a bit
closes: #16893

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:32:28 +01:00
b55f0221cc runtime(vim): Sync syntax generator base file with output file.
Synchronisation was lost in commit 0fab891 and the error propagated to
the output file in commit 5606ca5.

closes: #16889

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-15 09:30:00 +01:00
f22580e57c runtime(doc): update a few minor omissions from 5876016 and 4d2c4b9
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-14 12:05:52 +01:00
5606ca5349 patch 9.1.1202: Missing TabClosedPre autocommand
Problem:  Missing TabClosedPre autocommand
          (zoumi)
Solution: Add the TabClosedPre autcommand (Jim Zhou).

fixes: #16518
closes: #16855

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:58:25 +01:00
587601671c patch 9.1.1201: 'completefuzzycollect' does not handle dictionary correctly
Problem:  'completefuzzycollect' does not handle dictionary correctly
Solution: check for ctrl_x_mode_dictionary (glepnir)

closes: #16867

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:39:51 +01:00
1dc731a49f runtime(doc): make :h 'completefuzzycollect' a bit clearer
- Fix grammar
- Use "matches" instead of "items" ("completion candidates" is used in
  some other places, but it's a bit verbose)
- "When set" is a bit vague, instead use "For specified modes"

closes: #16871

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:30:43 +01:00
4d2c4b90fb runtime(doc): document gitrebase filetype
closes: #16883

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 21:20:20 +01:00
c1c1019fa3 translation(it): update menu_it
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 20:38:44 +01:00
6b01f02712 translation(sr): Add chapter two of the new tutor
Add chapter two to the Serbian translation of the new tutor.
Update the Filelist with two new files.

closes: #16875

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 20:33:26 +01:00
1830e787f6 patch 9.1.1200: cmdline pum not cleared for input() completion
Problem:  Cmdline pum not cleared for input() completion.
Solution: Temporary reset RedrawingDisabled in cmdline_pum_cleanup(),
          like what is done in wildmenu_cleanup() (zeertzjq).

fixes: #16874
closes: #16876

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-13 20:29:13 +01:00
0adbe639a5 patch 9.1.1199: gvim uses hardcoded xpm icon file
Problem:  Many X11/Wayland desktops support icon themes, and many themes
          provide a gvim icon, but this icon is ignored for the window
          itself because it is hardcoded in the source code.
Solution: Read the icon from the theme instead (Aurelien Gateau).

closes: #16859

Signed-off-by: Aurelien Gateau <mail@agateau.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 23:16:42 +01:00
54c88d0cf8 runtime(indent-tests): GitHub Actions doesn't show why indent tests failed
Problem:  GitHub Actions doesn't show why indent tests failed
Solution: Send the .fail files to stdout

References:
https://github.com/vim/vim/pull/16852#issuecomment-2719041781

closes: #16870

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 22:43:08 +01:00
f209dcd3de patch 9.1.1198: [security]: potential data loss with zip.vim
Problem:  [security]: potential data loss with zip.vim and special
          crafted zip files (RyotaK)
Solution: use glob '[-]' to protect filenames starting with '-'

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-693p-m996-3rmf

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 22:04:01 +01:00
53b14578e0 patch 9.1.1197: process_next_cpt_value() uses wrong condition
Problem:  process_next_cpt_value() uses wrong condition
Solution: use cfc_has_mode() instead and remove redundant else if branch
          (glepnir)

closes: #16833

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 21:28:39 +01:00
7546afbf52 patch 9.1.1196: filetype: config files for container tools are not recognized
Problem:  filetype: config files for container tools are not recognized
Solution: detect the ones that aren't detected yet as toml filetype
          (David Mandelberg)

The .containerignore format doesn't look exactly the same as gitignore,
but very close. And .dockerignore is already using gitignore.

References:
https://github.com/containers/common/blob/main/docs/containerignore.5.md
https://github.com/containers/common/blob/main/docs/containers.conf.5.md
https://github.com/containers/storage/blob/main/docs/containers-storage.conf.5.md
https://github.com/containers/image/blob/main/docs/containers-registries.conf.5.md
https://github.com/containers/image/blob/main/docs/containers-registries.conf.d.5.md

I wasn't sure exactly how to interpret what containers.conf(5) was
saying about modules, so I looked at
https://github.com/containers/common/tree/main/pkg/config/testdata/modules
to get examples, and based the detection off those.

closes: #16852

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 21:23:39 +01:00
c1c3b5d6a0 runtime(doc): remove unnecessary "an"
"umask" is pronounce like "youmask", so having an "an" before it is a
bit strange.  In other places in the help, "umask" is not preceded by
either "a" or "an", and sometimes preceded by "the".

Also, "Note" is usually followed either by ":" or "that" in builtin.txt,
so add a ":" after "Note".

closes: 16860

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 21:16:13 +01:00
2d18789aa6 patch 9.1.1195: inside try-block: fn body executed with default arg undefined
Problem:  inside try-block: fn body executed when default arg is
          undefined
Solution: When inside a try-block do not execute function body after an
          error in evaluating a default argument expression
          (Shane Harper).

closes: #16865

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 21:12:12 +01:00
7db96134c2 runtime(doc): Update doc 52.6
Problem: the highlight-yank plugin exmaple provided in the doc behaves
	 incorrectly when selection is set to exclusive.

Solution: use a unified offset of 1 and pass 'exclusive: false' to
	  getregionpos(), while at it, also clarify when the
          TextYankPost autocommand triggers.

closes: #16866

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-12 20:57:24 +01:00
23473303b7 runtime(compiler): allow customizing exe and args for tsc
closes: #16853

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:40:04 +01:00
4fa2dd2405 runtime(compiler): add comment for Dispatch
closes: #16854

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:35:48 +01:00
a8aeeeb9aa runtime(tera): remove unwanted code and fix issues in syntax script
closes: #16857

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:17:45 +01:00
0a336ccb57 runtime(doc): clarify that a umask is applied to mkdir()
fixes: #16849

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-11 21:15:30 +01:00
6763b0ee95 patch 9.1.1194: filetype: false positive help filetype detection
Problem:  filetype: false positive help filetype detection
Solution: Only detect a file as help if modeline appears either at start
          of line or is preceded by whitespace (zeertzjq).

closes: #16845

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:30:29 +01:00
c2623824a7 runtime(man): improve :Man completion for man-db
On man-db systems, complete with actual man sections and pages, instead
of shell commands.

I tried to come up with a portable solution for multiple man
implementations in https://github.com/vim/vim/discussions/16794 but I
think the differences between implementations were too large to do that
without overly complicated code. So instead, I implemented it for man-db
(which I think is common on Linux) and hopefully left it easier for
other people to implement it on other systems in the future if they want
to.

closes: #16843

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:26:50 +01:00
969e11a18b patch 9.1.1193: Unnecessary use of STRCAT() in au_event_disable()
Problem:  Unnecessary use of STRCAT() in au_event_disable().  STRCAT()
          seeks to the end of new_ei, but here the end is already known.
Solution: Use STRCPY() and add p_ei_len to new_ei.  Also fix a typo in a
          comment.  Add a test that 'eventignore' works in :argdo
          (zeertzjq).

closes: #16844

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:15:19 +01:00
835bc014c0 translation(sr): Update Serbian messages translation
closes: #16846

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:13:08 +01:00
8d67cbfa1f runtime(doc): document vim syntax switches
related: #16727
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:10:22 +01:00
0fab89117f runtime(vim): Update base-syntax, improve :syntax highlighting
- Highlight missing :syntax subcommands.
- Don't highlight user specified syntax group names.

closes: #16847

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-10 21:04:53 +01:00
e671b1b6d1 patch 9.1.1192: Vim crashes with term response debug logging enabled
Problem:  Vim crashes with term response debug logging enabled and
          running in a non-writeable directory
Solution: use ch_log() instead of custom termresponse logging function
          (Hirohito Higashi)

closes: #16840

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:35:14 +01:00
3dca512939 runtime(vim): Update base-syntax and generator, only match valid predefined variables
- Only match valid predefined and option variables.
- Match scope dictionaries.
- Highlight scope prefixed variables as a scope dictionary accessor. The
  vimVarScope syntax group can be linked to vimVar to disable this.
- Include support for Neovim-only predefined and option variables.

Temporary collateral damage - scope dictionaries match instead of keys
in dictionary literals.

closes: #16727

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:30:28 +01:00
42e498d9c4 runtime(plsql): move fold option from syntax to filetype plugin
closes: #16838

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Lee Lindley <lee.lindley@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:25:17 +01:00
d6c7913e24 patch 9.1.1191: tests: test for patch 9.1.1186 doesn't fail without the patch
Problem:  Test for patch 9.1.1186 doesn't fail without the patch.
Solution: Set 'nomodeline' in the test (zeertzjq).

closes: #16835

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:14:45 +01:00
f4d87ff888 patch 9.1.1190: C indentation does not detect multibyte labels
Problem:  C indentation does not detect multibyte labels
Solution: Correctly skip over multibyte characters
          (Anttoni Erkkilä)

closes: #16770

Signed-off-by: Anttoni Erkkilä <anttoni.erkkila@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:07:15 +01:00
ccf2731fd1 CI: Update clang to version 20
closes: #16836

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 16:03:47 +01:00
d49ba7b92a runtime(sh): set b:match_skip to ignore matches for matchit
related: #16801
closes: chrisbra/matchit#50
closes: #16834

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 10:16:30 +01:00
0a825bdde8 patch 9.1.1189: if_python: build error due to incompatible pointer types
Problem:  if_python: build error due to incompatible pointer types
Solution: cast pointer to PyObject* (oreo639)

Avoid build failure due to -Wincompatible-pointer-types becoming an error in
gcc 14.
When Py_LIMITED_API is < 0x030b0000, then the for Py_XDECREF must be PyObject*.
Vim targets Py_LIMITED_API = 0x03080000 (python 3.8).

closes: #16824

Signed-off-by: oreo639 <oreo6391@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 08:54:21 +01:00
14da0fb2d8 patch 9.1.1188: runtime(tera): tera support can be improved
Problem:  runtime(tera): tera support can be improved
Solution: update tera filetype plugin, include a tera syntax script
          include tera syntax tests, update the filetype test,
          update makemenu and synmenu vim scripts
          (MuntasirSZN)

closes: #16830

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 08:52:05 +01:00
9102ac11ab patch 9.1.1187: matchparen plugin wrong highlights shell case statement
Problem:  matchparen plugin wrong highlights shell case statement
          (Swudu Susuwu)
Solution: return early, if we are in a shSnglCase syntax element

The shell syntax element "case $var in foobar)" uses closing parenthesis
but there is no corresponding opening parenthesis for that syntax
element. However matchparen is not aware of such things and will happily
try to match just the next opening parenthesis.

So let's just add a way to opt out for such cases. In this case, use the
syntax state to check if the closing parenthesis belongs to the syntax
item "shSnglCase" and if it is, do not try to find a corresponding
opening parenthesis.

Since inspecting the syntax state might be expensive, put the whole
check behind a filetype test, so that matchparen will only perform this
particular check, when it knows the current buffer is a "sh" filetype.

fixes: #16801
closes: #16831

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 08:40:33 +01:00
d89770eb98 runtime(doc): use GNOME instead of Gnome
It's called "GNOME Terminal" in
https://gitlab.gnome.org/GNOME/gnome-terminal It's also called GNOME
Terminal in English Wikipedia
https://en.wikipedia.org/wiki/GNOME_Terminal and the Wikipedia pages of
8 other languages.

Also, make line wrapping the same in insert.txt and cmdline.txt.

closes: #16832

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-09 08:38:35 +01:00
16d6fff98e patch 9.1.1186: filetype: help files in git repos are not detected
Problem:  filetype: help files in git repos are not detected
Solution: detect */doc/*.txt files as help if they end with a help
          modeline, even if 'modeline' is off

Here's how I checked that this would still detect vim's own help files
correctly:

$ find . -type f -path '*/doc/*.txt' \
> -exec awk '{ } ENDFILE { print FILENAME ":" $0; }' '{}' + |
> grep -v 'vim:.*\<\(ft\|filetype\)=help\>'
./src/libvterm/doc/seqs.txt: 23    DECSM 42         = DECNRCM, national/multinational character

closes: #16817

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 17:21:16 +01:00
ce4f9d2a10 runtime(nohlsearch): fix CursorHold loop
fix exception when entering the insert mode with paste

closes: #16818

Co-authored-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: qaqland <qaq@qaq.land>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 17:16:18 +01:00
3d1a437f1b runtime(doc): warn users about potentially risky hotkey
Also, mention that CTRL-SHIFT-V might be mapped to paste text, similar
to the note about CTRL-V.

References:
2d7e9d78c9/src/org.gnome.Terminal.gschema.xml (L395-398)
8942adde5b/src/org.gnome.Ptyxis.gschema.xml.in (L529-L533)

closes: #16816

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 17:06:50 +01:00
f63c3467b1 runtime(syntax-tests): Improve parts of "runtest.vim"
* Accommodate the calling of "EraseLineAndReturnCarriage()"
  to not interfere with the "skipped" and "failed" reports.

* Create the "failed" directory, if unavailable, without
  relying on "VerifyScreenDump()" to do it so that reporting
  with "Xtestscript#s:AssertCursorForwardProgress()" can be
  uniformly attempted.

* Make an only list copy of the "Xtestscript" contents and
  share it with every syntax test.

* Narrow the scope of the "filetype" and "failed_root" local
  variables.

closes: #16789

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 16:58:17 +01:00
dd42b05f8a patch 9.1.1185: endless loop with completefuzzycollect and no match found
Problem:  endless loop with completefuzzycollect and no match found
Solution: move pointer to line end and break loop

closes: #16820

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 16:52:55 +01:00
af05694900 runtime(doc): CmdUndefined and FuncUndefined can always be nested
closes: #16825

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 16:45:20 +01:00
b7dc5d3b61 patch 9.1.1184: Unnecessary use of vim_tolower() in vim_strnicmp_asc()
Problem:  Unnecessary use of vim_tolower() in vim_strnicmp_asc().
Solution: Use TOLOWER_ASC() instead (zeertzjq).

It was passing *s1 and *s2 to vim_tolower(). When char is signed, which
is the case on most platforms, c < 0x80 is always true, so it already
behaves the same as TOLOWER_ASC().

closes: #16826

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 16:42:48 +01:00
62f19541f4 patch 9.1.1083: "above" virtual text breaks cursorlineopt=number
Problem:  "above" virtual text breaks cursorlineopt=number.
Solution: Take "above" virtual text into account when applying
          CursorLineNr highlight.

fixes: #16828
closes: #16829

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-08 16:27:37 +01:00
62e822808e runtime(go): add 'keywordprg' and 'formatprg' to ftplugin
closes: #16804

Signed-off-by: Phạm Bình An <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 19:19:31 +01:00
6852e5c597 runtime(syntax-tests): Re-introduce support for "phoney" languages
As of patch v9.1.1176~1, there are no longer makeshift Make
targets to accommodate language names that can match phoney
targets.  For example, "clean_" was previously generated for
Clean because otherwise it clashed with the "clean" target.

Additionally, enable test filtering for makeshift targets.

Reference:
https://wiki.clean.cs.ru.nl/Clean

closes: #16810

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 19:12:45 +01:00
53d59ecc1d patch 9.1.1182: No cmdline completion for 'completefuzzycollect'
Problem:  No cmdline completion for the 'completefuzzycollect' option
          (after v9.1.1178)
Solution: Add cmdline completion for the 'completefuzzycollect' option,
          improve its description in optwin.vim (zeertzjq).

closes: #16813

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 19:09:09 +01:00
4422de6316 patch 9.1.1181: Unnecessary STRLEN() calls in insexpand.c
Problem:  Unnecessary STRLEN() calls in insexpand.c (after 9.1.1178).
Solution: Use the already available length (zeertzjq).

closes: #16814

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 19:06:02 +01:00
b3a9127494 patch 9.1.1180: short-description
Problem:  The meaning of <Tab> depends on unspecified behavior
          (after 9.1.1179).
Solution: Return TAB in case bsearch() finds K_TAB.  Rename alt_name to
          pref_name as that's closer to it meaning (zeertzjq).

The man page of bsearch() says:

    The bsearch() function returns a pointer to a matching member of the
    array, or NULL if no match is found.  If there are multiple elements
    that match the key, the element returned is unspecified.

So it's possible that bsearch() finds K_TAB instead of TAB when trying
to get the key code for <Tab>. Actually, it can happen when adding a
single key to end of the table:

closes: #16821

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

diff --git a/src/misc2.c b/src/misc2.c
index 151745ca2..90f108a24 100644
--- a/src/misc2.c
+++ b/src/misc2.c
@@ -1141,7 +1141,8 @@ static struct key_name_entry
     {TRUE, K_XRIGHT, STRING_INIT("xRight"), NULL},
     {TRUE, K_XUP, STRING_INIT("xUp"), NULL},
     {TRUE, K_ZEND, STRING_INIT("zEnd"), NULL},
-    {TRUE, K_ZHOME, STRING_INIT("zHome"), NULL}
+    {TRUE, K_ZHOME, STRING_INIT("zHome"), NULL},
+    {TRUE, -1, STRING_INIT("zzDummyKey"), NULL}
     // NOTE: When adding a long name update MAX_KEY_NAME_LEN.
 };
 #undef STRING_INIT

Meanwhile IDX_KEYNAME_TAB doesn't do anything, as TAB and K_TAB have the
same name.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 18:51:40 +01:00
6bdfeb099a runtime(vim): Update base-syntax, bug fixes
- Allow trailing backslashes in option values.
- Match :map-special modifier.
- Match :map-arguments case-sensitively.
- Remove <*Leader> from map modifier list and allow in RHS of a mapping.

closes: #16822

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-07 18:49:11 +01:00
4a1e6dacbb patch 9.1.1179: too many strlen() calls in misc2.c
Problem:  too many strlen() calls in misc2.c
Solution: refactor misc2.c and use bsearch() instead of a linear search
          to find matches in the key_names_table array (John Marriott).

This commit changes misc2.c to use bsearch() to perform string searches of
the key_names_table array.

Implementation detail:
- Some entries in this array have alternate names. Add field alt_name to
  point to the alternate name.
- Some entries in this array are only available if a given feature is
  defined. Keep them in the array, but add a boolean field enabled to
  indicate if the record can be used or not. If the feature is not
  available, the corresponding enabled field is set to FALSE.

In my measurements running the test suite on a huge non-gui build on
linux, the number of string comparisons in get_special_key_code():
Before (linear search): 2,214,957
After (binary search): 297,770

A side effect of this is 1477 calls to STRLEN() in
get_special_key_name() for the same test run are no longer necessary.

While we are here, refactor call_shell() and the mshape_names array to
remove some STRLEN() calls.

closes: #16788

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-06 22:26:23 +01:00
f31cfa29bf patch 9.1.1178: not possible to generate completion candidates using fuzzy matching
Problem:  not possible to generate completion candidates using fuzzy
          matching
Solution: add the 'completefuzzycollect' option for (some) ins-completion
          modes (glepnir)

fixes #15296
fixes #15295
fixes #15294
closes: #16032

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-06 21:59:13 +01:00
25e833f4ec editorconfig: set editing style for comment and hlsearch package
closes: #16805

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-06 21:14:20 +01:00
5daaf23268 patch 9.1.1177: filetype: tera files not detected
Problem:  filetype: tera files not detected
Solution: detect '*.tera' files as tera filetype,
          include a simple filetype plugin
          (MuntasirSZN)

closes: #16806

Signed-off-by: MuntasirSZN <muntasir.joypurhat@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-06 21:06:38 +01:00
ec6e82af04 runtime(doc): revert modeline change in vim9.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-06 21:01:26 +01:00
2323f225ca runtime(new-tutor): add chapter two to the interactive tutorial
closes: #16803

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 21:49:37 +01:00
34a7d82aae patch 9.1.1176: wrong indent when expanding multiple lines
Problem:  wrong indentation of lastline when expanding multiple lines
Solution: Check OPENLINE_FORCE_INDENT flag in open_line() (glepnir)

closes: #16786

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 21:18:20 +01:00
2e18facede test(runtime/syntax): improve syntax tests
When a syntax file is changed, timestamps of the corresponding files are
updated.

NOTE: At the moment this script does not strictly track dependency, like
cpp on c.

Also update ignore files

closes #16548

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 21:15:45 +01:00
273926e5c0 editorconfig: set indent config for *.vim files
I tried to figure out what was the most common using modelines. Note
that there are 2401 vim files, and the numbers in the other command
outputs below add up to significantly less than that, so it's possible
that my estimate of what's most common is way off.

```
$ find . -name \*.vim | wc -l
2401
```

It looks like 2 is the most common value by far for shiftwidth and
softtabstop, so I used that for indent_size.

```
$ git grep -hE '(^|\s)((vi|vim|ex):|(vi|[vV]im|ex):\s*set? .*:)' -- '*.vim' |
> grep -Eo '\<(sw|shiftwidth)=[0-9]+' | cut -d = -f 2 |
> sort | uniq -c | sort -n
      2 0
     14 3
     18 8
     75 4
    610 2

$ git grep -hE '(^|\s)((vi|vim|ex):|(vi|[vV]im|ex):\s*set? .*:)' -- '*.vim' |
> grep -Eo '\<(sts|softtabstop)=[^ :]+' | cut -d = -f 2 |
> sort | uniq -c | sort -n
      2 -1
      7 8
      9 0
      9 3
     43 4
    469 2
```

Similarly, 8 is by far the most common tabstop, so I didn't adjust that.

```
$ git grep -hE '(^|\s)((vi|vim|ex):|(vi|[vV]im|ex):\s*set? .*:)' -- '*.vim' |
> grep -Eo '\<(ts|tabstop)=[0-9]+' | cut -d = -f 2 |
> sort | uniq -c | sort -n
      1 20
      1 6
      1 9
      2 10
      2 16
      2 17
      3 15
      4 3
      5 18
      9 2
     40 4
    497 8
```

And expandtab is significantly more common than noexpandtab. Taking that
in combination with the common shiftwidth and softtabstop of 2 but
tabstop of 8, I set indent_style to space.

```
$ git grep -hE '(^|\s)((vi|vim|ex):|(vi|[vV]im|ex):\s*set? .*:)' -- '*.vim' |
> grep -Eo '\<(no)?(et|expandtab)\>' | sort | uniq -c | sort -n
     15 noexpandtab
     86 noet
    115 et
    309 expandtab
```

I did try to look at a few of the less common values for those options
to see if there was any obvious pattern, like all *.vim files in one
directory having a different setting. The only real pattern I noticed
was in runtime/pack/dist/opt/netrw, but that looks like it's imported
from a separate repository? So I think it might make more sense for them
to create their own .editorconfig file rather than putting settings for
that directory in this one.

closes: #16777

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 21:07:59 +01:00
de4b244bfc runtime(doc): mention alternative check for vim9script
Vim9 syntax changed before Vim 9 leading to errors thrown if checked for
availability of Vim9script in Vim Version 8.2 such as

This check seems to work as well and throws less errors on Vim 8.2 such
as on Ubuntu 22.04

closes: #16783

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 21:05:24 +01:00
c8cce711dd patch 9.1.1175: inconsistent behaviour with exclusive selection and motion commands
Problem:  inconsistent behaviour with exclusive selection and motion
          commands (aidancz)
Solution: adjust cursor position when selection is exclusive
          (Jim Zhou)

fixes: #16278
closes: #16784

Co-authored-by: Hirohito Higashi <h.east.727@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:47:29 +01:00
b34ce3e205 runtime(man): don't add jumps when loading a manpage
Without this change, pressing K while in one manpage to load another
one, then pressing CTRL-O to go back, results in going to the bottom of
the current (second) manpage. With this change, it goes back to the
previous manpage.

closes: #16791

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:38:20 +01:00
08a410f674 runtime(vim): recognize <...> strings (and keys) for 'keywordprg'
see :help E499 and :h key-notation

closes: #16795

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:33:00 +01:00
f7087cbec7 patch 9.1.1174: tests: Test_complete_cmdline() may fail
Problem:  tests: when the file 'TestCommand?Test' exists,
          'Test_complete_cmdline()' will fail when writing the file. And
          there's no related cleaning operation for this kind of file
          before the test run.
Solution: modify `write` to `write!` to override (Jim Zhou).

closes: #16799

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:25:11 +01:00
4783a2c073 runtime(doc): mention bzip3 in gzip plugin documentation
closes: #16800

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:22:24 +01:00
9f827ec587 patch 9.1.1173: filetype: ABNF files are not detected
Problem:  filetype: ABNF files are not detected
Solution: detect '.abnf' file as abnf filetype and
          include an abnf syntax plugin (A4-Tacks).

References:
- RFC5234
- RFC7405

closes: #16802

Signed-off-by: A4-Tacks <wdsjxhno1001@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:19:32 +01:00
3ed6659549 patch 9.1.1172: [security]: overflow with 'nostartofline' and Ex command in tag file
Problem:  heap-buffer-overflow with 'nostartofline' and Ex command in
          tag file.
Solution: Set cursor column when moving cursor to line 1 (zeertzjq).

closes: #16796

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-05 20:05:18 +01:00
a95085e0fc patch 9.1.1171: tests: wrong arguments passed to assert_equal()
Problem:  tests: wrong arguments passed to assert_equal()
          (after v9.1.1167).
Solution: Swap arguments in the assert_equal() call (zeertzjq).

closes: #16782

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-04 21:33:57 +01:00
4ec46f3210 patch 9.1.1170: wildmenu highlighting in popup can be improved
Problem:  wildmenu highlighting in popup can be improved
Solution: Check if the completion items contain submatches of the
          entered text (Girish Palya).

This update enables highlighting in the popup menu even when the matched
fragment or pattern appears within an item (string) rather than only at the
beginning. This is especially useful for custom completion, where menu items
may not always start with the typed pattern.

For specific use cases, refer to the two examples in
https://github.com/vim/vim/pull/16759

A sliding window approach is used with direct string comparison. Performance
is not a concern, as highlighting is applied only to displayed lines, even if
the menu list is arbitrarily long.

closes: #16785

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-04 20:56:30 +01:00
29d596c80a runtime(netrw): upstream snapshot of v179
closes: #16787

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-04 20:36:31 +01:00
659cb28c25 runtime(doc): fix typo "bet" in :h 'completeopt'
closes: #16773

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-03 20:18:04 +01:00
0b5fe42071 patch 9.1.1169: using global variable for get_insert()/get_lambda_name()
Problem:  using global variable for get_insert()/get_lambda_name()
          (after v9.1.1151)
Solution: let the functions return a string_T object instead
          (Yee Cheng Chin)

In #16720, `get_insert()` was modified to store a string length in a
global variable to be queried immediately by another `get_insert_len()`
function, which is somewhat fragile. Instead, just have the function
itself return a `string_T` object instead. Also do the same for
`get_lambda_name()` which has similar issues.

closes: #16775

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-03 20:12:05 +01:00
d2219d547d patch 9.1.1168: wrong flags passed down to nextwild()
Problem:  wrong flags passed down to nextwild()
          (zeertzjq, after v9.1.1166)
Solution: only pass options flags (Girish Palya)

`options` needs to be passed into nextwild() since it may contain
WILD_KEEP_SOLE_ITEM which prevents the menu items list from getting
freed if there is only 1 item left (if `noselect` is set).

closes: #16778

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-03 20:01:06 +01:00
360a39ae6c patch 9.1.1167: mark '] wrong after copying text object
Problem:  mark '] wrong after copying text object (ubaldot)
Solution: Adjust position of '] for non-linewise, exclusive motions
          (Jim Zhou)

related: #16679
closes: #16772

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-03 19:58:25 +01:00
fb792374cf runtime(doc): update how to get Vim
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-03 08:16:27 +01:00
2bacc3e5fb patch 9.1.1166: command-line auto-completion hard with wildmenu
Problem:  command-line auto-completion hard with wildmenu
Solution: implement "noselect" wildoption value (Girish Palya)

When `noselect` is present in `wildmode` and 'wildmenu' is enabled, the
completion menu appears without pre-selecting the first item.

This change makes it easier to implement command-line auto-completion,
where the menu dynamically appears as characters are typed, and `<Tab>`
can be used to manually select an item. This can be achieved by
leveraging the `CmdlineChanged` event to insert `wildchar(m)`,
triggering completion menu.

Without this change, auto-completion using the 'wildmenu' mechanism is
not feasible, as it automatically inserts the first match, preventing
dynamic selection.

The following Vimscript snippet demonstrates how to configure
auto-completion using `noselect`:

```vim
vim9script
set wim=noselect:lastused,full wop=pum wcm=<C-@> wmnu
autocmd CmdlineChanged : timer_start(0, function(CmdComplete, [getcmdline()]))

def CmdComplete(cur_cmdline: string, timer: number)
  var [cmdline, curpos] = [getcmdline(), getcmdpos()]
  if cur_cmdline ==# cmdline  # Avoid completing each character in keymaps and pasted text
    && !pumvisible() && curpos == cmdline->len() + 1

    if cmdline[curpos - 2] =~ '[\w*/:]'  # Reduce noise by completing only selected characters
      feedkeys("\<C-@>", "ti")
      set eventignore+=CmdlineChanged  # Suppress redundant completion attempts
      timer_start(0, (_) => {
        getcmdline()->substitute('\%x00$', '', '')->setcmdline()  # Remove <C-@> if no completion items exist
        set eventignore-=CmdlineChanged
      })
    endif
  endif
enddef
```

fixes: #16551
closes: #16759

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-02 23:02:42 +01:00
a250738303 runtime(tar): use readblob() instead of shelling out to file(1)
fixes: ##16761
closes: #16769

Co-authored-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-02 22:24:28 +01:00
bc08ceb755 patch 9.1.1165: diff: regression with multi-file diff blocks
Problem:  Vim's diff block merging algorithm when doing a multi-file diff
          is buggy when two different diff hunks overlap a single
          existing diff block (after v9.1.0743)

Solution: fix a couple bugs in this logic:

1. Fix regression from v9.1.0743 where it's not correctly expanding the
   2nd overlap correctly, where it always expands without taking into
   account that this was always taken care of when the first overlap
   happened. Instead, we should only grow the 2nd overlap if it overhangs
   outside the existing diff block, and if we encounter a new overlapping
   diff block (due to overlap chaining).
2. When we expand a diff block to match the hunk size on the orig side
   (when handling the first overlap), we expand the same amount of lines
   in the new side. This is not sound if there exists a second overlap
   hunk that we haven't processed yet, and that hunk has different
   number of lines in orig/new. Fix this by doing the corresponding
   counter adjustment when handling 2nd/3rd/etc overlap by calculating
   the difference in lines between orig and new side.
   (Yee Cheng Chin)

closes: #16768

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-02 22:05:37 +01:00
334a13bff7 patch 9.1.1164: [security]: code execution with tar.vim and special crafted tar files
Problem:  editing a special crafted tar file allows code execution
          (RyotaK, after 129a8446d2)
Solution: escape the filename before feeding it to the `:read` command

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-wfmf-8626-q3r3

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-02 19:37:29 +01:00
8872012e5f translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 17:27:37 +01:00
8ac975d97e runtime(tar): fix syntax error in tar.vim
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 17:13:40 +01:00
1a741d3cb8 patch 9.1.1163: $MYVIMDIR is set too late
Problem:  $MYVIMDIR is set too late and not available while sourcing
          runtime files (Maxim Kim, after v9.1.1159)
Solution: Also set it when $MYVIMRC file is found

fixes: #16764
closes: #16767

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 16:30:33 +01:00
7003a5d63f runtime(syntax-tests): Apply stronger synchronisation between buffers
The current lightweight synchronisation with ":redraw" needs further
reinforcement in the light of v9.1.1110.  And, with v9.1.0820, make
another synchronisation point _before_ the first (or only) screenful is
dumped.

Also add a script to regenerate all screendumps.

closes: #16632

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 16:28:20 +01:00
ff159253eb patch 9.1.1162: completion popup not cleared in cmdline
Problem:  When an info popup spans into the cmdline area and ESC is
          pressed, some content remains visible on screen (yu3s)
Solution: Add popup_overlays_cmdline() check in screen_fill() to prevent
          prematurely clearing the clear_cmdline flag (glepnir).

fixes: #15627
closes: #16765

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 16:19:44 +01:00
94a045ed56 patch 9.1.1161: preinsert requires bot "menu" and "menuone" to be set
Problem:  preinsert requires bot "menu" and "menuone" to be set,
          but "menu" is redundant (after v9.1.1160)
Solution: preinsert only requires menuone (glepnir)

closes: #16763

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-03-01 16:12:23 +01:00
56957ed410 runtime(misc): add support for bzip3 to tar, vimball and gzip plugins
fixes: #16751
closes: #16755

Signed-off-by: Jim Zhou <jimzhouzzy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 18:06:14 +01:00
a2c5559f29 patch 9.1.1160: Ctrl-Y does not work well with "preinsert" when completing items
Problem:  The 'preinsert' feature requires Ctrl-Y to confirm insertion,
          but Ctrl-Y only works when the popup menu (pum) is displayed.
          Without enforcing this dependency, it could lead to confusing
          behavior or non-functional features.

Solution: Modify ins_compl_has_preinsert() to check for both 'menu' and
          'menuone' flags when 'preinsert' is set. Update documentation
          to clarify this requirement. This avoids adding complex
          conditional behaviors. (glepnir)

fixes: #16728
closes: #16753

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 17:43:42 +01:00
3e2affc324 patch 9.1.1159: $MYVIMDIR may not always be set
Problem:  $MYVIMDIR may not always be set (after 9.1.0718)
          (sandwm)
Solution: always set $MYVIMDIR to first item in runtimepath
          (except when using --clean), update it when changing &rtp

fixes: #16609
closes: #16709

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 17:34:46 +01:00
5e8b2268e1 patch 9.1.1158: :verbose set has wrong file name with :compiler!
Problem:  :verbose set has wrong file name with :compiler!
Solution: Add -keepscript (zeertzjq)

closes: #16752

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 17:32:07 +01:00
da53af57a7 runtime(netrw): correctly handle shellslash variable
closes: #16758

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-28 17:30:25 +01:00
3255af850e patch 9.1.1157: command completion wrong for input()
Problem:  command completion wrong for input()
          (Cdrman Fu)
Solution: Set commandline completion context explicitly
          (Jim Zhou)

fixes #16723
closes: #16733

Signed-off-by: Jim Zhou <csd_189@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:29:50 +01:00
85a50fe825 runtime(doc): fix confusing docs for 'completeitemalign'
closes: #16743

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:24:32 +01:00
4be1ab80be patch 9.1.1156: tests: No test for what patch 9.1.1152 fixes
Problem:  No test for what patch 9.1.1152 fixes.
Solution: Add a test (zeertzjq).

closes: #16742

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:22:26 +01:00
fce1fa5b61 patch 9.1.1155: Mode message not cleared after :silent message
Problem:  Mode message not cleared after :silent message
          (after 9.0.1634).
Solution: Don't reset mode_displayed when the message is empty.
          (zeertzjq)

fixes: neovim/neovim#32641
closes: #16744

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:19:36 +01:00
0b8205484b runtime(lua): Improve 'include' and make '*expr' functions script-local
- Prevent 'include' from matching variable assignments as calls to
  require() and others.
- Use script-local functions for 'includeexpr' and 'foldexpr'.
- Formatting fixes.

closes: #16746

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:17:33 +01:00
60bd140256 runtime(vim): Update base-syntax, match Vim9 function calls after "|"
Match Vim9 function calls after ex-bar.  These are also currently
matched but invalid syntax for legacy script.

fixes: #16721
closes: #16747

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:15:20 +01:00
e9ae35f265 patch 9.1.1154: Vim9: not able to use autoload class accross scripts
Problem:  Vim9: not able to use autoload class accross scripts
Solution: make it work, re-enable the test (Yegappan Lakshmanan)

fixes: #15031
closes: #16748

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:12:00 +01:00
3d75ec7401 runtime(compiler): improve svelte-check
closes: #16749

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-27 19:09:52 +01:00
dbedc0924d patch 9.1.1153: build error on Haiku
Problem:  build error on Haiku
Solution: define XDG_RUNTIME_PATH variables
          (Begasus)

closes: #16737

Signed-off-by: Begasus <begasus@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-26 22:26:16 +01:00
18bacc811c patch 9.1.1152: Patch v9.1.1151 causes problems
Problem:  Patch v9.1.1151 causes problems
Solution: partially revert it (John Marriott)

closes: #16736

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-26 19:14:06 +01:00
397700e507 runtime(new-tutor): update examples from Neovim to Vim
closes: #16741

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-26 19:00:48 +01:00
b2bd8de154 nsis: add Portuguese Brazilian translation to nsis installer
closes: #16692

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Rafael Fontenelle <rffontenelle@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 21:05:22 +01:00
d3c4b7e946 patch 9.1.1151: too many strlen() calls in getchar.c
Problem:  too many strlen() calls in getchar.c
Solution: store last inserted and recorded lengths,
          add functions to retrieve those and use those
          functions (John Marriott)

closes: #16720

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:56:38 +01:00
580e457a2a runtime(vim): make VimKeywordPrg even smarter for regexes
closes: #16729

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:53:55 +01:00
9b41e8f766 patch 9.1.1150: :hi completion may complete to wrong value
Problem:  :highlight auto-complettion has a minor bug where an existing
          highlight group with a cterm color being unset would result in
          it being auto-completed to -1 in cmdline which is invalid.

Solution: Correctly check for whether an int value is set to non-zero
          before retrieving the existing value for auto-complete. Also
          do this for attr/string values as they previously worked only
          by accident (Yee Cheng Chin).

closes: #16726

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:41:52 +01:00
aa8345a968 patch 9.1.1149: Unix Makefile does not support Brazilian lang for the installer
Problem:  Unix Makefile does not support Brazilian lang for the
          installer
Solution: add support for language code pt_br (RestorerZ)

This is in preparation of the Portuguese Brazilian translation
that will be merged a bit later.

related: #16692
closes: #16732

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:35:41 +01:00
6c0128385e patch 9.1.1148: Vim9: finding imported scripts can be further improved
Problem:  Vim9: finding imported scripts can be further improved
          (after v9.1.1146)
Solution: Eliminate extra find_imported() call (Hirohito Higashi)

related: #16602
related: #16660
closes: #16731

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:29:50 +01:00
00a00f5d3f runtime(lua): Update lua ftplugin and documentation
Problem:
- The doc says the default `g:lua_subversion` is 2, but in fact it is 3
  (see `runtime/syntax/lua.vim`)
- `includeexpr` doesn't work with module in `init.lua`

Solution:
- Update documentation
- Assign value to option `&include`
- Add function `LuaInclude` and assign it to `l:&includeexpr`

closes: #16655

Co-authored-by: dkearns <dougkearns@gmail.com>
Signed-off-by: brianhuster <phambinhanctb2004@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-25 20:26:45 +01:00
12b1eb58ab patch 9.1.1147: preview-window does not scroll correctly
Problem:  preview-window does not scroll correctly
Solution: init firstline = 0 for a preview window
          (Girish Palya)

The 'info' window, which appears during insert-mode completion to display
additional information, was not scrolling properly when using commands like:
	win_execute(popup_findinfo(), "normal! \<PageDown>")
This issue made it impossible to navigate through info window contents using
keyboard-based scrolling.
The fix correctly updates the w_firstline value of the popup window, ensuring
proper scrolling behavior. Mouse scrolling was already working as expected and
remains unaffected.

closes: #16703

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-24 21:39:42 +01:00
f877040a04 nsis: added support for pt-BR to installer and update README.txt
Prepare for PR #16692 which will eventually bring pt-br translation to
the installer and add some clarification on how to test the installer
with different languages

closes: #16725

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-24 19:42:36 +01:00
25b16d64a0 translation(tr): Update Turkish translations
closes: #16719

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-24 19:31:06 +01:00
16f2d3a465 patch 9.1.1146: Vim9: wrong context being used when evaluating class member
Problem:  Vim9: wrong context being used when evaluating class member
          (lifepillar, Ernie Rael)
Solution: Use the correct script context when evaluating a class member
          init expression(Yegappan Lakshmanan)

fixes: #14011
fixes: #14402
closes: #15112
closes: #16660

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-24 19:26:56 +01:00
5090a1fecb patch 9.1.1145: multi-line completion has wrong indentation for last line
Problem:  When expanding omni completion items with newlines (e.g.
          `then\n\t\nend`), the end statement gets wrong indentation.
Solution: Add OPENLINE_FORCE_INDENT flag to make open_line() use
          second_line_indent directly (glepnir)

closes: #16614

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Justin M. Keyes <justinkz@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-24 19:10:37 +01:00
5b97947bbd runtime(netrw): runtime(netrw): upstream snapshot of v178
relevant commits:
- refactor: netrw#own#Deprecate -> netrw#msg#Deprecate
- refactor: netrw#own#PathJoin -> netrw#fs#PathJoin
- fix: typos
- refactor: netrw#own#Open -> netrw#os#Open
- deprecate!: netrw#WinPath
- refactor: netrw#WinPath -> netrw#fs module
- refactor: s:ShellEscape -> netrw#os module
- refactor: s:NetrwExe -> netrw#os module
- refactor: s:NetrwGlob -> netrw#fs module
- refactor: s:NetrwGetcwd -> netrw#fs module
- refactor: s:NetrwFullPath -> netrw#fs module
- refactor: s:ComposePath -> netrw#fs module

closes: #16718

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 20:37:39 +01:00
b3854bfc54 patch 9.1.1144: no way to create raw strings from a blob
Problem:  no way to create raw strings from a blob
Solution: support the "encoding": "none" option
          to create raw strings (which may be invalid!)
          (Bakudankun)

closes: #16666

Signed-off-by: Bakudankun <bakudankun@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 20:29:21 +01:00
e0029daa35 patch 9.1.1143: illegal memory access when putting a register
Problem:  illegal memory access when putting a register
Solution: make sure cursor column doesn't become negative

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 20:01:54 +01:00
28155d0855 patch 9.1.1142: tests: test_startup fails if $HOME/$XDG_CONFIG_HOME is defined
Problem:  tests: test_startup fails if $HOME/$XDG_CONFIG_HOME is defined
Solution: define $HOME and $XDG_CONFIG_HOME to some non-existing
          directory

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 19:55:09 +01:00
094494bf2e runtime(vim): improve &keywordprg in ftplugin
- let keywordprg in vim filetype handle context-sensitive help calls by
  detecting the syntax group of the word under the cursor
- reformat whitespace
- add modeline

related: #16677
closes: #16680

Co-authored-by: Andrew Radev <andrey.radev@gmail.com>
Co-authored-by: "D. Ben Knoble" <ben.knoble+github@gmail.com>
Co-authored-by: Gary Johnson <garyjohn@spocom.com>
Co-authored-by: Tim Pope <code@tpope.net>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 16:03:30 +01:00
025dc48e88 runtime(vim): Update base-syntax, match :CompilerSet and :SynMenu commands
closes: #16713

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 15:48:52 +01:00
b8989fb860 patch 9.1.1141: Misplaced comment in readfile()
Problem:  Misplaced comment in readfile().
          (after v9.1.1139)
Solution: Move the comment above S_ISDIR().
          (zeertzjq)

closes: #16714

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 09:56:10 +01:00
ed7d8e55ac patch 9.1.1140: filetype: m17ndb files are not detected
Problem:  filetype: m17ndb files are not detected
Solution: detect m17ndb files as m17ndb filetype,
          include filetype, syntax and indent files for the
          new filetype (David Mandelberg).

References:

https://www.nongnu.org/m17n/manual-en/m17nDBFormat.html describes the
format. https://git.savannah.nongnu.org/cgit/m17n/m17n-db.git/tree/ has
examples of the files.

closes: #16696

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 09:41:42 +01:00
f1c3134ee1 patch 9.1.1139: [fifo] is not displayed when editing a fifo
Problem:  [fifo] is not displayed when editing a fifo
          (after v7.4.2189)
Solution: stat the filename and detect the type correctly

fixes: #16702
closes: #16705

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 09:36:56 +01:00
a7b8120820 patch 9.1.1138: cmdline completion for :hi is too simplistic
Problem:  Existing cmdline completion for :highlight was barebone and
          only completed the highlight group names.

Solution: Implement full completion for the highlight group arguments
          such as guifg and cterm. If the user tries to complete
          immediately after the '=' (e.g. `hi Normal guifg=<Tab>`), the
          completion will fill in the existing value, similar to how
          cmdline completion for options work (Yee Cheng Chin).

closes: #16712

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 09:34:50 +01:00
f4b36417e8 patch 9.1.1137: ins_str() is inefficient by calling STRLEN()
Problem:  ins_str() is inefficient by calling STRLLEN()
Solution: refactor ins_str() to take a length argument
          and let all callers provide the correct length
          when calling ins_str() (John Marriott)

closes: #16711

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 09:09:59 +01:00
066a5340e3 CI: Install netbeans on windows to make sure to run test_netbeans.vim
otherwise the test src/testdir/test_netbeans.vim wouldn't be executed by
the CI.

closes: #16710

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-23 08:50:54 +01:00
61af587f26 runtime(dockerfile): set comments in filetype plugin
closes: #16698

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Honza Pokorny <honza@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 15:09:03 +01:00
d15114c148 runtime(compiler): include svelte-check compiler
closes: #16704

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 15:07:09 +01:00
14e8208d84 runtime(doc): get rid of the titlestring hack for terminal-api
fixes: #16656

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 13:36:26 +01:00
7bbb0f357e patch 9.1.1136: Match highlighting marks a buffer region as changed
Problem:  Match highlighting marks a buffer region to be redrawn as if
          its buffer text was changed, unnecessarily invoking syntax code.
Solution: Set the `w_redraw_top/bot` variables instead of the b_mod_* ones
          (Luuk van Baal)

closes: #16697

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 09:19:04 +01:00
bf595ae4ac patch 9.1.1135: 'suffixesadd' doesn't work with multiple items
Problem:  'suffixesadd' doesn't work with multiple items
          (after 9.1.1122).
Solution: Don't concat multiple suffixes together.
          (zeertzjq)

fixes: #16694
closes: #16699

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 09:13:17 +01:00
51eefba1d6 runtime(filetype): move filetype detection into filetypedetect augroup
closes: #16701

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-22 08:48:06 +01:00
6a15942bc2 CI: add Makefile target to verify default highlighting groups are present
When adding new highlight groups, one needs to make sure to also add a
"default link NewHlGroup ExistingHlGroup" in highlight.c code, so that
when resetting a color scheme the old color won't be left behind.

So add a Makefile in the 'ci' directory that verifies that all
documented '*hl-<groupname>' from the documentation are either reflected
in the source code, or belong to a list of 'known to be ignored'
highlight groups and let that check run as part of the CI test suite.

related: #16676
closes: #16678

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:23:26 +01:00
41a6026f00 patch 9.1.1134: filetype: Guile init file not recognized
Problem:  filetype: Guile init file not recognized
Solution: detect '.guile' file as scheme filetype
          (David Mandelberg)

References:

https://www.gnu.org/software/guile/manual/html_node/Init-File.html
> When run interactively, Guile will load a local initialization file
> from ~/.guile. This file should contain Scheme expressions for
> evaluation.

closes: #16683

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:13:54 +01:00
b62bf81488 patch 9.1.1133: filetype: xkb files not recognized everywhere
Problem:  filetype: xkb files not recognized everywhere
Solution: detect xkb files in more places
          (David Mandelberg)

References:
https://xkbcommon.org/doc/current/user-configuration.html#user-config-locations

closes: #16684

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:09:35 +01:00
060e6556e2 patch 9.1.1132: Mark positions wrong after triggering multiline completion
Problem:  Mark positions wrong after triggering multiline completion.
Solution: Call deleted_lines_mark() after deleting lines.
          (zeertzjq)

closes: #16687

Co-authored-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 20:06:26 +01:00
b79fa3d9c8 patch 9.1.1131: potential out-of-memory issue in search.c
Problem:  potential out-of-memory issue in search.c
Solution: improve situation and refactor search.c slightly
          (John Marriott)

- In function update_search_stat():
  add a check for a theoretical null pointer reference, set and remember
  the length of lastpat, remove the three calls to STRLEN() and use the
  various string's associated lengths instead, add a check for an
  out-of-memory condition.

- In function search_for_fuzz_match():
  remove a call to strnsave() and thus avoid having to add a check for
  an out-of-memory condition, also replace the call to STRLEN() by
  ml_get_buf_len().

closes: #16689

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 19:59:56 +01:00
a48693c6c2 runtime(doc): remove resolved complete item from todo list
closes: #16690

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 19:52:13 +01:00
13f100e932 patch 9.1.1130: 'listchars' "precedes" is not drawn on Tabs.
Problem:  'listchars' "precedes" is not drawn on Tabs.
Solution: Only draw 'listchars' "precedes" when not skipping over cells.
          (zeertzjq)

fixes: #5927
closes: #16691

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-21 19:49:44 +01:00
3cb41489dc runtime(sieve): set fileformat=dos in filetype plugin
References:
https://datatracker.ietf.org/doc/html/rfc5228#section-2.2

closes: #16685

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 23:22:54 +01:00
fbe2dd7b4c patch 9.1.1129: missing out-of-memory test in buf_write()
Problem:  missing out-of-memory test in buf_write()
Solution: Check that the returned allocated buffer is not NULL
          (John Marriott)

closes: #16678

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 23:17:09 +01:00
27f5136761 runtime(mail): add commentstring '> %s' to ftplugin
The new native commenting functionality is currently not used when
editing mail. One could reasonably expect it to change the "quote" state
of any given line in the mail (i.e. the preceding ">"), which would be
very handy and feel natural when editing mail. Especially since the
current file already uses "setlocal comments+=n:>".

Solution: Add commentstring to `> %s` to be used in files of type mail.

closes: #16669

Signed-off-by: Lucas Eekhof <105216949+eekhof@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:32:07 +01:00
e3fed4828c patch 9.1.1128: patch 9.1.1119 caused a regression with imports
Problem:  patch 9.1.1119 caused a regression with imports
          (girishji)
Solution: revert the script ID change for the class script variable for
          now (Yegappan Lakshmanan)

fixes: #16664
closes: #16670

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:20:54 +01:00
106899eb21 runtime(dnsmasq): include simple filetype plugin
closes: #16671

Signed-off-by: dringsim <dringsim@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:19:23 +01:00
52fd867f5e patch 9.1.1127: preinsert text is not cleaned up correctly
Problem:  when 'completeopt' is set to preinsert the preinserted text is
          not cleared when adding new leader (Yee Cheng Chin)
Solution: add a condition to delete preinsert text in edit function
          (glepnir)

closes: #16672

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:13:24 +01:00
4418041698 patch 9.1.1126: patch 9.1.1121 used a wrong way to handle enter
Problem:  patch 9.1.1121 used a wrong way to handle enter
Solution: compl_enter_selects also needs to consider the selected item
          in ins_compl_new_leader() (glepnir)

closes: #16673

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:09:48 +01:00
3af0a8d8f5 patch 9.1.1125: cannot loop through pum menu with multiline items
Problem:  cannot loop through pum menu with multiline items with
          fuzzy and noselect in 'completeopt' (Tomasz N)
Solution: remove unnecessary compl_no_select condition (glepnir)

fixes: #16641
closes: #16674

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:06:16 +01:00
08a83a033a patch 9.1.1124: No test for 'listchars' "precedes" with double-width char
Problem:  No test for 'listchars' "precedes" with double-width char.
Solution: Add a test and fix a typo in code (zeertzjq).

closes: #16675

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 22:04:09 +01:00
e700ddeea4 patch 9.1.1123: popup hi groups not falling back to defaults
Problem:  Highlight groups PopupSelected/PopupNotification/
          MessageWindow are supposed to fall back to default highlight
          groups if they are not defined. However, once a colorscheme
          has defined them, switching to another colorscheme that
          doesn't do so will leave behind a cleared colorscheme, which
          causes the fallback to fail.

Solution: Set up default links to the relevant fallback highlight
          groups, which makes sure a `:hi clear` command will reset the
          state properly (Yee Cheng Chin).

closes: #16676

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 21:58:21 +01:00
911742a975 runtime(dosini): Add support for # comments to ftplugin
runtime/syntax/dosini.vim supports both ; and # as comments, and I think
a bunch of the files detected as dosini do too, so add support for # to
the ftplugin.

closes: #16681

Signed-off-by: David Mandelberg <david@mandelberg.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-20 20:43:10 +01:00
d6e3c9048d patch 9.1.1122: too many strlen() calls in findfile.c
Problem:  too many strlen() calls in findfile.c
Solution: refactor findfile.c and remove calls to strlen()
          (John Marriott)

closes: #16595

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:45:48 +01:00
07f0dbe3aa patch 9.1.1121: Enter does not insert newline with "noselect"
Problem:  Enter does not insert newline with "noselect" when the pum is
          visible (lifepillar)
Solution: When Enter is pressed and no complete-item is selected,
          ins_compl_prep returns false, and the edit function continues
          processing Enter to insert a new line. (glepnir)

fixes: #1653
closes: #16653

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:27:30 +01:00
ee1a24b21d runtime(netrw): fix s:NetrwHome() regression
If $MYVIMDIR is unset netrw creates a directory called '$MYVIMDIR' in
the current directory

fixes: #16609

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-18 20:11:51 +01:00
44c1c04ddb patch 9.1.1120: tests: Test_registers fails
Problem:  tests: Test_registers fails
          (T.J. Townsend, after v9.1.1115)
Solution: require clipboard feature

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 22:27:45 +01:00
5647c91355 runtime(doc): add reference to extendnew() at extend()
related: #16607

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 21:33:30 +01:00
778ada48fb patch 9.1.1119: Vim9: Not able to use an autoloaded class from another autoloaded script
Problem:  Vim9: Not able to use an autoloaded class from another
          autoloaded script (Elliot)
Solution: make it work (Yegappan Lakshmanan)

fixes: #15031
closes: #16652

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:21:23 +01:00
b34a688ba0 patch 9.1.1118: tests: test_termcodes fails
Problem:  tests: test_termcodes fails
          (after: v9.1.1114)
Solution: adjust the test for the expected termguicolors value

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-17 20:09:11 +01:00
68ba6c2c6c runtime(vim): Update base-syntax, improve performance
Contain the vimNotation syntax group, matching this at top level is
unnecessary and very slow.

The removed vimString and vimNumber definitions are broken and/or never
match. They have long been replaced by newer definitions.

closes: #16645

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:40:12 +01:00
5887cce1d7 patch 9.1.1117: there are a few minor style issues
Problem:  there are a few minor style issues
Solution: fix the issues (Hirohito Higashi)

closes: #16646

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:34:30 +01:00
b5f463ce4f patch 9.1.1116: Vim9: super not supported in lambda expressions
Problem:  Vim9: super not supported in lambda expressions
          (Aliaksei Budavei)
Solution: Support using the super keyword in a closure in an instance
          method (Yegappan Lakshmanan)

fixes: #16586
closes: #16647

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:25:24 +01:00
44831e4bea runtime(doc): Update the 'specifies' keyword documentation, slightly reformat
closes: #16648

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:23:07 +01:00
c0f0e2380e patch 9.1.1115: [security]: use-after-free in str_to_reg()
Problem:  [security]: use-after-free in str_to_reg()
          (fizz-is-on-the-way)
Solution: when redirecting the :display command, check that one
          does not output to the register being displayed

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-63p5-mwg2-787v

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 16:06:38 +01:00
27822a0441 patch 9.1.1114: enabling termguicolors automatically confuses users
Problem:  enabling termguicolors automatically confuses users. Since
          querying the terminal for the RGB flag happens asynchronously,
          enabling termguicolors is noticeable by users as the highlighting changes
          and is therefore unexpected.
          (after v9.1.1054)
Solution: comment out that part for now. We may need another way to
          enable this in the future.

fixes: #16539
fixes: #16568
fixes: #16649

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-16 09:30:00 +01:00
3f60114236 runtime(keymap): Add ukrainian-enhanced keymap
The "Ukrainian enhanced keymap" allows you to type Ukrainian in Vim
using jcuken Windows layout.

Original file is made by Ivan Korneliuk and can be found at
https://github.com/vansha/ukrainian-enhanced.vim. It is being added here
with the permission of the author.

There is another ukrainian layout already in Vim, namely the
keymap\ukrainian-jcuken.vim script by Anatoli Sakhnik. But this one
differs in way it maps numeric keys. It uses values usual for Windows
users.

closes: #16628

Signed-off-by: Vladyslav Rehan <rehanvladyslav@gmail.com>
Signed-off-by: Ivan Korneliuk <vansha@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-15 09:59:57 +01:00
e67eff2e24 patch 9.1.1113: tests: Test_terminal_builtin_without_gui waits 2 seconds
Problem:  tests: Test_terminal_builtin_without_gui waits 2 seconds
Solution: add --not-a-term to remove the annoying 2s delay in error
          message when Vim detects that stdio are not from a terminal
          (Yee Cheng Chin)

closes: #16635

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 18:01:25 +01:00
b6c900be9c patch 9.1.1112: Inconsistencies in get_next_or_prev_match()
Problem:  Inconsistencies in get_next_or_prev_match() (after 9.1.1109).
Solution: Change "file" to "entry" or "match" in comments.  Use the same
          order of branches for PAGEUP and PAGEDOWN (zeertzjq).

closes: #16633

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:59:31 +01:00
faf4112cdc runtime(doc): document ComplMatchIns highlight for insert-completion
closes: #16636

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:57:52 +01:00
73d8222b31 runtime(netrw): upstream snapshot of v177
relevant commits:
- defaults!: use 'suffixes' for 'g:netrw_sort_sequence'
- refactor: remove associated buffer when deliting a file
- refactor: s:NetrwLocalRm
- refactor: s:NetrwDelete
- refactor: s:NetrwLocalRmFile
- feat: use vim.notify on neovim
- fix: prefer v:lua instead of luaeval for vim.deprecate
- chore: remove old batteries

closes: #16638

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-14 17:54:22 +01:00
bf7c88d852 patch 9.1.1111: Vim9: variable not found in transitive import
Problem:  Vim9: variable not found in transitive import
          (lifepillar)
Solution: fix import and class extends (Hirohito Higashi)

fixes: #16379
related: #16440
closes: #16602

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 21:04:07 +01:00
e70587dbdb patch 9.1.1110: Vim tests are slow and flaky
Problem:  Vim tests are slow and flaky at the same time due to reliance
          on timeouts which are unreliable.
Solution: improve Vim test performance and reduce flakiness
          (Yee Cheng Chin)

A lot of Vim tests currently rely on waiting a specific amount of time
before asserting a condition. This is bad because 1) it is slow, as the
timeout is hardcoded, 2) it's unreliable as a resource-starved runner
may overshoot the timeout. Also, there are a lot of builtin sleep
commands in commonly used utilities like VerifyScreenDump and WaitFor()
which leads to a lot of unnecessary idle time.

Fix these issues by doing the following:
1. Make utilities like VerifyScreenDump and WaitFor use the lowest wait
   time possible (1 ms). This essentially turns it into a spin wait. On
   fast machines, these will finish very quickly. For existing tests
   that had an implicit reliance on the old timeouts (e.g.
   VerifyScreenDump had a 50ms wait before), fix the tests to wait that
   specific amount explicitly.
2. Fix tests that sleep or wait for long amounts of time to instead
   explicitly use a callback mechanism to be notified when a child
   terminal job has finished. This allows the test to only take as much
   time as possible instead of having to hard code an unreliable
   timeout.

With these fixes, tests should 1) completely quickly on fast machines,
and 2) on slow machines they will still run to completion albeit slowly.
Note that previoulsy both were not true. The hardcoded timeouts meant
that on fast machines the tests were mostly idling wasting time, whereas
on slow machines, the timeouts often were not generous enough to allow
them to run to completion.

closes: #16615

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:55:45 +01:00
977561a719 patch 9.1.1109: cmdexpand.c hard to read
Problem:  cmdexpand.c hard to read
Solution: refactor the file slightly (glepnir)

closes: #16621

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:48:56 +01:00
d7deeffe11 runtime(exports): include simple filetype plugin
closes: #16625

Signed-off-by: Matt Perry <matt@mattperry.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:45:13 +01:00
407319fe89 runtime(samba): include simple filetype plugin
closes: #16626

Signed-off-by: Matt Perry <matt@mattperry.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:42:43 +01:00
2c47ab8fcd patch 9.1.1108: 'smoothscroll' gets stuck with 'listchars' "eol"
Problem:  'smoothscroll' gets stuck with 'listchars' "eol".
Solution: Count size of 'listchars' "eol" in line size when scrolling.
          (zeertzjq)

related: neovim/neovim#32405
closes: #16627

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:34:34 +01:00
c0b7ca406b patch 9.1.1107: cannot loop through completion menu with fuzzy
Problem:  cannot loop through completion menu with fuzzy and nosort in
          'completeopt'
          (Tomasz N)
Solution: Reset cur to zero and update compl_shown_match when
          'completeopt' contains "nosort" but not "noselect"
          (glepnir)

fixes: #16624
closes: #16629

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:27:44 +01:00
4f010c90bd runtime(vim): Update base-syntax, always match continuation comments to EOL
closes: #16630

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-13 20:24:42 +01:00
8f3277fbbe runtime(nroff): set define option & add matchit config in ftplugin
closes: #16619

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Aman Verma <amanraoverma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:58:57 +01:00
a9c06429ac runtime(vim): Update base-syntax, match Vim9 boolean and null literals in parens
- Match Vim9 boolean and null literals in parenthesised expressions and
  function argument lists.
- Match read-only registers in expressions.

closes: #16622

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-12 20:44:17 +01:00
88ce0c546b patch 9.1.1106: tests: Test_log_nonexistent() causes asan failure
Problem:  tests: Test_log_nonexistent() causes asan failure
          (Hirohito Higashi)
Solution: don't run vim using system(), but run Vim in a terminal

related: #16602
related: #16610

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 22:58:20 +01:00
7e89800988 patch 9.1.1105: Vim9: no support for protected new() method
Problem:  Vim9: no support for protected new() method
Solution: support the protected "_new()" object method
          (Yegappan Lakshmanan)

closes: #16604

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 22:07:05 +01:00
f0ed0e6f63 patch 9.1.1104: CI: using Ubuntu 22.04 Github runners
Problem:  CI: uses Ubuntu 22.04 runners
Solution: Switch to Ubuntu 24.04 runners, make a few adjustments for
          different $TMPDIR (Drew Vogel)

closes: #16442

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 21:36:33 +01:00
5881828104 ci: syntax tests spam output
Currently syntax tests outputs all the Vim commands to the console,
which is annoying for a local developer but also makes the CI output
impossible to parse and just printing all the terminal output comes with
a performance penalty.

So let's just simply redirect all output to /dev/null similar to what
the script tests do.

This can be turned off locally for someone diagnosing issues but it
should not be the default behavior to output all terminal control
sequences to output in CI.

closes: #16612

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:16:11 +01:00
8cc725e927 patch 9.1.1103: if_perl: still some compile errors with Perl 5.38
Problem:  if_perl: still some compile errors with Perl 5.38
Solution: copy declaration of PL_memory_wrap from Perl header
          (Drew Vogel)

closes: #16613

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:06:07 +01:00
bfc7719e48 patch 9.1.1102: tests: Test_WinScrolled_Resized_eiw() uses wrong filename
Problem:  tests: Test_WinScrolled_Resized_eiw() uses wrong filename
          (Luuk van Baal, after v9.1.1084)
Solution: Rename the filename to something more unique

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-11 20:03:10 +01:00
40891bac5d patch 9.1.1101: insexpand.c hard to read
Problem:  insexpand.c hard to read
Solution: refactor slightly to make it better readable
          (glepnir)

Problem:
- Complex while loops with nested conditions
- Redundant if branches
- Hard to understand and maintain

Solution:
- Restructure using while(true) with clear break conditions
- Using ternary to replace some if conditions
- Add descriptive comments for each step

closes: #16600

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:18:00 +01:00
35e02af7bf patch 9.1.1100: tests: Test_log_nonexistent only works on Linux
Problem:  tests: Test_log_nonexistent only works on Linux
          (after v9.1.1097)
Solution: Add CheckUnix condition

closes: #16476

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:13:43 +01:00
1aa287e048 runtime(vim): Update base-syntax, improve variable matching
- Match variables after operators, including line continuations.
- Match option variables without leading whitespace.
- Explicitly match expression subscripts.
- Match Vim9 variables in LHS of assignments and method calls.
- Match option variables (&option) with a dedicated syntax group like
  environment variables.
- Match list literals, fixes: #5830
- Match :{un}lockvar arguments.
- Match registers and environment variables in :let unpack lists.
- Match lambda expressions
- Match Vim9 scope blocks
- Match variables in :for subject
- Highlight user variables with Normal
- Improve this/super keyword matching, fixes: #15970

closes: #16476

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 22:00:27 +01:00
54d7f18c38 patch 9.1.1099: Vim9: import with extends may crash
Problem:  Vim9: import with extends may crash, v9.1.1087 wasn't the
          correct way to fix it)
Solution: When using an import class, Check for a valid class member
          variable at compile time (Yegappan Lakshmanan)

related: #16601
closes: #16603

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 21:35:07 +01:00
e3647c8bf5 patch 9.1.1098: leaking memory with completing multi lines
Problem:  leaking memory with completing multi lines
          (after v9.1.1086)
Solution: free allocated memory (glepnir)

closes: #16605

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 21:16:32 +01:00
c5654b8448 patch 9.1.1097: --log with non-existent path causes a crash
Problem:  --log with non-existent path causes a crash
          (Ekkosun)
Solution: split initialization phase and init the execution stack
          earlier (Hirohito Higashi)

fixes: #16606
closes: #16610

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 21:12:19 +01:00
97baa1cfe8 patch 9.1.1096: if_perl: Perl 5.38 adds new symbols causing link failure
Problem:  if_perl: Perl 5.38 adds new symbols causing link failure
Solution: add stub symbols (Drew Vogel)

closes: #16611

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 20:17:56 +01:00
7de6b1bb56 patch 9.1.1095: tests: matchparen plugin test wrongly named
Problem:  tests: matchparen plugin test wrongly named
          (zeertzjq)
Solution: rename test_matchparen to test_plugin_matchparen
          to be consistent with the other plugin tests

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-10 20:12:46 +01:00
68d0858892 patch 9.1.1094: Vim9: problem finding implemented method in type hierarchy
Problem:  Vim9: problem finding implemented method for abstract method
          in type hierarchy (Aliaksei Budavei)
Solution: When checking for abstract methods in an extended class, check
          whether an abstract method is implemented in one of the parent
          classes (Yegappan Lakshmanan)

fixes: #16495
closes: #16497

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 19:39:52 +01:00
f30eb4a170 runtime(qf): Update syntax file, match second delimiter
Match both | separators and link to the Delimiter highlight group.

fixes #16584
closes: #16590

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 18:40:05 +01:00
3cfac59f92 patch 9.1.1093: tests: output of test ...win32_ctrl_z depends on python version
Problem:  tests: output of test Test_terminal_eof_arg_win32_ctrl_z depends on python
          version.
Solution: Check for the expected output in both, the second last line
          and last line

It seems python 3.13 changed the output a bit and there is no longer a
trailing blank line.  So to keep compatible with python < 3.13, let's
check for the expected output in either the last line and the second
last line.

closes: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:22:30 +01:00
2e4361bd40 patch 9.1.1092: tests: fix expected return code for python 3.13 on Windows
Problem:  tests: fix expected return code for python 3.13 on Windows
Solution: Check for return code 1 or 123 on Windows

There is a regression with python 3.13 on Windows, that it no longer
prints the requested error code, but instead exits with return code 1,
which  breaks the test-suite.

So let's check for either exit code 1 or 123 in tests
Test_terminal_duplicate_eof_arg() and Test_terminal_eof_arg()

This will probably be fixed on the Python side, see the pull request
python/cpython#129901 but in the meantime, let's allow both error codes.

related: #16599
related: python/cpython#129900

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:18:07 +01:00
ec7a4e4d69 patch 9.1.1091: tests: timeout might be a bit too small
Problem:  tests: timeout might be a bit too small
Solution: increase the test timeout from 30 to 45 seconds

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:16:36 +01:00
aae1bfbdb9 patch 9.1.1090: tests: test_terminwscroll_topline2 unreliable
Problem:  tests: test_terminwscroll_topline2 unreliable
          (Yee Cheng Chin)
Solution: instead of using term_wait() with a specific time, use
          terminal-api and to wait until the terminal is finished

call a terminal callback function when finished printing, instead of
using term_wait(), with a defined time, which caused timeouts on CI
with the macos runners

Unfortunately I couldn't figure out how to call the terminal-api on Windows,
so skip the test on Windows. cmd.com echo didn's seem to work and
neither did trying to use python, but perhaps it was just me fighting
with the terminal quoting rules 🤷

related: #16599
related: #16552

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:10:30 +01:00
6f14ef4b0b patch 9.1.1089: tests: No check when tests are run under Github actions
Problem:  tests: No check when tests are run under Github actions
Solution: Add the CheckGithubActions check command and skip test if
          needed

related: #16599
related: actions/runner-images#11512

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:05:21 +01:00
934d9ab3a2 patch 9.1.1088: tests: plugin tests are named inconsistently
Problem:  tests: plugin tests are named inconsistently
Solution: group them under a common 'plugin' prefix

related: #16599

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 17:03:31 +01:00
645a4288e2 patch 9.1.1087: Vim9: import with extends may crash
Problem:  Vim9: import with extends may crash
Solution: check otv for being NULL before trying to access it
          (Hirohito Higashi)

closes: #16601

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-09 16:41:23 +01:00
76bdb82527 patch 9.1.1086: completion doesn't work with multi lines
Problem:  completion doesn't work with multi lines
          (Łukasz Jan Niemier)
Solution: handle linebreaks in completion code as expected
          (glepnir)

fixes: #2505
closes: #15373

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 19:09:02 +01:00
746fe54d4f patch 9.1.1085: filetype: cmmt files are not recognized
Problem:  filetype: cmmt files are not recognized
Solution: detect '*.cmmt' as trace32 filetype
          (Christian Sax)

"*.cmmt" files use the same syntax as regular TRACE32 scripts,
but are intended as a kind of script template.

closes: #16598

Signed-off-by: Christoph Sax <c_sax@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 19:01:05 +01:00
b7147f8236 patch 9.1.1084: Unable to persistently ignore events in a window and its buffers
Problem:  Unable to persistently ignore events in a window and its buffers.
Solution: Add 'eventignorewin' option to ignore events in a window and buffer
          (Luuk van Baal)

Add the window-local 'eventignorewin' option that is analogous to
'eventignore', but applies to a certain window and its buffers. Identify
events that should be allowed in 'eventignorewin', adapt "auto_event"
and "event_tab" to encode this information. Window context is not passed
onto apply_autocmds_group(), and when to ignore an event is a bit
ambiguous when "buf" is not "curbuf", rather than a large refactor, only
ignore an event when all windows into "buf" are ignoring the event.

closes: #16530

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:52:39 +01:00
a35040f795 runtime(tex): improve syntax highlighting
this change includes the following changes:
- a macro option must be #1–#9
- add \providecommand
- add starred versions of \newcommand, \newenvironment, and their
  variants
- add number of arguments to \(re)newenvironment

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:32:14 +01:00
a17f8bfb28 patch 9.1.1083: setreg() doesn't correctly handle mbyte chars in blockwise mode
Problem:  setreg() doesn't correctly handle mbyte chars in blockwise
          mode
Solution: use mb_ptr2len_len function pointer (Yee Cheng Chin)

setreg() will automatically calculate the width when a blockwise mode is
specified, but it does not properly calculate the line widths of mbyte
characters when value is passed as newline-terminated string. It does
work when value is passed as a list of lines though.

Fix this by properly using the mbyte function pointer to increment the
loop counter.

closes: #16596

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-08 18:19:15 +01:00
a6d5778d9b patch 9.1.1082: unexpected DCS responses may cause out of bounds reads
Problem:  unexpected DCS responses may cause out of bounds reads
          (after v9.1.1054)
Solution: check that the parsed value is '=' as expected
          (Julio B)

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-07 20:54:56 +01:00
a41dfcd55b patch 9.1.1081: has('bsd') is true for GNU/Hurd
Problem:  has('bsd') is true for GNU/Hurd
Solution: exclude GNU/Hurd from BSD feature flag
          (Zhaoming Luo)

GNU/Hurd, like Mac OS X, is a BSD-based system. It should exclude
has('bsd') feature just like what Mac OS X does. The __GNU__ pre-defined
macro indicates it's compiled for GNU/Hurd.

closes: #16580

Signed-off-by: Zhaoming Luo <zhmingluo@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 21:39:35 +01:00
9c8f9b10fc patch 9.1.1080: filetype: Mill files are not recognized
Problem:  filetype: Mill files are not recognized
Solution: detect '*.mill' files as scala filetype
          (author)

In the past [Mill](https://mill-build.org/mill/index.html) build files
were always `build.sc` and treated as Scala files. However as the 0.12.x
series of mill you can create a `build.mill` file. You can see a lot of
examples of this if you search
[GitHub](https://github.com/search?q=build.mill&type=code). This small
change just ensures that if you have a `*.mill` file it treats it as a
Scala file.

closes: #16585

Signed-off-by: Chris Kipp <ckipp@pm.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 21:26:08 +01:00
a5e03f68a8 patch 9.1.1079: GUI late startup leads to uninitialized scrollbars
Problem:  GUI late startup leads to uninitialized scrollbars
Solution: initialize scrollbars for all windows in all tabpages
          (Yee Cheng Chin)

GUI startup was erroneously only initializing scrollbars for all windows
in current tab, instead of all tabs. This breaks if the user has created
tab pages before using `:gui` command to enter GUI mode, or sourced a
session file in vimrc.

closes: #16588
related: macvim-dev/macvim#862

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 21:18:17 +01:00
b69cd52447 runtime(misc): Add support for lz4 to tar & gzip plugin
while at it, clean up the tar plugin a bit and sort the patterns for the
tar and gzip plugin

References:
- https://github.com/lz4/lz4
- https://lz4.org/

closes: #16591

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Corpulent Robin <177767857+corpulentrobin@users.noreply.github.com>
2025-02-06 21:10:49 +01:00
cde8ff63e2 patch 9.1.1078: Terminal ansi colors off by one after tgc reset
Problem:  Terminal ansi colors off by one after tgc reset
Solution: Set the correct index for libvterm palette,
          revert parts in libvterm/src/pen.c that deviated from upstream
          (Julio B)

fixes: #16568
closes: #16573
related: Vim patch v8.2.0804

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-06 20:31:27 +01:00
f50d5364d7 patch 9.1.1077: included syntax items do not understand contains=TOP
Problem:  Syntax engine interpreted contains=TOP as matching nothing
          inside included files, since :syn-include forces HL_CONTAINED
          on for every included item. After 8.2.2761, interprets
          contains=TOP as contains=@INCLUDED, which is also not correct
          since it doesn't respect exclusions, and doesn't work if there
          is no @INCLUDED cluster.
Solution: revert patch 8.2.2761, instead track groups that have had
          HL_CONTAINED forced, and interpret contains=TOP and
          contains=CONTAINED using this. (Theodore Dubois)

fixes: #11277
closes: #16571

Signed-off-by: Theodore Dubois <tblodt@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-05 23:59:25 +01:00
34e1e8de91 patch 9.1.1076: vim_strnchr() is strange and unnecessary
Problem:  vim_strnchr() is strange and unnecessary (after v9.1.1009)
Solution: Remove vim_strnchr() and use memchr() instead.  Also remove a
          comment referencing an #if that is no longer present.

vim_strnchr() is strange in several ways:
- It's named like vim_strchr(), but unlike vim_strchr() it doesn't
  support finding a multibyte char.
- Its logic is similar to vim_strbyte(), but unlike vim_strbyte() it
  uses char instead of char_u.
- It takes a pointer as its size argument, which isn't convenient for
  all its callers.
- It allows embedded NULs, unlike other "strn*" functions which stop
  when encountering a NUL byte.

In comparison, memchr() also allows embedded NULs, and it converts bytes
in the string to (unsigned char).

closes: #16579

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-04 16:48:36 +01:00
f7cb9f9280 patch 9.1.1075: Vim9: len variable not used in compile_load()
Problem:  Vim9: length variable not used in compile_load()
Solution: use len instead of re-calculating the length
          (Hirohito Higashi)

closes: #16582

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-04 16:40:08 +01:00
4a530a632b runtime(vim): Update base-syntax, match :debuggreedy count prefix
Match :0debuggreedy as a special case until better range/count support
is implemented.

closes: #16572

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:59:09 +01:00
449c2e5454 patch 9.1.1074: Strange error when heredoc marker starts with "trim"
Problem:  Strange error when heredoc marker starts with "trim".
Solution: Check for whitespace after "trim" or "eval" (zeertzjq)

For :python3 etc., a heredoc marker that starts with a lower-case letter
is valid, and when it starts with "trim" it works in a script but not in
a function, and this PR makes it works in a function.
For :let, a heredoc marker that starts with a lower-case letter is not
valid, but when it starts with "trim" or "eval" the error can be a bit
confusing in a function, and this PR make it less confusing.

closes: #16574

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:56:16 +01:00
23da16d3d0 patch 9.1.1073: tests: test_compiler fails on Windows without Maven
Problem:  tests: test_compiler fails on Windows without Maven.
Solution: Add Xspotbugs directory to $PATH when mvn is not available
          (zeertzjq).

closes: #16576

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:53:28 +01:00
ccd7f454fc patch 9.1.1072: 'diffopt' "linematch" cannot be used with {n} less than 10
Problem:  'diffopt' "linematch" cannot be used with {n} less than 10
          digits (after v9.1.1022)
Solution: Fix off-by-one error when checking for digit (zeertzjq)

closes: #16577

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-03 18:49:49 +01:00
04d2a3fdc0 patch 9.1.1071: args missing after failing to redefine a function
Problem:  Arguments of a function are missing after failing to redefine
          it (after 8.2.2505), and heap-use-after-free with script-local
          function (after 9.1.1063).
Solution: Don't clear arguments or free uf_name_exp when failing to
          redefine an existing function (zeertzjq)

closes: #16567

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 19:04:22 +01:00
edf0f7db28 patch 9.1.1070: Cannot control cursor positioning of getchar()
Problem:  Cannot control cursor positioning of getchar().
Solution: Add "cursor" flag to {opts}, with possible values "hide",
          "keep" and "msg".

related: #10603
closes: #16569

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 19:01:01 +01:00
001c26cd61 patch 9.1.1069: preinsert text completions not deleted with <C-W>/<C-U>
Problem:  preinsert text completions not deleted with <C-W>/<C-U>
          (ddad431, after v9.1.1059)
Solution: handle <C-W> or <C-U> specifically and clear the completion
          (glepnir)

fixes: #16557
closes: #16565

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:36:22 +01:00
e0a2ab397f patch 9.1.1068: getchar() can't distinguish between C-I and Tab
Problem:  getchar() can't distinguish between C-I and Tab.
Solution: Add {opts} to pass extra flags to getchar() and getcharstr(),
          with "number" and "simplify" keys.

related: #10603
closes: #16554

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:14:35 +01:00
cbc1f409c1 CI: bump windows python to 3.13
closes: #16562

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:08:05 +01:00
44a21351a8 patch 9.1.1067: tests: Test_termwinscroll_topline2 fails on MacOS
Problem:  tests: Test_termwinscroll_topline2 fails on MacOS
          (after v9.1.1062)
Solution: reduce termwinscroll further, increase term_wait time

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 09:03:00 +01:00
2101230f40 patch 9.1.1066: heap-use-after-free and stack-use-after-scope with :14verbose
Problem:  heap-use-after-free and stack-use-after-scope with :14verbose
          when using :return and :try (after 9.1.1063).
Solution: Move back the vim_free(tofree) and the scope of numbuf[].
          (zeertzjq)

closes: #16563

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-02 08:55:57 +01:00
3a621188ee patch 9.1.1065: no digraph for "Approaches the limit"
Problem:  no digraph for "Approaches the limit"
Solution: Add the digraph using .= (Hans Ginzel)

Add digraph Approaches the Limit

≐ U+2250 https://www.fileformat.info/info/unicode/char/2250/index.htm

closes: #16508

Signed-off-by: Hans Ginzel <hans@matfyz.cz>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 16:17:14 +01:00
c078675ac7 patch 9.1.1064: not possible to use plural forms with gettext()
Problem:  not possible to use plural forms with gettext()
Solution: implement ngettext() Vim script function (Christ van Willegen)

closes: #16561

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 15:47:51 +01:00
b32800f7c5 patch 9.1.1063: too many strlen() calls in userfunc.c
Problem:  too many strlen() calls in userfunc.c
Solution: refactor userfunc.c and remove calls to strlen(),
          drop set_ufunc_name() and roll it into alloc_ufunc(),
          check for out-of-memory condition in trans_function_name_ext()
          (John Marriott)

closes: #16537

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 15:25:34 +01:00
3219da514c patch 9.1.1062: terminal: E315 when dragging the terminal with the mouse
Problem:  terminal: E315 when dragging the terminal with the mouse
          (user202729)
Solution: call update_topline() and validate_cursor() when clicking
          on the status line with the mouse (Hirohito Higashi)

fixes: #16024
fixes: #16211
closes: #16552

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 14:48:35 +01:00
7c930eb61a runtime(openPlugin): fix unclosed parenthesis in GetWordUnderCursor()
Problem:

Saw the following error when invoking gx mapping with cursor on a URL:

    Error detected while compiling function <SNR>95_GetWordUnderCursor:
    line    7:
    E1123: Missing comma before argument: return expand(user_var)
    E116: Invalid arguments for function dist#vim9#Open

Solution:

The line before "return expand(...)" has two open parentheses but only
one close parenthesis. Add another close parenthesis.

closes: #16553

Signed-off-by: Morton Fox <github@qslw.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-02-01 10:28:52 +01:00
195fcc90d0 runtime(doc): Tweak documentation style a bit
closes: #16556

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
2025-02-01 10:26:58 +01:00
85e3f24bea patch 9.1.1061: tests: test_glvs fails when unarchiver not available
Problem:  tests: test_glvs fails when unarchiver not available
          (Brian L. Matthews)
Solution: Check if an unarchiver is available, skip the test otherwise

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 17:02:32 +01:00
d7f5854fcc patch 9.1.1060: Vim always enables 'termguicolors' in a terminal
Problem:  Vim always enables 'termguicolors' in a terminal, even
          when not wanted (after v9.1.1054)
Solution: Respect `:set notermguicolors` in vimrc file

fixes: #16538
fixes: #16539
closes: #16540

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 16:16:48 +01:00
bfb4eea786 patch 9.1.1059: completion: input text deleted with preinsert when adding leader
Problem:  completion: input text deleted with preinsert when adding leader
Solution: remove compl_length and check the ptr for being equal
          to pattern when preinsert is active (glepnir)

closes: #16545

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 15:28:29 +01:00
fe0a9a3269 patch 9.1.1058: translation(sr): Missing Serbian translation for the tutor
Problem:  translation(sr): Missing Serbian translation for the tutor
Solution: include new Serbian translation for the new tutor,
          include translation for chapter 2 of the traditional tutor,
          update the Makefiles for installing the runtime files
          (Ivan Pešić)

closes: #16550

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-31 15:20:03 +01:00
8297e2cee3 patch 9.1.1057: Superfluous cleanup steps in test_ins_complete.vim
Problem:  Superfluous cleanup steps in test_ins_complete.vim.
Solution: Remove unnecessary :bw! and :autocmd! commands.
          Also remove unnecessary STRLEN() in insexpand.c
          (zeertzjq)

closes: #16542

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-30 11:04:47 +01:00
6d6ec2ee05 runtime(netrw): correct wrong version check
The version check introduced with commit edd4ac3e8 has a logic error.
Also it should only trigger when trying to use the netrw plugin and not
always.

fixes: #16541

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-30 11:00:35 +01:00
edd4ac3e89 patch 9.1.1056: Vim doesn't highlight to be inserted text when completing
Problem:  Vim doesn't highlight to be inserted text when completing
Solution: Add support for the "preinsert" 'completeopt' value
          (glepnir)

Support automatically inserting the currently selected candidate word
that does not belong to the latter part of the leader.

fixes: #3433
closes: #16403

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 18:58:04 +01:00
ec961b05dc runtime(netrw): upstream snapshot of v176
relevant commits:
- deprecate!: netrw#Launch, netrw#Open and gx mappings
- refactor: move some utility functions in a private file
- feat: add function to deprecate features
- refactor!: remove NetrwClean command and function
- refactor: use appropriate directories to store temporary files
- refactor: better way to call vim.ui.open
- refactor(Open): prefer lua wrapper function instead of cmdline
- refactor!: drop vim 7 checks
- refactor: use vim.ui.open when using neovim
- refactor: remove s:CheckIfKde
- refactor: balloon functionality
- refactor!: remove netrw#Access function

closes: #16519

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 18:39:30 +01:00
766801295d runtime(dist/vim9): fix regressions in dist#vim9#Open
fixes: #16533
fixes: #16532
closes: #16535

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 18:36:01 +01:00
a5d19aa44d runtime(hyprlang): fix string recognition
fixes: #16064
closes: #16527

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-29 10:28:42 +01:00
04cc897593 patch 9.1.1055: make install fails because of a missing dependency
Problem:  make install fails because of a missing dependency
Solution: add explicit dependencies for tutor/{en,it}
          (Sergei Trofimovich)

Without the change `make install -j16` fails
sometimes due to race condition to create a directory.

It's best reproducible with `make --shuffle`:

    $ make install --shuffle
    ...
    bash install-sh -c -d /vim-9.1.0990/share/vim/vim91/tutor
    chmod 755 /vim-9.1.0990/share/vim/vim91/tutor
    cp ../runtime/tutor/README* ../runtime/tutor/tutor* /vim-9.1.0990/share/vim/vim91/tutor
    cp ../runtime/tutor/en/* /vim-9.1.0990/share/vim/vim91/tutor/en/
    cp: target '/vim-9.1.0990/share/vim/vim91/tutor/en/': No such file or directory
    make[1]: [Makefile:2487: installtutor] Error 1 (ignored) shuffle=2340321974
    cp ../runtime/tutor/it/* /vim-9.1.0990/share/vim/vim91/tutor/it/
    cp: target '/vim-9.1.0990/share/vim/vim91/tutor/it/': No such file or directory
    make[1]: [Makefile:2488: installtutor] Error 1 (ignored) shuffle=2340321974

The fix adds a dependency on targeted directories used to install tutor.

Before the change it too 2-3 attempts to reproduce the install failure.
After the change `vim` survives 150 install attempts without failures.

closes: #16531

Signed-off-by: Sergei Trofimovich <slyich@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-28 11:37:52 +01:00
db23436b92 runtime(asm): add byte directives to syntax script
closes: #16523

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-26 16:55:54 +01:00
279dd703e1 patch 9.1.1054: Vim doesn't work well with TERM=xterm-direct
Problem:  Vim doesn't work well with TERM=xterm-direct
          (Andrea Pappacoda)
Solution: detect if a terminal supports true-colors and
          enable termguicolors

The terminfo database for xterm-direct contains both the (non-standard)
termcap RGB capability and a number of colors == 0x1000000 so it seems
either of those two options can be used to detect a terminal capable of
displaying true colors.

So set the termguicolor option automatically, when either of the two
options is detected. (for some reasons, my debian xterm (v393) does not
respond to XTGETTCAP query attempts, so falling back to the number of
colors seems like a good compromize)

fixes: #16327
closes: #16490

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-26 10:53:17 +01:00
fb49e3cde7 runtime(filetype): commit 99181205c5 breaks V lang detection
so make the regex more strict and have it check for a parenthesis.

See:
https://github.com/vlang/v/blob/master/examples/submodule/mymodules/submodule/sub_functions.v

related: #16513

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 16:18:51 +01:00
c729d6d154 runtime: decouple Open and Launch commands and gx mapping from netrw
closes: #16494
fixes: ##16486

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 16:07:12 +01:00
d65aa1bbdb patch 9.1.1053: "nosort" enables fuzzy filtering even if "fuzzy" isn't in 'completeopt'
Problem:  "nosort" enables fuzzy filtering even if "fuzzy" isn't in
          'completeopt' (after v9.1.1049)
Solution: Only enable fuzzy filtering when "fuzzy" is in 'completeopt'.
          (zeertzjq)

closes: #16510

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:30:46 +01:00
509a8d58f9 runtime(just): fix typo in syntax file
closes: #16515

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:27:15 +01:00
99181205c5 runtime(filetype): Improve Verilog detection by checking for modules definition
While at it, also increase the maximum number of lines to check to 500.

fixes: #16513

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:23:52 +01:00
3acfbb4b54 patch 9.1.1052: tests: off-by-one error in CheckCWD in test_debugger.vim
Problem:  tests: off-by-one error in CheckCWD in test_debugger.vim
Solution: Fix off-by-one in CheckCWD leading to local tests failure
          (Yee Cheng Chin)

Vim's test_debugger's Test_debug_backtrace_level test will fail if you
happen to run it in a Vim repository with full path of directory being
exactly 29 characters (e.g. `/Users/bob/developing/src/vim`). The test
does term dump comparison and the printout will overflow if the CWD is
too long. It does have a function to skip to test if it detects that but
it's off by one leading to this one situation where it will fail.

The reason why the logic didn't account for this is that Vim's message
printing will overflow the text if it prints a message at exactly the
width of the terminal. This could be considered a bug / quirk but that
will be another issue.

closes: #16517

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:14:06 +01:00
08ea2e1fb0 patch 9.1.1051: tests: no support for env variables when running Vim in terminal
Problem:  tests: no support for env variables when running Vim in
          terminal
Solution: support the "env" argument in RunVimInTerminal(),
          close swapfiles properly in test_termcodes,
          use CheckFeature in test_termencoding

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-25 15:01:42 +01:00
efc41a5958 patch 9.1.1050: too many strlen() calls in os_unix.c
Problem:  too many strlen() calls in os_unix.c
Solution: refactor os_unix.c and remove calls to strlen()
          (John Marriott)

closes: #16496

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-23 20:05:29 +01:00
f400a0cc41 patch 9.1.1049: insert-completed items are always sorted
Problem:  insert-completed items are always sorted, although the LSP
          spec[1] standard defines sortText in the returned
          completionitem list. This means that the server has sorted the
          results. When fuzzy is enabled, this will break the server's
          sorting results.
Solution: disable sorting of candidates when "nosort" is set in
          'completeopt'

[1]
https://microsoft.github.io/language-server-protocol/specifications/lsp/3.17/specification/#completionItem

closes: #16501

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-23 19:59:28 +01:00
df098fedbc patch 9.1.1048: crash after scrolling and pasting in silent Ex mode
Problem:  Crash after scrolling and pasting in silent Ex mode.
          (fizz-is-on-the-way)
Solution: Don't move cursor to line 0 when scrolling.
          (zeertzjq)

closes: #16506

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-22 22:27:30 +01:00
613d0bc128 patch 9.1.1047: Makefiles uses non-portable syntax
Problem:  Makefiles uses non-portable syntax
          (simo-zz, after v9.1.1029)
Solution: Revert auto-generation of MAJOR/MINOR variables

fixes: #16502
closes: #16503

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-22 22:21:50 +01:00
9dfc7e5e61 patch 9.1.1046: fuzzymatching doesn't prefer matching camelcase
Problem:  fuzzymatching doesn't prefer matching camelcase
          (Tomasz N)
Solution: Add extra score when case matches (glepnir)

fixes: #16434
closes: #16439

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 22:33:13 +01:00
c04334c33f patch 9.1.1045: filetype: N-Tripels and TriG files are not recognized
Problem:  filetype: N-Tripels and TriG files are not recognized
Solution: detect '*.nt' files as ntriples filetype and '*.trig' files
          as trig filetype (Gordian Dziwis)

closes: #16493

Signed-off-by: Gordian Dziwis <gordian@dziw.is>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 22:24:23 +01:00
d9a1f267ba patch 9.1.1044: Vim9: Patch 9.1.1014 causes regressions
Problem:  Vim9: Patch 9.1.1014 causes regressions
Solution: revert it for now

This reverts commit 57f0119358 since this
causes some regressions:
https://github.com/vim/vim/pull/16440#issuecomment-2600235629

So revert "patch 9.1.1014: Vim9: variable not found in transitive
import" for now.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 22:17:50 +01:00
e2a0471851 Update .gitignore for v9.1.1036
Ignore the src/{LICENSE,README.txt} which are created from shadow
directories.

closes: #16499

Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 21:48:58 +01:00
9601b1435a translation(sr): Update Serbian messages translation
closes: #16500

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-21 21:42:48 +01:00
9d1bed5ecc patch 9.1.1043: [security]: segfault in win_line()
Problem:  [security]: segfault in win_line()
          (fizz-is-on-the-way)
Solution: Check that ScreenLines is not NULL

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-j3g9-wg22-v955

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 22:55:57 +01:00
4cbc54a743 runtime(doc): update helptags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 22:52:54 +01:00
72755b3c8e patch 9.1.1042: filetype: just files are not recognized
Problem:  filetype: just files are not recognized
Solution: adjust filetype detection pattern, detect just shebang line,
          include just ftplugin, indent and syntax plugin
          (Peter Benjamin)

closes: #16466

Signed-off-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:56:41 +01:00
c273f1ac77 runtime(vim): Update base-syntax, match ternary and falsy operators
fixes: #14423
fixes: #16227
closes: #16484

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:53:01 +01:00
cb848b687f patch 9.1.1041: Vim9: out-of-bound access when echoing an enum
Problem:  Vim9: out-of-bound access when echoing an enum
Solution: Add NUL to growarray, check that ufunc is non-null
          before accessing it to make Coverity happy
          (Yegappan Lakshmanan)

closes: #16488

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:38:09 +01:00
d79ea47079 patch 9.1.1040: Vim9: imported type cannot be used as func return type
Problem:  Vim9: imported type cannot be used as func return type
          (Dayvid Albuquerque)
Solution: temporarily reset the is_export flag (Yegappan Lakshmanan)

fixes: #16489
closes: #16492

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:20:56 +01:00
4335fcfed1 runtime(kconfig): updated ftplugin and syntax script
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 21:01:41 +01:00
71028a32db runtime(doc): rename last t_BG reference to t_RB
This was missed in 37c64c78fd.

closes: #16491

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-20 20:19:18 +01:00
a81cf8b99e patch 9.1.1039: Vim9: comments are outdated
Problem:  Vim9: comments are outdated
Solution: Update comments, and include an enum example in the help
          (Yegappan Lakshmanan)

closes: #16485

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 22:20:34 +01:00
2a5312e738 patch 9.1.1038: tests: test_channel.py fails with IPv6
Problem:  tests: test_channel.py fails with IPv6
          (eds-collabora)
Solution: Use 127.0.0.1 instead of localhost

fixes: #16398

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 14:50:31 +01:00
8dec6c2e6c runtime(vim): Update base-syntax, fix is/isnot operator matching
- Match is? and isnot? operators.
- Limit other comparison operators to one match modifier rather than
  two.

closes: #16482

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 14:02:06 +01:00
bce60c4742 patch 9.1.1037: Vim9: confusing error when using abstract method via super
Problem:  Vim9: confusing error when using abstract method via super
Solution: Display an error when an abstract method is invoked using
          super (Ernie Rael)

fixes: #15514
closes: #16478

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 10:07:51 +01:00
5abc44e3c1 patch 9.1.1036: make install fails when using shadowdir
Problem:  make install fails when using shadowdir
          (after v9.1.1029)
Solution: also link in README.txt and LICENSE file

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 10:00:40 +01:00
90b397586d patch 9.1.1035: Vim9: memory leak with blob2str()
Problem:  Vim9: memory leak with blob2str()
Solution: free converted_str (Yegappan Lakshmanan)

closes: #16481

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-19 09:37:07 +01:00
2cb8246eb9 runtime(tex): add texEmphStyle to texMatchGroup in syntax script
fixes: #16228

Co-authored-by: Github User JordL
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 18:09:38 +01:00
c65bb2ea8e CI: bump windows python to 3.12
closes: #16473

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:38:12 +01:00
d402ba81e2 runtime(netrw): upstream snapshot of v175
Relevant commits:
- release: netrw v175
- fix: prevent netrw to load into the built-in terminal
- fix: restore correctly cpo settings
- fix(docs): mispelled original authors name
- chore: move viml files to new formatting standard

fixes: #16463
closes: #16465

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:36:02 +01:00
87f65f3857 CI: add Linux arm64 CI job
This patch adds jobs to run tests on arm64 GitHub Actions hosted runner
for tiny and huge features.

closes: #16477

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:33:31 +01:00
7c92e88894 patch 9.1.1033: Vim9: compiling abstract method fails without return
Problem:  Vim9: compiling abstract method fails without return
          (Aliaksei Budavei)
Solution: don't require return for an abstract method
          (Ernie Rael)

fixes: #15432
related: ##15441
closes: #16469

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:29:06 +01:00
fef4be0d7a CI: bump windows libsodium to 1.0.20
closes: #16475

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 17:20:13 +01:00
e06405181a runtime(c): add new constexpr keyword to syntax file (C23)
closes: #16471

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:52:27 +01:00
1d2867df0c patch 9.1.1033: tests: shaderslang was removed from test_filetype erroneously
Problem:  tests: shaderslang was removed from test_filetype erroneously
          (Christian Clason, after v9.1.1030)
Solution: restore the test

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:49:08 +01:00
b77c598487 patch 9.1.1032: link error when FEAT_SPELL not defined
Problem:  link error when FEAT_SPELL not defined
          (after v9.1.1016, John Marriott)
Solution: adjust ifdefs (Yegappan Lakshmanan)

closes: #16468

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:35:57 +01:00
5e9aaedf52 patch 9.1.1031: Coverity complains about insecure data handling
Problem:  Coverity complains about insecure data handling
          (v9.1.1024)
Solution: use int consistently to access the blob index
          (Yegappan Lakshmanan)

related: #16468

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:29:46 +01:00
54cb514c9a runtime(sh): update syntax script
- remove duplicated keywords
- add bash coproc and COPROC_PID keywords

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:11:28 +01:00
866f229591 runtime(c): Add missing syntax test files
These were missing from commit c2a967a.

closes: #16470

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:06:59 +01:00
727c567a09 patch 9.1.1030: filetype: setting bash filetype is backwards incompatible
Problem:  filetype: setting bash filetype is backwards incompatible
Solution: revert patch v9.1.0965, detect bash scripts again as sh
          filetype

This reverts commit b9b762c21f.

related: #16309

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-18 10:03:46 +01:00
c2a967a1b9 runtime(c): Update syntax and ftplugin files
- highlight more C keywords, including some from C23

Conditionally highlight C23 features:
- #embed, #elifdef and #elifndef preprocessor directives
- predefined macros
- UTF-8 character constants
- binary integer constants, _BitInt literals, and digit separators
- nullptr_t type and associated constant
- decimal real floating-point, bit precise and char types
- typeof operators

Matchit:
- update for new preprocessor directives

fixes: #13667
fixes: #13679
closes: #12984

Co-authored-by: Albin Ahlbäck <albin.ahlback@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 14:12:16 +01:00
2730d3873f patch 9.1.1029: the installer can be improved
Problem:  the installer can be improved
Solution: update the installer with the correct README and LICENSE
          files, improve the documentation, add a Makefile for the
          installer, update the Makefiles (RestorerZ)

fixes: #16378
closes: #16378

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 14:04:44 +01:00
c15de972e8 patch 9.1.1028: too many strlen() calls in screen.c
Problem:  too many strlen() calls in screen.c
Solution: refactor screen.c and remove calls to strlen(),
          verify that leadmultispace != NULL (John Marriott)

closes: #16460

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:54:49 +01:00
ca307efe48 patch 9.1.1027: no sanitize check when running linematch
Problem:  no sanitize check when running linematch
Solution: add sanitize check before applying the linematch algorithm,
          similar to diff_find_change() (Jonathon)

closes: #16446

Signed-off-by: Jonathon <jonathonwhite@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:37:35 +01:00
3a738fccaa patch 9.1.1026: filetype: swc configuration files are not recognized
Problem:  filetype: swc configuration files are not recognized
Solution: detect .swcrc files as json filetype (Marces Engel)

References:
https://swc.rs/docs/configuration/swcrc

closes: #16462

Signed-off-by: Marces Engel <marces@facemurphy.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:10:15 +01:00
9cfdabb074 runtime(netrw): change netrw maintainer
Dr. Chip retired some time ago and is no longer maintaining the netrw
plugin. However as a runtime plugin distributed by Vim, it important to
maintain the netrw plugin in the future and fix bugs as they are
reported.

So, split out the netrw plugin as an additional package, however include
some stubs to make sure the plugin is still loaded by default and the
documentation is accessible as well.

closes: #16368

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 13:03:53 +01:00
166b1754a9 patch 9.1.1025: wrong return type of blob2str()
Problem:  wrong return type of blob2str()
Solution: update return to list of string
          (Yegappan Lakshmanan)

closes: #16461

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-17 11:48:12 +01:00
a11b23c4d5 patch 9.1.1024: blob2str/str2blob() do not support list of strings
Problem:  blob2str/str2blob() do not support list of strings
          (after v9.1.1016)
Solution: Add support for using a list of strings (Yegappan Lakshmanan)

closes: #16459

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:16:42 +01:00
a234a46651 runtime(doc): fix typo in usr_02.txt
fixes: #16455

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:12:48 +01:00
a9f77be922 patch 9.1.1023: Coverity complains about dereferencing NULL pointer
Problem:  Coverity complains about dereferencing NULL pointer
Solution: Verify curdiff is not null before dereferencing it

closes: #16437

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:06:57 +01:00
9162e636b3 patch 9.1.1022: linematch option value not completed
Problem:  linematch option value not completed
          (after v9.1.1009)
Solution: Update diffoption completion values

related: #9661
closes: #16437

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 19:03:40 +01:00
70dfc374ec patch 9.1.1021: string might be used without a trailing NUL
Problem:  string might be used without a trailing NUL (after v9.1.0997)
Solution: Make sure that the buffer is NUL terminated

closes: #16457

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 18:58:20 +01:00
037b028a22 patch 9.1.1020: no way to get current selected item in a async context
Problem:  no way to get current selected item in a async context
Solution: add completed flag to show the entries of currently selected
          index item (@glepnir)

closes: #16451

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-16 14:37:44 +01:00
3058087f6f patch 9.1.1019: filetype: fd ignore files are not recognized
Problem:  filetype: fd ignore files are not recognized
Solution: detect .fdignore files as gitignore filetype

closes: #16444

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:46:37 +01:00
01f6509fb2 patch 9.1.1018: v9.1.0743 causes regression with diff mode
Problem:  v9.1.0743 causes regression with diff mode
Solution: Fix the regression with overlapping regions

closes: #16454

Signed-off-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:36:43 +01:00
6472e58365 runtime(doc): fix base64 encode/decode examples
Use str2blob()/blob2str() functions in examples given.

closes: #16449

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:31:28 +01:00
9904cbca41 patch 9.1.1017: Vim9: Patch 9.1.1013 causes a few problems
Problem:  Vim9: Patch 9.1.1013 causes a few problems
Solution: Translate the function name only when it is a string
          (Yegappan Lakshmanan)

fixes: #16453
closes: #16450

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-15 18:25:19 +01:00
1aefe1de0b patch 9.1.1016: Not possible to convert string2blob and blob2string
Problem:  Not possible to convert string2blob and blob2string
Solution: add support for the blob2str() and str2blob() functions

closes: #16373

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:29:42 +01:00
1ac53b84ad patch 9.1.1015: Coverity complains about dereferencing NULL value
Problem:  Coverity complains about dereferencing NULL value
Solution: Check that cms2 is not null

closes: #16438

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:25:02 +01:00
57f0119358 patch 9.1.1014: Vim9: variable not found in transitive import
Problem:  Vim9: variable not found in transitive import
Solution: Allow nested import (Hirohito Higashi)

fixe: #16379
closes: #16440

Signed-off-by: Hirohito Higashi <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:21:42 +01:00
045564d0a7 runtime(colors): Update colorschemes, include new unokai colorscheme
- new unokai colorscheme (similar/inspired by monokai)
- the rest: add explicit PopupSelected link to PmenuSel

closes: #16443

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:15:59 +01:00
6289f91591 patch 9.1.1013: Vim9: Regression caused by patch v9.1.0646
Problem:  Vim9: Regression caused by patch v9.1.0646
Solution: Translate the function name before invoking it in call()
          (Yegappan Lakshmanan)

fixes: #16430
closes: #16445

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-14 17:13:36 +01:00
30377e0fe0 runtime(lyrics): support milliseconds in syntax script
The following tool creates LRC files using three fractional digits after
the seconds (i.e. milliseconds).

References:
https://github.com/magic-akari/lrc-maker
https://lrc-maker.github.io/

closes: #16436

Signed-off-by: Denilson Sá Maia <denilsonsa@gmail.com>
Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 08:23:24 +01:00
221c53202d runtime(vim): Split Vim legacy and Vim9 script indent tests
The indent test file is not highlighted correctly as it's currently a
syntactically erroneous mix of legacy and Vim9 script.  This is causing
spurious indent test failures as the indent script relies on syntax ID
tests to determine the context of lines being processed.

Splitting the tests into legacy and Vim9 specific files allows for
correct syntax highlighting and indenting.

closes: #16431

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:54:33 +01:00
8e92db4ea2 patch 9.1.1012: Vim9: class interface inheritance not correctly working
Problem:  Vim9: class interface inheritance not correctly working
Solution: make the class inherit the interfaces of the super class

fixes: #16395
closes: #16412

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:30:11 +01:00
3a0cc36c69 patch 9.1.1011: popupmenu internal error with some abbr in completion item
Problem:  Popup menu internal error with some abbr in completion item.
Solution: Don't compute attributes when there is no corresponding text.
          Reduce indent in pum_redraw() while at it (zeertzjq).

fixes: #16427
closes: #16435

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-13 07:27:43 +01:00
c200f53cbb patch 9.1.1010: filetype: VisualCode setting file not recognized
Problem:  filetype: VisualCode setting file not recognized
Solution: detect json files in VSCode config directory as jsonc filetype
          (Konfekt)

closes: #16400

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 20:02:04 +01:00
7c7a4e6d1a patch 9.1.1009: diff feature can be improved
Problem:  diff feature can be improved
Solution: include the linematch diff alignment algorithm
          (Jonathon)

closes: #9661

Signed-off-by: Jonathon <jonathonwhite@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 09:58:00 +01:00
faf250c9e4 patch 9.1.1008: tests: test for patch 9.1.1006 doesn't fail without the patch
Problem:  tests: test for patch 9.1.1006 doesn't fail without the patch
          (after v9.1.1006)
Solution: Add ctermbg=NONE to the highlight groups (zeertzjq).

closes: #16425

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 09:32:27 +01:00
8cbe2e0a0a patch 9.1.1007: filetype: various ignore are not recognized
Problem:  filetype: various ignore are not recognized
Solution: detect rg/docker/npm/vvsce ignore files as 'gitgnore' filetype
          (Wu, Zhenyu)

Not only prettier, but many programs also support ignore files (like rg,
docker, npm, vscode). So use the gitignore filetype for them due to same syntax

closes: #16428

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-12 09:27:01 +01:00
5eaacef18e tests: Load screendump files with "git vimdumps"
Also, fold the difference part and the bottom part for the
identical screendump files.

closes: #16380

Co-authored-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 17:12:04 +01:00
9eff3ee818 patch 9.1.1006: PmenuMatch completion highlight can be combined
Problem:  PmenuMatch completion highlight can be combined
Solution: Combine highlight groups PmenuMatch with Pmenu and
          PmenuMatchSel with PmenuSel (glepnir)

fixes: #15563
closes: #16408

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 16:47:34 +01:00
9fddb8ae77 patch 9.1.1005: completion text is highlighted even with no pattern found
Problem:  completion text is highlighted even with no pattern found
Solution: use ins_compl_leader_len() instead of checking
          compl_leader.length (glepnir)

closes: #16422

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 16:42:50 +01:00
ebb08d5913 patch 9.1.1004: tests: a few termdebug tests are flaky
Problem:  tests: a few termdebug tests are flaky; test_termdebug_basic()
          and test_termdebug_config_types() may fail if there is too
          much load
Solution: Set g:test_is_flaky

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 15:43:12 +01:00
c9a1e257f1 patch 9.1.1003: [security]: heap-buffer-overflow with visual mode
Problem:  [security]: heap-buffer-overflow with visual mode when
          using :all, causing Vim trying to access beyond end-of-line
          (gandalf)
Solution: Reset visual mode on :all, validate position in gchar_pos()
          and charwise_block_prep()

This fixes CVE-2025-22134

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-5rgf-26wj-48v8

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 15:25:00 +01:00
9598a6369b runtime(doc): add package-<name> helptags for included packages
Improve how to find the justify package

closes: #16420

Co-authored-by: Peter Benjamin <petermbenjamin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 10:14:24 +01:00
c10342da44 patch 9.1.1002: Vim9: unknown func error with interface declaring func var
Problem:  Vim9: unknown function error with interface declaring a
          function variable (lifepillar)
Solution: Use correct instruction for getting interface member variables
          (Yegappan Lakshmanan)

fixes: #16345
closes: #16421

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 09:39:01 +01:00
668e9f2403 runtime(filetype): don't detect string interpolation as angular
fixes: #16375

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-11 09:20:55 +01:00
ad409876d9 patch 9.1.1001: ComplMatchIns highlight hard to read on light background
Problem:  ComplMatchIns highlight hard to read on light background
          (after v9.1.0996)
Solution: define the highlighting group cleared, it should be configured in
          colorschemes separately (glepnir)

closes: #16414

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-10 20:08:20 +01:00
695522dea3 runtime(vim): Update base-syntax, highlight literal string quote escape
Match the '' escape sequence in literal strings.  These were previously
ending the current string and starting another concatenated literal
string.

closes: #16415

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2025-01-10 20:02:17 +01:00
51754c8a49 runtime(editorconfig): set omnifunc to syntaxcomplete func
closes: #16419

Signed-off-by: Yochem van Rosmalen <git@yochem.nl>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-10 19:54:13 +01:00
ebea31e454 patch 9.1.1000: tests: ruby tests fail with Ruby 3.4
Problem:  tests: ruby tests fail with Ruby 3.4
Solution: adjust expected output for Ruby 3.4
          (Yee Cheng Chin)

Vim's Ruby tests relied on explicit matching of output texts which are
fragile in design. Ruby 3.4 has changed the output slightly (using
'name' instead of `name', and also using more spaces in dictionary
printouts). Modify the Vim tests to be less fragile to such changes.

closes: #16411

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-09 22:23:29 +01:00
2051af1642 patch 9.1.0999: Vim9: leaking finished exception
Problem:  leaking finished exception
          (after v9.1.0984)
Solution: use finish_exception to clean up caught exceptions
          (Yee Cheng Chin)

In Vimscript, v:exception/throwpoint/stacktrace are supposed to reflect
the currently caught exception, and be popped after the exception is
finished (via endtry, finally, or a thrown exception inside catch).
Vim9script does not handle this properly, and leaks them instead. This
is clearly visible when launching GVim with menu enabled.  A caught
exception inside the s:BMShow() in menu.vim would show up when querying
`v:stacktrace` even though the exception was already caught and handled.

To fix this, just use the same functionality as Vimscript by calling
`finish_exception` to properly restore the states. Note that this
assumes `current_exception` is always the same as `caught_stack` which
believe should be the case.

Added tests for this. Also fix up test_stacktrace to properly test the
stack restore behavior where we have nested exceptions in catch blocks
and to also test the vim9script functionality properly.

- Also, remove its dependency on explicitly checking a line number in
  runtest.vim which is a very fragile way to write tests as any minor
  change in runtest.vim (shared among all tests) would require changing
  test_stacktrace.vim. We don't actually need such granularity in the
  test.

closes: #16413

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-09 22:14:34 +01:00
df4a7d7617 runtime(tiasm): use correct syntax name tiasm in syntax script
closes: #16416

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-09 22:09:16 +01:00
4f73c07abf patch 9.1.0998: filetype: TI assembly files are not recognized
Problem:  filetype: TI assembly files are not recognized
Solution: inspect '*.sa' and assembly files and detect TI assembly
          files, include filetype plugin and syntax script for TI
          assembly files (Wu, Zhenyu)

closes: #15827

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 20:26:38 +01:00
a21240b97d patch 9.1.0997: too many strlen() calls in drawscreen.c
Problem:  too many strlen() calls in drawscreen.c
Solution: refactor drawscreen.c and remove calls to strlen(),
          make get_keymap_str() (in screen.c) return string length
          instead of TRUE/FALSE (John Marriott).

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 20:10:59 +01:00
8ab1819df6 runtime(xf86conf): add section name OutputClass to syntax script
References:
https://man.archlinux.org/man/xorg.conf.5#DESCRIPTION

closes: #16397

Signed-off-by: Jan-Arvid Harrach <jharrach@tutanota.com>
2025-01-08 20:05:05 +01:00
e890887b80 patch 9.1.0996: ComplMatchIns may highlight wrong text
Problem:  ComplMatchIns may highlight wrong text
Solution: don't highlight in case of fuzzy match,
          skip-highlight when not inserting anything
          (glepnir)

closes: #16404

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 18:30:45 +01:00
1718e7d07e runtime(vim): Update base-syntax, improve ex-bang matching
Always match ex-bang explicitly rather than incidentally as the ! operator.

fixes: #16221
closes: #16410

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 18:20:47 +01:00
1f045f324d runtime(doc): clarify buffer deletion on popup_close()
Reported-by: Lifepillar <lifepillar@lifepillar.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-08 14:09:02 +01:00
e0424b3348 CI: drop setup of snd-dummy module
Apparently even when loading the snd-dummy kernel module, the
CI tests for the sounds feature in test_sound.vim are already skipped.

So let's just remove all of this (even so we may loose a bit of coverage
information here).

closes: #16391

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-07 20:43:29 +01:00
616219f684 patch 9.1.0995: filetype: shaderslang files are not detected
Problem:  filetype: shaderslang files are not detected
Solution: detect '*.slang' files as shaderslang filetype,
          include a filetype and syntax script (mtvare6)

Reference:
https://shader-slang.com/

closes: #16387

Signed-off-by: mtvare6 <mtvare6@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-07 20:31:27 +01:00
0072ceedc6 patch 9.1.0994: Vim9: not able to use comment after opening curly brace
Problem:  Vim9: not able to use comment after opening curly brace
          (lifepillar)
Solution: allow to use comments after curly braces of an inner-block,
          modify the logic to search for comment in a line, update Vim9
          tests to use specific class type instead of any
          (Yegappan Lakshmanan)

fixes: #16363
closes: #16405

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-07 20:22:32 +01:00
c97e869535 patch 9.1.0993: New 'cmdheight' behavior may be surprising
Problem:  Although patch 9.1.0990 fixed a real problem/inconsistency,
          it also introduced new behavior that may break BWC and/or be
          unexpected. Before 9.1.0990, window commands could make the
          topframe smaller (without changing 'cmdheight'; quirk that is
          now fixed), but did not allow extending the topframe beyond
          the 'cmdheight' set by the user. After 9.1.0990, the user can
          reduce the 'cmdheight' below the value they set explicitly,
          through window commands, which may lead to confusion.
          (aftere v9.1.0990)
Solution: Store the value explicitly set by the user and clamp the
          'cmdheight' when resizing the topframe. This also applies to
          dragging laststatus, which in contrast to window commands
          _did_ allow reducing the 'cmdheight' to values below the one
          set by the user. So with this patch there is still new
          behavior, but I think in a way that is less surprising.
          While at it, also fix a Coverity warning, introduced in
          v9.1.0990 (Luuk van Baal)

closes: #16385

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-06 18:58:21 +01:00
3159b6494e runtime(sh): fix typo in Last Change header
related: #16394

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-06 18:50:15 +01:00
2050dcc20f patch 9.1.0992: Vim9: double-free after v9.1.0988
Problem:  Vim9: double-free after v9.1.0988
          (h-east)
Solution: clear typval pointer, before setting the type
          (Yegappan Lakshmanan)

Otherwise the contents are still referring to some other value.

fixes: #16386
closes: #16388

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-06 18:34:49 +01:00
6655bef330 patch 9.1.0991: v:stacktrace has wrong type in Vim9 script
Problem:  v:stacktrace has wrong type in Vim9 script.
Solution: Change the type to t_list_dict_any.  Fix grammar in docs.
          (zeertzjq)

closes: #16390

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-06 18:32:13 +01:00
cf1f55548d runtime(sh): add PS0 to bashSpecialVariables in syntax script
PS0 is also a special prompt variable. (It is expanded and displayed
after it reads a command but before executing it.)

References:
https://www.gnu.org/software/bash/manual/html_node/Interactive-Shell-Behavior.html

closes: #16394

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-06 18:27:38 +01:00
7ceaa8f3dd runtime(vim): Remove trailing comma from match_words
fixes: #16377 (`filetype plugin indent on` breaks matchit).
closes: #16389

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-06 18:12:11 +01:00
202ebc6ced runtime(zsh): sync syntax script with upstream repo
fixes: #16371

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-05 16:36:40 +01:00
8a27d97848 runtime(doc): Capitalise the mnemonic "Zero" for the 'z' flag of search()
closes: #16384

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-05 15:56:57 +01:00
e15cbc1af4 patch 9.1.0990: Inconsistent behavior when changing cmdheight
Problem:  Inconsistent behavior when changing cmdheight by resizing the
          topframe through wincmds and dragging laststatus. Changing
	  cmdheight by resizing the topframe does not trigger OptionSet.
Solution: Consolidate logic for changing the cmdheight, set the option
	  value to handle side-effects (Luuk van Baal)

closes: #16359

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-04 17:18:08 +01:00
dbe39edb29 patch 9.1.0989: Vim9: Whitespace after the final enum value causes a syntax error
Problem:  Vim9: Whitespace after the final enum value causes a syntax
          error
Solution: Fix parsing to allow whitespace after the final enum value.
          (Doug Kearns)

closes: #16383

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-04 17:12:24 +01:00
cd96075cde runtime(java): Quietly opt out for unsupported markdown.vim versions
fixes #16349
closes: #16369

Signed-off-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 17:38:14 +01:00
6139766e82 runtime(vim): fix failing vim syntax test
after v9.1.0985

related: #16356

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 17:32:54 +01:00
b04af4cc96 patch 9.1.0988: Vim9: no error when using uninitialized var in new()
Problem:  Vim9: no error when using uninitialized var in new()
          (lifepillar, Aliaksei Budavei)
Solution: Give an error if an uninitialized object variable is referenced
          in new() (Yegappan Lakshmanan)

fixes: #14411
fixes: #16344
closes: #16374

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:50:08 +01:00
27f2e473e1 runtime(doc): update index.txt
related: #16357
closes: #16372

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:45:15 +01:00
a407573f30 patch 9.1.0987: filetype: cake files are not recognized
Problem:  filetype: cake files are not recognized
Solution: detect '*.cake' files as cs filetype
          (Zoe Roux)

References:
https://cakebuild.net/

closes: #16367

Signed-off-by: Zoe Roux <zoe.roux@zoriya.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:40:31 +01:00
58c44e8833 patch 9.1.0986: filetype: 'jj' filetype is a bit imprecise
Problem:  filetype: 'jj' filetype is a bit imprecise
Solution: rename 'jj' filetype to 'jjdescription'
          (Gregory Anders)

closes: #16364

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:35:35 +01:00
bde76da4d0 runtime(jj): Support diffs in jj syntax
related: #16364

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:34:24 +01:00
fc61cfd60e runtime(vim): Update matchit pattern, no Vim9 short names
Abbreviated :enum and :interface commands are no longer supported.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:28:09 +01:00
aa979c763d patch 9.1.0985: Vim9: some ex commands can be shortened
Problem:  Vim9: some ex commands can be shortened
Solution: disallow shortening of :abstract, :interface and :type
          (h-east)

closes: #16356

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-03 10:19:45 +01:00
663d18d610 patch 9.1.0984: exception handling can be improved
Problem:  exception handling can be improved
Solution: add v:stacktrace and getstacktrace()

closes: #16360

Co-authored-by: Naruhiko Nishino <naru123456789@gmail.com>
Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-02 18:06:00 +01:00
fd771613b3 runtime(doc): update doc for :horizontal
Revert the documentation for :horizontal from commit
0c3e57b403 because :horizontal cannot be shortened to :ho

closes: #16362

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-02 17:34:55 +01:00
0c3e57b403 runtime(doc): update index.txt, windows.txt and version9.txt
closes: #16357

Co-authored-by: Aliaksei Budavei <32549825+zzzyxwvut@users.noreply.github.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-02 11:00:49 +01:00
e80f345b5d runtime(doc): Tweak documentation about base64 function
closes: #16353

Signed-off-by: Christian Brabandt <cb@256bit.org>
2025-01-02 10:42:07 +01:00
8dc98bf427 runtime(chordpro): update syntax script
References:
https://chordpro.org/beta/directives-define/#defining-chords-for-keyboard-instruments

Signed-off-by: nibo <nibo@relim.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-31 11:24:46 +01:00
d4088edae2 patch 9.1.0983: not able to get the displayed items in complete_info()
Problem:  not able to get the displayed items in complete_info()
          (Evgeni Chasnovski)
Solution: return the visible items via the "matches" key for
          complete_info() (glepnir)

fixes: #10007
closes: #16307

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-31 10:58:30 +01:00
34e271b321 runtime(doc): use standard SGR format at :h xterm-true-color
By default, Vim uses the non-standard, but widely supported, legacy
xterm/Konsole format for setting "direct colors" with set setaf and
setbf escape codes, which use semicolons as separators.

The documentation for xterm-true-color mentions that, as an alternative,
users can set alternative sequences that use colons instead of
semicolons. This format, though, isn't standard and it is unclear how
widely supported it is; it was added by xterm patch 282 due to a
misinterpretation of the ISO 8613-6 (ITU T.416) standard, and was later
changed to the format suggested by this patch, which is the one
specified in the standard.

Today, looking at ncurses' [terminfo], it seems that all terminal
emulators use either the standard format (named "xterm+direct" in the
terminfo source) or the legacy format (named "xterm+indirect" in the
terminfo source).

Hence, I believe it makes sense to align the docs with reality.

If you're interested in the story of this escape sequence, I'd recommend
reading
<https://invisible-island.net/ncurses/ncurses.faq.html#xterm_16MegaColors>.

[terminfo]: https://invisible-island.net/ncurses/terminfo.ti.html

closes: #16350

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Andrea Pappacoda <andrea@pappacoda.it>
2024-12-31 10:46:22 +01:00
39a4eb0b2c patch 9.1.0982: TI linker files are not recognized
Problem:  TI linker files are not recognized
Solution: inspect '*.cmd' files and detect TI linker files
          as 'lnk' filetype, include a lnk ftplugin and syntax
          script (Wu, Zhenyu)

closes: #16320

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-31 10:25:44 +01:00
f27e80a6e1 runtime(vim): update vim generator syntax script
* include the base64* functions
* allow to shorten finally

closes: #16346

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 15:40:24 +01:00
2bee7e43e1 patch 9.1.0981: tests: typo in test_filetype.vim
Problem:  tests: typo in test_filetype.vim
Solution: fix comment, update lnkmap syntax file and add
          DESCT keyword
          (Wu, Zhenyu)

closes: #16348

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 15:36:37 +01:00
810785c689 patch 9.1.0980: no support for base64 en-/decoding functions in Vim Script
Problem:  no support for base64 en-/decoding functions in Vim Script
          (networkhermit)
Solution: Add the base64_encode() and base64_decode() functions
          (Yegappan Lakshmanan)

fixes: #16291
closes: #16330

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 10:32:35 +01:00
48fa3198b7 syntax(sh): Improve the recognition of bracket expressions
- Define a general non-"contained" "shBracketExpr" group,
  and replace with it the "contained" bracket variant of
  "shOperator", adjusting the patterns for the competing
  conditional commands "[" and "[[".
- Accommodate some unbalanced brackets (e.g. "[!][!]").
- Make the leading "!" (or "^") stand out in NON-matching
  bracket expressions.
- Support literal newlines in parametric patterns (along
  with pathname globbings and "case" patterns).
- Also match bracket expressions in:
  * parametric patterns (e.g. "${1#[ab]_}");
  * pathname globbings (e.g. "[ab]*.txt");
  * arguments for the "[[", "echo", and "print" commands.
- Recognise collating symbols (e.g. "[.a.]") and equivalence
  classes (e.g. "[=a=]").
- Recognise end patterns for a pattern substitution form of
  parameter expansion and match bracket expressions in such
  patterns (e.g. "${1/%[.!]/;}").

fixes #15799
closes: #15941

References:
https://pubs.opengroup.org/onlinepubs/9799919799/basedefs/V1_chap09.html#tag_09_03_05
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/V3_chap02.html#tag_19_14
https://git.savannah.gnu.org/gitweb/?p=bash.git;a=blob_plain;f=doc/bash.html;hb=37b7e91d64ad10b1a1815d12128c9475636df670
http://www.mirbsd.org/htman/i386/man1/mksh.htm

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 10:23:50 +01:00
6de7191c31 runtime(doc): mention how NUL bytes are handled
fixes: #16326

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 10:20:17 +01:00
80ed8b8761 patch 9.1.0979: VMS: type warning with $XDG_VIMRC_FILE
Problem:  VMS: type warning with $XDG_VIMRC_FILE
          (Zoltan Arpadffy)
Solution: add explicit (char_u *) type cast to mch_getenv() call

fixes: #16335

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 10:10:01 +01:00
2e1f757f7b patch 9.1.0978: GUI tests sometimes fail when setting 'scroll' options
Problem:  GUI tests sometimes fail when setting 'scroll' options
Solution: decrease the 'scroll' and 'scrolljump' option value from 20 to
          15, in case the Gui window is not large enough to handle 20.

tests: decrease the scroll and scrolljump values

the gui tests sometimes fail with:

```
From test_options_all.vim:
Found errors in Test_opt_set_scroll():
Caught exception in Test_opt_set_scroll(): Vim(set):E49: Invalid scroll size: scroll=20 @ command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[617]..function RunTheTest[57]..Test_opt_set_scroll, line 7
Found errors in Test_opt_set_scrolljump():
Caught exception in Test_opt_set_scrolljump(): Vim(set):E49: Invalid scroll size: scrolljump=20 @ command line..script /home/runner/work/vim/vim/src/testdir/runtest.vim[617]..function RunTheTest[57]..Test_opt_set_scrolljump, line 9
```

closes: #16337

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 10:05:49 +01:00
32b7e3a8c9 patch 9.1.0977: filetype: msbuild filetypes are not recognized
Problem:  filetype: msbuild filetypes are not recognized
Solution: detect msbuild files as xml filetype
          (Gustav Eikaas)

closes: #16339

Signed-off-by: GustavEikaas <gustav.eikaas@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 10:01:36 +01:00
ab9a8947d7 patch 9.1.0976: Vim9: missing return statement with throw
Problem:  Vim9: missing return statement with throw
          (atitcreate)
Solution: Treat a throw statement at the end of an if-else block as a
          return statement (Yegappan Lakshmanan)

fixes: #16312
closes: #16338

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 09:56:34 +01:00
b0206e9fb5 patch 9.1.0975: Vim9: interpolated string expr not working in object methods
Problem:  Vim9: interpolated string expr not working in object methods
          (Igbanam Ogbuluijah)
Solution: Check the evalarg argument (Yegappan Lakshmanan)

fixes: #16317
closes: #16342

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 09:52:16 +01:00
df4b3ca5dc patch 9.1.0974: typo in change of commit v9.1.0873
Problem:  typo in change of commit v9.1.0873
          (Christ van Willegen)
Solution: Add back the square brackets
          (John Marriott)

closes: #16340

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-30 09:48:06 +01:00
14ede1890f patch 9.1.0973: too many strlen() calls in fileio.c
Problem:  too many strlen() calls in fileio.c
Solution: refactor fileio.c and remove calls to STRLEN(),
          check for out-of-memory condition in buf_check_timestamp()
          (John Marriott)

closes: #16306

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 16:18:23 +01:00
df67fc0e69 runtime(sh): set shellcheck as the compiler for supported shells
closes: #16311

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 15:36:42 +01:00
49a35f67eb runtime(doc): Fix enum example syntax
An ex-colon is not allowed before endenum.  As no other examples in the
file use an ex-colon remove them both.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 15:33:12 +01:00
5113831d16 patch 9.1.0972: filetype: TI linker map files are not recognized
Problem:  filetype: TI linker map files are not recognized
Solution: detect TI linker map files as lnkmap filetype
          (Wu, Zhenyu)

References:
https://downloads.ti.com/docs/esd/SPRUI03A/Content/SPRUI03A_HTML/linker_description.html

closes: #16324

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 15:28:46 +01:00
f0ab3e4e41 runtime(vim): Improve syntax script generator for Vim Script
closes: #16331

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 15:14:37 +01:00
3b3318b640 patch 9.1.0971: filetype: SLNX files are not recognized
Problem:  filetype: SLNX files are not recognized
Solution: detect '*.slnx' files as xml filetype
          (Gustav Eikaas)

References:
https://blog.ndepend.com/slnx-the-new-net-solution-xml-file-format/
https://blog.jetbrains.com/dotnet/2024/10/04/support-for-slnx-solution-files/

closes: #16334

Signed-off-by: GustavEikaas <gustav.eikaas@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 15:08:49 +01:00
7b12ac3ad8 patch 9.1.0970: VMS: build errors on VMS architecture
Problem:  VMS: build errors on VMS architecture
Solution: define cellsize struct, use C89 to initialize lval_root_S
          struct (Zoltan Arpadffy)

* define struct cellsize for VMS
* ensures the code adheres to the C89 standard

closes: #16328

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 09:50:20 +01:00
f2e08a1e54 runtime(doc): Fix documentation typos
closes: #16333

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-29 09:46:03 +01:00
f6ba8defc6 runtime(doc): update for new keyprotocol option value (after v9.1.0969)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-28 17:15:05 +01:00
231b4fc3cc patch 9.1.0969: ghostty not using kitty protocol by default
Problem:  ghostty not using kitty protocol by default (00-kat)
Solution: update keyprotocol option default and include ghostty

fixes: #16318
closes: #16323

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-28 16:27:49 +01:00
e51043ad9f patch 9.1.0968: tests: GetFileNameChecks() isn't fully sorted by filetype name
Problem:  tests: GetFileNameChecks() isn't fully sorted by filetype name
Solution: re-sort the list

closes: #16322

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-28 16:24:30 +01:00
223d6c0a94 runtime(doc): update version9.txt for bash filetype
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-28 16:20:53 +01:00
7b239f6d47 runtime(netrw): update last change header for #16265
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-28 14:08:38 +01:00
e6ccb643a6 runtime(doc): fix doc error in :r behaviour
closes: #16316

Signed-off-by: Martino Ischia <ischiamartino@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-28 10:19:26 +01:00
2e252474c4 patch 9.1.0967: SpotBugs compiler setup can be further improved
Problem:  SpotBugs compiler can be further improved
Solution: Introduce event-driven primitives for SpotBugs
          (Aliaksei Budavei)

closes: #16258

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-27 16:47:44 +01:00
b7f19a5459 patch 9.1.0966: Vim9: :enum command can be shortened
Problem:  Vim9: :enum command can be shortened
Solution: prevent shortening of :enum command by adding the EX_WHOLE
          flag to command definition (h-east)

closes: #16305

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-27 16:25:32 +01:00
6c57c30ad4 runtime(compiler): include a basic bash syntax checker compiler
See @saccarosium 's suggestion at
https://github.com/vim/vim/pull/16311#issuecomment-2563447885

closes: #16314

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-27 16:22:44 +01:00
b9b762c21f patch 9.1.0965: filetype: sh filetype set when detecting the use of bash
Problem:  filetype: sh filetype set when detecting the use of bash
Solution: when bash is detected, use 'bash' filetype instead
          (Luca Saccarola)

closes: #16309

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-27 16:08:14 +01:00
0a3b9fb5c2 runtime(doc): clarify ARCH value for 32-bit in INSTALLpc.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-27 15:51:09 +01:00
157397edff patch 9.1.0964: MS-Windows: sed error with MinGW
Problem:  MS-Windows: sed error with MinGW
Solution: use double quotes for sed, update compilation notes
          (Andrey A Voropaev)

closes: #16304

Signed-off-by: Andrey A. Voropaev <voropaev.andrey@swm.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 15:59:06 +01:00
5a04999a74 patch 9.1.0963: fuzzy-matching does not prefer full match
Problem:  fuzzy-matching does not prefer full match
          (Maxim Kim)
Solution: add additional score for a full match
          (glepnir)

fixes: #15654
closes: #16300

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 15:46:56 +01:00
f07ae5b3bd patch 9.1.0962: filetype: bun.lock file is not recognized
Problem:  filetype: bun.lock file is not recognized
Solution: detect 'bun.lock' file as jsonc filetype
          (Anton Kastritskii)

closes: #16308

Signed-off-by: Anton Kastritskii <halloy52@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 15:16:12 +01:00
6d2efd4920 runtime(vim): update indentation plugin for Vim script
Make the indent script aware of enums and ensure those will be correctly
indented.

fixes: #16289
closes: #16293

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Jim Zhou <csd_189@163.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 10:36:56 +01:00
b9ea0a89fa runtime(doc): tweak documentation style in helphelp.txt
closes: #16302

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 10:22:46 +01:00
9b67a2e1dd runtime(vim): Update base-syntax, allow parens in default arguments
Allow parentheses in default arguments specified in :def and :function
definitions.

fixes #16243
closes: #16269

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-26 10:13:45 +01:00
de6a313014 runtime(doc): mention auto-format using clang-format for sound.c/sign.c
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 18:03:09 +01:00
ae01b96004 runtime(help): fix typo s/additional/arbitrary/
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 17:52:12 +01:00
5ddcecf05f runtime(help): Add better support for language annotation highlighting
closes: #16238

Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h_east <h.east.727@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:55:48 +01:00
9360de9027 patch 9.1.0961: filetype: TI gel files are not recognized
Problem:  filetype: TI gel files are not recognized
Solution: detect '*.gel' files as gel filetype, include
          get filetype and syntax plugins
          (Wu, Zhenyu)

References:
https://downloads.ti.com/ccs/esd/documents/users_guide/ccs_debug-gel.html

closes: #16226

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:40:25 +01:00
a32daed559 patch 9.1.0960: filetype: hy history files are not recognized
Problem:  filetype: hy history files are not recognized
Solution: detect '*.hy', '.hy-history' files as hy filetype,
          detect '.lips_repl_history' files are scheme filetype
          (Wu, Zhenyu)

closes: #16298

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:33:57 +01:00
b6ab33bdb2 translation(fi): Fix typoes in Finish menu translation
fixes: #16285
closes: #16286

Signed-off-by: Fredrik <fredrik.oljemark@helsinki.fi>
Signed-off-by: Flammie A Pirinen <flammie@iki.fi>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:28:29 +01:00
00d3459ea6 patch 9.1.0959: Coverity complains about type conversion
Problem:  Coverity complains about type conversion
          (after v9.1.0957)
Solution: use size_t instead of int for file length
          (Yegappan Lakshmanan)

closes: #16297

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:20:51 +01:00
9739086de2 runtime(vim): Use supported syntax in indent tests
For now, prefer mis-indentation of enum values (see #16289)
rather than invalid syntax.

Related to #13670 and #14224.

closes: #16292

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-25 10:18:15 +01:00
e62d93ead1 patch 9.1.0958: filetype: supertux2 config files detected as lisp
Problem:  filetype: supertux2 config files detected as lisp
Solution: detect supertux2 config files as scheme instead
          (Wu, Zhenyu)

References:
https://github.com/SuperTux/supertux/wiki/S-Expression

supertux uses #t and #f as bool type, which is same as scheme, not
common lisp

closes: #16287

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-24 09:54:27 +01:00
084529c03d patch 9.1.0957: MS-Windows: conversion warnings
Problem:  MS-Windows: conversion warnings
Solution: add explicit type casts (Yegappan Lakshmanan)

closes: #16288

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-24 09:50:01 +01:00
8d0bb6dc9f patch 9.1.0956: completion may crash, completion highlight wrong with preview window
Problem:  completion may crash, completion highlight wrong with preview
          window (after v9.1.0954)
Solution: correctly calculate scroll offset, check for preview window
          when adding extra highlighting
          (glepnir)

when there have a preview window prepare_tagpreview
will change curwin to preview window and this may cause
ComplMatchIns check condition not correct. check wp is curwin
and also the type of wp is not a preview or poup info

fixes: #16284
closes: #16283

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-24 09:44:35 +01:00
f07c10d7bb patch 9.1.0955: Vim9: vim9compile.c can be further improved
Problem:  Vim9: vim9compile.c can be further improved
Solution: refactor the compile_def_function
          (Yegappan Lakshmanan)

closes: #16280

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-23 10:15:08 +01:00
08be9ddc85 runtime(doc): move help tag E1182
closes: #16279

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-23 10:11:25 +01:00
4ce1cb5bf1 runtime(graphql): contribute vim-graphql to Vim core
Contribute the core of my vim-graphql project (ftplugin, indent, syntax)
to the Vim project. This replaces the basic ftplugin support that was
already in the runtime with a more complete set of filetype settings. I
can assume maintainership for all of these files.

I'll continue to maintain the higher-level embedded filetype support
separately (in vim-graphql) for now, because it's fairly complex, but we
can consider integrating that code directly into vim later.

runtime files use the MIT license.

closes: #16273

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-23 09:57:42 +01:00
89a107efd1 patch 9.1.0954: popupmenu.c can be improved
Problem:  popupmenu.c can be improved
Solution: slightly refactor the logic
          (glepnir)

closes: #16271

Replace some if blocks and combine user attr abstract to an inline
function.

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-22 15:16:40 +01:00
7cb24917a1 patch 9.1.0953: filetype: APKBUILD files not correctly detected
Problem:  filetype: APKBUILD files not correctly detected
Solution: detect 'APKBUILD' files as apkbuild filetype,
          include a apkbuild syntax script (which basically
          just sources the sh.vim syntax file)
          (Hugo Osvaldo Barrera)

Vim plugins (e.g.: ALE, nvim-lspconfig, etc) rely on filetype to
determine which integrations/helpers are applicable. They expect
filetype=apkbuild for APKBUILD files.

On the other hand, plugins also enable bash-specific linters and
functionality when filetype=bash, but APKBUILD files are POSIX sh, not
bash, so these often provide bogus results.

Change the filetype for APKBUILD to a 'apkbuild', so that tools and
ftplugin can properly target these files. This filetype will use the
existing `sh` syntax rules, since these are applicable for them.

Signed-off-by: Hugo Osvaldo Barrera' via vim_dev <vim_dev@googlegroups.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-22 15:11:50 +01:00
92195ae72f patch 9.1.0952: Vim9: missing type checking for any type assignment
Problem:  Vim9: missing type checking for any type assignment
          (Ernie Rael)
Solution: when assigning to a list item, if the type of the LHS item is
          any, then use the list item type (Yegappan Lakshmanan)

fixes: #15208
closes: #16274

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-22 14:44:35 +01:00
62e3014ab1 patch 9.1.0951: filetype: jshell files are not recognized
Problem:  filetype: jshell files are not recognized
Solution: detect '*.jsh' files as java filetype
          (Konfekt)

closes: #16260

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-22 10:57:33 +01:00
70881ba195 runtime(dockerfile): do not set commentstring in syntax script
fixes: #16268

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:53:55 +01:00
f173f4249f patch 9.1.0950: filetype: fennelrc files are not recognized
Problem:  filetype: fennelrc files are not recognized
Solution: detect 'fennelrc' files as fennel filetype
          (Wu Zhenyu)

References:
https://github.com/bakpakin/Fennel/issues/193

closes: #16262

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:45:06 +01:00
2328a39a54 runtime(netrw): do not double escape Vim special characters
This double escaping was likely introduced because it was the only way
to make :Open work with hashes/percent signs despite shellescape(..., 1)
supposedly taking care of it, but then breaks the gx mapping
on MSYS2 as reported at [0]

Since special characters in the URL following :Open can be escaped,
whereas gx simply breaks and is more common, no longer double escape

[0]: https://github.com/vim/vim/issues/16252

fixes: #16252
closes: #16265

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:41:02 +01:00
fb27cf9cb1 git: ignore reformatting change of netrw plugin
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:37:54 +01:00
c673b805ad runtime(netrw): more reformating #16248
closes: #16266

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-20 19:36:40 +01:00
af0fed5988 runtime(doc): Add a note about handling symbolic links in starting.txt
closes: #16257

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:51:36 +01:00
13c1153eef patch 9.1.0949: popups inconsistently shifted to the left
Problem:  popups inconsistently shifted to the left
Solution: always shift non-fixed popups to the left when the
          text would be truncated
          (no matter whether 'wrap' is set or not)
          (Boris Staletic)

fixes: #16231
closes: #16247

Signed-off-by: Boris Staletic <boris.staletic@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:22:19 +01:00
83029a354e git: ignore reformatting change of netrw plugin
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:17:17 +01:00
c363ca1ecd runtime(netrw): change indent size from 1 to 2
closes: #16248

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:16:18 +01:00
3baf19a2b1 patch 9.1.0948: Missing cmdline completion for :pbuffer
Problem:  Missing cmdline completion for :pbuffer.
Solution: Add cmdline completion for :pbuffer like :buffer.
          (zeertzjq)

fixes: #16250
closes: #16251

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:05:28 +01:00
b183f50280 runtime(tutor): Reformat tutor1
* Fix lesson number.
* Fold a long line.
* Adjust newlines.

  It seems that each lesson is written in 23 lines to fit the 80x25
  monitor.

closes: #16253

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:03:10 +01:00
59c8880ade patch 9.1.0947: short-description
Problem:  Coverity comlains about un-initialized var
          (after v9.1.0943)
Solution: initialize variable (Yegappan Lakshmanan)

closes: #16256

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-19 20:00:31 +01:00
cbdc3c1f7a patch 9.1.0946: cross-compiling fails on osx-arm64
Problem:  cross-compiling fails on osx-arm64
Solution: use vim_cv_timer_create_with_lrt() instead of
          vim_cv_timer_create_works() (Brandon Maier)

Cross-compiling to osx-arm64 fails with the following

  In file included from json.c:17:
  In file included from ./vim.h:457:
  ./macros.h:304:24: error: expected identifier or '('
    304 |      static inline int isnan(double x)
        |                        ^
  .../MacOSX11.0.sdk/usr/include/math.h:165:7: note: expanded from macro 'isnan'
    165 |     ( sizeof(x) == sizeof(float)  ? __inline_isnanf((float)(x))
        |       ^

This can be traced back to ./configure incorrectly detecting the
compiler support for `isnan()`, from the config.log:

  configure:14567: checking for isnan()
  configure:14588: arm64-apple-darwin20.0.0-clang <...> -L$PREFIX/lib conftest.c  -lncurses -ltinfo -lrt >&5
  ld: library not found for -lrt
  arm64-apple-darwin20.0: error: linker command failed with exit code 1 (use -v to see invocation)

The `-lrt` linking is added by ./configure script when it detects
compiler support for `timer_create()`. On the osx-arm64 platform
`timer_create()` works but does not link with `-lrt`. This results in
the following settings from config.log:

  vim_cv_timer_create=yes
  vim_cv_timer_create_with_lrt=no
  vim_cv_timer_create_works=yes

But the configure.ac incorrectly uses `timer_create_works` to add
`-lrt`, instead of using `timer_create_with_lrt`.

fixes: https://github.com/conda-forge/vim-feedstock/pull/1664
closes: #16242

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 21:18:01 +01:00
f25d8f9312 patch 9.1.0945: ComplMatchIns highlight doesn't end after inserted text
Problem:  ComplMatchIns highlight doesn't end after inserted text.
Solution: Handle ComplMatchIns highlight more like search highlight.
          Fix off-by-one error. Handle deleting text properly.
          (zeertzjq)

closes: #16244

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 21:12:25 +01:00
beccb33977 translation(sv): re-include the change from #16240
related: #16240

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 21:09:27 +01:00
b2a8df35e8 patch 9.1.0944: tests: test_registers fails when not run under X11
Problem:  tests: test_registers fails when not run under X11
Solution: filter out warning message

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:40:48 +01:00
d0186c54c2 patch 9.1.0943: Vim9: vim9compile.c can be further improved
Problem:  vim9compile.c can be further improved
Solution: Refactor the compile_lhs function
          (Yegappan Lakshmanan)

closes: #16245

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:16:20 +01:00
80d72aa547 runtime(doc): Update README and mention make check to verify
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:13:46 +01:00
116d2787ad translation(sv): partly revert commit 98874dca6d
This partly reverts commit 98874dca6d,
but keeps the added changes from #16240, since the re-generated sv.po
file fails the Vim check.vim script in the CI test suite.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-18 20:10:33 +01:00
21c37d7f69 runtime(vim): update base-syntax after v9.1.0936
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 21:01:24 +01:00
d32bf0a067 patch 9.1.0942: a few typos were found
Problem:  a few typos were found
Solution: fix them (zeertzjq)

closes: #16232

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:55:13 +01:00
f4ccada5c3 patch 9.1.0941: ComplMatchIns doesn't work after multibyte chars
Problem:  ComplMatchIns doesn't work after multibyte chars
          (after v9.1.0936)
Solution: Use (ptr - line) instead of wlv.col (zeertzjq).

closes: #16233

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:50:19 +01:00
a977883ef3 runtime(doc): Fix style in fold.txt
closes: #16236

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:48:42 +01:00
38281e1b96 ci: Update macOS from macos-14 to macos-15
Make sure to use the latest Xcode (16.2) which contains fixes in the
compiler, as GitHub Actions defaults to using 16.0 still. See #15764.

closes: #16239

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:36:10 +01:00
98874dca6d translation(sv): Fix typo in Swedish translation
- "kind file" not as opposed to unkind, but two separate columns

- also regenerate sv.po

fixes: #16237
closes: #16240

Signed-off-by: Fredrik <fredrik.oljemark@helsinki.fi>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:32:44 +01:00
6c3027744e patch 9.1.0940: Wrong cursor shape with "gq" and 'indentexpr' executes :normal
Problem:  Wrong cursor shape with "gq" and 'indentexpr' executes :normal
Solution: Update cursor and mouse shape after restoring old_State.
          (zeertzjq)

closes: #16241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Solution: Update cursor and mouse shape after restoring old_State.
2024-12-17 20:26:45 +01:00
9c3330de28 runtime(doc): fix some small errors
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:24:24 +01:00
3353833f89 patch 9.1.0939: make installtutor fails
Problem:  make installtutor fails
          (Antonio Giovanni Colombo, after v9.1.0932)
Solution: Fix Makefile rule

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-17 20:16:58 +01:00
bb95589473 patch 9.1.0938: exclusive selection not respected when re-selecting block mode
Problem:  exclusive selection not respected when re-selecting block mode
          (Matt Ellis)
Solution: advance selection by another character when using
          selection=exclusive and visual block mode

fixes: #16202
closes: #16219

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 22:49:15 +01:00
381ff7726e patch 9.1.0937: test_undolist() is flaky
Problem:  test_undolist() is flaky
Solution: allow to match one additional optional whitespace char

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 22:28:28 +01:00
6a38aff218 patch 9.1.0936: cannot highlight completed text
Problem:  cannot highlight completed text
Solution: (optionally) highlight auto-completed text using the
          ComplMatchIns highlight group (glepnir)

closes: #16173

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:56:16 +01:00
368ef5a48c patch 9.1.0935: SpotBugs compiler can be improved
Problem:  SpotBugs compiler can be improved
Solution: runtime(compiler): Improve defaults and error handling for
          SpotBugs; update test_compiler.vim (Aliaksei Budavei)

runtime(compiler): Improve defaults and error handling for SpotBugs

* Keep "spotbugs#DefaultPreCompilerTestAction()" defined but
  do not assign its Funcref to the "PreCompilerTestAction"
  key of "g:spotbugs_properties": there are no default and
  there can only be introduced arbitrary "*sourceDirPath"
  entries; therefore, this assignment is confusing at best,
  given that the function's implementation delegates to
  whatever "PreCompilerAction" is.

* Allow for the possibility of relative source pathnames
  passed as arguments to Vim for the Javac default actions,
  and the necessity to have them properly reconciled when
  the current working directory is changed.

* Do not expect users to remember or know that new source
  files ‘must be’ ":argadd"'d to be then known to the Javac
  default actions; so collect the names of Java-file buffers
  and Java-file Vim arguments; and let users providing the
  "@sources" file-lists in the "g:javac_makeprg_params"
  variable update these file-lists themselves.

* Strive to not leave behind a fire-once Syntax ":autocmd"
  for a Java buffer whenever an arbitrary pre-compile action
  errors out.

* Only attempt to run a post-compiler action in the absence
  of failures for a pre-compiler action.  Note that warnings
  and failures are treated alike (?!) by the Javac compiler,
  so when previews are tried out with "--enable-preview",
  remember about passing "-Xlint:-preview" too to also let
  SpotBugs have a go.

* Properly group conditional operators when testing for key
  entries in a user-defined variable.

* Also test whether "javaExternal" is defined when choosing
  an implementation for source-file parsing.

* Two commands are provided to toggle actions for buffer-local
  autocommands:
  - SpotBugsRemoveBufferAutocmd;
  - SpotBugsDefineBufferAutocmd.

For example, try this from "~/.vim/after/ftplugin/java.vim":
------------------------------------------------------------
if exists(':SpotBugsDefineBufferAutocmd') == 2
	SpotBugsDefineBufferAutocmd BufWritePost SigUSR1
endif
------------------------------------------------------------

And ":doautocmd java_spotbugs User" can be manually used at will.

closes: #16140

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:38:47 +01:00
a2a2fe841e patch 9.1.0934: hard to view an existing buffer in the preview window
Problem:  hard to view an existing buffer in the preview window
Solution: add the :pbuffer command (Yinzuo Jiang)

Similar as `:pedit` and `:buffer` command. `:pbuffer` edits buffer [N]
from the buffer list in the preview window.

`:pbuffer` can also open special buffer, for example terminal buffer.

closes: #16222

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:22:09 +01:00
3920bb4356 runtime(doc): document how to minimize fold computation costs
closes: #16224

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 21:11:55 +01:00
468db1f8af patch 9.1.0933: Vim9: vim9compile.c can be further improved
Problem:  Vim9: vim9compile.c can be further improved
Solution: further refactor the compile assignment code
          (Yegappan Lakshmanan)

closes: #16230

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 20:56:56 +01:00
3f7d584e96 patch 9.1.0932: new Italian tutor not installed
Problem:  new Italian tutor not installed
Solution: add Makefile rule, include it into the Filelist
          ("Philip H." <47042125+pheiduck@users.noreply.github.com>),
          update the tutors help file

closes: #16215

Co-authored-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 20:38:31 +01:00
0a4e57f44a runtime(doc): fix a few minor errors from the last doc updates
1) move the section at :h inclusive-motion-selection-exclusive a few
lines below, so that it doesn't live in between the 2 exceptions.

2) remove the tag :h :!-range. It's not accurate (because it is actually
a filter) and this command is already described at :h :range!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-16 10:20:51 +01:00
b100477190 translation(it): add Italian translation for the interactive tutor
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 21:36:55 +01:00
41d6de2974 runtime(doc): update the change.txt help file
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 21:17:49 +01:00
6fea0a5480 runtime(help): Add Vim lang annotation support for codeblocks
closes: #16215

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 20:52:45 +01:00
3a3a2c921c patch 9.1.0931: ml_get error in terminal buffer
Problem:  ml_get error in terminal buffer (user202729)
Solution: call update_topline() in win_enter_ext() for terminal buffers
          (h-east)

fixes: #16024
closes: #16211

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 19:36:11 +01:00
b34622579c patch 9.1.0930: tests: test_terminal2 may hang in GUI mode
Problem:  tests: test_terminal2 may hang in GUI mode
Solution: break the loop in gui_mch_update() after at most 99 iterations
          (h-east)

related: #16211

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 19:32:39 +01:00
5a2e0cf5f1 patch 9.1.0929: filetype: lalrpop files are not recognized
Problem:  filetype: lalrpop files are not recognized
Solution: detect '*.lalrpop' files as lalrpop filetype
          (David Thievon)

References:
https://github.com/lalrpop/lalrpop

closes: #16223

Signed-off-by: David Thievon <pdkfan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 19:22:17 +01:00
b48108d58e patch 9.1.0928: tests: test_popupwin fails because the filter command fails
Problem:  tests: test_popupwin fails because the filter command fails
Solution: add the "e" flag to the :s command to normalize the
          screendumps Last Change header so that it doesn't fail on
          "Pattern not found"

The test might still fail, because the "Last Change" hader should always
be part of the screendump, but at least the filter command should not
cause aborting of the test script.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 10:38:57 +01:00
3c5d782dbc editorconfig: set trim_trailing_whitespace = false for src/testdir/test*.vim
closes: #16220

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-15 10:31:19 +01:00
6e19993991 patch 9.1.0927: style issues in insexpand.c
Problem:  style issues in insexpand.c
Solution: add braces, use ternary operator to improve style
          (glepnir)

closes: #16210

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-14 21:13:27 +01:00
7d1bb90dcf patch 9.1.0926: filetype: Pixi lock files are not recognized
Problem:  filetype: Pixi lock files are not recognized
Solution: detect "pixi.lock" file as yaml filetype
          (Brandon Maier)

Reference:
https://pixi.sh/latest/features/lockfile/

closes: #16212

Signed-off-by: Brandon Maier <brandon.maier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-14 20:56:34 +01:00
fbe9a6903a runtime(doc): Add a reference to |++opt| and |+cmd| at :h :pedit
closes: #16217

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-14 20:28:51 +01:00
ed89206efe runtime(doc): add a note about inclusive motions and exclusive selection
related: #16202

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-14 20:23:39 +01:00
e203841e0d patch 9.1.0925: Vim9: expression compiled when not necessary
Problem:  Vim9: expression compiled when not necessary
Solution: do not compile when ctx_skip is set, add a few more
          Vim9 expressions tests (Yegappan Lakshmanan)

closes: #16218

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-14 19:59:24 +01:00
6cc3027e54 patch 9.1.0924: patch 9.1.0923 causes issues
Problem:  patch 9.1.0923 causes issues (Shane-XB-Qian)
Solution: back-out the change

This reverts commit e29c8bafa7 (v9.1.0923)

fixes: #16213
related: #16160

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-13 17:56:46 +01:00
e29c8bafa7 patch 9.1.0923: too many strlen() calls in filepath.c
Problem:  too many strlen() calls in filepath.c
Solution: refactor filepath.c and remove calls to STRLEN(),
          unify dos_expandpath() and unix_expandpath() into
          a single function

closes: #16160

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-13 13:58:53 +01:00
618c4d36ca patch 9.1.0923: wrong MIN macro in popupmenu.c
Problem:  wrong MIN macro in popupmenu.c (after v9.1.0921)
          (zeertzjq)
Solution: change it to MAX()

Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-13 12:30:20 +01:00
c942f84aad patch 9.1.0921: popupmenu logic is a bit convoluted
Problem:  popupmenu logic is a bit convoluted
Solution: slightly refactor logic and use MIN/MAX() macros to simplify
          (glepnir)

Define the MAX/MIN macros. Since we support some older platforms, C
compilers may not be as smart. This helps reduce unnecessary if
statements and redundant ternary expressions. Pre-calculate some
expressions by defining variables. Remove unnecessary parentheses.
Adjust certain lines to avoid exceeding 80 columns.

closes: #16205

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-13 12:13:23 +01:00
95a03fc321 patch 9.1.0920: Vim9: compile_assignment() too long
Problem:  Vim9: compile_assignment() too long
Solution: refactor compile_assignment() function and split up into
          smaller parts (Yegappan Lakshmanan)

closes: #16209

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-13 11:54:54 +01:00
d66d68763d patch 9.1.0919: filetype: some assembler files are not recognized
Problem:  filetype: some assembler are files not recognized
Solution: detect '*.nasm' files as nasm filetype and '*.masm' as masm
          filetype (Wu, Zhenyu)

closes: #16194

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-12 19:39:19 +01:00
5c42c77315 runtime(netrw): do not pollute search history with symlinks
fixes: #16206

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-12 19:13:08 +01:00
dff3c9c1a7 patch 9.1.0918: tiny Vim crashes with fuzzy buffer completion
Problem:  tiny Vim crashes with fuzzy buffer completion
Solution: Adjust #ifdefs in ExpandBufnames() (826814741_6)

closes: #16200

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: 826814741_6 <44406129+826814741-6@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-10 17:17:06 +01:00
eed63f96d2 patch 9.1.0917: various vartabstop and shiftround bugs when shifting lines
Problem:  various vartabstop and shiftround bugs when shifting lines
Solution: Fix the bugs, add new tests for shifting lines in various ways
          (Gary Johnson)

fixes: #14891
closes: #16193

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-09 21:28:08 +01:00
b66cac1a8e runtime(typst): add definition lists to formatlistpat, update maintainer
closes: #16192

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-09 20:31:04 +01:00
ff70518f12 add saccarosium to maintainers files
closes: #16197

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
2024-12-09 20:22:44 +01:00
36f36715e6 patch 9.1.0916: messages.c is exceeding 80 columns
Problem:  messages.c is exceeding 80 columns
Solution: slightly reformat messages.c (h-east)

closes: #16196

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-09 20:05:59 +01:00
ad4764f65b runtime(proto): include filetype plugin for protobuf
closes: #16199

Signed-off-by: David Pedersen <limero@me.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-09 19:56:34 +01:00
ad3b6a3340 patch 9.1.0915: GVim: default font size a bit too small
Problem:  GVim: default font size a bit too small
Solution: increase guifont size to 12 pt on GTK builds
          of gVim (matveyt).

fixes: #16172
closes: #16178

Signed-off-by: matveyt <matthewtarasov@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-08 10:26:51 +01:00
85ee742f1e patch 9.1.0914: Vim9: compile_assignment() is too long
Problem:  Vim9: compile_assignment() is too long
Solution: refactor compile_assignment() into smaller functions
          (Yegappan Lakshmanan)

closes: #16186

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-08 10:15:35 +01:00
65be834c30 patch 9.1.0913: no error check for neg values for 'messagesopt'
Problem:  no error check for neg values for 'messagesopt'
          (after v9.1.0908)
Solution: add additional error checks and tests (h-east)

closes: #16187

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-08 10:08:48 +01:00
92b36663f8 runtime(netrw): only check first arg of netrw_browsex_viewer for being executable
fixes: #16185

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-08 09:52:37 +01:00
6e6aff0f7a patch 9.1.0912: xxd: integer overflow with sparse files and -autoskip
Problem:  xxd: integer overflow with sparse files and -autoskip
Solution: reset zero_seen when at the limit, change the type to char
          (sendittothenewts)

When encountering INT_MAX lines of zeros in the input, xxd overflows an
`int` counter, resulting in undefined behaviour.  Usually, this results
in a spurious line of zeros being output every 2**32 lines, while the
"*" line is lost, as is the final line of zeros that delineate the file
size if at end of file.

Since xxd doesn't need to know exactly how many lines are being skipped
when it's > 3, the exact value of the line counter `zero_seen` doesn't
matter and it can simply be reduced in value before the overflow occurs.

Changing the type of `zero_seen` to `signed char` is not important, and
done only to make the bug triggerable with more modest file sizes, and
therefore more convenient to test the fix.

fixes: #16170
closes: #16175

Signed-off-by: sendittothenewts <ross.axe@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-07 16:27:22 +01:00
8cc43daee1 patch 9.1.0911: Variable name for 'messagesopt' doesn't match short name
Problem:  Variable name for 'messagesopt' doesn't match short name
          (after v9.1.0908)
Solution: Change p_meo to p_mopt.  Add more details to docs.
          (zeertzjq)

closes: #16182

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-07 16:09:08 +01:00
d9e9f89e0f patch 9.1.0910: 'messagesopt' does not check max wait time
Problem:  'messagesopt' does not check max wait time
          (after v9.1.0908)
Solution: Check for max wait value
          (Shougo Matsushita)

closes: #16183

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-07 16:00:25 +01:00
72212c9bea runtime(doc): update wrong Vietnamese localization tag
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-07 15:57:34 +01:00
481992cea9 patch 9.1.0909: Vim9: crash when calling instance method
Problem:  Vim9: crash when calling instance method
          (Igbanam Ogbuluijah)
Solution: Pass the object when calling a partial function
          (Yegappan Lakshmanan)

fixes: #16166
closes: #16180

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-06 18:35:12 +01:00
51d4d84d6a patch 9.1.0908: not possible to configure :messages
Problem:  not possible to configure :messages
Solution: add the 'messagesopt' option (Shougo Matsushita)

closes: #16068

Co-authored-by: h_east <h.east.727@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-06 17:26:25 +01:00
ee9bc68f03 patch 9.1.0907: printoptions:portrait does not change postscript Orientation
Problem:  printoptions:portrait does not change postscript Orientation
Solution: Set Orientation depending on portrait suboption.

fixes: #16156
closes: #16174

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-06 17:19:25 +01:00
41afa308d6 runtime(doc): Add vietnamese.txt to helps main TOC
closes: #16177

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-06 16:03:37 +01:00
bdb5f85a51 patch 9.1.0906: filetype: Nvidia PTX files are not recognized
Problem:  filetype: Nvidia PTX files are not recognized
Solution: detect '*.ptx' files as ptx filetype (Yinzuo Jiang)

Reference: https://docs.nvidia.com/cuda/parallel-thread-execution/

closes: #16171

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-05 21:31:09 +01:00
73785accfd runtime(doc): updated version9.txt with changes from v9.1.0905
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-05 21:06:12 +01:00
1c5a120a70 patch 9.1.0905: Missing information in CompleteDone event
Problem:  Missing information in CompleteDone event
Solution: add complete_word and complete_type to v:event dict
          (glepnir)

closes: #16153

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-04 20:31:43 +01:00
215c82d061 patch 9.1.0904: Vim9: copy-paste error in class_defining_member()
Problem:  Vim9: copy-paste error in class_defining_member()
Solution: use variable type VAR_CLASS instead (Zdenek Dohnal)

Found issue by OpenScanHub:
Error: COPY_PASTE_ERROR (CWE-398):
vim91/src/vim9class.c:3308: original: "VAR_OBJECT" looks like the
original copy.
vim91/src/vim9class.c:3316: copy_paste_error: "VAR_OBJECT" looks like a
copy-paste error.
vim91/src/vim9class.c:3316: remediation: Should it say "VAR_CLASS"
instead?
3314|             {
3315|                 cl_tmp = super;
3316|->               vartype = VAR_OBJECT;
3317|             }
3318|         }

closes: #16163

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-04 20:19:40 +01:00
39a94d2048 patch 9.1.0903: potential overflow in spell_soundfold_wsal()
Problem:  potential overflow in spell_soundfold_wsal()
Solution: Protect wres from buffer overflow, by checking the
          length (Zdenek Dohnal)

Error: OVERRUN (CWE-119):
vim91/src/spell.c:3819: cond_const: Checking "reslen < 254" implies that
"reslen" is 254 on the false branch.
vim91/src/spell.c:3833: incr: Incrementing "reslen". The value of "reslen"
is now 255.
vim91/src/spell.c:3792: overrun-local: Overrunning array "wres" of 254
4-byte elements at element index 254 (byte offset 1019) using index
"reslen - 1" (which evaluates to 254).
 3789|   		    {
 3790|   			// rule with '<' is used
 3791|-> 			if (reslen > 0 && ws != NULL && *ws != NUL
 3792|   				&& (wres[reslen - 1] == c
 3793|   						    || wres[reslen - 1] == *ws))

Error: OVERRUN (CWE-119):
vim91/src/spell.c:3819: cond_const: Checking "reslen < 254" implies that
"reslen" is 254 on the false branch.
vim91/src/spell.c:3833: overrun-local: Overrunning array "wres" of 254
4-byte elements at element index 254 (byte offset 1019) using index
"reslen++" (which evaluates to 254).
 3831|                         {
 3832|                             if (c != NUL)
 3833|->                               wres[reslen++] = c;
 3834|                             mch_memmove(word, word + i + 1,
 3835|                                        sizeof(int) * (wordlen -
(i + 1) + 1));

related: #16163

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-04 20:16:17 +01:00
eda923e9c9 runtime(netrw): do not detach when launching external programs in gvim
On Debian 12 when detaching the program wouldn't launch at all

closes: #16168

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-04 20:12:44 +01:00
ea0e41a115 runtime(doc): make tag alignment more consistent in filetype.txt
closes: #16169

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
2024-12-04 20:08:25 +01:00
8a52587ee0 runtime(doc): fix wrong syntax and style of vietnamese.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-04 20:06:45 +01:00
4854647abe translation(it): update Italian manpage for vimtutor
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-04 20:02:08 +01:00
fdfcce56a6 runtime(lua): add optional lua function folding
closes: #16151

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 22:23:48 +01:00
c6db53ce5f Filelist: include translations for Chapter 2 tutor
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 22:16:41 +01:00
336fb22eae translation(vi): Update Vietnamese translation
closes: #16144

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 22:11:43 +01:00
189e24bb14 runtime(doc): include vietnamese.txt
Since Vietnamese keymaps in Vim is quite differences from the
corresponding input methods, let's document the Vietnamese specifics in
vietnames.txt

related: #16144

Signed-off-by: Phạm Bình An <111893501+brianhuster@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 21:59:52 +01:00
cdbbdb9ece runtime(tutor): fix another typo in tutor2
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 21:27:30 +01:00
23eea9b984 runtime(doc): fix typo in vimtutor manpage
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 21:23:43 +01:00
1d20ad0bbd translation(it): update Italian manpage for vimtutor
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 21:21:09 +01:00
0b5926f77f translation(it): include Italian version of tutor chapter 2
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 21:14:45 +01:00
5ccf7f1407 runtime(tutor): regenerated some translated tutor1 files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 21:12:17 +01:00
2e359b98f2 runtime(tutor): fix typo in Chapter 2
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 21:10:43 +01:00
876de275cb patch 9.1.0902: filetype: Conda configuration files are not recognized
Problem:  filetype: Conda configuration files are not recognized
Solution: detect '.condarc' and 'condarc' files as yaml filetype.
          (zeertzjq)

closes: #16162

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 20:45:34 +01:00
b534e80008 runtime(doc): Tweak documentation style a bit
closes: #16164

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-03 20:38:30 +01:00
6fa304f27d runtime(tutor): update the tutor files and re-number the chapters
closes: #16110

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-02 20:22:52 +01:00
12e1729e89 runtime(tutor): Update the makefiles for tutor1 and tutor2 files
closes: #16111

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-02 20:13:52 +01:00
e7ea4ba723 patch 9.1.0901: MS-Windows: vimtutor batch script can be improved
Problem:  MS-Windows: vimtutor batch script can be improved
Solution: Update vimtutor.bat, validate languages using Powershell
          cultureinfo (RestorerZ)

closes: #16112

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-02 20:07:58 +01:00
fd6693ca5c runtime(doc): remove buffer-local completeopt todo item
has already implemented by @zeertzjq  on https://github.com/vim/vim/pull/14922

closes: #16152

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-02 20:04:14 +01:00
198ada3d9f patch 9.1.0900: Vim9: digraph_getlist() does not accept bool arg
Problem:  Vim9: digraph_getlist() does not accept bool argument
          (Maxim Kim)
Solution: accept boolean as first argument (Yegappan Lakshmanan)

fixes: #16154
closes: #16159

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-02 19:58:51 +01:00
9a39483adb runtime(typst): provide a formatlistpat in ftplugin
closes: #16134

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-01 20:12:26 +01:00
768728b487 runtime(doc): Update documentation for "noselect" in 'completeopt'
In particular, make the distinction and interaction between "noinsert"
and "noselect" clearer as it was very confusing before.

closes: #16148

Signed-off-by: dundargoc <gocdundar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-01 20:06:42 +01:00
959ef61430 patch 9.1.0899: default for 'backspace' can be set in C code
Problem:  default for 'backspace' can be set in C code
Solution: promote the default for 'backspace' from defaults.vim to the C
          code (Luca Saccarola)

closes: #16143

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-01 16:25:53 +01:00
c74a87eea2 runtime(helptoc): reload cached g:helptoc.shell_prompt when starting toc
Follow up on PR 10446 [1] so that changes at run-time (or after loading
a vimrc) are reflected at next use. Instead of "uncaching" the variable
by computing SHELL_PROMPT on each use, which could negatively impact
performance, reload any user settings before creating the TOC.

Also make sure, changes to the shell prompt variable do correctly
invalidate b:toc, so that the table of content is correctly re-created
after user makes any changes.

[1]: https://github.com/vim/vim/pull/10446#issuecomment-2485169333

closes: #16097

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-01 16:06:18 +01:00
c7a96d6d1a translation(ru): Updated messages translation
closes: #16145

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-12-01 15:56:33 +01:00
3c2596a9e9 patch 9.1.0898: runtime(compiler): pytest compiler not included
Problem:  runtime(compiler): pytest compiler not included
Solution: include pytest compiler, update the compiler completion test
          (Konfekt)

closes: #16130

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-30 11:32:49 +01:00
aa16b30552 patch 9.1.0897: filetype: pyrex files are not detected
Problem:  filetype: pyrex files are not detected
Solution: detect '*.pxi' and '*.pyx+' as pyrex filetype
          (user202729)

References:
https://cython.readthedocs.io/en/latest/src/userguide/language_basics.html#cython-file-types
https://www.csse.canterbury.ac.nz/greg.ewing/python/Pyrex/version/Doc/Manual/using_with_c++.html

closes: #16136

Signed-off-by: user202729 <25191436+user202729@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-30 11:09:49 +01:00
dd21c89626 runtime(compiler): update eslint compiler
compact formatter is no longer distributed with eslint, so:

- switch to '--format stylish' in makeprg
- update 'errorformat' for the 'stylish' format output

fixes: #16126
closes: #16137

Signed-off-by: Romain Lafourcade <romainlafourcade@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-30 11:05:18 +01:00
a49c077a88 patch 9.1.0896: completion list wrong after v9.1.0891
Problem:  completion list wrong after v9.1.0891
Solution: update compl_mach_array after leader change
          (glepnir)

compl_shown_match update not correct after refactoring in v9.1.0891
Unfortunately, this regressed what item is selected after leader change.

So generate compl_match_array before updating compl_shown_match range,
and split generate compl_match_array into range match_head

fixes: #16128
closes: #16129

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-30 10:56:30 +01:00
075aeea404 runtime(doc): document changed default value for 'history'
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 23:13:10 +01:00
c0d30eff6d patch 9.1.0895: default history value is too small
Problem:  default history value is too small
Solution: promote the change from defaults.vim back to
          the C core, so increase the default 'history' option value
          from 50 to 200 (Lucca Saccarola)

closes: #16129

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 22:27:28 +01:00
60ddb1a140 patch 9.1.0894: No test for what the spotbug compiler parses
Problem:  No test for what the spotbug compiler parses
          (after commit: 65311c6f47)
Solution: Test &makeprg for the SpotBugs compiler plugin
          (Aliaksei Budavei)

closes: #16096

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 22:05:37 +01:00
14382c8bc9 patch 9.1.0893: No test that undofile format does not regress
Problem:  No test that undofile format does not regress
Solution: include a sample undofile to make sure we are always able to
          read it

This is so, that we don't unintentionally change the undofile format and
make sure we can load an undo file that has been created by an older
Vim.

closes: #16127

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 21:59:33 +01:00
3d670bb191 translation(de): update German manpages
fixes: #16086

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 21:45:39 +01:00
65311c6f47 runtime(compiler): include spotbugs Java linter
closes: #16001

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 21:06:09 +01:00
2cddf0e85a patch 9.1.0892: the max value of 'tabheight' is limited by other tabpages
Problem:  the max value of 'tabheight' is limited by other tabpages
Solution: Limit the maximum value of 'cmdheight' to the current tabpage only.
          (Milly)

The Help says that cmdheight is local to the tab page, but says nothing
about the maximum value depending on the state of all tab pages. Users
may wonder why they can't increase cmdheight when there are still rows
available on the current tab page. This PR changes the behavior of
cmdheight so that its maximum value depends only on the state of the
current tab page.

Also, since magic numbers were embedded in various places with the
minimum value of cmdheight being 1, we defined a constant to make it
easier to understand.

closes: #16131

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 18:16:55 +01:00
511eb84c08 runtime(po): remove poDiffOld/New, add po-format flags to syntax file
fixes: #16120
closes: #16132

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-28 18:00:09 +01:00
80b662009c patch 9.1.0891: building the completion list array is inefficient
Problem:  building the completion list array is inefficient
Solution: refactor and improve ins_compl_build_pum() func
          (glepnir)

current time complexity is O(n^2). I guess garray is not used here to save memory and avoid efficiency
is caused by heap memory allocation. A simple way is to add an extra pointer as a single linked list
to store the matching compl_T, and traverse this single linked list to generate compl_match_array.
The time complexity is O(n x m). The worst case is m=n, but we can still get a little improvement.
Because the if condition does not need to be run at one time. This should be a good solution for now.
Later we may be able to complete it in O(lgn) time. But this requires more reconstruction. So this is
the first step.

closes: #16125

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-27 21:53:53 +01:00
ac023e8baa patch 9.1.0890: %! item not allowed for 'rulerformat'
Problem:  %! item not allowed for 'rulerformat'
          (yatinlala)
Solution: also allow to use %! for rulerformat option
          (Yegappan Lakshmanan)

fixes: #16091
closes: #16118

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-27 20:55:45 +01:00
7e501f4d99 runtime(gzip): load undofile if there exists one
fixes: #16102
closes: #16122

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-26 15:10:33 +01:00
9f25a3a237 patch 9.1.0889: Possible unnecessary redraw after adding/deleting lines
Problem:  Possible unnecessary redraw after adding/deleting lines.
Solution: Check b_mod_set before using b_mod_xlines to avoid using stale
          b_mod_xlines value (zeertzjq).

closes: #16124

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-26 15:08:02 +01:00
0a850673e3 patch 9.1.0888: leftcol property not available in getwininfo()
Problem:  leftcol property not available in getwininfo()
Solution: add leftcol property property (glepnir)

closes: #16119

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-25 19:39:04 +01:00
ea49002aca CI: update FreeBSD runner to 14.2
closes: #16115

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-25 10:03:34 +01:00
5757a20547 patch 9.1.0887: Wrong expression in sign.c
Problem:  Wrong expression in sign.c
          (after v9.1.0885)
Solution: remove the duplicate expression

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-25 09:59:20 +01:00
57b947e3c3 patch 9.1.0886: filetype: debian control file not detected
Problem:  filetype: debian control file not detected
Solution: detect 'debian/control' files as debcontrol filetype
          (author)

closes: #16067

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-24 14:34:01 +01:00
c1e6621a59 runtime(c3): include c3 filetype plugin
closes: #16090

Signed-off-by: Turiiya <34311583+ttytm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-24 14:30:43 +01:00
78ca80f856 patch 9.1.0885: style of sign.c can be improved
Problem:  style of sign.c can be improved
Solution: Refactor code (Luca Saccarola)

Purpose of this commit is:
- separate clearly sections of code
- declare variables at the lowest scope possible
- initialize all variables

closes: #16092

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-24 14:25:06 +01:00
c847c12cdd patch 9.1.0884: gcc warns about uninitialized variable
Problem:  gcc warns about uninitialized variable in vim_strnicmp_asc()
Solution: initialize variable to 1
          (John Marriott)

closes: #16108

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-24 14:09:40 +01:00
ccc024f3a7 runtime(apache): Update syntax directives for apache server 2.4.62
closes: #16109

Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-24 14:08:02 +01:00
f63449a5d1 translation(ru): updated vimtutor translation, update MAINTAINERS file
the translated man page is synchronized with the original English

closes: #16113

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-24 13:50:28 +01:00
9f860a14c3 patch 9.1.0883: message history cleanup is missing some tests
Problem:  message history cleanup is missing some tests
Solution: Add tests, refactor common code into did_set_msghistory()
          (Shougo Matsushita)

closes: #16078

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Milly <milly.ca@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-24 13:48:05 +01:00
a01148d2cb runtime(doc): Expand docs on :! vs. :term
fixes: #16071
closes: #16089

Signed-off-by: matveyt <matthewtarasov@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-23 14:19:58 +01:00
d7745acbd8 runtime(netrw): Fixing powershell execution issues on Windows
closes: #16094

Signed-off-by: GuyBrush <miguel.barro@live.com>
2024-11-23 14:13:10 +01:00
5e6ea92b2c patch 9.1.0882: too many strlen() calls in insexpand.c
Problem:  too many strlen() calls in insexpand.c
Solution: Refactor insexpand.c and reduce number of calls to STRLEN(),
          fix a warning get_next_filename_completion(), add new function
          ins_compl_leader_len() (John Marriott)

closes: #16095

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-23 14:01:57 +01:00
991603cc04 patch 9.1.0881: GUI: message dialog may not get focus
Problem:  GUI: message dialog may not get focus
Solution: add window manager hint to give focus to the dialog
          (Chris White)

Tell the window manager that message dialogs should be given focus when
the user switches from another application back to Vim.  This can
happen, e.g., when the user has a file open in Vim and then edits it
in another program.

fixes: #172
closes: #16100

Signed-off-by: Chris White <christopher.white@crowdstrike.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-23 13:35:43 +01:00
cacfccf803 runtime(netrw): update netrw's decompress logic
Detect a few more default archive types, correctly handle file
extensions with digits in it.

fixes: #16099
closes: #16104

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-23 13:28:01 +01:00
4dd6c22ebe runtime(apache): Update syntax keyword definition
closes: #16105

Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-23 13:14:47 +01:00
9c69453f0e runtime(misc): add Italian LICENSE and (top-level) README file
related: #16061

Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 23:13:46 +01:00
c8dfcfc53b patch 9.1.0880: filetype: C3 files are not recognized
Problem:  filetype: C3 files are not recognized
Solution: detect '*.c3*' files as c3 filetype (Turiiya)

closes: #16087

Signed-off-by: Turiiya <34311583+ttytm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 23:05:21 +01:00
cb34507b5f runtime(doc): add helptag for :HelpToc command
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 23:02:57 +01:00
fa41a3ed1e git: ignore re-formatting commit v9.1.0879 for blame
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 22:58:40 +01:00
3cf094edaf patch 9.1.0879: source is not consistently formatted
Problem:  source is not consistently formatted
Solution: reformat sign.c and sound.c
          (Luca Saccarola)

closes: #16019

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 22:55:13 +01:00
8bc4d25abe Add clang-format config file
This is used in preparation to enable automatic code-formatting in the
following commits.  For now let's just add a clang-format config file,
formatting of source files will follow.

related: #16019

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 22:54:34 +01:00
4927daef60 runtime(compiler): fix escaping of arguments passed to :CompilerSet
See newly added help entry referring to option-backslash

closes: #16084

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 22:41:14 +01:00
ae1c8b790b patch 9.1.0878: termdebug: cannot enable DEBUG mode
Problem:  termdebug: cannot enable DEBUG mode
Solution: Allow to specify DEBUG mode (Ubaldo Tiberi)

closes: #16080

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 22:32:30 +01:00
b5c1557323 patch 9.1.0877: tests: missing test for termdebug + decimal signs
Problem:  tests: missing test for termdebug + decimal signs
Solution: Add a termdebug test (Ubaldo Tiberi)

closes: #16081

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 21:10:24 +01:00
e2c27ca8ef patch 9.1.0876: filetype: openCL files are not recognized
Problem:  filetype: openCL files are not recognized
Solution: detect '*.cl' files as opencl or lisp filetype,
          include a opencl syntax and filetype plugin (Wu, Zhenyu)

closes: #15825

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 21:03:09 +01:00
a13bd294ab patch 9.1.0875: filetype: hyprlang detection can be improved
Problem:  filetype: hyprlang detection can be improved
Solution: detect '/hypr/*.conf' files as hyprlang filetype,
          include basic syntax highlighting (Luca Saccarola)

fixes: #15875
closes: #16064

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 20:43:52 +01:00
fdac54d7bb patch 9.1.0874: filetype: karel files are not detected
Problem:  filetype: karel files are not detected
Solution: detect '*.kl' files as karel filetype,
          include syntax and filetype plugin
          (Kirill Morozov)

closes: #16075

Co-authored-by: KnoP-01 <knosowski@graeffrobotics.de>
Signed-off-by: Kirill Morozov <kirill@robotix.pro>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 20:36:22 +01:00
9a65a8c270 CI: join codecov array flags, instead of accessing it directly
closes: #16082

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-19 13:46:17 +01:00
a87462a498 patch 9.1.0873: filetype: Vivado files are not recognized
Problem:  filetype: Vivado files are not recognized
Solution: detect '*.mss' files as 'mss' filetype
          (Wu, Zhenyu)

references:
https://docs.amd.com/r/2020.2-English/ug1400-vitis-embedded/Microprocessor-Software-Specification-MSS

closes: #15907

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-18 21:36:31 +01:00
a15dfc2d41 patch 9.1.0872: No test for W23 message
Problem:  No test for W23 message
Solution: Check for W23 message when accessing the clipboard fails
          (after v9.1.0868)

closes: #16076

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-18 21:20:54 +01:00
a73dfc2f55 patch 9.1.0871: getcellpixels() can be further improved
Problem:  getcellpixels() can be further improved
Solution: Fix floating point exception, implement getcellpixels() in the
          UI (mikoto2000)

closes: #16059

Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-18 21:12:21 +01:00
bd4614f43d patch 9.1.0870: too many strlen() calls in eval.c
Problem:  too many strlen() calls in eval.c
Solution: Refactor eval.c to remove calls to STRLEN()
          (John Marriott)

closes: #16066

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-18 20:26:13 +01:00
ba9e1570d2 CI: Bump codecov/codecov-action from 4 to 5
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 4 to 5.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v4...v5)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

closes: #16079

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-18 19:05:53 +01:00
9848face74 patch 9.1.0869: Problem: curswant not set on gm in folded line
Problem:  curswant not set on gm in folded line
          (citizenmatt)
Solution: in a folded line, call update_curswant_force()

fixes: #11596
closes: #11994
closes: #15398

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-17 16:18:00 +01:00
8b94afc207 patch 9.1.0868: the warning about missing clipboard can be improved
Problem:  the warning about missing clipboard can be improved
          (after v9.1.0852)
Solution: use different warnings depending on whether or not clipboard
          support is included in Vim, update related documentation

Improve the Warnings about missing clipboard registers

- Make it translatable
- Use a different warning, when clipboard support was not compiled in
- add a reference to :h W24
- explain in more detail the error message

closes: #16069

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-17 16:07:50 +01:00
deda23f850 runtime(doc): Makefile does not clean up all temporary files
Also remove (automatically generated) tags-* (made by make vimtags) and
vim-stylesheet.css (which is produced by vim2html.pl).

related: #16061

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-16 12:47:06 +01:00
5c66e23c62 patch 9.1.0867: ins_compl_add() has too many args
Problem:  ins_compl_add() has too many args
Solution: refactor it and use an int array instead of 2 separate int
          args (glepnir)

closes: #16062

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-15 19:58:27 +01:00
54996ecda0 editorconfig: don't trim trailing whitespaces in runtime/doc
closes: #16058

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-15 19:54:45 +01:00
ba0b458570 translation(am): Remove duplicate keys in desktop files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-15 15:59:52 +01:00
232a77e80a runtime(doc): update helptags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-15 15:47:33 +01:00
7e4b861da9 runtime(filetype): remove duplicated *.org file pattern
related: #16054

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-15 15:46:27 +01:00
7c3b65eb3e runtime(cfg): only consider leading // as starting a comment
fixes: #16051

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 23:22:31 +01:00
bc32bbddcf patch 9.1.0866: filetype: LLVM IR files are not recognized
Problem:  filetype: LLVM IR files are not recognized
Solution: detect '*.ll' files either as lifelines or llvm filetype
          (Wu, Zhenyu)

closes: #15824

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 22:55:36 +01:00
0684800c85 patch 9.1.0865: filetype: org files are not recognized
Problem:  filetype: org files are not recognized
Solution: detect '*.org' files as 'org' filetype,
          include filetype and syntax plugin
          (Luca Saccarola)

closes: #16054

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 22:44:14 +01:00
4bd9b2b246 patch 9.1.0864: message history is fixed to 200
Problem:  message history is fixed to 200
Solution: Add the 'msghistory' option, increase the default
          value to 500 (Shougo Matsushita)

closes: #16048

Co-authored-by: Milly <milly.ca@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 22:34:24 +01:00
de094dcd6f patch 9.1.0863: getcellpixels() can be further improved
Problem:  getcellpixels() can be further improved
Solution: improve it further, add more tests
          (mikoto2000)

closes: #16047

Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 22:13:48 +01:00
0acd3abfad runtime(sh): better function support for bash/zsh in indent script
closes: #16052

Signed-off-by: Lukas Zapletal <lzap+git@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 21:52:44 +01:00
460799d885 runtime(netrw): small fixes to netrw#BrowseX
- do not enter dir in Netrw on opening
- double quotes after start cause error on Windows

See @chrisbra 's comments at
[0]

[0]: ff82e7a9db (diff-39baf27d8f62071617bbef12f874cce31c0ebd02ec99e7b119474ca870c636a3R5279)

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 21:42:27 +01:00
437bc13ea1 patch 9.1.0862: 'wildmenu' not enabled by default in nocp mode
Problem:  'wildmenu' not enabled by default in nocp mode
Solution: promote the default Vim value to true, it has been enabled
          in defaults.vim anyhow, so remove it there (Luca Saccarola)

closes: #16055

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 21:21:17 +01:00
8b97ca66cf runtime(doc): update how to report issues for mac Vim
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-14 21:13:34 +01:00
dbf231a4b7 runtime(doc): mention option-backslash at :h CompilerSet
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-13 20:28:43 +01:00
c4208da0f4 runtime(compiler): include a Java Maven compiler plugin
@Konfekt suggested adding this [1]; I confirmed that both source
repositories have permissive licenses [2], [3] that permit copying the
code (at least where the compiler scripts are concerned).

[1]: 570b1006fd
[2]: https://github.com/JalaiAmitahl/maven-compiler.vim
[3]: https://github.com/mikelue/vim-maven-plugin/issues/13

closes: #16041

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-13 19:51:29 +01:00
8e013b1421 runtime(racket): update Racket runtime files
This brings the included Racket runtime files to commit c41bc5a (indent
for[*]/lists with accumulator clause correctly, 2024-11-12) of
https://github.com/benknoble/vim-racket.

Note that not all files from that repository are included.

closes: #16046

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-13 19:45:38 +01:00
9b05326afd runtime(doc): improve indentation in examples for netrw-handler
related: #16043

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-13 17:14:39 +01:00
8b96858996 runtime(doc): improve examples for netrw-handler functions
fixes: #16043

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-13 15:38:33 +01:00
5ca8f223f0 runtime(idris2): include filetype,indent+syntax plugins for (L)Idris2 + ipkg
closes: #15993

Co-authored-by: Christian Clason <ch.clason+github@icloud.com>
Signed-off-by: Serhii Khoma <srghma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 21:52:20 +01:00
f18987caa5 runtime(doc): clarify the use of filters and external commands
related: #16044

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 21:38:22 +01:00
e798446362 patch 9.1.0861: Vim9: no runtime check for object member access of any var
Problem:  Vim9: no runtime check for object member access of any var
          (after: 9.1.0850)
Solution: Add runtime type compatibility check for object member
          accessed using a any variable (Yegappan Lakshmanan).

closes: #16037

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 21:03:00 +01:00
210c49bbe8 runtime(compiler): update pylint linter
closes: #16039

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 20:48:31 +01:00
24078e39cd patch 9.1.0860: tests: mouse_shape tests use hard code sleep value
Problem:  tests: mouse_shape tests use hard code sleep value
          (Bram Moolenaar)
Solution: Use WaitForAssert() instead (Yee Cheng Chin)

related: #12157
closes: #16042

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 20:26:48 +01:00
13a6605ddf patch 9.1.0859: several problems with the GLVS plugin
Problem:  several problems with the GLVS plugin
Solution: fix issues, add regression tests, require at least Vim 9.1
          (GuyBrush)

closes: #16036

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 20:23:41 +01:00
002ccbfac4 patch 9.1.0858: Coverity complains about dead code
Problem:  Coverity complains about dead code
          (after v9.1.0852)
Solution: adjust #ifdef FEAT_CLIPBOARD

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-12 20:10:58 +01:00
129a8446d2 runtime(tar): Update tar.vim to support permissions
These changes enable tar.vim to keep permissions of files that were
edited intact instead of replacing them with the default permissions.

The major change for this is switching from "tar -OPxf", which reads out
the contents of the selected file from an tar archive to stdout to
"tar -pPxf" which extracts the selected file to the current directory
with permissions intact

This requirs the temporary directory to be created earlier.

closes: #7379

Signed-off-by: Lennart00 <73488709+Lennart00@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 22:39:30 +01:00
4b9fa95712 patch 9.1.0857: xxd: --- is incorrectly recognized as end-of-options
Problem:  xxd: --- is incorrectly recognized as end-of-options
Solution: improve xxds end-of-option parser (DungSaga)

closes: #9285

Signed-off-by: DungSaga <dungsaga@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 22:19:50 +01:00
a1b654ff36 patch 9.1.0856: mouseshape might be wrong on r and gr
Problem:  mouseshape might be wrong on r and gr
Solution: call update_mousesape(-1) immediately
          (Yee Cheng Chin)

Currently, when entering the "pretend" or single character replace modes
using `r` or `gr`, the mouse cursor doesn't immediately update until you
have re-focused the window or moved the mouse. This is because it's not
calling `update_mouseshape(-1)` immediately, so the cursor will only be
updated when it's called by other functions like `gui_mouse_focus`.

To fix this, just make sure we call this `update_mouseshape(-1)`. It's
what we do when entering Insert or Replace modes for example.

I noticed this when trying to figure out why MacVim CI is failing in
`Test_mouse_shape_after_cancelling_gr` (introduced in #12110), but I
think that test is only passing in Vim GTK CI by accident, since this
issue happens there too. I think the window captured focus after the
mouse `gr` call which triggers a mouse shape change but it probably
would have failed under other circumstances.

fixes: #14660
closes: #12157

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 21:57:27 +01:00
2e48567007 patch 9.1.0855: setting 'cmdheight' may cause hit-enter-prompt
Problem:  setting 'cmdheight' may cause hit-enter-prompt and echo output
          to be missing
Solution: Before cleaning the cmdline, check the need_wait_return flag
          (nwounkn)

closes: #13432

Signed-off-by: nwounkn <nwounkn@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 21:48:30 +01:00
feea1b444e Add an .editorconfig file to repository
This commit tries to use an editorconfig file to ensure the same
settings across editors while contributing to the vim repository.

The rules are based of the guidelines defined in
`runtime/doc/develop.txt`.

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 21:37:40 +01:00
1083cae709 patch 9.1.0854: cannot get terminal cell size
Problem:  cannot get terminal cell size
Solution: add getcellpixels() function to return xpixel * ypixel
          cell size on terminal Unix (mikoto2000)

closes: #16004

Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 21:24:14 +01:00
6fbf63de86 patch 9.1.0853: filetype: kubernetes config file not recognized
Problem:  filetype: kubernetes config file not recognized
Solution: detect '/.kube/config' file as yaml filetype
          (Jonathan Lopez)

closes: #11076

Signed-off-by: Jonathan Lopez <jonathanglopez@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 21:03:31 +01:00
45e0704d96 patch 9.1.0852: No warning when X11 registers are not available
Problem:  No warning when X11 registers are not available
          (delvh)
Solution: Output W23 once when connection to X11 clipboard/selection
          is not possible, mention in the documentation, that register 0
          will be used instead

Vim silently uses the 0 register, when clipboard or selection register * or +
are not available. This might be a bit unexpected for the user.

So let's just warn once when this happens.

fixes: #14768
closes: #16013

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 20:52:55 +01:00
e7a1bbf210 patch 9.1.0851: too many strlen() calls in getchar.c
Problem:  too many strlen() calls in getchar.c
Solution: refactor code and reduce strlen() calls
          (John Marriott)

closes: #16017

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 20:40:33 +01:00
56d45f1b66 patch 9.1.0850: Vim9: cannot access nested object inside objects
Problem:  Vim9: cannot access nested object inside objects
          (lifepillar, 91khr, mawkish)
Solution: Add support for accessing an object member using a "any"
          variable type (Yegappan Lakshmanan)

fixes: #11822
fixes: #12024
fixes: #12196
fixes: #12198
closes: #16029

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 20:01:06 +01:00
622f6f5b9a runtime(tex): extra Number highlighting causes issues
So let's revert "runtime(tex): add Number highlighting to syntax file"

This (partly) reverts commits 8e6b5034f3 and 6065755a39

fixes: #16030

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-11 08:50:24 +01:00
7724d621f2 runtime(vim): Fix indent after :silent! function
See 35699f1749 (commitcomment-148816912)

closes: #16009

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 20:36:28 +01:00
7c5152826f patch 9.1.0849: there are a few typos in the source
Problem:  there are a few typos in the source.
Solution: Correct typos (zeertzjq).

closes: #16026

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 20:26:12 +01:00
5b63b236a0 runtime(netrw): directory symlink not resolved in tree view
closes: #16020

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 20:22:34 +01:00
18defabaeb runtime(doc): add a table of supported Operating Systems
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 20:10:42 +01:00
6065755a39 runtime(tex): update Last Change header in syntax script
related: #11271

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 14:10:52 +01:00
060107cbc4 runtime(doc): fix typo in g:termdebug_config
closes: #16023

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-10 14:10:00 +01:00
bbe5252c2c runtime(vim): Update base-syntax, improve :normal highlighting
Fix command name termination, match bang, and allow a line-continued
argument.

closes: #15358

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 19:11:25 +01:00
8e6b5034f3 runtime(tex): add Number highlighting to syntax file
closes: #11271

Signed-off-by: amarakon <amar.al-zubaidi45@tutanota.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 18:59:31 +01:00
624bb83619 runtime(doc): Tweak documentation style a bit
closes: #11419

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 18:37:32 +01:00
50732c7ba6 patch 9.1.0848: if_lua: v:false/v:true are not evaluated to boolean
Problem:  if_lua: v:false/v:true are not evaluated to boolean
Solution: Use lua_pushboolean() instead of lua_pushinteger().
          (zeertzjq)

fixes: #15994
closes: #11419

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 18:31:08 +01:00
a14c457cad runtime(dune): use :setl instead of :set in ftplugin
closes: #11419

Signed-off-by: Dani Dickstein <daniel.dickstein@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 11:53:54 +01:00
5e7f43b6ac runtime(termdebug): allow to use decimal signs
closes: #16011

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ella Moss <ella.moss@utah.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-09 11:32:15 +01:00
815c822aaf translation(it): Updated Italian vimtutor
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-08 18:53:56 +01:00
0f60fbf679 runtime(compiler): improve cppcheck
Properly escape the values for makeprg according to the :set rules

closes: #16014

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-08 18:51:52 +01:00
07c9ab8c05 git: git-blame-ignore-revs shown as an error on Github
So let's move the comment above the actual revision.

related:
8854244587 (commitcomment-148723832)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-08 12:45:58 +01:00
28d3941ede patch 9.1.0847: tests: test_popupwin fails because of updated help file
Problem:  tests: test_popupwin fails because of updated main help file
Solution: normalize Last Change header in test_popup_setbuf screendumps

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 23:05:57 +01:00
d91124f926 patch 9.1.0846: debug symbols for xxd are not cleaned in Makefile
Problem:  debug symbols for xxd are not cleaned in Makefile
Solution: remove  xxd.dSYM in xxds Makefile, call xxd clean target from
          main Makefile (Yee Cheng Chin)

Remove xxd.dSYM folder when calling `make clean`. On macOS, when
compiling with debug info, clang will generate a "dSYM" folder that
contains debug symbols for the executable because unlike Linux, the
DWARF data is not embedded in the executable itself.

closes: #16010

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 22:11:06 +01:00
39f52a6249 runtime(structurizr): Update structurizr syntax
closes: #16003

Signed-off-by: Duke <emersonalmeidax@gmail.com>
Signed-off-by: Bastian Venthur <venthur@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 22:05:32 +01:00
6e410c9112 runtime(8th): updated 8th syntax
closes: #16005

Signed-off-by: Ron Aaron <ron@aaron-tech.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 21:59:44 +01:00
c9e8640476 runtime(doc): Add pi_tutor.txt to help TOC
closes: #16006

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 21:53:45 +01:00
6d9a145d71 runtime(compiler): add mypy and ruff compiler; update pylint linter
mypy and ruff come from
https://github.com/Konfekt/vim-compilers/tree/master/compiler and the
former was added by @pbnj-dragon

closes: #16007

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 21:40:22 +01:00
64a536d4fa runtime(netrw): fix several bugs in netrw tree listing
fixes: #5630
fixes: #9807
fixes: #14623
closes: #15996

Signed-off-by: Tom Benham <tom.benham13@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 21:31:49 +01:00
a063b22b3b runtime(netrw): prevent polluting the search history
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-07 14:31:09 +01:00
715a58fda6 patch 9.1.0845: vimtutor shell script can be improved
Problem:  vimtutor shell script can be improved
Solution: further improve the vimtutor shell script
          (Aliaksei Budavei)

- Rewrite the script usage note.
- Reconcile the usage help output with the manual page entry
  that describes the implementation in that:
  * a language code argument can be used alone or with its
    option key, e.g. "vimtutor -l nl" or "vimtutor nl";
  * a chapter number argument cannot be used without its
    option key, e.g. "vimtutor -c 2".
- Accept only chapters 1 or 2 as valid chapter arguments.
- Double-quote instances of shell parameter expansion where
  neither pathname expansion nor field splitting is desired.
- Prefer "$(foo)" to "`foo`" for command substitution.
- Follow a single indentation style (see the modeline).

closes: #15992

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-06 21:58:53 +01:00
ea19e7856b patch 9.1.0844: if_python: no way to pass local vars to python
Problem:  if_python: no way to pass local vars to python
Solution: Add locals argument to py3eval(), pyeval() and pyxeval()
          (Ben Jackson)

fixes: #8573
closes: #10594

Signed-off-by: Ben Jackson <puremourning@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-06 21:53:07 +01:00
fd1a838d36 patch 9.1.0843: too many strlen() calls in undo.c
Problem:  too many strlen() calls in undo.c
Solution: refactor code and remove strlen() calls, update test_undo.vim
          and close remaining open swap files (John Marriott)

closes: #15995

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-06 21:39:15 +01:00
39cd9061b1 runtime(doc): update default value for fillchars option
closes: #15998

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-06 20:20:57 +01:00
3780c11267 runtime(compiler): fix typo in cppcheck compiler plugin
closes: #16002

Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-06 20:14:49 +01:00
5ccac75d96 runtime(doc): simplify vimtutor manpage a bit more
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 21:03:17 +01:00
59834ba6df runtime(matchparen): Add matchparen_disable_cursor_hl config option
Set the "matchparen_disable_cursor_hl" config variable to disable
highlighting the cursor with the MatchParen highlighting group.

closes: #15984

Signed-off-by: Matteo Landi <matteo@matteolandi.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 20:46:54 +01:00
8bb5eaf019 patch 9.1.0842: not checking for the sync() systemcall
Problem:  not checking for the sync() systemcall
Solution: check for sync in configure script, fix related #ifdefs
          (Jonas Termansen)

It's better to check for features directly rather than maintaining a
denylist of operating systems without them.

closes: #15985

Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 20:36:41 +01:00
cef8ab2c75 patch 9.1.0841: tests: still preferring python2 over python3
Problem:  tests: still preferring python2 over python3
Solution: prefer Python 3 when picking a Python program in Vim tests,
          by checking for the more specific python version first and
          only when python3 not found, check for the python binary
          (Yee Cheng Chin)

Most OSes have Python 3 mapped to `python3` instead of `python`. Vim
tests should prioritize using that instead of Python 2 in case that is
still installed on the host system.

closes: #15986

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 20:26:47 +01:00
c04bc64ba6 patch 9.1.0840: filetype: idris2 files are not recognized
Problem:  filetype: idris2 files are not recognized
Solution: detect '*.idr' files as idris2, '*.lidr' files as lidris2
          and '*.ipkg' files as ipkg filetype (Serhii Khoma)

closes: #15987

Signed-off-by: Serhii Khoma <srghma@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 20:14:43 +01:00
93f65a4ab8 patch 9.1.0839: filetype: leo files are not recognized
Problem:  filetype: leo files are not recognized
Solution: detect '*.leo' files as leo filetype, include
          a filetype plugin (Riley Bruins)

References:
https://github.com/ProvableHQ/leo

closes: #15988

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 19:58:45 +01:00
19bc76c929 runtime(cook): include cook filetype plugin
References:
https://github.com/cooklang/spec?tab=readme-ov-file#comments

closes: #15989

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 19:50:47 +01:00
9dadfe7a52 runtime(debversions): Update Debian versions
- Move mantic to unsupported
- Reorder names to maintain alphabetic order
- Bump date to submit upstream

closes: #15991

Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 19:48:37 +01:00
09cc8c92d1 patch 9.1.0838: vimtutor is bash-specific
Problem:  vimtutor is bash-specific (after 17c71daf83)
Solution: port back to POSIX sh (Aliaksei Budavei).

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 19:43:22 +01:00
ac2bb9dfea runtime(doc): add help specific modeline to pi_tutor.txt
related: #6414

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-04 19:37:24 +01:00
c39c0230c4 Filelist: vimtutor chapter 2 is missing in Filelist
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 21:22:08 +01:00
2cf145b78b patch 9.1.0837: cross-compiling has some issues
Problem:  Cross-compiling to good modern operating systems is difficult as
          configure assumes obscure bugs are present by default. However,
          most core autoconf-based packages today assume features work
          when in doubt, making cross-compilation easier.
Solution: Assume features work by default and continue to issue a warning
          with the appropriate cache variable. This solution shifts the
          burden onto the users of rare buggy operating systems and
          makes cross-compilation work out of the box for everyone else.

The vim_cv_terminfo test was accidentally negated, where the yes case
was in the error handler, leading to false positives if the test program
failed to compile.

Split the timer_create detection into two phases: First locating the
the library containing timer_create, and then another check to check
if timer_create works to properly support cross-compilation.

Signed-off-by: Jonas 'Sortie' Termansen <sortie@maxsi.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 20:58:21 +01:00
17c71daf83 runtime(vimtutor): Add a second chapter
fixes: #5719
closes: #5729

Signed-off-by: Paul Desmond Parker <pauldesmondparker@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 20:54:32 +01:00
a54816b884 patch 9.1.0836: The vimtutor can be improved
Problem:  the vimtutor can be improved
Solution: port and include the interactive vimtutor plugin from Neovim
          (by Felipe Morales) (Yegappan Lakshmanan)

closes: #6414

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-11-03 11:01:10 +01:00
6eda269600 patch 9.1.0835: :setglobal doesn't work properly for 'ffu' and 'tsrfu'
Problem:  :setglobal doesn't work properly for 'ffu' and 'tsrfu' when
          the local value is set (after v9.1.0831)
Solution: Check os_flags instead of buffer option variable (zeertzjq).

closes: #15980

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 09:23:33 +01:00
ca6231b8a6 patch 9.1.0834: tests: 2html test fails
Problem:  tests: 2html test fails (after b256221e83)
Solution: Adjust testdir/samples/Test_tohtml_basic.c.html
          (Aliaksei Budavei)

closes: #15981

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 09:19:14 +01:00
9fd5d9674f patch 9.1.0833: CI: recent ASAN changes do not work for indent tests
Problem:  CI: recent ASAN changes do not work for indent tests
Solution: Move code to runtime/indent/testdir/runtest.vim
          (Aliaksei Budavei)

closes: #15981

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 09:15:35 +01:00
46dcd84d24 patch 9.1.0832: :set doesn't work for 'cot' and 'bkc' after :setlocal
Problem:  :set doesn't work for 'cot' and 'bkc' after :setlocal.
Solution: clear the local flags when using :set (zeertzjq).

closes: #15981

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 09:10:50 +01:00
6081c17890 runtime(doc): update help-toc description
related: #10446

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-03 09:06:10 +01:00
b256221e83 runtime(2html): Make links use color scheme colors in TOhtml
The browser-default dark blue/purple colors don't fit in with most color
schemes and also are unreadable if the color scheme has a dark
background.

closes: #10191

Signed-off-by: Max Bernstein <tekknolagi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 18:48:53 +01:00
a13f3a4f5d patch 9.1.0831: 'findexpr' can't be used as lambad or Funcref
Problem:  'findexpr' can't be used for lambads
          (Justin Keyes)
Solution: Replace the findexpr option with the findfunc option
          (Yegappan Lakshmanan)

related: #15905
closes: #15976

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 18:43:42 +01:00
0b8176dff2 Filelist: include helptoc package
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 18:20:30 +01:00
b3ec5643cd runtime(doc): include a TOC Vim9 plugin
closes: #10446

See :h help-TOC

Signed-off-by: lagygoill <lacygoill@lacygoill.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 17:58:33 +01:00
29ce419076 Filelist: ignore .git-blame-ignore-revs
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:49:57 +01:00
bc10be7a40 patch 9.1.0830: using wrong highlight group for spaces for popupmenu
Problem:  using wrong highlight group for spaces for popupmenu
Solution: use original attribute instead of combined attributed
          (glepnir)

closes: #15978

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:45:01 +01:00
d181bafd0b runtime(typst): synchronize updates from the upstream typst.vim
2 commits included from the upstream:

- 2a4a0e0662
- 50e89f4811

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:35:46 +01:00
8854244587 git: ignore reformatting commit for git-blame (after v9.1.0829)
See:
https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile

Enable this using the following command in your copy:
git config blame.ignoreRevsFile .git-blame-ignore-revs

Github should pick it up automatically

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:29:55 +01:00
8ce738de3f patch 9.1.0829: Vim source code uses a mix of tabs and spaces
Problem:  Vim source code uses a mix of tabs and spaces
Solution: Expand tabs in sound.c, this is an experiment
          (Luca Saccarola)

closes: #15969

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:22:45 +01:00
8d4477ef22 patch 9.1.0828: string_T struct could be used more often
Problem:  string_T struct could be used more often
Solution: Refactor code and make use of string_T struct
          for key-value pairs, reformat overlong lines
          (John Marriott)

closes: #15975

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 16:11:58 +01:00
f1d83c4c71 patch 9.1.0827: CI: tests can be improved
Problem:  CI: tests can be improved
Solution: collect failed indent tests, raise timeout for search()
          functions when using ASAN/Valgrind (Aliaksei Budavei)

ASan-instrumented Vim builds tend to run slower (x2) than
non-instrumented Vim builds and occasionally make indent
tests fail when "search*()" functions time out and give up
further execution.

Reference:
https://github.com/google/sanitizers/wiki/AddressSanitizer

closes: #15974

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 15:51:14 +01:00
a95d6a3d64 runtime(doc): remove stray sentence in pi_netrw.txt
closes: #15971

Signed-off-by: S. B. Tam <cpplearner@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 15:48:54 +01:00
84b5b1c660 patch 9.1.0826: filetype: sway files are not recognized
Problem:  filetype: sway files are not recognized
Solution: detect '*.sw' files as sway filetype, include
          a filetype plugin (Riley Bruins)

References:
 https://github.com/FuelLabs/sway.

Comments taken from their syntax documentation. File extension taken
from the same documentation/GitHub's own recognition of these file types

closes: #15973

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-02 15:44:43 +01:00
26113e5ae3 runtime(doc): Include netrw-gp in TOC
closes: #7627

Signed-off-by: Ernesto Elsäßer <ernesto.elsaesser@me.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-01 23:17:03 +01:00
b5e7da1f27 runtime(doc): mention 'iskeyword' at :h charclass()
fixes: #15965

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-11-01 09:33:00 +01:00
15f69de263 runtime(doc): update help tags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 11:08:40 +01:00
69f85c6506 patch 9.1.0825: compile error for non-diff builds
Problem:  compile error for non-diff builds
          (after v9.1.0822)
Solution: Add #ifdef FEAT_DIFF (John Marriott)

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 10:54:10 +01:00
4d618006ec runtime(netrw): fix E874 when browsing remote directory which contains ~ character
closes: #15964

Signed-off-by: Tom Benham <tom.benham13@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 10:47:23 +01:00
55adc5b46a runtime(doc): update coding style documentation
closes: #15939

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
2024-10-31 10:28:40 +01:00
6be21b937d runtime(debversions): Add plucky (25.04) as Ubuntu release name
closes: #15882

Signed-off-by: Simon Quigley <tsimonq2@ubuntu.com>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 10:18:05 +01:00
79f6ffd388 patch 9.1.0824: too many strlen() calls in register.c
Problem:  too many strlen() calls in register.c
Solution: refactor code, add string_T struct to keep track
          of string lengths (John Marriott)

closes: #15952

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 10:09:04 +01:00
a68bd6f089 patch 9.1.0823: filetype: Zephyr overlay files not recognized
Problem:  filetype: Zephyr overlay files not recognized
Solution: detect '*.overlay' files as dts filetype,
          include syntax tests for DTS files
          (Xudong Zheng)

Reference:
https://docs.zephyrproject.org/latest/build/dts/howtos.html

closes: #15963

Signed-off-by: Xudong Zheng <7pkvm5aw@slicealias.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 09:32:25 +01:00
d52fb2fabd runtime(doc): Clean up minor formatting issues for builtin functions
closes: #15966

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 09:25:09 +01:00
8b0fa7a565 runtime(netrw): make :Launch/Open autoloadable
fixes: #15959
closes: #15962

Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-31 09:21:23 +01:00
9f32069b8c runtime(netrw): fix regression with x mapping on Cygwin
related: #13687

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-30 18:37:06 +01:00
aa2ce6f580 runtime(netrw): fix filetype detection for remote files
fixes: #15961

while at it, remove the Decho comments in the s:NetrwOptionsRestore()
function

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-30 18:27:03 +01:00
05a40e07c2 patch 9.1.0822: topline might be changed in diff mode unexpectedly
Problem:  topline might be changed in diff mode unexpectedly
          (Jaehwang Jung)
Solution: do not re-calculate topline, when using line() func
          in diff mode.

fixes: #15812
closes: #15950

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-29 20:29:04 +01:00
203c7225f5 CI: huge linux builds should also run syntax & indent tests
closes: #15960

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-29 20:27:34 +01:00
20e045f781 patch 9.1.0821: 'findexpr' completion doesn't set v:fname to cmdline argument
Problem:  'findexpr' completion doesn't set v:fname to cmdline argument.
Solution: Set v:fname to the cmdline argument as-is (zeertzjq).

closes: #15934

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 22:05:26 +01:00
baab7c0865 patch 9.1.0820: tests: Mac OS tests are too flaky
Problem:  tests: Mac OS tests are too flaky
Solution: Increase max test timeout to 25 minutes,
          allow up to 10 retries on Mac OS runners,
          refactor runtest.vim (Milly).

closes: #15940

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 21:56:50 +01:00
1e2007e643 runtime(awk): Highlight more awk comments in syntax script
closes: #15944

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 21:46:09 +01:00
d69ffbe4bc runtime(netrw): add missing change for s:redir()
Somehow, that change got lost in commit 70197885

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 21:24:47 +01:00
bdac2ef6fe patch 9.1.0819: tests: using findexpr and imported func not tested
Problem:  tests: need a test for findexpr and vim9 imported func
Solution: Add a test for 'findexpr' and Vim9 imported script
          (Yegappan Lakshmanan)

closes: #15954

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 21:01:28 +01:00
70197885a8 runtime(netrw): improve netrw's open-handling further
closes: #15956

Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 20:47:25 +01:00
7c96776729 runtime(netrw): fix syntax error in netrwPlugin.vim
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-28 07:03:24 +01:00
3d7e567ea7 runtime(netrw): simplify gx file handling
It did not work very well, at least on Debian 12, and I am not sure Git
Bash and WSL, for example, were taken care of as maintenance stalled.

The whole logic was somewhat convoluted with some parts repeatedly invoking
failed commands.

The file handling was outdated, for example, nowadays Netscape is rarely
used, and also opinionated, for example mainly Microsoft Paint and Gimp for
Image files.

Instead, let's use (xdg-)open and similar commands on other systems
which respects the user's preferences.

closes: #15721

Co-authored-by: Luca Saccarola <96259932+saccarosium@users.noreply.github.com>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 22:16:49 +01:00
a04003a929 patch 9.1.0818: some global functions are only used in single files
Problem:  some global functions are only used in single files
Solution: refactor code slightly and make some more functions static
          (Yegappan Lakshmanan)

closes: #15951

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 21:54:11 +01:00
8f1d09828a patch 9.1.0817: termdebug: cannot evaluate expr in a popup
Problem:  termdebug: cannot evaluate expr in a popup
Solution: enhance termdebug plugin and allow to evaluate expressions in
          a popup window, add a unit test (Peter Wolf).

fixes: #15877
closes: #15933

Signed-off-by: Peter Wolf <pwolf2310@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 21:51:14 +01:00
2abec431e1 runtime(defaults): Detect putty terminal and switch to dark background
Vim tries to determine the default background and checks for $TERM
and even checks for the "putty" value. But unfortunately, putty by
default uses "xterm" as $TERM value and as such Vim uses a "light"
background.

So use a TermResponse autocommand to set the background for putty back
to dark.

Note: this only works on non-tiny builds and when defaults.vim is in
use.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 21:36:09 +01:00
ce35ee8986 patch 9.1.0816: tests: not clear what tests cause asan failures
Problem:  tests: not clear what tests cause asan failures
Solution: append testname to $ASAN_OPTIONS

Mention what test causes ASAN failures by appending the testname
to log_path in $ASAN_OPTIONS/$UBSAN_OPTIONS. This assumes 'log_path' is
always the last sub-option in $ASAN_OPTIONS.

While at it, also make the CI run with `-O0` instead of `-O1` when ASAN
is enable since this causes line numbers to disappear.

closes: #15927

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 21:15:50 +01:00
912fbaf6e8 runtime(doc): Remove some completed items from todo.txt
closes: #15949

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 20:46:42 +01:00
91d26aa338 patch 9.1.0815: "above" virtual text causes wrong 'colorcolumn' position
Problem:  "above" virtual text causes wrong 'colorcolumn' position.
          (@matrdr)
Solution: Use the number of cells instead of bytes for vcol_off_tp.
          (zeertzjq)

fixes: #15946
closes: #15948

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-27 19:24:53 +01:00
de79f9129a runtime(syntax-tests): tiny vim fails because of line-continuation
Problem:  tiny vim fails because of line-continuation, although
          the test script should be skipped for non-eval builds of Vim.
Solution: :set cpo&vim

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-24 23:03:10 +02:00
fdf135a052 patch 9.1.0814: mapset() may remove unrelated mapping
Problem:  mapset() may remove unrelated mapping whose {rhs} matches the
          restored mapping's {lhs}.
Solution: only match by {lhs} when unmapping for mapset() (zeertzjq).

closes: #15935

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-24 21:43:43 +02:00
118072862b patch 9.1.0813: no error handling with setglobal and number types
Problem:  no error handling with setglobal and number types
Solution: validate values when using :setglobal with number option types
          (Milly)

closes: #15928

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-23 21:42:41 +02:00
d0809869d6 patch 9.1.0812: Coverity warns about dereferencing NULL ptr
Problem:  Coverity warns about dereferencing NULL ptr
          in check_colorcolumn()
Solution: verify that wp is not null before accessing it

related: #15914

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-23 21:32:31 +02:00
2f6efaccfd patch 9.1.0811: :find expansion does not consider 'findexpr'
Problem:  :find expansion does not consider 'findexpr'
Solution: Support expanding :find command argument using 'findexpr'
          (Yegappan Lakshmanan)

closes: #15929

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-23 21:06:10 +02:00
aeb1c97db5 patch 9.1.0810: cannot easily adjust the |:find| command
Problem:  cannot easily adjust the |:find| command
Solution: Add support for the 'findexpr' option (Yegappan Lakshmanan)

closes: #15901
closes: #15905

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 23:42:20 +02:00
626b6ab486 patch 9.1.0809: filetype: petalinux config files not recognized
Problem:  filetype: petalinux config files not recognized
Solution: detect 'project-spec/*.conf' files as bitbake filetype
          (Wu, Zhenyu)

References:
https://www.amd.com/en/products/software/adaptive-socs-and-fpgas/embedded-software/petalinux-sdk.html

closes: #15926

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 23:23:56 +02:00
6d5f4a0bed patch 9.1.0808: Terminal scrollback doesn't shrink when decreasing 'termwinscroll'
Problem:  Terminal scrollback doesn't shrink when reducing
          'termwinscroll'
Solution: Check if option value was decreased (Milly).

closes: #15904

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 23:17:45 +02:00
3e5bbb8e11 patch 9.1.0807: tests: having 'nolist' in modelines isn't always desired
Problem:  tests: having 'nolist' in modelines isn't always desired
Solution: remove 'nolist' from modeline (zeertzjq)

closes: #15910

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 23:11:27 +02:00
b38700ac81 patch 9.1.0806: tests: no error check when setting global 'briopt'
Problem:  tests: no error check when setting global 'briopt'
Solution: also parse and check global 'briopt' value (Milly)

closes: #15911

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 22:59:39 +02:00
231480f975 patch 9.1.0805: tests: minor issues in gen_opt_test.vim
Problem:  tests: minor issues in gen_opt_test.vim
Solution: fix restore value for 'undolevels', fix comment, fix
          wrong cpo value, add equality test for global-local options on
          switchback (Milly).

closes: #15913

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 22:53:01 +02:00
a441a3eaab patch 9.1.0804: tests: no error check when setting global 'cc'
Problem:  tests: no error check when setting global 'cc'
Solution: also parse and check global 'cc' value (Milly)

closes: #15914

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 22:43:01 +02:00
5e7a6a4a10 patch 9.1.0803: tests: no error check when setting global 'isk'
Problem:  tests: no error check when setting global 'isk'
Solution: also parse and check global 'isk' value (Milly)

closes: #15915

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 22:27:19 +02:00
142cad1f88 patch 9.1.0802: tests: no error check when setting global 'fdm' to empty value
Problem:  tests: no error check when setting global 'fdm' to empty value
Solution: Also check global 'fdm' value for being empty (Milly).

closes: #15916

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 22:11:51 +02:00
94606f70e2 patch 9.1.0801: tests: no error check when setting global 'termwinkey'
Problem:  tests: no error check when setting global 'termwinkey'
Solution: Also validate when using setglobal (Milly).

closes: #15917

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 22:07:52 +02:00
8be10aa9e4 patch 9.1.0800: tests: no error check when setting global 'termwinsize'
Problem:  tests: no error check when setting global 'termwinsize'
Solution: Also validate when using setglobal (Milly).

closes: #15918

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 22:01:46 +02:00
19be0eb7f0 runtime(doc): :ownsyntax also resets 'spelloptions'
closes: #15919

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 21:36:45 +02:00
ceec8640df patch 9.1.0799: tests: gettwinvar()/gettabwinvar() tests are not comprehensive
Problem:  tests: gettwinvar()/gettabwinvar() tests are not comprehensive
Solution: Add more tests (Milly)

closes: #15920

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 21:23:31 +02:00
92b59c628a runtime(doc): Fix wrong Mac default options
Clean up docs for macOS defaults. Simply use "Unix" across the board
instead of being inconsistent and occasionally using "Unix, macOS". Also
remove stale defaults that were erroneously renamed to "macOS" from
"Macintosh" when they were actually referring to Mac OS 9 which is no
longer supported.

closes: #15924

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-22 21:16:43 +02:00
8df07d0ca3 patch 9.1.0798: too many strlen() calls in cmdhist.c
Problem:  too many strlen() calls in cmdhist.c
Solution: refactor code and remove strlen() calls
          (John Marriott)

closes: #15888

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 22:37:07 +02:00
6eca04e9f1 patch 9.1.0797: testing of options can be further improved
Problem:  testing of options can be further improved
Solution: split the generated option test into test_options_all.vim,
          add more test cases, save and restore values, fix use-after-free

closes: #15894

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 22:20:51 +02:00
bfe568d8c4 patch 9.1.0796: filetype: libtool files are not recognized
Problem:  filetype: libtool files are not recognized
Solution: detect '*.{lo,la,lai}' as sh filetype
          (Wu, Zhenyu)

closes: #15751

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 22:09:32 +02:00
421ed14b8a runtime(typst): add folding to typst ftplugin
closes: #15897

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 22:01:10 +02:00
a7d456191d runtime(netrw): deprecate and remove netrwFileHandlers#Invoke()
closes: #15895

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 21:31:29 +02:00
0887e62bce patch 9.1.0795: filetype: Vivado memory info file are not recognized
Problem:  filetype: Vivado memory info file are not recognized
Solution: detect '*.mmi' memory info file as xml filetype
          (Wu, Zhenyu)

References: https://docs.amd.com/r/en-US/ug1580-updatemem/MMI-File-Syntax

closes: #15906

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-21 20:54:13 +02:00
4f5681dbdf patch 9.1.0794: tests: tests may fail on Windows environment
Problem:  tests: tests may fail on Windows environment
Solution: use shellcmdflag=/D to skip executing autorun from
          the registry (Milly)

closes: #15900

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-20 11:06:00 +02:00
539349cb32 runtime(doc): improve the :colorscheme documentation
closes: #15871

Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-20 10:52:50 +02:00
c73fc86bf8 patch 9.1.0793: xxd: -e does add one extra space
Problem:  xxd: -e does add one extra space
Solution: fix it, refactor and merge some code
          (Aapo Rantalainen)

fixes: #15898
closes: #15899

Signed-off-by: Aapo Rantalainen <aapo.rantalainen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-19 15:54:57 +02:00
cc15bbcbc4 patch 9.1.0792: tests: Test_set_values() is not comprehensive enough
Problem:  tests: Test_set_values() is not comprehensive enough
Solution: Add a lot more test cases (Milly)

closes: #15892

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-18 19:58:04 +02:00
f10db25367 runtime(swayconfig): add flag for bindsym/bindcode to syntax script
Add the `--inhibited` flag for the bindsym/bindcode commands.

closes: #15891

Signed-off-by: CismonX <admin@cismon.net>
Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-17 21:44:35 +02:00
b498c44444 patch 9.1.0791: tests: errors in gen_opt_test.vim are not shown
Problem:  tests: errors in gen_opt_test.vim are not shown
Solution: update gen_opt_test.vim and write test.log,
          let the makefile output test.log (Milly)

closes: #15887

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-17 21:05:31 +02:00
5e48e97e42 runtime(compiler): check for compile_commands in build dirs for cppcheck
closes: #15889

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-17 20:54:00 +02:00
8fc2a097e2 patch 9.1.0790: Amiga: AmigaOS4 build should use default runtime (newlib)
Problem:  Amiga: AmigaOS4 build should use default runtime (newlib)
Solution: Remove clib2 from compiler / linker flags (Ola Söder)

closes: #15890

Signed-off-by: Ola Söder <rolfkopman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-17 20:49:36 +02:00
6c2fc377bf runtime(help): Update help syntax
This commit makaes the following changes to the vim help syntax:

- fix excessive URL detection in help, because `file:{filename}` in
  doc/options.txt is determined to be a URL.
- update highlighting N for :resize in help
- split Italian-specific syntax into separate help script
- highlight `Note` in parentheses in help
- update 'titlestring' behaviour in documentation for invalid '%' format

closes: #15883

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-16 22:11:17 +02:00
4bfb89996f runtime(help): fix end of sentence highlight in code examples
closes: #15745

Co-authored-by: Danilo Rezende <returndanilo@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-16 21:59:50 +02:00
5e53fca76f runtime(jinja): Support jinja syntax as secondary filetype
fixes: ##15880
closes: #15885

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-16 21:31:19 +02:00
c0cba184f5 patch 9.1.0789: tests: ':resize + 5' has invalid space after '+'
Problem:  tests: ':resize + 5' has invalid space after '+'
Solution: Correct the test (Milly)

closes: #15884

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-16 20:03:44 +02:00
a2834e17d1 patch 9.1.0788: <CSI>27;<mod>u is not decoded to literal Escape in kitty/foot
Problem:  <CSI>27;<mod>u is not decoded to literal Escape in kitty/foot
Solution: disable XTerm modifyOtherKeys form 1 when the kitty protocol is enabled
          (Christian Fillion)

References:
- https://invisible-island.net/xterm/modified-keys.html
- https://sw.kovidgoyal.net/kitty/keyboard-protocol/
- e891abdd6a/kitty-keymap.h
- d31459b092/kitty/key_encoding.c (L193)

fixes: #15868
closes: #15881

Signed-off-by: Christian Fillion <contact@cfillion.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-16 17:28:38 +02:00
991657e87d patch 9.1.0787: cursor position changed when using hidden terminal
Problem:  cursor position changed when using hidden terminal
          and BufFilePost autocommand (Mizuno Jan Yuta)
Solution: Save and restore cursor position

fixes: #15854
closes: #15876

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-15 20:38:57 +02:00
6a1deaf5ad patch 9.1.0786: tests: quickfix update test does not test location list
Problem:  tests: quickfix update test does not test location list
          (after: v9.1.0.785)
Solution: update Test_quickfix_buffer_contents to test with location
          lists (Yegappan Lakshmanan)

closes: #15879

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-15 20:26:45 +02:00
5bcfb5a30c runtime(doc): add some docs for file-watcher programs
fixes: #15733

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 22:08:22 +02:00
793c315115 CI: uploading failed screendumps still fails on Cirrus CI
Let's see if removing the double quotes makes a difference.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 21:24:03 +02:00
27fbf6e5e8 patch 9.1.0785: cannot preserve error position when setting quickfix list
Problem:  cannot preserve error position when setting quickfix lists
Solution: Add the 'u' action for setqflist()/setloclist() and try
          to keep the closes target position (Jeremy Fleischman)

fixes: #15839
closes: #15841

Signed-off-by: Jeremy Fleischman <jeremyfleischman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 20:53:07 +02:00
83a06705dc patch 9.1.0784: there are several problems with python 3.13
Problem:  there are several problems with python 3.13
Solution: fix the problems in the python3 interface (Boris Staletic)

This commit does the following things:
1) Since python 3.13.0b1, all statically defined objects are "immortal".
   Besides never getting garbage collected, this also affects reference
   counting:

   - Immportal objects have a reference count of 2^32-1.
   - Reference counting is a no-op.

   All this is considered implementation details by cpython, so
   documentation is next to non-existent.

   Relevant CPython source code:
   https://github.com/python/cpython/blob/v3.13.0/Include/object.h#L62-L107
   https://github.com/python/cpython/blob/v3.13.0/Include/object.h#L389-L391

2) Opt-out of ANSI-painted python stack traces

3) Make python error message severity more consistent

fixes: #15838
closes: #15842

Signed-off-by: Boris Staletic <boris.staletic@protonmail.com>
Signed-off-by: puremourning <puremourning@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 20:28:39 +02:00
322ad0c953 patch 9.1.0783: 'spell' option setting has problems
Problem:  'spell' option setting has problems
Solution: correctly check for comma for 'spellfile' option,
          remove unnecessary checks, refactor slightly (Milly)

closes: #15873

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 20:21:48 +02:00
0c59c30271 patch 9.1.0782: tests: using wrong neomuttlog file name
Problem:  tests: using wrong neomuttlog file name
Solution: use correct file name

related: #15858

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 19:56:38 +02:00
7b5e52d16f runtime(doc): add preview flag to statusline example
Problem:  The standard statusline example is missing the preview flag
          "%w"
Solution: Add the preview flag "%w"

closes: #15874

Signed-off-by: saher <msaher.shair@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-14 19:52:50 +02:00
7d755d8ef3 patch 9.1.0781: tests: test_filetype fails
Problem:  tests: test_filetype fails (clason)
          (after v9.1.0779)
Solution: Use correct filename for neomuttlog filetype

related: #15845

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 20:28:21 +02:00
b516598092 patch 9.1.0780: MS-Windows: incorrect Win32 error checking
Problem:  MS-Windows: incorrect Win32 error checking
Solution: fix wrong order of error handling and perform
          some minor refactoring (Nir Lichtman)

In the function that adjusts the process privileges there is a mistake
in which GetLastError is called after CloseHandle, though clearly the
last error check is meant for the privileges related call before hand
and the current state appears like a mistake.

So fix this problem, and also perform the following:

- Remove the static variable done since the PlatformId is only called
  during initialization
- Fix incorrect parameter passed to the Win32 API privileges function

closes: #15845

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:44:07 +02:00
a2aa921f76 patch 9.1.0779: filetype: neomuttlog files are not recognized
Problem:  filetype: neomuttlog files are not recognized
Solution: detect '*.neomuttdebug' file as neomuttlog filetype,
          include neomuttlog syntax script (Richard Russon)

closes: #15858

Co-authored-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Richard Russon <rich@flatcap.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:42:14 +02:00
0f146b7925 patch 9.1.0778: filetype: lf config files are not recognized
Problem:  filetype: lf config files are not recognized
Solution: detect lfrc files as lf filetype, include a syntax
          script for lf files (Andis Spriņķis).

References:
- https://github.com/gokcehan/lf

closes: #15859

Signed-off-by: Andis Spriņķis <spr.andis@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:29:56 +02:00
f64bafd98a runtime(comment): fix commment toggle with mixed tabs & spaces
- fix regression where toggling doesn't properly remove comment chars in
  files with tabs indents only.
- refactor toggling comments for mixed tabs & spaces sources

closes: #15861

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:20:53 +02:00
a4205471ad runtime(misc): Use consistent "Vim script" spelling
References: https://groups.google.com/g/vim_dev/c/3Z5yM8KER2w/m/wAqws0QSEAAJ

closes: #15863

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:16:42 +02:00
6e918538b1 runtime(gleam): add ftplugin for gleam files
fixes: #15864
closes: #15866

Signed-off-by: Trilowy <49493635+trilowy@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 19:08:30 +02:00
5dcee3c723 runtime(doc): link help-writing from write-local-help
fixes: #15862

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-13 10:26:37 +02:00
367499c5c3 patch 9.1.0777: filetype: Some upstream php files are not recognized
Problem:  filetype: Some upstream php files are not recognized
Solution: Detect more config files from the PHP source
          distribution as filetype ini (nisbet-hubbard).

closes: #15840

Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 17:19:58 +02:00
05d0893ed8 runtime(java): Define javaBlockStart and javaBlockOtherStart hl groups
And do not link either to any group.

Resolves zzzyxwvut/java-vim#2.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 17:12:51 +02:00
1961cafc99 runtime(doc): mention conversion rules for remote_expr()
fixes: #15844

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 11:57:12 +02:00
eac806bf0b runtime(tutor): Fix missing :s command in spanish translation section 4.4
closes: #15850

Signed-off-by: Andrés <abenitof@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 11:47:18 +02:00
ea997edc7a patch 9.1.0776: test_strftime may fail because of missing TZ data
Problem:  test_strftime may fail because of missing TZ data
Solution: Use GMT offsets to validate timezone differences (James McCoy)

Some systems only provide timezones that follow the geographical region
naming (e.g. America/New_York) by default and require an additional
install for other names (like EST).

The GMT+<offset> format must always be honored, so use that to generate
distinct data for the test.

closes: #15848

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 11:36:58 +02:00
59086a25c4 translation(am): Add Armenian language translation
closes: #15853

Signed-off-by: Gagik Hakobyan <hakgagik@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 11:32:46 +02:00
484facebe4 patch 9.1.0775: tests: not enough tests for setting options
Problem:  tests: not enough tests for setting options
Solution: Add more comprehensive tests to test_options (Milly).

closes: #15856

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-12 11:26:06 +02:00
85f36d61e0 patch 9.1.0774: "shellcmdline" doesn't work with getcompletion()
Problem:  "shellcmdline" doesn't work with getcompletion().
Solution: Use set_context_for_wildcard_arg() (zeertzjq).

closes: #15834

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-10 19:14:13 +02:00
e58e9015cc patch 9.1.0773: filetype: some Apache files are not recognized
Problem:  filetype: some Apache files are not recognized
Solution: Detect more config files from the Apache source
          distribution as filetype apache (nisbet-hubbard)

closes: #15810

Signed-off-by: nisbet-hubbard <87453615+nisbet-hubbard@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-10 19:09:28 +02:00
7baa014d0f patch 9.1.0772: some missing changes from v9.1.0771
Problem:  some missing changes from v9.1.0771
Solution: use correct highlighting attribute and adjust comments
          (glepnir)

closes: #15836

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-09 20:19:25 +02:00
0fe17f8ffb patch 9.1.0771: completion attribute hl_group is confusing
Problem:  Currently completion attribute hl_group is combined with
          all items, which is redundant and confusing with kind_hlgroup
Solution: Renamed to abbr_hlgroup and combine it only with the abbr item
          (glepnir).

closes: #15818

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 22:26:44 +02:00
0407d621bb patch 9.1.0770: current command line completion is a bit limited
Problem:  current command completion is a bit limited
Solution: Add the shellcmdline completion type and getmdcomplpat()
          function (Ruslan Russkikh).

closes: #15823

Signed-off-by: Ruslan Russkikh <dvrussk@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 22:24:04 +02:00
347d43bd33 patch 9.1.0769: filetype: MLIR files are not recognized
Problem:  filetype: MLIR files are not recognized
Solution: Detect '*.mlir' files as mlir filetype,
          include a mlir filetype plugin
          (Wu, Zhenyu)

closes: #15826

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 21:58:35 +02:00
ded59139fd patch 9.1.0768: MS-Windows: incorrect cursor position when restoring screen
Problem:  MS-Windows: incorrect cursor position when restoring screen
          (after v9.1.0664)
Solution: Restore the VTP command for switching screens back to
          termcap_mode_end() (William Bresler)

Patch 9.1.0664 moved the VTP command for switching back to the main
screen buffer from termcap_mode_end() to mch_exit_c().  However, the
saved cursor position from the main screen continued to be restored
in termcap_mode_end().  This failed if the cursor position was beyond
the console window height, since the alternate screen buffer is always
the same size as the console window.

This patch restores the VTP command for switching back to the main
screen buffer to termcap_mode_end().  In order to preserve the effect
of patch 9.1.0664, the VTP command for switching back to the main
screen buffer in mch_exit_c() is issued only if termcap mode was not
active while exiting Vim.

See issue 15775 for a fuller description, with screen shots of the
problem.

fixes: #15775
closes: #15829

Signed-off-by: William Bresler <wbresler@gmail.com>
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 21:42:46 +02:00
830a802f91 runtime(nasm): Update nasm syntax script
Co-authored-by: sarvel <sarvel@protonmail.com>
Signed-off-by: Andrii Sokolov <andriy145@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 21:10:09 +02:00
c9aa6e4f2a patch 9.1.0767: A condition is always true in ex_getln.c
Problem:  A cmdlen == 0 condition is always true as ccline.cmdlen == 0
          was already checked above (after v9.1.0766).
Solution: Remove the condition and the variable.
          (zeertzjq)

closes: #15830

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 21:04:19 +02:00
cb1d1dcc87 runtime(skill): Update syntax file to fix string escapes
The syntax script allowed for single backslash escapes like this
"string\""
But did not accommodate for the uncommon case:
"<key>\\"
Let's fix this by also skipping over double backslashes in the
skillString region.

closes: #15832

Signed-off-by: Simão Afonso @ Powertools Tech <simao.afonso@powertools-tech.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 20:58:41 +02:00
d3b55d7f76 runtime(help): highlight CTRL-<Key> correctly
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-08 20:20:23 +02:00
015c84ce54 runtime(doc): add missing usr_52 entry to toc
fixes: #15821

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:48:32 +02:00
ccf8907570 patch 9.1.0766: too many strlen() calls in ex_getln.c
Problem:  too many strlen() calls in ex_getln.c
Solution: refactor the code to reduce the number of strlen() calls
          (John Marriott)

closes: #15809

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:40:39 +02:00
6e56484f05 runtime(doc): correct vi registers 1-9 documentation error
When using heirloom `vi` originally written by Bill Joy (`:version`
gives me "Version 4.0 (gritter) 12/25/06"), its possible to store text into
registers 1-9 and subsequently use the `:edit` or `:next` command to
change files and paste the contents of those numbered registers,
contrary to what Vim documentation states.

POSIX description also does not mention such a restriction:
https://pubs.opengroup.org/onlinepubs/9799919799/utilities/ex.html#tag_20_40_13_10

closes: #15814

Signed-off-by: Frederick Key Abell III <fkabell@localhost.localdomain>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:07:12 +02:00
5df3cb2898 patch 9.1.0765: No test for patches 6.2.418 and 7.3.489
Problem:  No test for patches 6.2.418 and 7.3.489
Solution: Add a test.  Fix some whitespace problems in test_mapping.vim.
          Document the behavior (zeertzjq).

closes: #15815

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:05:06 +02:00
4f51f3a573 runtime(spec): set comments and commentstring options
closes: #15817

Signed-off-by: Andreas Schneider <asn@cryptomilk.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 21:02:10 +02:00
48f3833ff0 NSIS: Include libgcc_s_sjlj-1.dll again
gettext-iconv-windows v0.22.5a-v1.17 requires libgcc_s_sjlj-1.dll again.
Add a new option ${INCLUDE_LIBGCC} to control whether it should be
included in the package.

This partly reverts 49f1e1979f.

Related: https://github.com/vim/vim-win32-installer/pull/355

closes: #15819

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-07 20:37:00 +02:00
fd4e47e06b runtime(doc): clarify the effect of 'startofline' option
fixes: #15794

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 18:02:45 +02:00
51b62387be patch 9.1.0764: [security]: use-after-free when closing a buffer
Problem:  [security]: use-after-free when closing a buffer
Solution: When splitting the window and editing a new buffer,
          check whether the newly to be edited buffer has been marked
          for deletion and abort in this case

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-rj48-v4mq-j4vg

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 17:36:31 +02:00
818c641b6f runtime(vim): Update base-syntax file, improve class, enum and interface highlighting
- Enable folding of class, enum and interface declarations.
- Highlight constructor names with the Function highlight group, like
  other special methods.
- Mark function definitions using special method names as errors.
- Highlight :type arguments.

fixes: #14393#issuecomment-2042796198.
closes: #13810

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 17:00:48 +02:00
ec0229414b patch 9.1.0763: tests: cannot run single syntax tests
Problem:  tests: cannot run single syntax tests
Solution: Support running a subset of syntax tests
          (Aliaksei Budavei)

Two methods of assembling a subset of test filenames for
selection are provided:

* Filename and filetype Make targets will be generated, and
  multiple such targets can be passed before the mandated
  trailing "test" target, e.g. "make html markdown test".

* Filenames and their parts can be specified as a regular
  expression that is assigned to a "VIM_SYNTAX_TEST_FILTER"
  environment variable, and used with the test Make target,
  e.g. "VIM_SYNTAX_TEST_FILTER=html\\\|markdown make test".
  (This variable will be ignored and the whole suite will be
  run when Make is GNU Make and a parent Makefile is used.)

Methods can be used alone or together, with the Make targets
having the higher precedence. Neither method will influence
the order of test execution.

closes: #15670

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:57:33 +02:00
a9c6f90918 patch 9.1.0762: 'cedit', 'termwinkey' and 'wildchar' may not be parsed correctly
Problem:  'cedit', 'termwinkey' and 'wildchar' may not be parsed
          correctly
Solution: improve string_to_key() function in option.c
          (Milly)

- Problem: `^@` raises an error.
  Solution: Store as `<Nul>`.
- Problem: `<t_xx` does not raise an error.
  Solution: Raise an error if closing `>` is missing.
- Problem: Single `<` or `^` raises an error. It is inconvenient for users.
  Solution: They are stored as a single character.

closes: #15811

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:47:02 +02:00
1a31c430bb patch 9.1.0761: :cd completion fails on Windows with backslash in path
Problem:  :cd completion fails on Windows with backslash in path
Solution: switch no_bslash argument to FALSE in file_pat_to_reg_pat()

Note: only fixes the problem on Windows. For Unix, we still need to
escape backslashes since those are taken as regex atoms (and could be
invalid regex atoms).

fixes: #15643
closes: #15808

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:34:20 +02:00
d4ad4c9b3e patch 9.1.0760: tests: no error reported, if gen_opt_test.vim fails
Problem:  tests: no error reported, if gen_opt_test.vim fails
Solution: Make Vim exit with return code 1 in case of any error
          (Milly)

closes: #15795

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-06 16:27:28 +02:00
b065a10e24 patch 9.1.0759: screenpos() may return invalid position
Problem:  screenpos() may return invalid position
          after switching buffers (Greg Hurrell)
Solution: reset w_leftcol if wrapping has been set
          after copying wrap option

fixes: #15792
closes: #15803

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:30:22 +02:00
7c3f9af0ed runtime(misc): unset compiler in various ftplugins
just to foster best practices

closes: #15798

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:26:46 +02:00
89872f58a9 runtime(doc): update formatting and syntax
closes: #15800

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:16:18 +02:00
af449f69c7 runtime(compiler): add cppcheck linter compiler plugin
closes: #15804

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 17:09:21 +02:00
738ebfea41 runtime(doc): Fix style in documents
closes: #15801

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 16:56:47 +02:00
8ee0e0b8e3 runtime(doc): Fix to two-space convention in user manual
closes: #15802

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 16:44:27 +02:00
7b27fc49a8 runtime(comment): consider &tabstop in lines after whitespace indent
The count `strlen()` in

```vim
line = printf(indent_start .. substitute(cms, '%s\@!', '%%', 'g'),
                       strpart(getline(lnum), strlen(indent_start)))
```

is too large if the block of lines to be operated on contains different
whitespace indenting (tab vs. spaces).

Considering using `2gcc` on the first line with 4 spaces as indenting
and on the next line using a single tab character (with &tabstop value
of 8):

Using `strlen(indent_start) = 4` for an initial indent of 4 spaces is
correct for the first line, but wrong for the next line and will
therefore wrongly comment out the tab-indented line (and possibly
deleting some content).

The new check is still too simple because it assumes that as soon as
there's a tab the whole indent is made of tabs; it's a start of entering
the mixed tab and whitespace indent rabbit hole.

fixes: #15797
closes: #15805

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-05 16:19:40 +02:00
40c6babc17 patch 9.1.0758: it's possible to set an invalid key to 'wildcharm'
Problem:  it's possible to set an invalid key to 'wildcharm'
Solution: error out, if the 'wildcharm' value is an invalid key
          (Milly)

closes: #15787

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-04 20:41:14 +02:00
60310a4b26 runtime(java): Manage circularity for every :syn-included syntax file
With "g:markdown_fenced_languages" defined and "java" added
to its list, a circular dependency between the Markdown and
Java syntax files will be made.  To break it, no Markdown
documentation comments will be recognised in fenced blocks
in Markdown files; in order to view Java source files,
"java" must be removed from "g:markdown_fenced_languages",
and this task can be automated as follows.

1) Add to "~/.after/ftplugin/java.vim":
------------------------------------------------------------
if exists("g:markdown_fenced_languages") &&
	\ !(exists("g:java_ignore_javadoc") ||
	\ exists("g:java_ignore_markdown"))
    let s:idx = index(g:markdown_fenced_languages, 'java')
    if s:idx > -1
	call remove(g:markdown_fenced_languages, s:idx)
    endif
    unlet s:idx
endif
------------------------------------------------------------

2) Optionally add to "~/.after/ftplugin/markdown.vim":
------------------------------------------------------------
if exists("g:markdown_fenced_languages") &&
	\ index(g:markdown_fenced_languages, 'java') < 0
    call add(g:markdown_fenced_languages, 'java')
endif
------------------------------------------------------------

(Make sure that the above snippets appear in the files under
the "ftplugin" NOT "syntax" directory.)

Finally, unless the new version of the syntax file is made
available from "$VIMRUNTIME" (and from "~/.vim/syntax" if
necessary), OTHER discoverable file versions will be used
whose behaviour may interfere with this fix.

related: #15740
closes: #15796

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-04 20:25:05 +02:00
075ab5ab3b patch 9.1.0757: tests: messages files contains ANSI escape sequences
Problem:  tests: messages files contains ANSI escape sequences
Solution: filter those out in runtests.vim

Also, since we are setting $LC_ALL, we don't need to set $LANG and
$LANGUAGE since those are overridden by $LC_ALL anyhow.

closes: #15788

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-03 16:38:52 +02:00
a6d9e3c4e0 patch 9.1.0756: missing change from patch v9.1.0754
Problem:  missing change from patch v9.1.0754
Solution: use correct width for the actual item
          in pum_redraw() (glepnir)

closes: #15786

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-03 11:01:19 +02:00
2982299699 patch 9.1.0755: quickfix list does not handle hardlinks well
Problem:  quickfix list does not handle hardlinks well
Solution: store original file name with quickfix entry
          (Austin Chang)

Quickfix list shows entries with duplicate name if the file is opened
with the path of hard links.

The major cause is that qflist assumed that the filename passed into
`qf_add_entry` matches the filename opened with the buffer.

This patch handles this case by introduce a `qf_fname` into `qfline_S`
structure. It stores the filename from `qf_add_entry` for each quickfix
line.

closes: #15687

Signed-off-by: Austin Chang <austin880625@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-03 10:56:31 +02:00
ae62fe5c28 runtime(doc): 'filetype', 'syntax' and 'keymap' only allow alphanumeric + some characters
closes: #15783

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-02 19:36:03 +02:00
f416a2220f runtime(systemd): small fixes to &keywordprg in ftplugin
closes: #15784

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-02 19:28:44 +02:00
5d64e28011 CI: macos-12 runner is being sunset, switch to 13
See: https://github.com/actions/runner-images/issues/10721

closes: #15780

Signed-off-by: Philip H. <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-02 19:21:52 +02:00
6a89c94a9e patch 9.1.0754: fixed order of items in insert-mode completion menu
Problem:  fixed order of items in insert-mode completion menu
Solution: Introduce the 'completeitemalign' option with default
          value "abbr,kind,menu" (glepnir).

Adding an new option `completeitemalign` abbr is `cia` to custom
the complete-item order in popupmenu.

closes: #14006
closes: #15760

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 20:32:12 +02:00
e021f39b79 runtime(comment): commenting might be off by one column
getpos columns start at 1 and not 0 as do arrays

closes: #15774

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 20:02:15 +02:00
47f8584a80 patch 9.1.0753: Wrong display when typing in diff mode with 'smoothscroll'
Problem:  Wrong display when typing in diff mode with 'smoothscroll'.
Solution: Use adjust_plines_for_skipcol() (zeertzjq).

closes: #15776

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 19:35:47 +02:00
25732435c5 patch 9.1.0752: can set 'cedit' to an invalid value
Problem:  can set cedit to an invalid value
Solution: Check that the value is a valid key name
          (Milly)

closes: #15778

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 19:33:39 +02:00
baee8448d1 runtime(doc): add usr tag to usr_toc.txt
When typing `:h usr` it redirects to usr_01.txt, but I'd argue
usr_toc.txt is more useful as you can see an overview of all manuals.
When I usr `:h usr` I personally always intend to go to `usr_toc`.

closes: #15779

Signed-off-by: dundargoc <gocdundar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-10-01 19:24:02 +02:00
b50bc9ad55 patch 9.1.0751: Error callback for term_start() not used
Problem:  Error callback for term_start() not used
          (darkseid-is)
Solution: attach pipe to stderr if an error callback exists

fixes: #15665
closes: #15729

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 21:29:43 +02:00
563e8ec8c7 patch 9.1.0750: there are some Win9x legacy references
Problem:  there are some Win9x legacy references
Solution: Remove those mentions (Nir Lichtman)

closes: #15730

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:42:28 +02:00
85f054aa3f runtime(java): Recognise the CommonMark form (///) of Javadoc comments
Complement "g:java_ignore_javadoc" with "g:java_ignore_html"
and "g:java_ignore_markdown" to allow selectively disabling
the recognition of HTML and CommonMark respectively.

(Note that this is not a preview feature.)

======================== LIMITATION ========================

According to the syntactical details of JEP 467:

> Any leading whitespace and the three initial / characters
> are removed from each line.
>
> The lines are shifted left, by removing leading whitespace
> characters, until the non-blank line with the least
> leading whitespace has no remaining leading whitespace.
>
> Additional leading whitespace and any trailing whitespace
> in each line is preserved, because it may be significant.

the following example:
------------------------------------------------------------
///    A summary sentence.
///     A list:
///      - Item A.
///     - Item B.
///
///     Some code span, starting here `
///      1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

should be interpreted as if it were written thus:
------------------------------------------------------------
///A summary sentence.
/// A list:
///  - Item A.
/// - Item B.
///
/// Some code span, starting here `
///  1 + 2 ` and ending at the previous \`.
------------------------------------------------------------

Since automatic line rewriting will not be pursued, parts of
such comments having significant whitespace may be ‘wrongly’
highlighted.  For convenience, a &fex function is defined to
‘correct’ it: g:javaformat#RemoveCommonMarkdownWhitespace()
(:help ft-java-plugin).

References:
https://openjdk.org/jeps/467
https://spec.commonmark.org/0.31.2

closes: #15740

Co-authored-by: Tim Pope <code@tpope.net>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:40:04 +02:00
de6c1d1182 patch 9.1.0749: filetype: http files not recognized
Problem:  filetype: http files not recognized
Solution: detect '*.http' as http filetype, include
          http filetype plugin (Riley Bruins)

Based on the specification found
[here](https://github.com/JetBrains/http-request-in-editor-spec/blob/master/spec.md)

closes: #15762

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:34:04 +02:00
0fb25515cc runtime(comment): fix syntax error
fixes: #15767
closes: #15770

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-30 19:30:34 +02:00
5dd4ec0089 CI: uploading failed screendump tests does not work Cirrus
Problem:  CI: uploading failed screendump tests does not work Cirrus
          (after: e019f3626d)
Solution: Do not use the $CIRRUS_WORKING_DIR env variable

related: #15695

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 17:29:39 +02:00
ea84202372 patch 9.1.0748: :keep* commmands are sometimes misidentified as :k
Problem:  The :keep{alt,jumps,marks,patterns} commmands are sometimes
          misidentified as :k.
Solution: Make sure one_letter_cmd() only returns true for :k and not
          other :keep* commands (Doug Kearns).

This currently manifests as missing completion for :keep* commands and
incorrect results from fullcommand().

E.g., fullcommand("keepmarks") returns "k" rather than "keepmarks".

The correct command, however, is executed as command modifiers are
handled specially in do_one_cmd() rather than using find_ex_command().

Fix exists(':k') so that it returns 2 for a full match.

closes: #15742

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 17:17:41 +02:00
ee20fc8062 runtime(indent): allow matching negative numbers for gnu indent config file
Some gnu indent options take negative numbers (e.g. --indent-label).
Add matching for an optional single '-' before the number.

closes: #15754

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 11:18:42 +02:00
9142136161 runtime(comment): add gC mapping to (un)comment rest of line
fixes: #15727
closes: #15737

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:48:40 +02:00
8feed3a525 patch 9.1.0747: various typos in repo found
Problem:  various typos in repo found
Solution: Fix typos (zeertzjq)

closes: #15749

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:37:47 +02:00
fa117387ee patch 9.1.0746: tests: Test_halfpage_longline() fails on large terminals
Problem:  Test_halfpage_longline() fails on large terminals
          (lazypingu)
Solution: Use a window with known width (zeertzjq).

fixes: #15755
closes: #15756

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:16:18 +02:00
6db3fc5632 runtime(doc): reformat gnat example
closes: #15758

Signed-off-by: hokorobi <hokorobi.hokorobi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:10:51 +02:00
c3989f184d runtime(doc): reformat ada_standard_types section
closes: #15759

Signed-off-by: hokorobi <hokorobi.hokorobi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:08:40 +02:00
8a2aea8a62 patch 9.1.0745: filetype: bun and deno history files not recognized
Problem:  filetype: bun and deno history files not recognized
Solution: detect '.bun_repl_history' and 'deno_history.txt' as
          javascript filetype (Wu, Zhenyu)

closes: #15761

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 10:03:19 +02:00
7cd6edf2b7 runtime(glvs): Correct the tag name of glvs-autoinstal
closes: #15748

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 09:50:52 +02:00
998f018df3 runtime(doc): include short form for :earlier/:later
fixes: #15757

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 09:48:19 +02:00
1678ca36c8 runtime(doc): remove completed TODO
Completed in commit: c81dfaa69c
(Patch 9.0.1621)

closes: #15763

Signed-off-by: Ben Scuron <bscuron19@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-29 09:42:42 +02:00
1a2870b57a patch 9.1.0744: filetype: notmuch configs are not recognised
Problem:  filetype: notmuch configs are not recognised
Solution: Detect more notmuch profile configuration files
          as dosini filetype (Julio B)

Reference:
https://notmuchmail.org/doc/latest/man1/notmuch-config.html#configuration

closes: #15744

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:22:34 +02:00
06fe70c183 patch 9.1.0743: diff mode does not handle overlapping diffs correctly
Problem:  diff mode does not handle overlapping diffs correctly
Solution: correct the logic to handle overlapping blocks
          (Yukihiro Nakadaira)

Vim merges overlapped diff blocks and it doesn't work expectedly
in some situation.

closes: #15735

Signed-off-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:19:42 +02:00
c854efc6fe runtime(glvs): fix a few issues
Fix errors on #15640 that:
* led to use the wrong vim runtime directory name if using powershell or
  bash on windows.
* use a wrong pattern to detect the users runtime dir
* allow to use global variables to specify un-archive commands

closes: #15722

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:14:08 +02:00
2c41dad387 runtime(doc): Fix typo in :help :command-modifiers
closes: #15734

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:05:02 +02:00
25876a6cdd patch 9.1.0742: getcmdprompt() implementation can be improved
Problem:  getcmdprompt() implementation can be improved
Solution: Improve and simplify it (h-east)

closes: #15743

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 16:01:57 +02:00
d9af78b945 runtime(docs): update :set? command behavior table
closes: #15746

Signed-off-by: Milly <milly.ca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 15:54:43 +02:00
166f89e049 runtime(doc): update vim90 to vim91 in docs
closes: #15747

Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-26 15:52:22 +02:00
ac8a10ab76 runtime(doc): fix typo in :h dos-colors
related: #15723
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-24 16:36:37 +02:00
6908428560 patch 9.1.0741: No way to get prompt for input()/confirm()
Problem:  No way to get prompt for input()/confirm()
Solution: add getcmdprompt() function (Shougo Matsushita)
          (Shougo Matsushita)

closes: #15667

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-23 20:34:47 +02:00
770b38df40 runtime(doc): fix typo in version9.txt nrformat -> nrformats
This blocks K from finding the keyword

closes: #15726

Signed-off-by: hseg <gesh@gesh.uni.cx>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-23 20:14:54 +02:00
a7229c8a99 runtime(rmd,rrst): 'fex' option not properly restored
Add 'fex' to b:undo_ftplugin variable

closes: #15728

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-23 20:12:48 +02:00
be551dacb8 runtime(netrw): remove extraneous closing bracket
fixes: #15717
closes: #15718

Signed-off-by: Peter Aronoff <peter@aronoff.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-22 11:29:40 +02:00
f1694b439b patch 9.1.0740: incorrect internal diff with empty file
Problem:  incorrect internal diff with an empty file
Solution: Set pointer to NULL, instead of using an empty line file
          (Yukihiro Nakadaira)

When using internal diff, empty file is read as one empty line file.
So result differs from external diff.

closes: #15719

Signed-off-by: Yukihiro Nakadaira <yukihiro.nakadaira@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-22 11:26:13 +02:00
a6de28755e patch 9.1.0739: [security]: use-after-free in ex_getln.c
Problem:  [security]: use-after-free in ex_getln.c
Solution: free pointer p a bit later (John Marriott)

closes: #15712

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-21 11:39:02 +02:00
a0c14ef310 runtime(filetype): tests: Test_filetype_detection() fails
Problem:  tests: Test_filetype_detection() fails (after 9.1.0738)
Solution: Add missing filetype detect patterns for *.SYSx and *.MODx

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-21 11:23:07 +02:00
e6b01cfe01 runtime(dist): do not output a message if executable is not found
closes: #15705

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-20 22:26:56 +02:00
fdcb08264d patch 9.1.0738: filetype: rapid files are not recognized
Problem:  filetype: rapid files are not recognized
Solution: detect '*.sysx' and '*.modx' as rapid filetype
          (KnoP-01)

closes: #15669

Signed-off-by: KnoP-01 <knosowski@graeffrobotics.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-20 22:19:45 +02:00
87b65652e8 runtime(modconf): remove erroneous :endif in ftplugin
regression introduced in f86568f918

closes: #15704

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-20 21:47:19 +02:00
597aadcf21 runtime(lyrics): support multiple timestamps in syntax script
Problem:  Multiple timestamps in the same line were not highlighted
Solution: Adapt the syntax to support multiple timestamps

fixes: #15703
closes: #15707

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-20 21:41:17 +02:00
50423ab808 runtime(java): Optionally recognise _module_ import declarations
Define "g:java_syntax_previews" and include number 476 in
its list to enable this recognition:
------------------------------------------------------------
        let g:java_syntax_previews = [476]
------------------------------------------------------------

Reference:
https://openjdk.org/jeps/476

closes: #15709

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-20 21:38:21 +02:00
35699f1749 runtime(vim): Update base-syntax, improve folding function matches
- Allow function command modifiers.
- Match function bodies starting with empty lines.

Command modifiers reported by @Konfekt.

fixes #15671
closes: #15674

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 19:51:59 +02:00
e019f3626d CI: upload failed screendump tests also for Cirrus
related: #15695

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 19:48:02 +02:00
9dfe1110fd patch 9.1.0737: tests: screendump tests may require a bit more time
Problem:  Asynchronous terminal jobs occassionally require more time
          to complete and redraw the window
Solution: increase the sleep value from 10 to 50 milliseconds
          (Aliaksei Budavei)

closes: #15695

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 19:44:17 +02:00
f86568f918 runtime(misc): simplify keywordprg in various ftplugins
closes: #15696

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 19:37:38 +02:00
23079450a8 runtime(java): Optionally recognise all primitive constants in _switch-case_ labels
Define "g:java_syntax_previews" and include number 455 in
its list to enable this recognition:
------------------------------------------------------------
	let g:java_syntax_previews = [455]
------------------------------------------------------------

Reference:
https://openjdk.org/jeps/455

closes: #15698

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 18:22:58 +02:00
41c7bbaf8f runtime(zsh,sh): set and unset compiler in ftplugin
closes: #15699

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 18:19:43 +02:00
c18a9d5835 runtime(netrw): using inefficient highlight pattern for 'mf'
Fixes E872 too many '(' in highlight pattern for `mf` selection

fixup for #15551
closes: #15700

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-19 18:09:51 +02:00
4298c5f472 patch 9.1.0736: Unicode tables are outdated
Problem:  Unicode tables are outdated
Solution: Update Unicode tables to v16

closes: #15693

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-17 20:24:56 +02:00
89b9bb4ac8 patch 9.1.0735: filetype: salt files are not recognized
Problem:  filetype: salt files are not recognized
Solution: Detect '*.sls' files as filetype salt,
          include a syntax script (Gregory Anders)

closes: #15689

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-17 20:16:37 +02:00
202c467bb3 patch 9.1.0734: filetype: jinja files are not recognized
Problem:  filetype: jinja files are not recognized
Solution: detect '*.jinja' files a jinja filetype,
          include jinja syntax script (Gregory Anders)

related: #15689

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-17 20:12:47 +02:00
f21d28a5c7 runtime(zathurarc): add double-click-follow to syntax script
closes: #15688

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
2024-09-17 19:50:52 +02:00
a81813d007 translation(ru): Updated messages translation
closes: #15690
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-17 19:41:05 +02:00
3f6981d8c8 translation(it): updated xxd man page
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
2024-09-17 19:12:03 +02:00
5ca3efa5d9 translation(ru): updated xxd man page
closes: #15692

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-17 19:03:16 +02:00
7cfe693f9b patch 9.1.0733: keyword completion does not work with fuzzy
Problem:  keyword completion does not work with fuzzy
          (egesip)
Solution: handle ctrl_x_mode_normal() specifically
          (glepnir)

fixes: #15412
closes: #15424

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 20:09:42 +02:00
150227258d patch 9.1.0732: xxd: cannot use -b and -i together
Problem:  xxd: cannot use -b and -i together
          (Irgendwer)
Solution: implement the missing changes
          (Andre Chang)

fixes: #15362
closes: #15661

Signed-off-by: Andre Chang <andre@augmentcode.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 20:03:05 +02:00
5e95c8f637 runtime(java): Highlight javaConceptKind modifiers with StorageClass
Stop assigning by default the NonText highlighting group for
javaConceptKind modifiers since its colour is hardly
distinguishable from a background colour for a range of
colour schemes.

fixes #15237
related #15238
closes: #15664

Co-authored-by: Dexter Gaon-Shatford <dexter@gaonshatford.ca>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 19:53:50 +02:00
fdd1819b5f runtime(doc): reword and reformat how to use defaults.vim
closes: #15663
closes: #15668

Signed-off-by: Max Coplan <mchcopl@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 19:43:06 +02:00
59b089c9df patch 9.1.0731: inconsistent case sensitive extension matching
Problem:  inconsistent case sensitive extension matching
Solution: unify case sensitive extension matching (Evgeni Chasnovski).

There are different approaches of how extensions are matched with
respect to case sensitivity. In particular, '\c' flag is used in pattern
whereas in most places case sensitive matching is guarded behind
`has("fname_case")` condition.

Replace all instances of '\c' with an explicit case sensitive pattern
variants guarded by `has("fname_case")`. Strictly speaking, this is a
breaking change because only two (most common and prevailingly tested)
variants are now matched: upper first letter and upper all letters.

closes: #15672

Signed-off-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 19:23:25 +02:00
4d427d4cab runtime(vim): Update base-syntax, match Vim9 bool/null literal args to :if/:while/:return
Match Vim9 boolean and null literals in expression arguments of :if,
:elseif, :while and :return.

closes: #15684

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 19:21:18 +02:00
0f5effbd1f runtime(netrw): delete confirmation not strict enough
fixes: #15680

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-15 19:17:23 +02:00
59149f0269 patch 9.1.0730: Crash with cursor-screenline and narrow window
Problem:  Crash with cursor-screenline and narrow window
          (elig0n)
Solution: Don't set right_col when width2 is 0 (zeertzjq).

fixes: #15677
closes: #15678

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-14 10:40:29 +02:00
86dc4f8b43 patch 9.1.0729: Wrong cursor-screenline when resizing window
Problem:  Wrong cursor-screenline when resizing window
Solution: Invalidate saved left_col and right_col when width1 or width2
          change.

closes: #15679

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-14 10:37:17 +02:00
be4bd189d2 patch 9.1.0728: [security]: heap-use-after-free in garbage collection with location list user data
Problem:  heap-use-after-free in garbage collection with location list
          user data.
Solution: Mark user data as in use when no other window is referencing
          the location list (zeertzjq)

fixes: neovim/neovim#30371
closes: #15683

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-14 10:34:53 +02:00
d657d3d8fd runtime(doc): clarify the effect of the timeout for search()-functions
related: #15657
related: #15404

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:57:06 +02:00
fc72a2fa48 runtime(idlang): update syntax script
closes: #15419

Signed-off-by: Joe Sapp <992873+sappjw@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:46:54 +02:00
e40157641c runtime(spec): Recognize epoch when making spec changelog in ftplugin
closes: #15537

Signed-off-by: fundawang <fundawang@yeah.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:43:05 +02:00
2241f0845f runtime(spec): add file triggers to syntax script
closes: #15569

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:34:37 +02:00
95dacbb5fd patch 9.1.0727: too many strlen() calls in option.c
Problem:  too many strlen() calls in option.c
Solution: refactor the code to reduce the number of strlen() calls
          (John Marriott)

closes: #15604

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:25:14 +02:00
077d1d2cff runtime(make): add compiler/make.vim to reset compiler plugin settings
closes: #15645

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:11:28 +02:00
a9ae38dc3f runtime(java): Recognise all available standard doclet tags
* Complement the tag set with @spec, {@systemProperty},
  {@summary}, @provides, @uses, @hidden, and {@index}.
* Do not hoard all tags under a single highlighting group.
* Skip over nested balanced braces in inline tags.
* Observe that tag names are case sensitive: both {@docRoot}
  and {@inheritDoc} are valid, whereas {@inheritdoc} and
  {@docroot} are not.
* In the @see tag arguments, allow for:
  - module name prefixes (e.g. java.base/java.lang.String);
  - references to arbitrary URI fragments (e.g. ##foo);
  - matching any tag variation arguments on the next line.
* Test directives and tags for Java module declarations.
* Enforce the word end for "module-info" candidates.

References:
https://bugs.openjdk.org/browse/JDK-8226279 (@spec)
https://bugs.openjdk.org/browse/JDK-8214559 ({@systemProperty})
https://bugs.openjdk.org/browse/JDK-8173425 ({@summary})
https://bugs.openjdk.org/browse/JDK-8160196 (@provides & @uses)
https://bugs.openjdk.org/browse/JDK-8073100 (@hidden)
https://bugs.openjdk.org/browse/JDK-8044243 ({@index})
https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html
https://github.com/openjdk/jdk/blob/jdk-21-ga/src/jdk.compiler/share/classes/com/sun/source/doctree/DocTree.java

closes: #15652

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 21:00:33 +02:00
508403687d patch 9.1.0726: not using correct python3 API with dynamic linking
Problem:  not using correct python3 API with dynamic linking
Solution: Use stable IncRef / DecRef in Python 3 dynamic bindings
          (Yee Cheng Chin)

Previously, we were using the Py_DECREF macros even when using dynamic
linking of Python 3. This caused issues because Python's headers contain
references to internal APIs like `_Py_Dealloc` and in v8.1.2201 and
v8.2.1225 we simply hacked around the issue by manually copying the
Python header implementation to Vim and linking in the private APIs.
This is fragile and prone to break. In fact, the Py_DECREF
implementation is different in newer versions of Python meaning that
this could potentially cause memory issues.

Instead, simply use the API versions (`Py_DECREF` and `Py_INCREF`) which
are functions exposed by the Python library. They could be slightly
slower since they require a function call instead of a macro, but are
much more reliable and we should only be calling these when the Python
Vim plugins are crossing the language boundary anyway which are always
going to be slow.

Note that this only affects dynamically linked Python builds that are
not using stable ABI.

Also see #15648

closes: #15653

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 20:56:13 +02:00
c0982f9f79 runtime(dosini): Update syntax script, spellcheck comments only
By default spell checking is enabled for all text, but adding
`contains=@Spell` to syntax rules restricts spell checking to those
syntax rules.  See `:help spell-syntax` for full details.

Variable names and headers are far more likely than comments to contain
spelling errors, so only enable spell checking in comments.

Introduced in https://github.com/xuhdev/syntax-dosini.vim/pull/8

cc @tobinjt

closes: #15655

Signed-off-by: John Tobin <johntobin@johntobin.ie>
Signed-off-by: Hong Xu <hong@topbug.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 20:52:15 +02:00
26e4b00002 runtime(doc): Revert outdated comment in completeopt's fuzzy documentation
Originally, `:set completeopt+=fuzzy` did not affect how the candidate
list is collected in default keyword completion. A comment was added to
documentation as part of #14912 to clarify it. #15193 later changed the
fuzzy behavior to now change the candidate collection behavior as well
so the clarification in docs is now wrong. Remove them here.

closes: #15656

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 20:50:08 +02:00
03cac4b70d patch 9.1.0725: filetype: swiftinterface files are not recognized
Problem:  filetype: swiftinterface files are not recognized
Solution: Detect '*.swiftinterface' files as swift filetype
          (LosFarmosCTL)

closes: #15658

Signed-off-by: LosFarmosCTL <80157503+LosFarmosCTL@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-10 20:44:59 +02:00
d30ffdca49 runtime(pandoc): Update compiler plugin to use actual 'spelllang'
Previously these would be cached in buffer-local variables and
would not change on :compiler pandoc

closes: #15642

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-09 20:27:15 +02:00
7cc0e9145d runtime(groff): Add compiler plugin for groff
Groff MOM (Macros for Manuscripts) is a macro package for the GNU
troff (groff) typesetting system, a light-weight alternative
to LaTeX for professional-quality documents.

closes: #15646

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-09 20:10:02 +02:00
c2285a8cf3 patch 9.1.0724: if_python: link error with python 3.13 and stable ABI
Problem:  if_python: link error with python 3.13 and stable ABI
          (zdohnal)
Solution: Use the correct stable APIs Py_IncRef and Py_DecRef instead
          (Yee Cheng Chin)

This fixes #15460 properly. There was an attempt to fix it in v9.1.0668,
but it did it by manually copy and pasting definitions from Python 3.13
headers, which is problematic as it makes Vim dependent on low-level
implementation details which are subject to change. That change also
pulls in dependencies to private APIs (`_Py_IncRef`) which is a very bad
idea as the next version of Python could very well remove that.

The core issue was simply that `Py_INCREF` and similar functions are not
part of the stable API. We are supposed to be using `Py_IncRef` instead
which performs null-check (similar to `Py_XINCREF`) and is available as
a linkable function. We simply need to call it instead of the macro.
We simply remap `Py_INCREF` (and friends) to the function version in
stable API similar to how we mapped other functions.

related #15460
closes: #15648

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-09 19:55:24 +02:00
97a5be4687 patch 9.1.0723: if_python: dynamic linking fails with python3 >= 3.13
Problem:  if_python: dynamic linking fails with python3 >= 3.13
          when using non-stable ABI (zdohnal)
Solution: do not try to import the privat python symbol
          _PyObject_NextNotImplemented
          (Yee Cheng Chin)

Vim is importing a private Python symbol `_PyObject_NextNotImplemented`
because it used to be required as part of the `PyIter_Check()` macro in
an abstraction breaking way. Python eventually fixed the issue and in
3.13 it removed the private symbol export, which broke Vim. Simply
remove importing this private symbol in newer Python versions as it's no
longer needed for PyIter_Check to work.

fixes: #15457
closes: #15649

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-09 19:46:17 +02:00
701c863e68 patch 9.1.0722: crash with large id in text_prop interface
Problem:  crash with large id in text_prop interface
          prop_add()/prop_add_list() (cposture)
Solution: Error out if the id is > INT_MAX or <= INT_MIN

fixes: #15637
closes: #15638

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-08 20:05:23 +02:00
5b9237c2e7 patch 9.1.0721: tests: test_mksession does not consider XDG_CONFIG_HOME
Problem:  tests: test_mksession does not consider XDG_CONFIG_HOME
Solution: allow to match $HOME/.vim/ and $HOME/.config/vim for &viewdir
          (John M Devin)

closes: #15639

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-08 20:00:38 +02:00
609599cc45 runtime(glvs): update GetLatestVimScripts plugin
GetLatestVimScripts builtin plugin required several fixes:
* Support for the new vimbal `.vmb` extension introduced in
  [patch 9.0.1797](f97f6bbf56):
  Vimball/Visual Basic filetype detection conflict
* Update the urls from the old `sourceforge.net` to `vim.org`.
  The download url was hardcoded and a new variable is introduced.
* Fix `curl` command line option to set a filename (`-O` uses the remote
  filename and `-o` specifies a filename).
* Replace windows' command to move files. `REN` can only rename files and
  the script actually moves them. My educated guess was that originally
  only renaming was necessary. When the script was modified to move
  files no change was required on linux because `mv` does both.
* Fix Autoinstall support to check `ftplugins` and `pack-plugins` too
  (`pack-plugins` did not exist when the plugin was created).

closes: #15640

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-08 19:54:43 +02:00
0b2285c96b runtime(doc): Fix typo in :help :hide text
closes: #15644

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-08 19:39:20 +02:00
b584117b05 runtime(doc): buffers can be re-used
while at it, also move the note about :wincmd
directly to :h :wincmd, it doesn't seem to belong to the buffer section.

closes: #15636

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-07 17:37:52 +02:00
61a6ac4d00 patch 9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs
Problem:  Wrong breakindentopt=list:-1 with multibyte chars or TABs in
          text matched by 'formatlistpat' (John M Devin)
Solution: Use the width of the match text (zeertzjq)

fixes: #15634
closes: #15635

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-07 11:23:54 +02:00
66f65a46c5 patch 9.1.0719: Resetting cell widths can make 'listchars' or 'fillchars' invalid
Problem:  Resetting cell widths can make 'listchars' or 'fillchars'
          invalid.
Solution: Check for conflicts when resetting cell widths (zeertzjq).

closes: #15629

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-06 16:24:41 +02:00
82f6134b1b runtime(doc): Update version9.txt and mention $MYVIMDIR
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-05 18:21:56 +02:00
4e7249a916 patch 9.1.0718: hard to know the users personal Vim Runtime Directory
Problem:  hard to guess the Vim Runtime Directory
Solution: Set the $MYVIMDIR environment variable to the users
          personal runtime directory (e.g. ~/.vim on Linux)

closes: #15576

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-05 17:46:19 +02:00
f7b8609446 patch 9.1.0717: Unnecessary nextcmd NULL checks in parse_command_modifiers()
Problem:  Unnecessary nextcmd NULL checks in parse_command_modifiers().
Solution: Remove them (zeertzjq)

Every place parse_command_modifiers() is called, nextcmd is NULL, and
after it's set to non-NULL the function returns very soon.
Even if one day nextcmd may be non-NULL, the NULL checks may still be
wrong as the correct behavior may be overriding nextcmd.

closes: #15620

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-05 17:26:30 +02:00
233252fdf2 Maintainers: fix typo in author name
closes: #15626

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-05 17:23:17 +02:00
539e9b571a patch 9.1.0716: resetting setcellwidth() doesn't update the screen
Problem:  resetting setcellwidth() doesn't update the screen
Solution: Redraw after clearing the cellwidth table (Ken Takata)

closes: #15628

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-05 17:19:34 +02:00
150b5078ac runtime(hcl,terraform): Add runtime files for HCL and Terraform
closes: #15618

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-04 22:19:45 +02:00
315b6f7b73 runtime(tmux): Update syntax script
closes: ericpruitt/tmux.vim#25
closes: #15622

Signed-off-by: Eric Pruitt <eric.pruitt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-04 22:15:40 +02:00
fa16e4351a patch 9.1.0715: Not correctly parsing color names (after v9.1.0709)
Problem:  Not correctly parsing color names (chdiza, after v9.1.0709)
Solution: Revert part of the patch that compares the color names and
          fall-back to the macro STRICMP

fixes: #15617
closes: #15619

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-04 22:10:34 +02:00
eccc92792a patch 9.1.0714: tests: GuiEnter_Turkish test may fail
Problem:  tests: GuiEnter_Turkish test may fail
Solution: the message will be translated if the Turkish message file is
          installed. Use gettext() to get the expected message
          (Ken Takata)

closes: #15615

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-03 23:01:55 +02:00
2432b4a753 patch 9.1.0713: Newline causes E749 in Ex mode
Problem:  Newline causes E749 in Ex mode (after 9.1.0573).
Solution: Don't execute empty command followed by a newline.

closes: #15614

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-03 22:58:30 +02:00
3db32d2e7f patch 9.1.0712: tests: missing dependency of Test_gettext_makefile
Problem:  tests: missing dependency of Test_gettext_makefile
Solution: Check that xgettext binary is available, else skip the test
          (James McCoy)

closes: #15612

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-03 22:50:38 +02:00
06ed634db1 patch 9.1.0711: tests: test_xxd may file when using different xxd
Problem:  tests: test_xxd may file when using different xxd
Solution: Make Test_xxd_color_0 agnostic to xxd's path, similar to
          Test_xxd_color_1 by filtering out shell command prompt in
          screen dump file (James McCoy)

If an alternative xxd path is provided, e.g., the system installed xxd,
then the screen dump fails due to the difference in path.

From test_xxd.vim:
Found errors in Test_xxd_color2():
Run 1, 15:17:03 - 15:17:04:
command line..script /tmp/autopkgtest-lxc.1auv5tlk/downtmp/autopkgtest_tmp/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_xxd_color2[36]..VerifyScreenDump line 67: See dump file difference: call term_dumpdiff("testdir/failed/Test_xxd_color_0.dump", "testdir/dumps/Test_xxd_color_0.dump"); difference in line 1: "|$+0&#ffffff0| |/|u|s|r|/|b|i|n|/|x@1|d| |-|R| |n|e|v|e|r| @1|<| |X@1|D|f|i|l|e|_|c|o|l|o|r|s| @33"

related: #15612

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-03 22:46:31 +02:00
f00f4d9cce patch 9.1.0710: popup window may hide part of Command line
Problem:  when a popup window covers the command line,
          the command line is not completely cleared on popup_hide()
          (yu3s)
Solution: Check if the popup window covers the command line and if it
          does, set the clear_cmdline flag.

fixes: #15608
closes: #15610

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-03 18:20:13 +02:00
3c07eb0c67 runtime(vim): Update syntax, improve user-command matching
- Match -addr and -keepscript attributes and generate -addr values.
- Match attribute errors where = is specified.
- Highlight attributes with Special like other Ex command options.
- Don't highlight user-specified completion function args.
- Match :delcommand -buffer attribute.

closes: #15586

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-02 10:03:37 +02:00
84e3175c4e patch 9.1.0709: GUIEnter event not found in Turkish locale
Problem:   GUIEnter not found in Turkish locale
           (James McCoy, after v9.1.0256, the issue was there before,
            but v9.1.0256 made it more apparent)
Solution:  explicitly compare autocommand events by ASCII value and
           ignoring locale, because according to the documentation,
           events are case insensitive (:h autocommand-events)

fixes: #15574
closes: #15603

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-02 09:59:18 +02:00
bd69b39514 runtime(sudoers): improve recognized Runas_Spec and Tag_Spec items
Recognize colon-delimited second part of Runas_Spec that specifies
permitted groups, e.g.:

    alan ALL = (root, bin : operator, system) ALL

This implementation is sloppy because it accepts any amount of colons
delimiting further Runas_Lists, but for now that's better than bailing
out completely as soon as a colon is encountered (esp. given that the
default sudoers uses these colons, breaking highlighting OOTB).

Also, while at it, make Vim recognize all Tag_Spec items, not just
{,NO}PASSWD

closes: #15607

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-02 09:55:00 +02:00
3d5065fc75 patch 9.1.0708: Recursive window update does not account for reset skipcol
Problem:  Window is updated with potentially invalid skipcol in recursive
          window update path. I.e. cursor outside of visible range in
          large line that does not fit.
Solution: Make sure it is valid (Luuk van Baal).

closes: #15605

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-09-01 10:33:56 +02:00
9abd02d16a runtime(nu): include filetype plugin
This is used to set the commentstring option.

closes: #15601

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Marc Jakobi <marc.jakobi@tiko.energy>
2024-09-01 09:21:16 +02:00
396fd1ec29 patch 9.1.0707: [security]: invalid cursor position may cause a crash
Problem:  [security]: invalid cursor position may cause a crash
          (after v9.1.0038)
Solution: Set cursor to the last character in a line, if it would
          otherwise point to beyond the line; no tests added, as it
          is unclear how to reproduce this.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-4ghr-c62x-cqfh

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 17:58:16 +02:00
75ba87ba62 patch 9.1.0706: tests: test_gettext fails when using shadow dir
Problem:  tests: test_gettext fails when using shadow dir
Solution: Link the ru_RU directory into the shadow testdir
          (James McCoy)

Link the ru_RU directory into shadow testdir

When the ru_RU locale is present, but the build is using a shadowdir,
then test_gettext_cp1251.vim and test_gettext_utf8.vim fail:

    From test_gettext_cp1251.vim:
    Executed Test_gettext()                            in   0.000848 seconds
    Executed 1 test                          in   0.007010 seconds
    1 FAILED:
    Found errors in Test_gettext():
    command line..script /home/runner/work/vim/vim/src/shadow/testdir/runtest.vim[607]..function RunTheTest[57]..Test_gettext line 9: Expected '������: ' but got 'ERROR: '

    From test_gettext_utf8.vim:
    Executed Test_gettext()                            in   0.000908 seconds
    Executed 1 test                          in   0.007339 seconds
    1 FAILED:
    Found errors in Test_gettext():
    command line..script /home/runner/work/vim/vim/src/shadow/testdir/runtest.vim[607]..function RunTheTest[57]..Test_gettext line 9: Expected '������: ' but got 'ERROR: '

This is because it's unable to load the translations from the ru_RU test
directory, since it wasn't symlinked into the shadow directory.

closes: #15591

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 17:15:08 +02:00
4e527a2d55 CI: Install locales-all package
The test_gettext* files need specific locales available to exercise
their tests.

related: #15591

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 17:15:03 +02:00
58d705238c patch 9.1.0705: Sorting of fuzzy filename completion is not stable
Problem:  Sorting of fuzzy filename completion is not stable
Solution: Compare indexes when scores are equal.  Fix some typos.
          (zeertzjq)

closes: #15593

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 17:05:39 +02:00
41ba26566f translation(pt): update Portuguese/Brazilian menu translation
closes: #15592

Signed-off-by: JNylson <nylsinho_ba@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 17:04:01 +02:00
d817609b87 runtime(vim): Update base-syntax, match bracket mark ranges
Match '(,'),'[,'],'{, and '} marks in Ex command ranges.

Thanks to Maxim Kim.

Fixes #15332.
Closes #15337.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 16:57:32 +02:00
e2c4e07795 runtime(doc): Update :help :command-complete list
closes: #15602

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2024-08-31 16:44:14 +02:00
09b80d23cf patch 9.1.0704: inserting with a count is inefficient
Problem:  inserting with a count is inefficient
Solution: Disable calculation of the cursor position and topline, if a
          count has been used (Ken Takata)

Optimize insertion when using :normal 10000ix.

This patch optimizes the insertion with a large count (e.g. `:normal
10000ix`).

It seems that calculation of the cursor position for a long line is slow
and it takes O(n^2). Disable the calculation if not needed.

Before:
```
$ time ./vim --clean -c 'normal 10000ix' -cq!
real    0m1.879s
user    0m1.328s
sys     0m0.139s

$ time ./vim --clean -c 'normal 20000ix' -cq!
real    0m5.574s
user    0m5.421s
sys     0m0.093s

$ time ./vim --clean -c 'normal 40000ix' -cq!
real    0m23.588s
user    0m23.187s
sys     0m0.140s
```

After:
```
$ time ./vim --clean -c 'normal 10000ix' -cq!
real    0m0.187s
user    0m0.046s
sys     0m0.093s

$ time ./vim --clean -c 'normal 20000ix' -cq!
real    0m0.217s
user    0m0.046s
sys     0m0.108s

$ time ./vim --clean -c 'normal 40000ix' -cq!
real    0m0.278s
user    0m0.093s
sys     0m0.140s

$ time ./vim --clean -c 'normal 80000ix' -cq!
real    0m0.494s
user    0m0.311s
sys     0m0.140s

$ time ./vim --clean -c 'normal 160000ix' -cq!
real    0m1.302s
user    0m1.140s
sys     0m0.094s
```

closes: #15588

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-31 16:35:06 +02:00
7c8bbc6d28 runtime(doc): use mkdir -p to save a command
closes: #15599

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ughur Alakbarov <58857108+ugur-a@users.noreply.github.com>
2024-08-31 16:12:39 +02:00
c9bfed2fda patch 9.1.0703: crash with 2byte encoding and glob2regpat()
Problem:  possible crash with 2-byte encoding and glob2regpat()
          (after v9.1.0700, v9.1.0702)
Solution: include both bytes for a multi-byte character for an
          escaped character

closes: #15590

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-29 22:15:03 +02:00
87c01d9561 runtime(hollywood): update syn highlight for If-Then statements and For-In-Loops
Improving syntax highlighting by allowing numbers, - and a $ as suffix
in user constants and by allowing hwConstants in If-Then statements

closes: #15059

Signed-off-by: Tom Crecelius <holly@net-eclipse.net>
Signed-off-by: Ola Söder <rolfkopman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-29 22:09:49 +02:00
f459d68ecf patch 9.1.0702: Patch 9.1.0700 broke CI
Problem:  Patch 9.1.0700 broke CI
Solution: Revert for now

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-28 23:46:53 +02:00
c3a02d78bd patch 9.1.0701: crash with NFA regex engine when searching for composing chars
Problem:  crash with NFA regex engine when searching for composing chars
          (SuyueGuo)
Solution: When there is no composing character, break out of the loop
          and check that out1 state is not null

fixes: #15583

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-28 23:17:52 +02:00
1c815b54bb patch 9.1.0700: crash with 2byte encoding and glob2regpat()
Problem:  possible crash with 2byte encoding and glob2regpat()
Solution: Skip over character, if it is multi-byte character

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-28 22:08:35 +02:00
f8702aeb8f patch 9.1.0699: "dvgo" is not always an inclusive motion
Problem:  "dvgo" is not always an inclusive motion
          (Iain King-Speir)
Solution: initialize the inclusive flag to false

fixes: #15580
closes: #15582

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-28 20:39:24 +02:00
8556e23ee9 runtime(java): Provide support for syntax preview features
Introduce a new API variable "g:java_syntax_previews" whose
value must be a list of syntax preview feature numbers.

Enumerate the currently supported numbers in a table at the
end of the documentation entry for "ft-java-syntax".

Also, disable the recognition of String Templates.  Despite
the withdrawal of this preview feature in its proposed form
from the upcoming JDK 23 release and the fact that the JDK
22 release is coming to EOL this September, an earlier
iteration of this preview feature was included in JDK 21
(LTS) whose EOL is projected to fall due in late 2028 and,
therefore, retain the current implementation.

Define "g:java_syntax_previews" and include number 430 in
its list to enable the recognition of String Templates:
------------------------------------------------------------
	let g:java_syntax_previews = [430]
------------------------------------------------------------

References:
https://openjdk.org/jeps/430 (Preview)
https://openjdk.org/jeps/459 (Second Preview)
https://openjdk.org/jeps/465 (Third Preview)
https://mail.openjdk.org/pipermail/amber-spec-experts/2024-April/004106.html

closes: #15579

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-27 22:32:13 +02:00
d56c451e1c patch 9.1.0698: tests: "Untitled" file not removed when running Test_crash1_3 alone
Problem:  tests: "Untitled" file not removed when running Test_crash1_3 alone
          with TEST_FILTER (after v9.1.0695)
Solution: Use a TearDown function instead of another test.
          (zeertzjq)

closes: #15578
closes: #15577

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-26 18:45:37 +02:00
322ba91086 patch 9.1.0697: [security]: heap-buffer-overflow in ins_typebuf
Problem:  heap-buffer-overflow in ins_typebuf
          (SuyueGuo)
Solution: When flushing the typeahead buffer, validate that there
          is enough space left

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-4ghr-c62x-cqfh

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-25 21:33:03 +02:00
663950d700 patch 9.1.0696: installing runtime files fails when using SHADOWDIR
Problem:  installing runtime files fails when using SHADOWDIR
Solution: revert part of v9.1.0609, since runtime/doc/Makefile's default
          value for VIMPROG does not work if vim was built in a SHADOWDIR.
          (James McCoy)

closes: #15575

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-25 20:22:11 +02:00
88a6dd036a runtime(doc): fix typo
closes: #15572

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-25 15:49:54 +02:00
cd83173def patch 9.1.0695: tests: test_crash leaves Untitled file around
Problem:  tests: test_crash leaves Untitled file around
Solution: cleanup at the end of the test_crash.vim test file

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-24 17:34:19 +02:00
a68e34c993 translation(br): Update Brazilian translation
The previous patch 18de7adaf4 somehow wasn't correctly applied and
broke the check script

related: #15558

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: JNylson <nylsinho_ba@hotmail.com>
2024-08-24 16:54:03 +02:00
377ad8c71f translation(pt): Update menu_pt_br
closes: #15566

Signed-off-by: JNylson <nylsinho_ba@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-24 16:35:33 +02:00
81e7513c86 patch 9.1.0694: matchparen is slow on a long line
Problem:  The matchparen plugin is slow on a long line.
Solution: Don't use a regexp to get char at and before cursor.
          (zeertzjq)

Example:

```vim
  call setline(1, repeat(' foobar', 100000))
  runtime plugin/matchparen.vim
  normal! $hhhhhhhh
```

closes: #15568

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-24 16:32:24 +02:00
dc2c75c6b5 patch 9.1.0693: Configure doesn't show result when not using python3 stable abi
Problem:  Configure doesn't show result when not using python3 stable
          abi (after v9.1.0691)
Solution: Add back AC_MSG_RESULT() (Ken Takata)

related: #15555

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-24 16:27:50 +02:00
d1c8d2de4b patch 9.1.0692: Wrong patlen value in ex_substitute()
Problem:  Wrong patlen value in ex_substitute() (after 9.1.0426).
Solution: Compute patlen after finding end separator.
          (zeertzjq)

Add a more explicit test.  The test already passes as the only case
where a overlarge patlen value matters was fixed by patch 9.1.0689.

closes: #15565

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-24 11:33:39 +02:00
3f7024cf86 patch 9.1.0691: python3: stable-abi may cause segfault on Python 3.11
Problem:  python3: stable-abi may cause segfault on Python 3.11
          (Audrius Kažukauskas, after v9.1.0668)
Solution: do not enable the stable Python ABI by default, only when used
          with --with-python3-stable-abi argument is given

related: #15543

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:39:08 +02:00
7866d54ecc runtime(vim): Update base-syntax, match :loadkeymap after colon and bar
Match :loadkeymap after Ex colons and bars.

Don't generate :loadkeymap as it is matched with a custom syntax group.

closes: #15554

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:37:55 +02:00
5d1c551057 runtime(mane): Improve <Plug>ManBS mapping
related: #15547 and #15538
closes: #15556

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:36:08 +02:00
38f99a1f0d patch 9.1.0690: cannot set special highlight kind in popupmenu
Problem:  cannot set special highlight kind in popupmenu
Solution: add kind_hlgroup item to complete function
          (glepnir)

closes: #15561

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:31:06 +02:00
56186e41db translation(pt): Revert and fix wrong Portuguese menu translation files
In #14674, the Brazilian and Portuguese localization files were
erroneously combined, even though those are separate locales. This
reverts that change, but maintains some of the original typo fixes in
it.

closes: #15557
related: #14674

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:12:05 +02:00
79b5fc5697 translation(pt): revert Portuguese menu translation
This reverts commit d88a39e0d6.

related: #14674
related: #15557

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
2024-08-23 18:09:47 +02:00
18de7adaf4 translation(br): Update Brazilian translations
closes: #15558

Signed-off-by: JNylson <nylsinho_ba@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:06:34 +02:00
7884cc7418 runtime(vim): Update base-syntax, improve :let-heredoc highlighting
The end marker is not required to match the indent of :let when "trim"
is specified, it may also appear without leading whitespace as normal.

closes: #15564

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-23 18:01:35 +02:00
cacb6693c1 patch 9.1.0689: [security]: buffer-overflow in do_search() with 'rightleft'
Problem:  buffer-overflow in do_search() with 'rightleft'
          (SuyueGuo)
Solution: after reversing the text (which allocates a new buffer),
          re-calculate the text length

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-v2x2-cjcg-f9jm

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:40:14 +02:00
95e90781a4 runtime(vim): Improve heredoc handling for all embedded scripts
* Improve heredoc handling
  - Support "trim" for all the embedded scripts.
  - Check the indent of "trim" for "let" and all the embedded scripts.
* Update missing part of vim.vim.base in the commit
  d164f2a521.
* Update gen_syntax_vim.vim to catch up with 9.1.0685's source code.

closes: #15542

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:29:39 +02:00
25618fc9ea patch 9.1.0688: Vim9: dereferences NULL pointer in check_type_is_value()
Problem:  Vim9: dereferences NULL pointer in check_type_is_value()
          (Suyue Guo)
Solution: Verify that the pointer is not Null

fixes: #15540
closes: #15545

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:25:18 +02:00
dabf07e458 patch 9.1.0687: Makefile may not install desktop files
Problem:  Makefile may not install desktop files
Solution: Check for "$(DESTDIR)$(DATADIR)" instead of just "$DESTDIR",
          which is usually not defined, add uninstall rules for the
          icons and the desktop files

closes: #15528
fixes: #15546

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:20:15 +02:00
1c4f40213b runtime(man): Fix <Plug>ManBS
This change does 2 things:
- make sure the mapping <Plug>ManBS sets the buffer to modified
  to avoid a potential error message
- remove commented q mapping

fixes #15538
closes: #15547

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:17:19 +02:00
2750b83fa1 runtime(java): Make the bundled &foldtext function optional
- Obtain and pass through translated messages with this
  function.
- If "g:java_foldtext_show_first_or_second_line" is defined,
  assign this function to &foldtext.

closes: #15549

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:09:32 +02:00
c75dad0177 runtime(netrw): Change line on mx if command output exists
closes: #15550

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 21:06:32 +02:00
38cfa2b662 runtime(netrw): Fix mf-selected entry highlighting
closes: #15551

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 20:54:47 +02:00
0e9fd7755d runtime(htmlangular): add html syntax highlighting
fixes: #15459
closes: #15552

Signed-off-by: Dennis van den Berg <dennis.vandenberg@nedap.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-22 20:50:11 +02:00
4a0dc29e5f translation(it): Fix filemode of Italian manpages
closes: #15544

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-21 19:57:21 +02:00
fd01eb21e5 runtime(doc): Update outdated man.vim plugin information
closes: #15536

Signed-off-by: John M Devin <john.m.devin@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-21 13:26:37 +02:00
bc29ea6286 runtime(zip): simplify condition to detect MS-Windows
related: #15519

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-21 08:20:13 +02:00
7790ea0c68 patch 9.1.0686: zip-plugin has problems with special characters
Problem:  zip-plugin has problems with special characters
          (user202729)
Solution: escape '*?[\' on Unix and handle those chars
          a bit differently on MS-Windows, add a test, check
          before overwriting files

runtime(zip): small fixes for zip plugin

This does the following:
- verify the unzip plugin is executable when loading the autoload plugin
- handle extracting file names with '[*?\' in its name correctly by
  escaping those characters for the unzip command (and handle those
  characters a bit differently on MS-Windows, since the quoting is different)
- verify, that the extract plugin is not overwriting a file (could cause
  a hang, because unzip asking for confirmation)
- add a test zip file which contains those special file names

fixes: #15505
closes: #15519

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 22:41:52 +02:00
5f5f2832f5 runtime(pandoc): escape quotes in &errorformat for pandoc
closes: #15535

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 21:57:54 +02:00
9beccaf779 translation(it): updated Italian manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 21:12:37 +02:00
9e795852f3 patch 9.1.0685: too many strlen() calls in usercmd.c
Problem:  too many strlen() calls in usercmd.c
Solution: refactor code to reduce the number or strlen() calls
          (John Marriott)

closes: #15516

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 20:57:23 +02:00
e44e64492c runtime(doc): fix grammar in :h :keeppatterns
- It's clear that :s and :& are Ex commands, so remove "command" along
  with the duplicate "the".
- Use "or" instead of "and" following "without".

closes: #15527

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
2024-08-20 20:20:43 +02:00
d55e698fa0 runtime(pandoc): refine pandoc compiler settings
closes: #15529

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
2024-08-20 20:18:28 +02:00
753794bae8 patch 9.1.0684: completion is inserted on Enter with "noselect"
Problem:  completion is inserted on Enter with "noselect"
          (Carman Fu)
Solution: check noselect before update compl_shown_match
          (glepnir)

fixes: #15526
closes: #15530

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 19:58:44 +02:00
12333bae01 translation(ru): update man pages
closes: #15532

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 19:57:00 +02:00
0fd1cb1b1f patch 9.1.0683: mode() returns wrong value with <Cmd> mapping
Problem:  mode() returns wrong value with <Cmd> mapping
Solution: Change decision priority of VIsual_active and move
          visual mode a bit further down (kuuote)

closes: #15533

Signed-off-by: kuuote <znmxodq1@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-20 19:53:17 +02:00
3840d2feaf runtime(doc): remove trailing whitespace in cmdline.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-19 21:49:41 +02:00
cb90ea9cba patch 9.1.0682: Vim9: Segfault with uninitialized funcref
Problem:  Vim9: Segfault with uninitialized funcref
          (Daniel Viberg)
Solution: Check the Funcref for being Null before trying to access it
          (Ernie Rael)

fixes: #15523

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-19 21:47:35 +02:00
6bff6a2fa4 patch 9.1.0681: tests: Analyzing failed screendumps is hard
Problem:  tests: Analyzing failed screendumps is hard
Solution: Facilitate the viewing of rendered screendumps under src/
          add some documentation on how to use the viewdumps.vim
          script (Aliaksei Budavei)

With the submitted "viewdumps.vim" script, a few manual
steps in typical workflows (see below) can be automated.
The updated "README.txt" contains additional information.

============================================================

Reviewing LOCAL failed screendump tests can be arranged as
follows:

1) Run tests and generate screendumps:
------------------------------------------------------------
cd /path/to/fork/src/testdir
make
------------------------------------------------------------

2) Examine the screendumps from the "failed" directory:
------------------------------------------------------------
../vim -u NONE -S viewdumps.vim
------------------------------------------------------------

============================================================

Reviewing UPLOADED failed screendump tests can be arranged
as follows (it can be further locally scripted):

1) Fetch an artifact with failed screendumps from
"github.com/vim/vim/actions/runs/A_ID/artifacts/B_ID".

2) Extract the archived files:
------------------------------------------------------------
unzip /tmp/failed-tests.zip -d /tmp
------------------------------------------------------------

3) Set up the "dumps" directory.  Create a symlink to
"/path/to/fork/dirs/dumps" in the extracted directories so
that term_dumpdiff() can be used.  (The lookup algorithm
resolves "dumps" for every loaded filename.  So, with
"/tmp/src/testdir/failed/*.dump" files passed as script
arguments, the algorithm will make the files in
"/tmp/src/testdir/dumps" queried.)
------------------------------------------------------------
cd /path/to/fork
ln -s $(pwd)/src/testdir/dumps /tmp/src/testdir/dumps
------------------------------------------------------------

4) Examine the extracted screendumps:
------------------------------------------------------------
./src/vim -u NONE -S src/testdir/viewdumps.vim \
  /tmp/src/testdir/failed/*.dump
------------------------------------------------------------

5) Clean up:
------------------------------------------------------------
unlink /tmp/src/testdir/dumps
rm -rf /tmp/src
------------------------------------------------------------

============================================================

Reviewing SUBMITTED FOR PULL REQUEST screendump tests can be
arranged as follows (it can be further locally scripted):

1) List the fetched changeset and write the changed "dumps"
filenames to "/tmp/filelist":
------------------------------------------------------------
cd /path/to/fork
git switch prs/1234
git diff-index --relative=src/testdir/dumps/ \
  --name-only prs/1234~1 > /tmp/filelist
------------------------------------------------------------

2) Reconcile relative filepaths, and copy next-to-be-updated
"dumps" files in the "failed" directory (note the missing
new screendumps, if any):
------------------------------------------------------------
git switch master
cd src/testdir/dumps
test -d ../failed || mkdir ../failed
cp -t ../failed $(cat /tmp/filelist)
------------------------------------------------------------

3) Remember about the introduced INVERTED relation between
"dumps" and "failed", i.e. the files to be committed are in
"dumps" already and their previous versions are in "failed";
therefore, copy the missing new screendumps from "dumps" to
"failed" (otherwise these won't be shown):
------------------------------------------------------------
git switch prs/1234
cp -t ../failed foo_10.dump foo_11.dump foo_12.dump
------------------------------------------------------------

4) Examine the screendumps from the "failed" directory (new
screendumps will be shown with no difference between their
versions):
------------------------------------------------------------
cd ..
../vim -u NONE -S viewdumps.vim
------------------------------------------------------------

closes: #15515

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-19 21:33:26 +02:00
175a87c7f1 runtime(doc): more clarification for the :keeppatterns needed
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-19 21:23:38 +02:00
10231ac638 patch 9.1.0680: VMS does not have defined uintptr_t
Problem:  VMS does not have defined uintptr_t
Solution: Add type definitions (Zoltan Arpadffy)

closes: #15520

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-18 16:59:20 +02:00
890f97ce57 runtime(doc): improve typedchar documentation for KeyInputPre autocmd
closes: #15521

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-08-18 16:57:04 +02:00
8e25d91cb7 runtime(dist): verify that executable is in $PATH
Otherwise, if the executable to be verified does not exist,
this would cause a false-positive in the 'IsSafeExecutable()' check,
because 'exepath(executable)' returns an empty string and
'fnamemodify('', ':p:h')' returns the current directory and as a result
the 'IsSafeExecutable()' returns false (for the wrong reason).

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-17 21:00:55 +02:00
a4aa97590b translation(it): update Italian manpages
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-17 15:14:43 +02:00
cba93cab53 runtime(doc): clarify the effect of :keeppatterns after v9.1.0677
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:37:08 +02:00
9b7d55ee26 runtime(doc): update Makefile and make it portable between GNU and BSD
by removing the non-portable GNU variable and using $? instead
Note: this only works for rules with single dependencies.

closes: #15493

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:13:50 +02:00
bc11f6d9d4 patch 9.1.0679: Rename from w_closing to w_locked is incomplete
Problem:  Rename from w_closing to w_locked is incomplete
          (after 9.1.0678).
Solution: Rename remaining occurrences of w_closing to w_locked and
          update comments (zeertzjq).

closes: #15504

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:11:31 +02:00
6908db4756 runtime(colors): update colorschemes
- all: PMenuMatch and PMenuMatchSel for 8c/16c
- habamax:
    - revert VertSplit to solid background color
    - remove gitCommitSummary link to Title
    - make TabLineFill same as StatuslineNC

closes: #15506

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:09:50 +02:00
d164f2a521 runtime(vim): Update base-syntax, improve :let-heredoc highlighting
The end marker must appear on line of its own without any trailing
whitespace.

Whitespace is incorrectly allowed before all end markers.  Limiting this
only to heredocs where "trim" was specified, and with the correct
indent, is currently an intractable problem given that contained syntax
groups (in this case :let) cannot be limited to start patterns.

Highlight interpolated expressions when "eval" is specified.

cloess: #15511

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:07:15 +02:00
8f3f78546f runtime(doc): Updating the examples in the xxd manpage
closes: #15508

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-16 21:03:58 +02:00
85c724ea0e translation(ru): Updated uganda.rux
closes: #15510

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: RestorerZ <restorer@mail2k.ru>
2024-08-16 21:02:21 +02:00
c6ed816761 runtime(yaml): do not re-indent when commenting out lines
It's a personal annoyance for me. I have to edit yaml files on a lot of
customer environments and whenever you type '#' at the start of the
line, the commented line will be indented by whatever indent the
previous line had.

I hate this seriously, because it makes un-commenting painful. So let's
fix this. But instead of messing with the indent function, let's just
remove the '0#' from cinkeys, so that Vim won't perform re-indenting
when commenting out such a yaml file.

closes: #15494

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:29:47 +02:00
0a6e57b09b patch 9.1.0678: [security]: use-after-free in alist_add()
Problem:  [security]: use-after-free in alist_add()
          (SuyueGuo)
Solution: Lock the current window, so that the reference to
          the argument list remains valid.

This fixes CVE-2024-43374

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:15:28 +02:00
3b59be4ed8 patch 9.1.0677: :keepp does not retain the substitute pattern
Problem:  :keeppatterns does not retain the substitute pattern
          for a :s command
Solution: preserve the last substitute pattern when used with the
          :keeppatterns command modifier (Gregory Anders)

closes: #15497

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:09:28 +02:00
12cb1d1326 translation(ja): Update Japanese translations to latest release
https://github.com/vim-jp/lang-ja/releases/tag/20240815

closes: #15498

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:02:45 +02:00
1fbccc1e96 runtime(netrw): Drop committed trace lines
closes: #15501

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:01:24 +02:00
b4d1164425 runtime(netrw): Error popup not always used
Problem:  g:netrw_use_errorwindow=2 does not work
          without +balloon_eval.
Solution: Check for popup_atcursor().

related: #15501

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:00:45 +02:00
7c754110ff runtime(netrw): ErrorMsg() may throw E121
Move variables declaration

related: #15501

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 22:00:10 +02:00
1869fe0ce6 runtime(tutor): update Makefile and make it portable between GNU and BSD
by removing the non-portable GNU variable and using $? instead
Note: this only works for rules with single dependencies.

closes: #15502
related: #15493

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 21:51:32 +02:00
cca3df9275 translation: improve the po/cleanup.vim script
explicitly delete into the black-hole register

closes: #15499

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 21:47:09 +02:00
5f995c92e7 runtime(lang): update Makefile and make it portable between GNU and BSD
by removing the non-portable GNU variable and using $? instead
Note: this only works for rules with single dependencies.

closes: #15503

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 21:43:56 +02:00
81b62dd654 patch 9.1.0676: style issues with man pages
Problem:  style issues with man pages
Solution: update man pages and test_xxd.vim, since it uses
          the xxd man page (RestorerZ)

closes: #15489

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-15 21:39:33 +02:00
ded1677dd2 patch 9.1.0675: Patch v9.1.0674 causes problems
Problem:  Patch v9.1.0674 causes problems
Solution: Revert it for now

Revert "patch 9.1.0674: Vim9: compiling abstract method fails because of missing return"

This reverts commit 7477861e0d.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 23:05:41 +02:00
a1dc64956f runtime(dosbatch): Show %%i as an argument in syntax file
Inside batch files, for-variables must be written as %%i, not %i.

closes: #15453

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 21:59:42 +02:00
11c92be897 runtime(dosbatch): Add syn-sync to syntax file
Closing parentheses were often highlighted as errors.
Add a syntax sync command to reduce the error.

Also fix that `defined` was not highlighted as an operator inside
parentheses.  E.g.:
```
if defined foo (
    if defined bar (
        ...
    )
)
```
The first `defined` was highlighted but the second one was not.

related: #15453

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 21:59:41 +02:00
fc762dfc9f runtime(sql, mysql): fix E169: Command too recursive with sql_type_default = "mysql"
Problem: When setting "let g:sql_type_default = "mysql", editing .sql
file reports "E169: Command too recursive" error

Solution:

- Add 'let b:did_ftplugin = 1' at the top of ftplugin/sql.vim
- Add 'if exists("b:did_ftplugin") | finish | endif' in ftplugin/mysql.vim
- Add missing header information in ftplugin/mysql.vim
- Remove redundant code in ftplugin/sql.vim

fixes: #15474
closes: #15475

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 21:49:00 +02:00
7477861e0d patch 9.1.0674: Vim9: compiling abstract method fails because of missing return
Problem:  Vim9: compiling abstract method fails because of missing
          return (Aliaksei Budavei)
Solution: don't require a return statement for an abstract method when
          compiling (Ernie Rael)

fixes: #15432
closes: #15441

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 14:53:55 +02:00
ea76096fa9 runtime(javascript): fix a few issues with syntax higlighting
It addresses the following issues:

- Fix highlight of let and var javascript keywords

  According to runtime/doc/syntax.txt, Identifier is for variable names.
  let/var are not variable names, they are keywords

- Add highlighting for "from" keyword in javascript

- Fix highlight of function keyword in javascript

  According to docs, Function is for function names, so the function
  keyword should just be Keyword.

- Fix highlight of static keyword in javascript

  According to vim docs: StorageClass static, register, volatile, etc.

closes: #15480

Signed-off-by: Tobiasz Laskowski <tobil4sk@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 14:50:56 +02:00
dd36d6cc7c runtime(mediawiki): fix typo in doc, test for b:did_ftplugin var
closes: #15479

Signed-off-by: Stanislav Asunkin <1353637+stasjok@users.noreply.github.com>
Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 14:43:30 +02:00
bbeb38db4e runtime(termdebug): Fix wrong test for balloon feature
fixes: #15359
closes: #15487

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 14:41:02 +02:00
ff1680722d runtime(doc): Remove mentioning of the voting feature
closes: #15491

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-14 14:39:32 +02:00
dc831db6ea runtime(doc): add help tags for json + markdown global variables
I added help tags for them in the syntax.txt file since this is the only
place they are mentioned.

closes: #15486

Signed-off-by: JJCUBER <34446698+JJCUBER@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-13 23:42:36 +02:00
58c9579430 patch 9.1.0673: Vim9: too recursive func calls when calling super-class method
Problem:  Vim9: too recursive func calls when calling super-class method
          with non-overriden super-call methods. (Aliaksei Budavei)
Solution: use interface method, when super is to be used (Ernie Rael)

When compiling "super.Func()" force class context to class that defines
function that is doing "super.Func()".
ISN_METHODCALL arg "cmf_is_super" for specific ufunc.

fixes: #15448
fixes: #15463 (2) super.method may not execute in context of defining
                  class
closes: #15477

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-13 23:27:22 +02:00
d33afe12c6 runtime(syntax-tests): Facilitate the viewing of rendered screendumps
With the submitted "viewdumps.vim" script, a few manual
steps in typical workflows (see below) can be automated.
The updated "README.txt" contains additional information.

============================================================

Reviewing LOCAL failed syntax tests can be arranged as
follows:

1) Run tests and generate screendumps:
------------------------------------------------------------
cd /path/to/fork/runtime/syntax
make clean test
------------------------------------------------------------

2) Examine the screendumps from the "failed" directory:
------------------------------------------------------------
../../src/vim --clean -S testdir/viewdumps.vim
------------------------------------------------------------

============================================================

Reviewing UPLOADED failed syntax tests can be arranged as
follows (it can be further locally scripted):

1) Fetch an artifact with failed screendumps from
"github.com/vim/vim/actions/runs/A_ID/artifacts/B_ID".

2) Extract the archived files:
------------------------------------------------------------
unzip /tmp/failed-tests.zip -d /tmp
------------------------------------------------------------

3) Set up the "dumps" directory.  Create a symlink to
"/path/to/fork/dirs/dumps" in the extracted directories so
that term_dumpdiff() can be used.  (The lookup algorithm
resolves "dumps" for every loaded filename.  So, with
"/tmp/runtime/syntax/testdir/failed/*.dump" files passed
as script arguments, the algorithm will make the files in
"/tmp/runtime/syntax/testdir/dumps" queried.)
------------------------------------------------------------
cd /path/to/fork
ln -s $(pwd)/runtime/syntax/testdir/dumps \
  /tmp/runtime/syntax/testdir/dumps
------------------------------------------------------------

4) Examine the extracted screendumps:
------------------------------------------------------------
./src/vim --clean -S runtime/syntax/testdir/viewdumps.vim \
  /tmp/runtime/syntax/testdir/failed/*.dump
------------------------------------------------------------

5) Clean up:
------------------------------------------------------------
unlink /tmp/runtime/syntax/testdir/dumps
rm -rf /tmp/runtime
------------------------------------------------------------

============================================================

Reviewing SUBMITTED FOR PULL REQUEST syntax tests can be
arranged as follows (it can be further locally scripted):

1) List the fetched changeset and write the changed "dumps"
filenames to "/tmp/filelist":
------------------------------------------------------------
cd /path/to/fork
git switch prs/1234
git diff-index --relative=runtime/syntax/testdir/dumps/ \
  --name-only prs/1234~1 > /tmp/filelist
------------------------------------------------------------

2) Reconcile relative filepaths, and copy next-to-be-updated
"dumps" files in the "failed" directory (note the missing
new screendumps, if any):
------------------------------------------------------------
git switch master
cd runtime/syntax/testdir/dumps
cp -t ../failed $(cat /tmp/filelist)
------------------------------------------------------------

3) Remember about the introduced INVERTED relation between
"dumps" and "failed", i.e. the files to be committed are in
"dumps" already and their previous versions are in "failed";
therefore, copy the missing new screendumps from "dumps" to
"failed" (otherwise these won't be shown):
------------------------------------------------------------
git switch prs/1234
cp -t ../failed foo_10.dump foo_11.dump foo_12.dump
------------------------------------------------------------

4) Examine the screendumps from the "failed" directory (new
screendumps will be shown with no difference between their
versions):
------------------------------------------------------------
cd ..
../../../src/vim --clean -S viewdumps.vim
------------------------------------------------------------

closes: #15476

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-12 18:43:06 +02:00
90e1fe4b76 runtime(doc): fix a few style issues
closes: #15478

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-12 18:27:41 +02:00
8d02e5cf96 patch 9.1.0672: marker folds may get corrupted on undo
Problem:  marker folds may get corrupted on undo (Yousef Mohammed)
Solution: when adjusting folds, make sure that line1 is the lower limit
          and line2 is the upper line limit. In particular, line2 should
          not be able to get smaller than line1.

fixes: #15455
closes: #15466

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-11 20:12:41 +02:00
fb3f969936 Problem: crash with WinNewPre autocommand
Problem:  crash with WinNewPre autocommand, because window
          structures are not yet safe to use
Solution: Don't trigger WinNewPre on :tabnew

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-11 20:09:17 +02:00
e20aeb875c patch 9.1.0670: po file encoding fails on *BSD during make
Problem:  po file encoding fails on *BSD during make
Solution: instead of using `$<` make use of variable `$?` which should
          be equivalent when the rule is dependent on only a single
          file (RestorerZ).

closes: #15471

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-11 20:03:35 +02:00
659713da33 translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-11 19:49:16 +02:00
2630687315 translation: Stop using msgconv
It caused differences from Unix-like systems. Make sure that the same
files are generated both on Windows and Unix.

fixes: #14490
fixes: #14601
closes: #15469

Also
- update a few more auto-generated po files
- Make_mvc.mak work with Cygwin/MSYS2's gettext by using copy /b instead
  of copy /a

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-11 19:06:58 +02:00
1c032e36a6 patch 9.1.0669: if_python: stable python ABI not used by default
Problem:  stable python ABI not used by default
Solution: Enable stable python ABI v3.8 when building with python3/dyn
          by default, update the default Python3 version to 3.8 for
          MS-Windows (Ken Takata)

closes: #15470
related: #15457

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-11 18:41:41 +02:00
3383ed7e24 Update .gitignore and .hgignore files
Ignore auto-generated executable files in src/po/

closes: #15472

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-11 18:38:19 +02:00
9abd7158d7 patch 9.1.0668: build-error with python3.12 and stable ABI
Problem:  build-error with python3.12 and stable ABI (zdohnal)
Solution: Add type casts, define Py_INCREF for Python3.12 and higher
          (Ken Takata)

fixes: #15460

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-10 09:44:20 +02:00
181fda18e9 translations: Update generated po files
Some auto-generated po files cause differences after building Vim.
Update them.

closes: #15468

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-10 09:38:24 +02:00
b026a293b1 patch 9.1.0667: Some other options reset curswant unnecessarily when set
Problem:  Some other options reset curswant unnecessarily when set.
          (Andrew Haust)
Solution: Don't reset curswant when setting 'comments', 'commentstring'
          or 'define' (zeertzjq)

fixes: #15462
closes: #15467

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-10 09:35:20 +02:00
9c4b2462bb patch 9.1.0666: assert_equal() doesn't show multibyte string correctly
Problem:  assert_equal() doesn't show multibyte string correctly
Solution: Properly advance over a multibyte char.
          (zeertzjq)

closes: #15456

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-09 19:52:10 +02:00
0cc5dce578 runtime(doc): clarify directory of Vim's executable vs CWD
According to :h win32-PATH, "the same directory as Vim" means the same
directory as the Vim executable, not Vim's current directory.  In patch
8.2.4860 these two concepts were mixed up.

closes: #15451

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-08 21:12:15 +02:00
6b97d7ad19 patch 9.1.0665: Locked variable can be changed in a :for loop
Problem:  Locked variable can be changed in a :for loop.
Solution: Always do a full permission check on the first loop iteration
          where ASSIGN_DECL is not set (zeertzjq).

related: #12470
fixes: #15450
closes: #15454

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-08 21:05:57 +02:00
39eff4cdc0 runtime(proto): Add indent script for protobuf filetype
closes: #15446

Signed-off-by: David Pedersen <limero@me.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-07 21:23:59 +02:00
568cbc92a6 patch 9.1.0664: MS-Windows: console vim did not switch back to main screen on exit
Problem:  MS-Windows: console vim did not switch back to main screen on
          exit
Solution: switch back to main screen on exit (Ken Takata)

`vim.exe --cmd quit` quitted without switching back to the main screen
buffer and the alternate screen buffer was kept shown.

Restore the main screen buffer even when termcap mode has not been
started.

closes: #15443

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-07 21:18:24 +02:00
e2d9b0d499 runtime(zip): zip plugin does not work with Vim 9.0
Problem:  zip plugin does not work with Vim 9.0
          because of :defer
Solution: raise minimum Vim version to Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-07 08:13:32 +02:00
91efcd115e patch 9.1.0663: tests: zip test still resets 'shellslash' option
Problem:  tests: zip test still resets 'shellslash' option
Solution: Remove resetting the 'shellslash' option, the zip
          plugin should now be able to handle this options

closes: #15434

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:50 +02:00
afea6b9468 runtime(zip): use defer to restore old settings
Problem:  RestoreOpts() plugin called too often
Solution: use :defer to have the RestoreOpts() function
          called when the function returns automatically

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:50 +02:00
8d52926857 runtime(zip): add a generic Message function
Problem:  the zip plugin duplicates a lot of code for displaying
          warnings/errors
Solution: refactor common code into a generic Mess() function

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:49 +02:00
a336d8f21e runtime(zip): increment base version of zip plugin
Problem:  the zip plugin version is still v33
Solution: increment the version to v34

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:49 +02:00
e1044fb72e runtime(zip): raise minimum Vim version to v9.0
Problem:  the zip plugin uses features of Vim 9.0, but
          checks for a Vim version >= 7.2
          (interpolated strings and readblob() function)
Solution: raise the minimum Vim version to v9.0

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:49 +02:00
19636be55e runtime(zip): refactor save and restore of options
Problem:  zip plugin has no way to set/restore option values
Solution: Add the SetSaneOpts() and RestoreOpts() functions,
          so options that cause issues are set to sane values
          and restored back to their initial values later on.
          (this affects the 'shellslash' option on windows, which also
          changes how the shellescape() function works)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:19:37 +02:00
33836d38b8 runtime(zip): remove test for fnameescape
Problem:  zip plugin tests for fnameescape() function
Solution: Remove the check, fnameescape() has been available since
          7.1.299, it should nowadays always be available

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:03:22 +02:00
120c0dd815 runtime(zip): use :echomsg instead of :echo
Problem:  zip plugin uses :echo which does not store messages
Solution: use :echomsg instead of :echo so that messages are stored in
          the message history

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:02:05 +02:00
a63f66e953 runtime(zip): clean up and remove comments
Problem:  zip plugin contains a lot of comments from the decho plugin
Solution: Clean up and remove un-used comments

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 20:00:31 +02:00
da090f95df patch 9.1.0662: filecopy() may return wrong value when readlink() fails
Problem:  filecopy() may return wrong value when readlink() fails.
Solution: Set ret to -1 so that 0 is returned when readlink() fails.
          (zeertzjq)

closes: #15438

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-06 19:51:09 +02:00
d7af21e746 patch 9.1.0661: the zip plugin is not tested.
Problem:  the zip plugin is not tested.
Solution: include tests (Damien)

closes: #15411

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-05 20:24:11 +02:00
f0e9b72c8f runtime(zip): Fix for FreeBSD's unzip command
Problem:  Cannot browse zipfiles with the unzip program found
	  on FreeBSD.
Solution: Adjust command arguments.

Unzip found on FreeBSD complain about missing argument with the
zipinfo modifier '-Z -1'. Joining arguments seems to work
for both implementations.

Also change `:sil!` to `:sil` so that error messages are properly
reported (per review of Christian Brabandt).

related: #15411

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-05 20:21:18 +02:00
217d3c17c6 runtime(doc): capitalize correctly
* do not capitalize after a double colon when introducing a list
* Capitalize a header line

closes: #15433

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-05 17:37:08 +02:00
f5f69e8663 patch 9.1.0660: MS-Windows: Shift-Insert does work on old conhost
Problem:  MS-Windows: Shift-Insert does not work on old conhost
          (Nick Jensen, after 9.0.1146)
Solution: handle Shift-Insert specifically
          (Christian Plewright)

fixes: #15326
closes: #15430

Signed-off-by: Christopher Plewright <chris@createng.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-04 19:57:44 +02:00
e0fd1ca7df translation(it): update Italian manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-04 18:52:55 +02:00
c0f7505ede runtime(lua): add/subtract a 'shiftwidth' after '('/')' in indentexpr
Problem:

- Current lua indentexpr does not indent for '(' ')'.
- Missing indent test for lua.

Solution:

- Match '(', ')' in `function GetLuaIndentIntern`.
- Add an indent test for lua.

closes: #15364

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-04 18:47:25 +02:00
c5bdd66558 runtime(zip): escape '[' on Unix as well
Problem:  After 6f1cbfc9ab483a09877e153ad130164875c40b1d fnameescape()
          is no longer called on the name of the file to be extracted.
          However, while spaces indeed don't need to be escaped, unzip
          treats '[' as a wildcard character, so it need to be escaped.
Solution: Escape '[' on both MS-Windows and Unix.

From the docs it seems '*' and '?' also need escaping, but they seem to
actually work without escaping.

fixes: neovim/neovim#29977
closes: #15427

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-04 18:35:50 +02:00
2708afa640 patch 9.1.0659: MS-Windows: MSVC Makefile is a bit hard to read
Problem:  MS-Windows: MSVC Makefile is a bit hard to read
          (after v9.1.0657)
Solution: indent the if/else statements to improve readability
          (Ken Takata)

closes: #15428

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-04 18:31:48 +02:00
947f752a47 runtime(doc): fix typo in syntax.txt
closes: #15425

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 17:40:58 +02:00
15141208e9 runtime(doc): -x is only available when compiled with crypt feature
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 15:40:19 +02:00
62d861741b patch 9.1.0658: Coverity warns about dereferencing NULL pointer.
Problem:  Coverity warns about dereferencing NULL pointer.
Solution: Bail out if vim_strrchr() returns NULL.
          (zeertzjq)

________________________________________________________________________________________________________
*** CID 1616019:    (NULL_RETURNS)
/src/help.c: 834 in fix_help_buffer()
828                                  continue;
829                              t2 = gettail(f2);
830                              e2 = vim_strrchr(t2, '.');
831                              if (e1 - f1 != e2 - f2
832                                          || fnamencmp(f1, f2, e1 - f1) != 0)
833                                  continue;
>>>     CID 1616019:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "(char_u *)e2" when calling "vim_fnamecmp".
834                              if (fnamecmp(e1, ".txt") == 0
835                                             && fnamecmp(e2, fname + 4) == 0)
836                                  // use .abx instead of .txt
837                                  VIM_CLEAR(fnames[i1]);
838                          }
839                      }
/src/help.c: 816 in fix_help_buffer()
810                      // the same directory.
811                      for (i1 = 0; i1 < fcount; ++i1)
812                      {
813                          f1 = fnames[i1];
814                          t1 = gettail(f1);
815                          e1 = vim_strrchr(t1, '.');
>>>     CID 1616019:    (NULL_RETURNS)
>>>     Dereferencing a pointer that might be "NULL" "(char_u *)e1" when calling "vim_fnamecmp".
816                          if (fnamecmp(e1, ".txt") != 0
817                                             && fnamecmp(e1, fname + 4) != 0)
818                          {
819                              // Not .txt and not .abx, remove it.
820                              VIM_CLEAR(fnames[i1]);
821                              continue;

closes: #15420

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 14:52:00 +02:00
6228481b8e runtime(colors): update Todo highlight in habamax colorscheme
Magenta background Todo is too bright and might interfere with DiffText.
Make it less strong, without background, bold.

closes: #15423

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 14:48:16 +02:00
87d63d34b6 patch 9.1.0657: MS-Windows: MSVC build time can be optimized
Problem:  MS-Windows: MSVC build time can be optimized
Solution: Stop using Powershell, show detected version, read _MSC_VER
          and _MSC_FULL_VER in a single cl execution. (Ken Takata)

closes: #15421

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 14:40:35 +02:00
cdf1c7a73a patch 9.1.0656: MS-Windows: MSVC Makefile CPU handling can be improved
Problem:  MS-Windows: MSVC Makefile CPU handling can be improved
Solution: Update Makefile and also remove some old code
          (Ken Takata)

* The variable `ASSEMBLY_ARCHITECTURE` was originally used to generate
  the manifest file. However, this was removed in v7.0.198.  Remove
  `ASSEMBLY_ARCHITECTURE` and use `CPU` instead.
* `/arch:AVX512` is available starting from Visual C++ 2017.
* ARM64 was not considered when validating CPUNR.
  Skip the validation for ARM64 for now.
* Remove old code for VC6/7 and Win9x.

closes: #15422

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-03 14:36:37 +02:00
0aa65b48fb patch 9.1.0655: filetype: goaccess config file not recognized
Problem:  filetype: goaccess config file not recognized
Solution: detect 'goaccess.conf' as goaccess filetype, also
          include a basic syntax and ftplugin (Adam Monsen)

Add syntax highlighting for GoAccess configuration file.

GoAccess is a real-time web log analyzer and interactive viewer that
runs in a terminal in *nix systems or through your browser.

GoAccess home page: https://goaccess.io

closes: #15414

Signed-off-by: Adam Monsen <haircut@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:58:00 +02:00
22a22529af CI: update clang compiler to version 20
closes: #15416

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:45:52 +02:00
c527d90fae runtime(netrw): honor g:netrw_alt{o,v} for :{S,H,V}explore
Make `:Sexplore` / `:Hexplore` / `:Vexplore` commands honor the user
`&split{right,below}` settings (or netrw-specific `g:netrw_alt{o,v}`)
instead of hardcoding a split direction. Similarly, update banged
variants of the two latter commands to follow the inverted preference.

closes: #15417

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:43:12 +02:00
b9de1a057f patch 9.1.0654: completion does not respect completeslash with fuzzy
Problem:  completion does not respect completeslash with fuzzy
          (egesip)
Solution: Change path separator on Windows, depending on 'completeslash'
          option value (glepnir)

fixes: #15392
closes: #15418

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:14:38 +02:00
a0b5bc1285 patch 9.1.0653: Patch v9.1.0648 not completely right
Problem:  Patch v9.1.0648 not completely right
          (zeertzjq)
Solution: Remove always true condition

closes: #15415

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-02 19:06:41 +02:00
b4ea77185c patch 9.1.0652: too many strlen() calls in syntax.c
Problem:  too many strlen() calls in syntax.c
Solution: refactor code to reduce the number or strlen() calls,
          get rid of un-used SYN_NAMELEN macro
          (John Marriott)

closes: #15368

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 23:01:25 +02:00
0214680a8e patch 9.1.0651: ex: trailing dot is optional for :g and :insert/:append
Problem:  ex: trailing dot is optional for :g and :insert/:append
Solution: don't break out early, when the next command is empty.
          (Mohamed Akram)

The terminating period is optional for the last command in a global
command list.

closes: #15407

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:53:01 +02:00
e8feaa354e patch 9.1.0650: Coverity warning in cstrncmp()
Problem:  Coverity warning in cstrncmp()
          (after v9.1.0645)
Solution: Change the type of n2 to int.
          (zeertzjq)

________________________________________________________________________________________________________
*** CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
/src/regexp.c: 1757 in cstrncmp()
1751                 n1 -= mb_ptr2len(s1);
1752                 MB_PTR_ADV(p);
1753                 n2++;
1754             }
1755             // count the number of bytes to advance the same number of chars for s2
1756             p = s2;
>>>     CID 1615684:  Integer handling issues  (INTEGER_OVERFLOW)
>>>     Expression "n2--", which is equal to 18446744073709551615, where "n2" is known to be equal to 0, underflows the type that receives it, an unsigned integer 64 bits wide.
1757             while (n2-- > 0 && *p != NUL)
1758                 MB_PTR_ADV(p);
1759
1760             n2 = p - s2;
1761
1762             result = MB_STRNICMP2(s1, s2, *n, n2);

closes: #15409

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:48:53 +02:00
c1ed788c1b patch 9.1.0649: Wrong comment for "len" argument of call_simple_func()
Problem:  Wrong comment for "len" argument of call_simple_func().
Solution: Remove the "or -1 to use strlen()".  Also change its type to
          size_t to remove one cast. (zeertzjq)

closes: #15410

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:46:54 +02:00
b29f4abcd4 patch 9.1.0648: [security] double-free in dialog_changed()
Problem:  [security] double-free in dialog_changed()
          (SuyueGuo)
Solution: Only clear pointer b_sfname pointer, if it is different
          than the b_ffname pointer.  Don't try to free b_fname,
          set it to NULL instead.

fixes: #15403

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-46pw-v7qw-xc2f

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:35:18 +02:00
8a0bbe7b8a patch 9.1.0647: [security] use-after-free in tagstack_clear_entry
Problem:  [security] use-after-free in tagstack_clear_entry
          (Suyue Guo )
Solution: Instead of manually calling vim_free() on each of the tagstack
          entries, let's use tagstack_clear_entry(), which will
          also free the stack, but using the VIM_CLEAR macro,
          which prevents a use-after-free by setting those pointers
          to NULL

This addresses CVE-2024-41957

Github advisory:
https://github.com/vim/vim/security/advisories/GHSA-f9cr-gv85-hcr4

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 22:35:18 +02:00
5b07213c0b runtime(doc): re-format tag example lines, mention ctags --list-kinds
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-08-01 09:27:53 +02:00
164096927b patch 9.1.0646: Vim9: imported function may not be found
Problem:  Vim9: imported function may not be found
Solution: Try to find the function by name (Ernie Rael)

fixes: #15381
closes: #15382

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:18:11 +02:00
30a8ad675d runtime(java): Document "g:java_space_errors" and "g:java_comment_strings"
closes: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:16:46 +02:00
77b87c30d9 runtime(java): Cluster optional group definitions and their group links
And keep non-optional group links at the end of the file.

related: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:15:16 +02:00
9aabcef1c8 runtime(java): Tidy up the syntax file
- Prefix all global variables with "g:".
- Add spaces around each variable assignment operator.
- Remove extraneous whitespace characters.
- Remove a spurious _serializable_ Java keyword (since v1.1,
  java.io.Serializable and java.io.Externalizable interfaces
  provide an API for object serialization; see vim-6-0j).
- Normalise the syntax definition argument order by making
  _contained_ the first argument of each such definition.
- Normalise the argument tabulation for highlighting group
  definitions.

Reference:
https://web.archive.org/web/20010821025330/java.sun.com/docs/books/jls/first_edition/html/1.1Update.html

related: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:14:37 +02:00
3749dff093 runtime(java): Tidy up the documentation for "ft-java-syntax"
- Reword a few sentences and reformat a few paragraphs.
- Supply absent capitalisation and punctuation.
- Make listed highlighting groups and code stand out.
- Prefix all Java-related global variables with "g:".
- Add spaces around each variable assignment operator.
- Acknowledge that some Javadoc variables are maintained in
  the HTML syntax file.

Also, move the overridable _default_ HTML group links before
the HTML syntax file inclusion in order to implement the
documented diverged settings.

related: #15399

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:13:25 +02:00
d88ebcbd9f runtime(colors): update habamax scheme - tweak diff/search/todo colors
- Make diff colors more accessible, Green for added, Red for deleted, Blue for Changed
- Change Search to blue to be visible with Diff colors
- Change Todo to bright magenta

closes: #15400

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:09:24 +02:00
5753d99ff6 runtime(nohlsearch): add missing loaded_hlsearch guard
related: #15039
closes: #15402

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 22:07:43 +02:00
56e8ed6162 runtime(kivy): Updated maintainer info for syntax script
closes: #15405

Signed-off-by: Corey Prophitt <git@prophitt.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-31 21:56:29 +02:00
491e55d0e7 Maintainers: Add maintainer for ondir ftplugin + syntax files
closes: #15397

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 21:21:43 +02:00
e34d0e37e3 runtime(netrw): removing trailing slash when copying files in same directory
closes: #14756

Signed-off-by: Travis Shelton <tshelton.mail@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 21:10:38 +02:00
22e8e12d9f patch 9.1.0645: regex: wrong match when searching multi-byte char case-insensitive
Problem:  regex: wrong match when searching multi-byte char
          case-insensitive (diffsetter)
Solution: Apply proper case-folding for characters and search-string

This patch does the following 4 things:

1) When the regexp engine compares two utf-8 codepoints case
   insensitive it may match an adjacent character, because it assumes
   it can step over as many bytes as the pattern contains.

   This however is not necessarily true because of case-folding, a
   multi-byte UTF-8 character can be considered equal to some
   single-byte value.

   Let's consider the pattern 'ſ' and the string 's'. When comparing and
   ignoring case, the single character 's' matches, and since it matches
   Vim will try to step over the match (by the amount of bytes of the
   pattern), assuming that since it matches, the length of both strings is
   the same.

   However in that case, it should only step over the single byte value
   's' by 1 byte and try to start matching after it again. So for the
   backtracking engine we need to ensure:
   * we try to match the correct length for the pattern and the text
   * in case of a match, we step over it correctly

   There is one tricky thing for the backtracing engine. We also need to
   calculate correctly the number of bytes to compare the 2 different
   utf-8 strings s1 and s2. So we will count the number of characters in
   s1 that the byte len specified. Then we count the number of bytes to
   step over the same number of characters in string s2 and then we can
   correctly compare the 2 utf-8 strings.

2) A similar thing can happen for the NFA engine, when skipping to the
   next character to test for a match. We are skipping over the regstart
   pointer, however we do not consider the case that because of
   case-folding we may need to adjust the number of bytes to skip over.
   So this needs to be adjusted in find_match_text() as well.

3) A related issue turned out, when prog->match_text is actually empty.
   In that case we should try to find the next match and skip this
   condition.

4) When comparing characters using collections, we must also apply case
   folding to each character in the collection and not just to the
   current character from the search string.  This doesn't apply to the
   NFA engine, because internally it converts collections to branches
   [abc] -> a\|b\|c

fixes: #14294
closes: #14756

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 20:39:18 +02:00
df9f67e10d runtime(html): update syntax script to sync by 250 minlines by default
closes: #14071

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 20:22:20 +02:00
74011dc1fa patch 9.1.0644: Unnecessary STRLEN() when applying mapping
Problem:  Unnecessary STRLEN() when applying mapping.
          (after v9.1.0642)
Solution: Use m_keylen and vim_strnsave().
          (zeertzjq)

closes: #15394

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 19:17:56 +02:00
c4be066817 runtime(zip): Opening a remote zipfile don't work
Problem:  Opening a zipfile from HTTP gives an empty buffer.
Solution: Ensure that the magic bytes check does not
          skip protocol processing.

Also use readblob() and remove commented out lines.

closes: #15396

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 19:14:35 +02:00
e6471b415b runtime(cuda): source c and cpp ftplugins
closes: #15383

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-30 18:15:30 +02:00
1254e6db83 patch 9.1.0643: terminal: cursor may end up on invalid position
Problem:  terminal: cursor may end up on invalid position after reducing
          the scrollback lines (user202729)
Solution: After reducing the scrollback size, check the cursor position,
          making sure it does not end up on an invalid line

fixes: #15351

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 21:19:51 +02:00
9d997addc7 patch 9.1.0642: Check that mapping rhs starts with lhs fails if not simplified
Problem:  Check that mapping rhs starts with lhs doesn't work if lhs is
          not simplified.
Solution: Keep track of the mapblock containing the alternative lhs and
          also compare with it (zeertzjq).

fixes: #15376
closes: #15384

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 21:10:07 +02:00
baaf6deb95 patch 9.1.0641: MS-Windows: OLE enabled in console version
Problem:  MS-Windows: OLE enabled in console version, may cause hang
          (Linda_pp)
Solution: Disable OLE for console version (Ken Takata)

If VIMDLL was enabled, a message box for registering OLE might be shown
even if Vim was executed in a console. (See #15372)

Enabling OLE in a console is not so useful.  Disable it.

fixes: #15372
closes: #15385

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:57:19 +02:00
011f2223e5 runtime(thrift): add ftplugin, indent and syntax scripts
Problem: Apache Thrift files misses ftplugin, indent and syntax scripts

Solution:
- add ftplugin and indent scripts
- add thrift indent test
- port the syntax script from apache/thrift (Apache License 2)

Reference:
https://diwakergupta.github.io/thrift-missing-guide/#_language_reference

closes: #15387

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:51:05 +02:00
3da011871a patch 9.1.0640: Mingw: Makefile can be improved
Problem:  Mingw: Makefile can be improved
Solution: Reduce nesting level, directly check if the '-Wl,--entry'
          option is required (Ken Takata)

closes: #15386

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:43:21 +02:00
0bee82b1d0 patch 9.1.0639: channel timeout may wrap around
Problem:  channel timeout may wrap around
Solution: Correct timeout calculation when GetTickCount() wraps around
          (Ken Takata)

closes: #15390

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:39:12 +02:00
0dff31576a patch 9.1.0638: E1510 may happen when formatting a message for smsg()
Problem:  E1510 may happen when formatting a message
          (after 9.1.0181).
Solution: Only give E1510 when using typval. (zeertzjq)

closes: #15391

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 20:28:14 +02:00
81a65000c5 patch 9.1.0637: MS-Windows: Style issues in MSVC Makefile
Problem:  MS-Windows: Style issues in MSVC Makefile
Solution: Fix style issues, simplify logic
          (Ken Takata)

* Add space around the operators for consistency.
* Remove unnecessary ren command. Use the /Fe option to create
  install.exe directly.
* Remove unnecessary mkdir auto command. src/auto should always exist.

closes: #15389

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-29 19:52:03 +02:00
f4572cee35 patch 9.1.0636: filetype: ziggy files are not recognized
Problem:  filetype: ziggy files are not recognized
Solution: detect '*.ziggy' files as ziggy filetype,
          detect '*.ziggy-schema' files as ziggy-schema filetype
          (EliSauder)

References: https://ziggy-lang.io/

fixes: #15355
closes: #15367

Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:32:38 +02:00
e57c9a19ed patch 9.1.0635: filetype: SuperHTML template files not recognized
Problem:  filetype: SuperHTML template files not recognized
Solution: Update the filetype detection code to detect '*.shtml' either
          as HTML (Server Side Includes) or SuperHTML (template files)
          (EliSauder)

related: #15355
related: #15367

Signed-off-by: EliSauder <24995216+EliSauder@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:28:11 +02:00
13032a49b7 patch 9.1.0634: Ctrl-P not working by default
Problem:  Ctrl-P not working by default
          (Jesse Pavel, after v9.1.0598)
Solution: Revert part of v9.1.0598 and set cur_match_pos
          correctly according to compl_dir_forward()

fixes: #15370
closes: #15379

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:16:48 +02:00
0268ff3af3 patch 9.1.0633: Compilation warnings with -Wunused-parameter
Problem:  Compilation warnings with `-Wunused-parameter`
Solution: Add the `UNUSED` macro where needed, and remove some
          superfluous ones (Dominique Pellé)

Change fixes these kind of warnings when building without the channel
feature:

```
eval.c:6122:15: warning: unused parameter ‘tv’ [-Wunused-parameter]
     typval_T *tv,
               ^
eval.c:6123:14: warning: unused parameter ‘tofree’ [-Wunused-parameter]
     char_u **tofree,
              ^
eval.c:6124:13: warning: unused parameter ‘numbuf’ [-Wunused-parameter]
     char_u *numbuf,
             ^
eval.c:6125:10: warning: unused parameter ‘composite_val’ [-Wunused-parameter]
     int  composite_val)
```

closes: #15378

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 21:12:20 +02:00
073cb02cb5 patch 9.1.0632: MS-Windows: Compiler Warnings
Problem:  MS-Windows: Compiler Warnings
Solution: Fix the warnings (Ken Takata)

* Unused variable.
* Conversion from size_t to int.

closes: #15369

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 17:08:15 +02:00
4c45425c10 runtime(debcopyright): Add support for Files-Included in syntax script
Full support (including for components) was finished with this commit:
ee90dad771

closes: #15374

Signed-off-by: josch <josch@debian.org>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 17:06:14 +02:00
52e7cc26d8 runtime(doc): tweak documentation style a bit
closes: #15371

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-28 17:03:29 +02:00
6b6280c4a2 patch 9.1.0631: wrong completion list displayed with non-existing dir + fuzzy completion
Problem:  wrong completion list displayed with non-existing dir + fuzzy
          completion (kawarimidoll)
Solution: clear list of matches, if leader did not use fuzzy match
          (glepnir)

fixes: #15357
closes: #15365

Signed-off-by: glepnir <glephunter@gmail.com>
2024-07-27 16:25:45 +02:00
f0ce176b5f patch 9.1.0630: MS-Windows: build fails with VIMDLL and mzscheme
Problem:  MS-Windows: build fails with VIMDLL and mzscheme
Solution: define scheme_register_tls_space() inside gvim.exe
          and refer to it from the dll (Ken Takata).

`scheme_register_tls_space()` doesn't support a thread-local variable in
a DLL:
https://docs.racket-lang.org/inside/im_memoryalloc.html#%28cpp._scheme_register_tls_space%29

closes: #15363

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:25:34 +02:00
4100852e09 patch 9.1.0629: Rename of pum hl_group is incomplete
Problem:  Rename of pum hl_group is incomplete in source.
Solution: Also rename the test function.  Rename to user_hlattr in code
          to avoid confusion with pum_extra.  Add test with matched text
          highlighting (zeertzjq).

closes: #15348

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:21:49 +02:00
f08865ce83 patch 9.1.0628: MinGW: coverage files are not cleaned up
Problem:  MinGW: coverage files are not cleaned up
Solution: Adjust clean rule to remove the coverage files
          (Ken Takata)

closes: #15361

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:16:43 +02:00
e4486bad10 patch 9.1.0627: MinGW: build-error when COVERAGE is enabled
Problem:  MinGW: build-error when COVERAGE is enabled
          (after v9.1.0621)
Solution: Fix regressions in v9.1.0621 and v9.1.0622
          (Ken Takata)

* Fix build error when COVERAGE=yes.
* Fix if_lua with USE_GC_SECTIONS=yes.

related: #15361

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-27 13:16:38 +02:00
94082b60d5 patch 9.1.0626: Vim9: need more tests with null objects
Problem:  Vim9: need more tests with null objects
          (after v9.1.0620)
Solution: add one more test with null_object
          (Ernie Rael)

closes: #15360

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:40:29 +02:00
a7295ae7f5 runtime(autohotkey): include initial filetype plugin
closes: #15345

Signed-off-by: Peter Aronoff <peter@aronoff.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:24:33 +02:00
6ed8ae837b patch 9.1.0625: tests: test output all translated messages for all translations
Problem:  tests: test output all translated messages for all
          translations
Solution: Redirect the output of check.vim to /dev/null, it's not that
          useful.

closes: #15354

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:21:03 +02:00
70a11a6bf6 patch 9.1.0624: ex command modifiers not found
Problem:  ex command modifiers are not found
          (Ingo Karkat, after v9.1.0352)
Solution: partly revert patch v9.1.0352, ignore :{ and :}
          when expanding ex commands

The issue is, that the :keepmarks command can be abbreviated to :kee or
:keep or :keepm but not to e.g. :ke (because that would be the :exe
command :k with register e).

This basically means, we need `:kee` sorted before `:keepalt` but at the
same time `:keepmarks` sorted after the `:keepalt` command in the
cmdmod_info_tab table. Due to this, the binary search may not work
correctly, so let's revert that part of patch v9.1.0352.

fixes: #15305
closes: #15336

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:13:55 +02:00
325420ebe4 patch 9.1.0623: Mingw: errors when trying to delete non-existing files
Problem:  Mingw: warnings when trying to delete non-existing files
Solution: Use "rm -f" instead of "rm" to suppress errors for
          non-existing files (Ken Takata)

closes: #15350

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:07:48 +02:00
032accd98b patch 9.1.0622: MS-Windows: mingw-build can be optimized
Problem:  MS-Windows: mingw-build can be optimized
Solution: use --gc-sections to reduce the size of the executable
          (Ken Takata)

Use the --gc-sections linker option and the -ffunction-sections compiler
option to reduce the size of the executable files.  To make these work,
the -fno-asynchronous-unwind-tables compiler option is also needed.

This is enabled by default and can be disabled by `USE_GC_SECTIONS=no`.

Note: A similar feature has been already used in MSVC. (The /OPT linker
option.)

related: #15350

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 19:07:41 +02:00
b32d0a479d patch 9.1.0621: MS-Windows: startup code can be improved
Problem:  MS-Windows: startup code can be improved
Solution: Re-work and optimize win32 startup code
          (Ken Takata)

* Revise the code and reduce #ifdefs.
* For VIMDLL, stop using the default CRT startup code to reduce the file
  size.
  The file size becomes ~130 KB -> ~34 KB on MSVC.
* Update comments. Make them consistent between os_w32dll.c and
  os_w32exe.c.

closes: #15352

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 18:46:54 +02:00
be82825687 patch 9.1.0620: Vim9: segfauls with null objects
Problem:  Vim9: segfauls with null objects
          (after v9.1.0219)
Solution: Check object pointer being NULL
          (Ernie Rael)

fixes: #15338
closes: #15349

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 18:39:52 +02:00
8754efe437 patch 9.1.0619: tests: test_popup fails
Problem:  tests: test_popup fails
          (after v9.1.0618)
Solution: Correct test, move combining extra attributes to
          pum_compute_text_attrs() (glepnir)

closes: #15353

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-26 18:15:27 +02:00
508e7856ec patch 9.1.0618: cannot mark deprecated attributes in completion menu
Problem:  cannot mark deprecated attributes in completion menu
Solution: add hl_group to the Dictionary of supported completion fields
          (glepnir)

closes: #15314

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 21:39:08 +02:00
dc373d456b patch 9.1.0617: Cursor moves beyond first line of folded end of buffer
Problem:  Cursor moves beyond start of a folded range at the end of a buffer.
Solution: Move cursor to start of fold when going beyond end of buffer.
          Check that cursor moved to detect FAIL in outer cursor function.
          (Luuk van Baal)

closes: #15344

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 21:24:32 +02:00
eb4b903c9b patch 9.1.0616: filetype: Make syntax highlighting off for MS Makefiles
Problem:  filetype: Make syntax highlighting off for MS Makefiles
Solution: Try to detect MS Makefiles and adjust syntax rules to it.
          (Ken Takata)

Highlighting of variable expansion in Microsoft Makefile can be broken.
E.g.:
2979cfc262/src/Make_mvc.mak (L1331)

Don't use backslash as escape characters if `make_microsoft` is set.
Also fix that `make_no_comments` was not considered if `make_microsoft`
was set.

Also add description for `make_microsoft` and `make_no_comments` to the
documentation and include a very simple filetype test

closes: #15341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Ken Takata <kentkt@csc.jp>
2024-07-25 21:16:37 +02:00
242667ae14 patch 9.1.0615: Unnecessary STRLEN() in make_percent_swname()
Problem:  Unnecessary STRLEN() in make_percent_swname()
Solution: Pass the end of "dir" to make_percent_swname()
          (zeertzjq)

closes: #15340

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 20:58:42 +02:00
4d68054c1e runtime(progress): Add single-line comment syntax
Progress OpenEdge 11.6 added a new C-like single-line comment syntax; such
comments begin with `//` and proceed to the end of the line.

Add a new syntax group `ProgressLineComment` to implement highlighting for this
syntax. Rename the existing group from `ProgressComment` to
`ProgressBlockComment`, and introduce a cluster named `ProgressComment` to
encapsulate both.

closes: #15339

Signed-off-by: Daniel Smith <daniel@rdnlsmith.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 20:55:34 +02:00
408bd9ffe7 runtime(progress): Add syntax test for comments
We intend to update the Progress syntax file to support the single-line comment
syntax that was introduced in Progress OpenEdge 11.6. As there are no existing
tests for this file, we should first add one that demonstrates the comment
syntax that is already supported.

related: #15339

Signed-off-by: Daniel Smith <daniel@rdnlsmith.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 20:54:57 +02:00
d5cc8ee0fa runtime(progress): Update maintainer info
The Progress syntax file was last updated eight years ago, and the header
information twelve years ago. Attempts to contact the last known maintainer at
the email address listed in the file header (with the spam-prevention characters
removed) produced a delivery failure notification stating that the address did
not exist.

I intend to submit some minor improvements to this file. Per [1], I will assume
maintainership of it for the time being.

related: #15339

Signed-off-by: Daniel Smith <daniel@rdnlsmith.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

[1]: https://groups.google.com/g/vim_dev/c/I3pOKIOgM4A/m/pekGQB_lBwAJ
2024-07-25 20:54:10 +02:00
377a085ea3 patch 9.1.0614: tests: screendump tests fail due to recent syntax changes
Problem:  Vim syntax file changes to :set command highlighting render
          some test dump files invalid.
          (zeertzjq, after commit ddbb6fe)
Solution: Regenerate the affected dump files (Doug Kearns)

closes: #15342

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-25 20:43:50 +02:00
2979cfc262 patch 9.1.0613: tests: termdebug test may fail and leave file around
Problem:  tests: termdebug test may fail and leave temp file around
          (Dominique Pellé)
Solution: only run balloon_show() if the function exists, validate
          termdebug is running using the g: termdebug_is_running var,
          use defer to delete temporary files

fixes: #15334

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 21:41:55 +02:00
ddbb6fe2d0 runtime(vim): Update base-syntax, improve :set highlighting
- Match bang, "all" and "termcap" options, and trailing command
  separator "|".
- Highlight set assignment operators.
- Match multiline :set and multiline option values.
- Mention the newer "0o" octal prefix at :help :set=.

closes: #15329

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 20:21:22 +02:00
e73e5b889b runtime(java): Optionally highlight the :: token for method references
This token will be highlighted, similar to the arrow of
lambda expressions, whenever "g:java_highlight_functions" is
defined.

Also:

- Improve the recognition of _switch-case_ labels
  (D-Cysteine).
- Remove insignificant empty statements in syntax test
  files.

closes: #15322

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.13
https://github.com/fleiner/vim/pull/1

Co-authored-by: D-Cysteine <54219287+D-Cysteine@users.noreply.github.com>
Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 20:17:43 +02:00
df77c8ad39 patch 9.1.0612: filetype: deno.lock file not recognized
Problem:  filetype: deno.lock file not recognized
Solution: detect 'deno.lock' as json filetype
          (カワリミ人形)

Reference:
https://docs.deno.com/runtime/manual/basics/modules/integrity_checking/#caching-and-lock-files

closes: #15333

Signed-off-by: カワリミ人形 <kawarimidoll+git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 20:10:58 +02:00
2cad941dc0 runtime(zip): Use delete() for deleting directory
This is safer because we don't invoke the shell.

closes: #15335

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-24 20:07:00 +02:00
581d4a7b35 runtime(netrw): escape filename before trying to delete it
fixes: #15330

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-23 21:14:06 +02:00
56904f90d1 patch 9.1.0611: ambiguous mappings not correctly resolved with modifyOtherKeys
Problem:  ambiguous mappings not correctly resolved with modifyOtherKeys
Solution: Check for termcode when an upper case mapping is received and
          does not match (Oleg Goncharov)

Fix for mapping processing when capital leters are represented with terminal codes.

Problem: there are two mappings and
1) the first mapping is substring of the second,
2) the first non-matching letter is capital,
3) capital letters are represented with termcodes "ESC[27;2;<ascii code>~" in given system
then first mapping is applied instead of second.

Example:

    :map B b
    :map BBB blimp!

and then

    BBB -> bbb

instead of

    BBB -> blimp!

Solution: force termcodes check if capital letter does not match.

closes: #15251

Signed-off-by: Oleg Goncharov <goncharovoi@yandex.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-23 20:42:02 +02:00
38ce71c1c3 runtime(zip): correctly extract file from zip browser
Problem:  Enter 'x' in zip browser fail with E121
Solution: Fix typo in zip#Extract()

closes: #15321

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-23 19:58:36 +02:00
e4b991ed36 patch 9.1.0610: filetype: OpenGL Shading Language files are not detected
Problem:  filetype: OpenGL Shading Language files are not detected
Solution: detect various file extensions as GLSL filetype, include
          indent and syntax script, do no longer recognize '*.comp'
          as Mason filetype (Gregory Anders)

closes: #15317

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-22 20:33:48 +02:00
9d57ea5cd3 runtime(netrw): Fix endless recursion in netrw#Explore()
Problem:  ':E /etc BOOM' give E132 error.
Solution: Avoid recursion call with same arguments.

fixes: #5723
closes: #15318

Signed-off-by: Damien <141588647+xrandomname@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-22 20:25:34 +02:00
4c3616d7a2 patch 9.1.0609: outdated comments in Makefile
Problem:  outdated comments in Makefile
Solution: update outdated comments, update rule for vimtags
          (Shane Harper)

related: commit b81109192f

Here are the changes and the reasons for them:

- Delete the comment preceding the assignment to VIMPROG. Since b81109192f
  there's no need for VIMPROG to be set to something else when this is executed
  from src/Makefile. (The comment was wrong anyway; VIMPROG was being set to
  "$$BUILD_DIR/$(VIMTARGET)".)

```
    # Set to $(VIMTARGET) when executed from src/Makefile.
     VIMPROG = ../../src/vim
```

- Delete "`and installed`" in the following comment; The vimtags rule doesn't
  require that Vim has been installed.

```
    # Use Vim to generate the tags file.  Can only be used when Vim has been
    # compiled and installed.  Supports multiple languages.
    vimtags: $(DOCS)
```

- With commit b81109192f there is no longer a need to set VIMPROG here:

```
       -@BUILD_DIR="`pwd`"; cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \
               $(MAKE) VIMPROG="$$BUILD_DIR/$(VIMTARGET)" vimtags; fi
```

The new code below will use the same vim executable as the old code:
```
       -@cd $(HELPSOURCE); if test -z "$(CROSS_COMPILING)"; then \
               $(MAKE) vimtags; fi
```

- Delete the following comment which was related to setting VIMPROG as it no longer has any value:
```
       # We can assume Vim was build, but it may not have been installed,
       # thus use the executable in the current directory.
```
Note: this comment used to be (unnecessarily) echoed to the terminal (because
      it was indented) when making installrtbase.

closes: #15320

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-22 20:09:26 +02:00
6e37575760 runtime(mysql): update syntax script
Problem:

- `syn region ...`s in syntax/mysql.vim match function names inaccurately.
- no syntax rules for mysql window function.
- coarse highlight definition in syntax/mysql.vim.

Solution:

- add `\<` before the function name for accuracy.
- add syntax rules for mysql window function.
- enhance the highlight definition.

closes: #15311

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-21 09:27:27 +02:00
aa495124f8 runtime(yaml): Fix flow mapping key detection
fixes: #15196
closes: #15313

Signed-off-by: itchyny <itchyny@cybozu.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-21 09:21:20 +02:00
d887fb81b6 runtime(yaml): Remove orphaned YAML syntax dump files
closes: #15312

Signed-off-by: itchyny <itchyny@cybozu.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-20 13:32:24 +02:00
220474d239 patch 9.1.0608: Coverity warns about a few potential issues
Problem:  Coverity warns about a few potential issues
Solution: Fix those issues (see details below)

1) Fix overflow warning in highlight.c
   This happens because we are comparing int with long
   and assign a potential long value to an int, which
   could cause an overflow. So add some casts to ensure
   the value fits into an int.

2) Fix Overflow warning in shift_line().
   This happens because we are performing a division/modulo
   operation of a long type by an int type and assign the result
   to an int, which could then overflow. So before performing
   the operation, trim the long to value to at most max int value,
   so that it can't overflow.

3) Fix overflow warning in syn_list_cluster in syntax.c
   This is essential the same issue as 1)

4) not checking the return value of vim_mkdir() in spellfile.c
   Creating the spell directory could fail. Handle this case
   and return early in this case.

5) qsort() may deref a NULL pointer when fuzzy match does not
   return a result. Fix this by checking that the accessed growarray
   fuzzy_indices actually contains  data. If not we can silently skip
   the qsort() and related logic.

closes: #15284

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-20 13:26:44 +02:00
4aa6b52e82 runtime(kconfig): Update syntax script and remove syn sync
fixes: #15306

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-20 12:20:51 +02:00
510f94b6db INSTALL: remove outdated notice about statically linked executable
closes: #15308

Signed-off-by: Joey Pabalinas <joeypabalinas@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-20 12:08:43 +02:00
a90b0b4ba2 patch 9.1.0607: termdebug: uses inconsistent style
Problem:  termdebug: uses inconsistent style
Solution: termdebug: deprecate numeric values for v:true/false,
          fix white space style in the plugin
          (Ubaldo Tiberi)

closes: #15304

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-20 12:06:07 +02:00
c8a582aad5 patch 9.1.0606: tests: generated files may cause failure in test_codestyle
Problem:  tests: generated files may cause failure in test_codestyle
Solution: Exclude OLE-related generated files from style checks.
          (Ken Takata)

Some OLE-related auto-generated files may contain space errors:
https://ci.appveyor.com/project/chrisbra/vim-win32-installer/builds/50248542/job/w45ve9yd6qmmws8t#L11475
```
	From test_codestyle.vim:
	Found errors in Test_source_files():
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../dlldata.c line 2: trailing white space
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../iid_ole.c line 12: trailing white space
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[6]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../if_ole.h line 60: space before Tab
	command line..script C:/projects/vim-win32-installer/vim/src/testdir/runtest.vim[607]..function RunTheTest[57]..Test_source_files[8]..<SNR>8_PerformCheck[11]..<SNR>8_ReportError line 2: ../if_ole.h line 10: trailing white space
```

Exclude them from style checking.

closes: #15309

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-20 11:55:13 +02:00
0be03e14b9 patch 9.1.0605: internal error with fuzzy completion
Problem:  internal error with fuzzy completion
          (techntools)
Solution: only fuzzy complete the pattern after directory separator
          (glepnir)

fixes: #15287
closes: #15291

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-19 16:45:05 +02:00
b14c325a5b patch 9.1.0604: popup_filter during Press Enter prompt seems to hang
Problem:  popup_filter during Press Enter prompt seems to hang
Solution: Return early, when need_wait_return is set
          (Ernie Rael)

fixes: #15300
closes: #15301

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-19 16:37:39 +02:00
d2cedc2db3 translatoin(tr): Update Serbian messages translation
closes: #15302

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-19 16:31:43 +02:00
5fb801a74f patch 9.1.0603: filetype: use correct extension for Dracula
Problem:  pattern detection for Dracula language uses "*lvs" and "*lpe".
          as there is no dot, those are not treated as extensions which
          they should (judging by 'runtime/syntax/dracula.vim' and
          common sense).
Solution: use "*.lvs" and "*.lpe" patterns (Evgeni Chasnovski)

closes: #15303

Signed-off-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-19 15:59:29 +02:00
37853b7de3 patch 9.1.0602: filetype: Prolog detection can be improved
Problem:  filetype: Prolog detection can be improved
Solution: update the prolog detection regex
          (igna_martinoli)

related: #10835
related: #15206
closes: #15253

Co-authored-by: clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: igna_martinoli <ignamartinoli@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 21:34:36 +02:00
eb6d733bef runtime(doc): fix more inconsistencies in assert function docs
related: https://github.com/vim/vim/pull/15280#issuecomment-2233771449

closes: #15285

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 21:16:05 +02:00
b5d6b5caac patch 9.1.0601: Wrong cursor position with 'breakindent' when wide char doesn't fit
Problem:  Wrong cursor position with 'breakindent' when a double-width
          character doesn't fit in a screen line (mikoto2000)
Solution: Include the width of the 'breakindent' properly.
          (zeertzjq)

fixes: #15289
closes: #15290

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 21:13:31 +02:00
99984fc58a runtime(vim): Update base-syntax, improve :map highlighting
Match :map ( RHS properly.

Only match ! after :map, :noremap, :unmap and :mapclear.

closes: #15297

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 20:45:19 +02:00
1165f7850b patch 9.1.0600: Unused function and unused error constants
Problem:  unused function typval_compare_class() and error constants
Solution: remove function typval_compare_class() and ifdef out
          unused error constants (Dominique Pellé)

closes: #15299

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 20:40:28 +02:00
aef6179bcf patch 9.1.0599: Termdebug: still get E1023 when specifying arguments
Problem:  Termdebug: still get E1023 when specifying arguments and using
          a prompt buffer.
Solution: Use empty() instead of len().  Add a test.  Fix wrong order of
          arguments to assert_equal() in Test_termdebug_basic().
          (zeertzjq)

closes: #15288

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 20:35:42 +02:00
4266daae17 runtime(mermaid): correct wrong comment options
fixes: #15279

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-18 20:32:04 +02:00
e7a4523b02 runtime(doc): fix typo "a xterm" -> "an xterm"
related: #15278

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:41:48 +02:00
8159fb18a9 patch 9.1.0598: fuzzy completion does not work with default completion
Problem:  fuzzy completion does not work with default completion
Solution: Make it work (glepnir)

closes: #15193

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:32:54 +02:00
fcc1b5741e patch 9.1.0597: KeyInputPre cannot get the (unmapped typed) key
Problem:  KeyInputPre cannot get the (unmapped typed) key
          (after v9.1.0563)
Solution: Add the "typedchar" property to the v:event dict
          (Shougo Matsushita)

closes: #15231

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:25:22 +02:00
76c19028ff patch 9.1.0596: filetype: devscripts config files are not recognized
Problem:  filetype: Debian devscripts config files are not recognized
Solution: detect devscripts.conf and .devscripts files as sh filetype
          (sourced by /bin/sh)

closes: #15227

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:18:10 +02:00
2736cc725d runtime(termdebug): gdb file/folder check is now performed only in CWD.
closes: #15268

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:16:02 +02:00
27f53346a3 runtime(termdebug): quote filename arguments using double quotes
closes: #15270

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:15:07 +02:00
1724ddbe3a runtime(sdc): update syntax to SDC-standard 2.1
Looking into the current standard for Synopsis Design Constraints (SDC)
from their [Technology Access
Program](https://www.synopsys.com/community/interoperability-programs/tap-in.html),
one can see that the current state of the sdc-syntax file is very
outdated as well as short in coverage of keywords.

This commit pursues to add all the missing keywords from the current
standard (Rev. 2.1).

closes: #15281

Signed-off-by: daniel-s-w <59746710+daniel-s-w@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:10:04 +02:00
c1b3984a7b runtime(doc): minor updates.
closes: #15280

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 20:04:22 +02:00
080ba2c69d runtime(vim): Cleanup :match and :loadkeymap syntax test files
Remove extraneous trailing whitespace from legacy script :loadkeymap
test file.

Remove :match *_99.dump test file.  These are no longer generated.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 19:35:02 +02:00
d65e58f6f9 runtime(vim): Update base-syntax, match types in Vim9 variable declarations
Match types in Vim9 variable declarations.

Match Vim9 boolean and null literals. These are not matched in all
contexts yet.

related: #15277

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 19:34:14 +02:00
30d54fdddf patch 9.1.0595: make errors out with the po Makefile
Problem:  make errors out with the po Makefile
          (yanivshlom, after v9.1.0558)
Solution: Set variables differently (RestorerZ)

fixes: #15275
closes: #15282

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 19:28:25 +02:00
ac4ce9e15b patch 9.1.0594: Unnecessary redraw when setting 'winfixbuf'
Problem:  Unnecessary redraw when setting 'winfixbuf'.
Solution: Remove P_RWIN flag. (zeertzjq)

closes: #15283

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 19:26:50 +02:00
d24aaa9983 runtime(doc): using wrong highlight for UTF-8
This happens, because UTF-8 was on a single line and as such triggered
the helpHeading syntax group. So slightly re-worded the line, so
that it does no longer match the header syntax rule.

fixes: #15278

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-17 08:25:45 +02:00
3698fbbd7c runtime(tsv): include simple syntax plugin
fixes: #15271

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:53:40 +02:00
3088ef094d patch 9.1.0593: filetype: Asymptote files are not recognized
Problem:  filetype: Asymptote files are not recognized
Solution: detect '*.asy' files as asy filetype, include
          ftplugin and syntax plugin (AvidSeeker).

Reference: https://asymptote.sourceforge.io/

closes: #15252

Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:42:17 +02:00
babea52f4d runtime(gomod): add recommended indent options to ftplugin
closes: #15264

Signed-off-by: markmacode <code@mamo.aleeas.com>
Signed-off-by: yu-yk <yukkuen.yu@linktivity.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:30:32 +02:00
3e07d5aef1 runtime(go): add recommended indent options to ftplugin
related: #15264

Signed-off-by: markmacode <code@mamo.aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:26:47 +02:00
6a54dcbbd6 runtime(gdscript): add recommended indent options to ftplugin
related: #15264

Signed-off-by: markmacode <code@mamo.aleeas.com>
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:18:06 +02:00
b5844104ab patch 9.1.0592: runtime: filetype: Mediawiki files are not recognized
Problem:  filetype: Mediawiki files are not recognized
Solution: detect "*.mw" and "*.wiki" as mediawiki filetype,
          include basic syntax and filetype plugins.
          (AvidSeeker)

closes: #15266

Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 21:10:50 +02:00
c6d7dc0393 patch 9.1.0591: filetype: *.wl files are not recognized
Problem:  filetype: *.wl files are not recognized
Solution: Detect '*.wl' files as Mathematica package files
          (Jonas Dujava)

closes: #15269

Signed-off-by: Jonas Dujava <jonas.dujava@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 20:37:41 +02:00
d4d1207208 patch 9.1.0590: Vim9: crash when accessing getregionpos() return value
Problem:  Vim9: crash when accessing getregionpos() return value.
Solution: Correct the return type (zeertzjq).

fixes: #15272
closes: #15273

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 20:34:16 +02:00
03d20aaac4 runtime(doc): 'cpoptions': Include "z" in the documented default
A fixup for commit 22105fd1fe (tag: v9.1.0589)

While at it, document the correct Vi defaults and $VIM_POSIX (even more
compatible) flags.

closes: #15274

Signed-off-by: Illia Bobyr <illia.bobyr@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-16 20:19:13 +02:00
22105fd1fe patch 9.1.0589: vi: d{motion} and cw work differently than expected
Problem:  vi: d{motion} and cw command work differently than expected
Solution: add new cpo-z flag to make the behaviour configurable

There are two special vi compatible behaviours (or should I say bugs?):

1): cw behaves differently than dw. That is, because cw is special cased
    by Vim and is effectively aliased to ce.
    POSIX behaviour is documented here:
https://pubs.opengroup.org/onlinepubs/9699919799/utilities/vi.html#tag_20_152_13_81

2): d{motion} may make the whole delete operation linewise, if the start
    and end of the motion are on different lines and there are only
    blanks before the start and after the end of the motion.
    Did not find a related POSIX link that requires this behaviour.

Both behaviours can be considered inconsistent, but we cannot easily
change it, because it would be a backward incompatible change and also
incompatible to how classic vi behaved.

So let's add the new cpo flag "z", which when not included fixes both
behaviours and make them more consistent to what users would expect.

This has been requested several times:
https://groups.google.com/d/msg/vim_use/aaBqT6ECkA4/ALf4odKzEDgJ
https://groups.google.com/d/msg/vim_dev/Dpn3xtUF16I/T6JcOPKN6usJ
http://www.reddit.com/r/vim/comments/26nut8/why_does_cw_work_like_ce/
https://groups.google.com/d/msg/vim_use/vunNWLFWfQg/MmJh_ZGaAgAJ
https://github.com/vim/vim/issues/4390

So in summary, if you want to have the w motion work more consistent,
remove the 'z' from the cpo settings.

related: #4390
closes: #15263

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:51:11 +02:00
fcc53461d4 runtime(colors): update included colorschemes
- Add PmenuMatch and PmenuMatchSel to all colorschemes
- Add contrast to habamax Type, String, Constant and PreProc
- Change habamax PmenuSel to neutral gray to make PmenuMatchSel more visible
- Change habamax Tabline and VertSplit
- Make Conceal less visible for zellner, torte, shine, ron, peachpuff,
  pablo, morning, koehler, evening, delek, blue, darkblue, lunaperche,
  retrobox
- Add Added/Changed/Removed highlights
- Fix retrobox Terminal background
- Other minor fixes and improvements

closes: #15267

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:42:31 +02:00
df62c62177 runtime(doc): grammar fixes in options.txt
closes: #15265

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:29:59 +02:00
3ce274682b patch 9.1.0588: The maze program no longer compiles on newer clang
Problem:  The maze program no longer compiles on newer clang
Solution: Use ANSI C function definition for main()
          (Mohamed Akram)

Implicit int is an error in newer versions of clang.

closes: #15247

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:23:36 +02:00
1cc4cae961 runtime(typst): Add typst runtime files
closes: #15234

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 20:00:48 +02:00
490c1daa24 patch 9.1.0587: tests: Test_gui_lowlevel_keyevent is still flaky
Problem:  tests: Test_gui_lowlevel_keyevent is still flaky
          (after v9.1.0571)
Solution: skip generating key event for Ctrl-C,
          remove the test_is_flaky variable again (Ken Takata)

v9.1.0571 was not enough.
Ctrl-C interruption may occur before the preceding events are processed.
Exclude Ctrl-C to avoid the flakiness.

closes: #15224

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-15 19:52:25 +02:00
700cf8cfa1 patch 9.1.0586: ocaml runtime files are outdated
Problem:  ocaml runtime files are outdated
Solution: sync those files with the upstream repo,
          detect a few more ocaml files
          (Yinzuo Jiang)

closes: #15260

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-14 17:02:33 +02:00
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
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>
2024-07-14 16:03:41 +02:00
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>
2024-07-14 11:15:07 +02:00
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
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
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>
2024-07-14 10:26:19 +02:00
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>
2024-07-14 10:22:54 +02:00
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>
2024-07-14 10:20:20 +02:00
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>
2024-07-13 19:06:44 +02:00
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>
2024-07-13 19:04:10 +02:00
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>
2024-07-13 19:02:10 +02:00
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>
2024-07-13 18:59:47 +02:00
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>
2024-07-13 18:56:25 +02:00
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>
2024-07-13 18:53:54 +02:00
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>
2024-07-13 18:49:55 +02:00
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
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>
2024-07-12 20:18:54 +02:00
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
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>
2024-07-12 19:36:53 +02:00
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
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>
2024-07-12 07:48:32 +02:00
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
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>
2024-07-12 07:35:36 +02:00
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
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>
2024-07-12 07:29:14 +02:00
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
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>
2024-07-11 22:45:42 +02:00
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>
2024-07-11 22:26:01 +02:00
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>
2024-07-11 22:25:54 +02:00
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>
2024-07-11 22:25:42 +02:00
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>
2024-07-11 22:16:28 +02:00
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>
2024-07-11 22:05:12 +02:00
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>
2024-07-11 21:48:09 +02:00
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
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>
2024-07-11 21:41:23 +02:00
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>
2024-07-11 21:36:21 +02:00
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>
2024-07-11 21:14:15 +02:00
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>
2024-07-10 21:25:04 +02:00
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>
2024-07-10 20:20:48 +02:00
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
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>
2024-07-10 19:36:36 +02:00
a3a14d5469 runtime(htmlangular): correct comment
related: #15190

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-10 19:33:33 +02:00
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>
2024-07-10 19:31:00 +02:00
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>
2024-07-09 20:03:24 +02:00
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>
2024-07-09 19:55:40 +02:00
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>
2024-07-09 19:52:20 +02:00
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>
2024-07-09 19:44:32 +02:00
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>
2024-07-09 19:11:18 +02:00
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>
2024-07-09 18:51:29 +02:00
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
c8e158be0e patch 9.1.0548: it's not possible to get a unique id for some vars
Problem:  it's not possible to get a unique id for some vars
Solution: Add the id() Vim script function, which returns a unique
          identifier for object, dict, list, job, blob or channel
          variables (Ernie Rael)

fixes: #14374
closes: #15145

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 18:39:52 +02:00
73a810817b runtime(tmux): Update syntax script
closes: #15195
related: #15188

Co-authored-by: Contsantine Bulany <61948252+lostl1ght@users.noreply.github.com>
Signed-off-by: Eric Pruitt <eric.pruitt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 18:32:55 +02:00
48b7d05a4f patch 9.1.0547: No way to get the arity of a Vim function
Problem:  No way to get the arity of a Vim function
          (Austin Ziegler)
Solution: Enhance get() Vim script function to return the function
          argument info using get(func, "arity") (LemonBoy)

fixes: #15097
closes: #15109

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-09 18:31:12 +02:00
03acd4761b patch 9.1.0546: vim-tiny fails on CTRL-X/CTRL-A
Problem:  vim-tiny fails on CTRL-X/CTRL-A
          (Rob Foehl, after 9.1.0172)
Solution: Move #ifdefs, so that after changing the line in del_bytes,
          the cached textlen value is invalidated

closes: #15178

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-08 21:12:55 +02:00
ab03dd2085 runtime(hlsplaylist): include hlsplaylist ftplugin file
fixes: #15156
closes: #15162

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: AvidSeeker <avidseeker7@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-08 21:11:34 +02:00
d1c369892d runtime(doc): fix typo in :h ft-csv-syntax
closes: #15179

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-08 21:02:14 +02:00
b3c232215d runtime(doc): Correct shell command to get $VIMRUNTIME into shell
The original shell command could set the VIMRUNTIME variable to an
invalid path.
    - since v9.0.0592 trailing spaces were typically added making the
      path invalid. (I observed that spaces were added if the length of
      the path wasn't equal to one less than an integer multiple of the
      number of display columns.)
    - newline character/s would be added, making the path invalid, if
      the path was longer than the number of display columns.

The new command is shorter than the original command.

closes: #15184

Signed-off-by: Shane Harper <shane@shaneharper.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-08 20:59:33 +02:00
5285b3cd29 patch 9.1.0545: MSVC conversion warning
Problem:  MSVC conversion warning (LemonBoy, after 9.1.0522)
Solution: Use size_t instead of int, fix style of casts
          (Ernie Rael)

related: #15082
closes: #15187

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-08 20:42:45 +02:00
62f31e9499 patch 9.1.0544: filetype: ldapconf files are not recognized
Problem:  filetype: ldapconf files are not recognized
Solution: Detect '.ldaprc', 'ldap.conf' and 'ldaprc' files as ldapconf
          filetype, include a simple ldapconf ftplugin file
          (Riley Bruins)

[Specification](https://www.openldap.org/software//man.cgi?query=ldap.conf&sektion=5&apropos=0&manpath=OpenLDAP+2.4-Release)

closes: #15176

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:20:22 +02:00
f77a0e9f41 runtime(cmakecache): include cmakecache ftplugin file
closes: #15175

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:18:31 +02:00
380f98002d runtime(lex): include lex ftplugin file
Spec found [here](https://docs.oracle.com/cd/E19504-01/802-5880/lex-6/index.html)

closes: #15174

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:17:16 +02:00
7d60dc2069 runtime(yacc): include yacc ftplugin file
closes: #15173

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:16:08 +02:00
08b0c12716 runtime(squirrel): include squirrel ftplugin file
Comment spec found [here](https://squirrel-lang.org/squirreldoc/reference/language/lexical_structure.html#comments)

closes: #15172

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:14:59 +02:00
2c9ef3a671 runtime(objcpp): include objcpp ftplugin file
This one just sources the objc.vim ftplugin.

closes: #15170

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:12:47 +02:00
94c1c6638a runtime(tf): include tf ftplugin file
Adds ftplugin support for tf (TinyFugue). Comment support taken from
[here](1e8ac0bb01/src/command.c (L568))

closes: #15168

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:07:56 +02:00
01e20902f4 runtime(mysql): include mysql ftplugin file
This one just sources from the SQL ftplugin. Without this, *.mysql
files don't inherit the common SQL settings.

closes: #15166

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 21:02:23 +02:00
a264bb931e runtime(javacc): include javacc ftplugin file
closes: #15167

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:59:42 +02:00
2525608d73 runtime(cabal): include cabal ftplugin file
closes: #15158

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:58:10 +02:00
f5398c8975 runtime(cuda): include CUDA ftplugin file
closes: #15159

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:56:43 +02:00
2c299eb258 runtime(editorconfig): include editorconfig ftplugin file
closes: #15160

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:54:32 +02:00
8906e22df5 runtime(kivy): update kivy syntax, include ftplugin
Kivy uses "#:" for preprocessing commands (like "#:import ...") which
were overridden by the comment syntax. This has been changed, and a
commentstring has been added.

closes: #15163

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:53:04 +02:00
b5a92d72eb runtime(syntax-tests): Stop generating redundant "*_99.dump" files
- Remove the code handling their generation.
- Remove the code written for the shell filetype to clear up
  the buffer screen before such a file can be generated.
- Remove all but "yaml.yaml_99.dump" of such generated files
  (since there is no published "input/yaml.yaml.yaml", let
  its maintainer regenerate screen dump files and remove
  redundant ones).

The new algorithm turns a "*_99.dump" file obsolete because
all lines written in such a file will already be present in
lower-numbered "*.dump" files.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:51:14 +02:00
8145620a95 patch 9.1.0543: Behavior of CursorMovedC is strange
Problem:  Behavior of CursorMovedC is strange.
Solution: Also trigger when the cmdline has changed.
          (zeertzjq)

fixes: #15069
closes: #15071

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:48:25 +02:00
e85fdc730e runtime(vim): Update base-syntax, improve :match command highlighting
Match group and pattern arguments to :match commands.

closes: #15096

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:45:37 +02:00
9d779c514f patch 9.1.0542: Vim9: confusing string() output for object functions
Problem:  Vim9: confusing string() output for object functions
Solution: improve the output for object functions (Ernie Rael)

fixes: #15129
closes: #15143

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:41:44 +02:00
52123879c0 patch 9.1.0541: failing test with Vim configured without channel
Problem:  failing test with Vim configured without channel
Solution: In the test Test_null_values() verify that the 'channel' and
          'job' feature is present in Vim. (Dominique Pellé)

Test `Test_null_values` was failing when vim is configured without
channel because the test uses function `null_channel()` (which
requires the `+channel` feature) and using `null_job()` which
requires the `+job` feature. But was reproducible when vim is
configured with:
```
./configure --with-features=huge --enable-gui=none --disable-channel
```

Only check `null_channel()` when the `+channel` feature is available.
Only check `null_job()` when the `+job` feature is available.

closes: #15177

Signed-off-by: Dominique Pellé <dominique.pelle@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:37:12 +02:00
fc3f5dba52 patch 9.1.0540: Unused assignment in sign_define_cmd()
Problem:  Unused assignment in sign_define_cmd()
Solution: Remove the assignment.  Also document the "priority" flag of
          sign_define(). (zeertzjq)

closes: #15169

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:33:46 +02:00
fbbabbca33 runtime(doc): add page-scrolling keys to index.txt
Also add the newly documented keys from commit 6a4afb1efc
to index.txt which was forgotten.

related: #15107

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:30:59 +02:00
49ddeefeca runtime(doc): add reference to xterm-focus-event from FocusGained/Lost
fixes: #15157

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 20:29:43 +02:00
248efab9b5 patch 9.1.0539: Not enough tests for what v9.1.0535 fixed
Problem:  Not enough tests for what v9.1.0535 fixed
Solution: Add another test for ex-mode

This comes from: https://groups.google.com/g/vim_dev/c/F5-tDqoafz8/m/GqKF-uQsLD0J

related: #15120

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 19:44:16 +02:00
b9bbf1f044 runtime(doc): clarify how to re-init csv syntax file
fixes: #15161

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-07 19:24:36 +02:00
b975ddfdf9 patch 9.1.0538: not possible to assign priority when defining a sign
Problem:  not possible to assign priority when defining a sign
          (Mathias Fußenegger)
Solution: Add the priority argument for the :sign-define ex command and
          the sign_define() function (LemonBoy)

Use the specified value instead of the default one (SIGN_DEF_PRIO) when
no priority is explicitly specified in sign_place or :sign place.

fixes: #8334
closes: #15124

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 18:04:09 +02:00
25ac6d67d9 patch 9.1.0537: signed number detection for CTRL-X/A can be improved
Problem:  signed number detection for CTRL-X/A can be improved
          (Chris Patuzzo)
Solution: Add the new "blank" value for the 'nrformat' setting. This
          will make Vim assume a signed number only if there is a blank
          in front of the sign.
          (distobs)

fixes: #15033
closes: #15110

Signed-off-by: distobs <cuppotatocake@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 17:55:26 +02:00
f095539b39 patch 9.1.0536: filetype: zone files are not recognized
Problem:  filetype: zone files are not recognized
          (rpdprd)
Solution: Detect '*.zone' files as bindzone filetype

fixes: #14222

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 17:39:18 +02:00
f3daa4525b patch 9.1.0535: newline escape wrong in ex mode
Problem:  newline escape wrong in ex mode (Konrad Schwarz)
Solution: partly revert patch 7.3.014, remove backslash in front of a
          newline when not in prompt mode in ex line mode
          (Mohamed Akram)

This fixes newline escaping to allow passing multiple commands to
":global", multiple lines to shell commands, and ending lines in append
mode with backslashes. This should fix a POSIX/(traditional) VI
incompatiblity.

This reverts a previous incorrect attempt at patch v7.3.014 to fix
append mode which removed half of trailing backslashes which lead to,
eg. the following two commands being parsed as having a different number
of backslashes:

```
!echo foo\\\
```

```
!echo foo\\ \
```

fixes: #6135
fixes: #7244
closes: #15120

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 17:12:09 +02:00
84ca1388d8 runtime(man): honor cmd modifiers before g:ft_man_open_mode
Give priority to (placement) command modifiers, specifically
`:vertical`, `:horizontal` and `:tab`, ahead of `g:ft_man_open_mode`,
so that if the user says e.g. `:vert Man`, Vim does the expected thing.

closes: #15117

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 16:57:18 +02:00
f21ca6d1f1 runtime(man): use nnoremap to map to Ex commands
If the user plays rebinding games such as

    nnoremap : ,
    nnoremap , :

(cf. https://konfekt.github.io/blog/2016/10/03/get-the-leader-right),
then the mappings defined by man.vim will become non-functional.

closes: #15130

Signed-off-by: Ivan Shapovalov <intelfx@intelfx.name>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 16:17:07 +02:00
65407ce1d2 patch 9.1.0534: completion wrong with fuzzy when cycling back to original
Problem:  completion wrong with fuzzy when cycling back to original
          (Quan Nguyen)
Solution: reset show_match_ok when cp_score is zero (glepnir)

fixes: #15095
closes: #15105

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 16:09:19 +02:00
719714383e runtime(syntax-tests): Abort and report failed cursor progress
Track the cursor forward progress through a syntax test file
so that any degenerate input can be checked and reported.

closes: #15150

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 12:00:02 +02:00
d2f4987999 runtime(syntax-tests): Introduce self tests for screen dumping
Write a batch of test files with made-up syntax to serve for
additional linewise checks to be manually performed whenever
the algorithm for screen dump file generation is modified.

Define a shell variable VIM_SYNTAX_SELF_TESTING to run these
tests:
	cd runtime/syntax/
	VIM_SYNTAX_SELF_TESTING=1 make clean test

related: #15150

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 11:59:35 +02:00
cc5482edb4 runtime(syntax-tests): Clear and redraw the ruler line with the shell info
The current contents of sh_01_99.dump and sh_09_99.dump
begin with ":redraw" in the ruler line whereas both the
comment and the need for the redraw command execution imply
blanks "       ".

related: #15150

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 11:56:56 +02:00
8418446644 runtime(syntax-tests): Allow for folded and wrapped lines in syntax test files
The current implementation falls short for syntax test files
on two accounts:
1. With folded lines -- some lines before folded lines are
    unnecessarily repeated in generated dump files because
    closed folded lines are always treated as opened for the
    cursor to move _in_ instead of to move _over_ them.
2. With wrapped lines (longer than 75 columns) -- some lines
    are omitted in generated dump files because calculations
    for the cursor progress and its movement commands only
    refer to file lines and not their layout within a 20x75
    buffer (less &cmdheight).

As an alternative, we abandon deterministic (and inaccurate
at times) calculations for the cursor progress and, instead,
advance the cursor by as much as before for a single dump
file, but now rely on marking the last visible line and
additional movement to position lines at desired offsets,
carefully preserving compatibility for the &scrolloff and
&ruler values inherited from defaults.vim.  The parent Vim
process will keep track of progress through a syntax test
file made by its child process ("terminal") by reading the
rightmost end of the ruler line from the terminal buffer,
looking for " All " or " Bot " for its cue to finish dump
file generation.

With these changes applied, the lossless line length limit
will be raised from 75 to 1425 (for a 19x75 view) columns.

Also, prefer "lastline" to "truncate" for &display; hiding
the content of any last _long_ line in a view goes against
the purpose of syntax file testing -- all lines should be
recorded.

related: #15150
fixes: #14245

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 11:56:31 +02:00
f397549332 patch 9.1.0533: Vim9: need more tests for nested objects equality
Problem:  Vim9: need more tests for nested objects equality
Solution: Add more tests (Ernie Rael)

related: #15070
related: #15081
related: #15085
closes: #15153

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 11:44:37 +02:00
b81109192f CI: Pre-v9.0.0110 versions generate bogus documentation tag entries
Problem:  CI: Pre-v9.0.0110 versions generate bogus documentation tag
          entries
Solution: Set $VIMPROG to the freshly compiled Vim (Aliaksei Budavei)

related: #10813
related: #15099

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 11:40:46 +02:00
aaaa21b58f runtime(doc): Remove wrong help tag CTRL-SHIFT-CR
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-06 11:29:38 +02:00
15addb24dd patch 9.1.0532: filetype: Cedar files not recognized
Problem:  filetype: Cedar files not recognized
Solution: Detect '*.cedar' files as cedar filetype
          (Riley Bruins)

References: https://github.com/cedar-policy

closes: #15148

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-05 21:14:26 +02:00
6a4afb1efc runtime(doc): document further keys that scroll page up/down
fixes: #15107

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-05 21:11:57 +02:00
93a3d2b905 patch 9.1.0531: resource leak in mch_get_random()
Problem:  resource leak in mch_get_random() (after v9.1.0518)
Solution: close file descriptor after reading successfully
          from /dev/urandom

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-05 09:58:58 +02:00
7a44f96fe7 runtime(tutor): Fix wrong spanish translation
closes: #15127

Signed-off-by: Rodolfo Guagnini <rodolfo.guagnini@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 20:04:26 +02:00
3146d63267 runtime(netrw): fix remaining case of register clobber
complements 62f7b55c1a

closes: #15114

Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 19:45:36 +02:00
470c0db2b3 patch 9.1.0530: xxd: MSVC warning about non-ASCII character
Problem:  xxd: MSVC warning about non-ASCII character
Solution: Specify source-charset:utf-8 in Makefile (Ken Takata)

xxd.c has non-ASCII-character comments. This causes the following
warning on MSVC:
```
warning C4819: The file contains a character that cannot be represented
in the current code page (932). Save the file in Unicode format to
prevent data loss.
```

Add the `/source-charset:utf-8` option to avoid this.

closes: #15119

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 19:35:48 +02:00
749ba0f6d9 patch 9.1.0529: silent! causes following try/catch to not work
Problem:  silent! causes following try/catch to not work
          (Malcolm Rowe)
Solution: consider emsg_silent in handle_did_throw() and do not abort
          evaluation flow for :silent! (LemonBoy)

The silent! flag causes the evaluation not to be aborted in case of
uncaught exceptions, adjust handle_did_throw to take this detail into
account.

Fixes the long-standing todo.txt item:
```
Problem that a previous silent ":throw" causes a following try/catch not
to work. (ZyX, 2013 Sep 28) With examples: (Malcolm Rowe, 2015 Dec 24)
Also see #8487 for an example.
```

fixes: #538
closes: #15128

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 19:23:16 +02:00
11d5992573 runtime(rust): use shiftwidth() in indent script
closes: #15138

Signed-off-by: novenary <novenary@kwak.zip>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 19:11:16 +02:00
68f5ceddca patch 9.1.0528: spell completion message still wrong in translations
Problem:  spell completion message still wrong in translations
          (after 9.1.0512)
Solution: Update translation files with the new message
          (Kyle Kovacs)

closes: #15113

Signed-off-by: Kyle Kovacs <kkovacs@diconfiberoptics.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:51:09 +02:00
cd33faf614 patch 9.1.0527: inconsistent parameter in Makefiles for Vim executable
Problem:  inconsistent parameter in Makefiles for Vim executable
Solution: consistently use $VIMPROG across all Makefiles
          (RestorerZ)

closes: #15099

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:48:01 +02:00
8ccb89016e patch 9.1.0526: Unwanted cursor movement with pagescroll at start of buffer
Problem:  Cursor is moved to bottom of window trying to pagescroll when
          already at the start of the buffer (Asheq Imran, after v9.1.0357)
Solution: Don't move cursor when buffer content did not move.
          (Luuk van Baal)

closes: #15139

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:35:56 +02:00
950292152c runtime(doc): mention $XDG_CONFIG_HOME instead of $HOME/.config
This makes it more consistent with :h vimrc and is more correct (in the
case when $XDG_CONFIG_HOME has been defined to point to some other
location.

fixes: #15108

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:31:06 +02:00
761a420c66 patch 9.1.0525: Right release selects immediately when pum is truncated.
Problem:  Right release selects immediately when pum is truncated.
Solution: Use pum_height instead of pum_size when checking click row.
          Don't place it above mouse row when there is more space below.
          (zeertzjq)

fixes: #15101
closes: #15102

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:26:37 +02:00
7ccd1a2e85 patch 9.1.0524: the recursive parameter in the *_equal functions can be removed
Problem:  the recursive parameter in the *_equal functions can be removed
Solution: Remove the recursive parameter in dict_equal(), list_equal()
          object_equal and tv_equal(). Use a comparison of the static
          var recursive_cnt == 0 to determine whether or not tv_equal()
          has been called recursively (Yinzuo Jiang).

closes: #15070

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:20:53 +02:00
e54fd3f7d8 runtime(termdebug): Add Deprecation warnings
closes: #15091

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:14:03 +02:00
50d485432c patch 9.1.0523: Vim9: cannot downcast an object
Problem:  Vim9: cannot downcast an object (Ernie Rael)
Solution: Fix class downcasting issue (LemonBoy).

When casting an object from one class to another the target type may be
a subclass (downcast) or superclass (upcast) of the source one.
Upcasts require a runtime type check to be emitted.

Add a disassembly test.

fixes: #13244
closes: #15079

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 17:03:17 +02:00
05ff4e42fb patch 9.1.0522: Vim9: string(object) hangs for recursive references
Problem:  Vim9: string(object) hangs for recursive references
Solution: Handle recursive objects specifically, add a hang test and a
          compare test (Ernie Rael)

fixes: #15080
closes: #15082

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 16:50:11 +02:00
4179f193cc patch 9.1.0521: if_py: _PyObject_CallFunction_SizeT is dropped in Python 3.13
Problem:  if_py: _PyObject_CallFunction_SizeT is dropped in Python 3.13
Solution: define PyObject_CallFunction for Python >= 3.13
          (Yaakov Selkowitz)

references: python/cpython#105051

closes: #15088

Signed-off-by: Yaakov Selkowitz <yselkowi@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 16:36:05 +02:00
f4af331d08 patch 9.1.0520: Vim9: incorrect type checking for modifying lists
Problem:  Vim9: incorrect type checking for modifying lists
Solution: Correctly assign the member declared types and generate
          typechecks, add disassembly test (LemonBoy)

fixes: #15090
closes: #15094

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 13:43:12 +02:00
9d85d4dcf9 runtime(manpager): avoid readonly prompt
fixes: #15103
closes: #15106

Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 13:39:34 +02:00
9554ace1d9 patch 9.1.0519: MS-Windows: libvterm compilation can be optimized
Problem:  MS-Windows: libvterm compilation can be optimized
Solution: Enable batch inference for libvterm (Ken Takata)

Enable batch inference for libvterm by using $(OBJDIR)/libvterm as the
object directory. This should make the compilation process a bit faster.

closes: #15118

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 13:31:25 +02:00
9987fe8ca0 patch 9.1.0518: initialize the random buffer can be improved
Problem:  initialize the random buffer can be improved
Solution: refactor init_srand() function, move machine-specific parts to
          os_mswin and os_unix, implement a fallback for Windows 10 and
          later (LemonBoy)

closes: #15125

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 13:20:49 +02:00
898b3740c7 patch 9.1.0517: MS-Windows: too long lines in Make_mvc.mak
Problem:  MS-Windows: too long lines in Make_mvc.mak
Solution: Wrap long lines in Make_mvc.mak (Ken Takata)

closes: #15133

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 11:51:30 +02:00
2fbcc15cf9 runtime(terraform): Add filetype plugin for terraform
- Adds commentstring property for terraform
- Adds comments property for terraform

closes: #15144

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Janno Tjarks <janno.tjarks@mailbox.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 11:46:05 +02:00
3d2a996267 runtime(dockerfile): enable spellchecking of comments in syntax script
closes: #15147

Signed-off-by: Kafva <36083692+Kafva@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 11:40:41 +02:00
2606e7718c runtime(doc): rename variable for pandoc markdown support
fixes: #15141

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-07-04 11:25:30 +02:00
f0837ba0b9 runtime(doc): In builtin overview use {buf} as param for appendbufline/setbufline (#15089)
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-24 21:27:01 +02:00
ecd642af43 runtime(doc): clarify, that register 1-9 will always be shifted
related: #15077

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23 20:24:52 +02:00
62f7b55c1a runtime(netrw): save and restore register 0-9, a and unnamed
fixes: #15077

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23 20:23:40 +02:00
225d4d9212 runtime(termdebug): Refactored StartDebug_term and EndDebug functions
- Functions are way too long. Readability and maintainability should
be slightly improved.

- Some variables are re-assigned to their initial value at teardown.
This should not be needed since all internal variables are
re-initialized at startup of every Termdebug session.

closes: #15086

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23 17:25:05 +02:00
01a4fb104d runtime(java): Compose "g:java_highlight_signature" and "g:java_highlight_functions"
With the variables defined, distinctly highlight parts of
a method declaration header: its name and parameter list
parens, from its type parameters, return type, and formal
parameters; and distinctly highlight parts of a lambda
expression: its parameter list parens and the arrow, from
its formal parameters and identifiers.

closes: #15083

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23 10:03:33 +02:00
88bbdb04c2 patch 9.1.0516: need more tests for nested dicts and list comparision
Problem:  need more tests for nested dicts and list comparision
Solution: Add tests for comparing deeply nested List/Dict values
          (Yegappan Lakshmanan)

closes: #15081

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23 10:00:04 +02:00
8625714ac1 patch 9.1.0515: Vim9: segfault in object_equal()
Problem:  Vim9: segfault in object_equal()
Solution: test for object pointer being NULL, before dereferencing them
          (Ernie Rael)

closes: #15085

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-23 09:54:45 +02:00
7b29cc97d6 patch 9.1.0514: Vim9: issue with comparing objects recursively
Problem:  Vim9: issue with comparing objects recursively
          (Yinzuo Jiang)
Solution: only set recursive == TRUE, when called from tv_equal(), not
          from typeval_compare_object(), refactor code into object_equal()
          function (LemonBoy)

The recursive flag in tv_equal should be set only when the caller is
tv_equal, meaning that the comparison depth is > 1. The comparison
predicates for other object types are all following this rule, except
for the object one, and that may cause some weird issues like causing
the max depth limit not to be initialized in some cases.

closes: #15076

Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-22 17:25:07 +02:00
549ecc8636 runtime(termdebug): Change some variables to Enums
Problem:  The types of some script variables in Termdebug
          can be changed for readability
Solution: Change the type of some vars from string to `enum`
          (Yinzuo Jiang)

closes: #15068

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-22 16:28:19 +02:00
fc64ac0be2 runtime(vim): Update base-syntax, fix function tail comments
Match Vim9-script comments after :def and :enddef and legacy-script
comments after :func and :endfunc, in any definition context.

Highlight incorrect comment types after these commands as errors.

fixes: #15062
closes: #15072

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-22 11:20:36 +02:00
f0e6914420 patch 9.1.0513: Vim9: segfault with object comparison
Problem:  Vim9: segfault with object comparisons
Solution: increment recusive_cnt before calling typval_compare_object()
          (Ernie Rael)

closes: #15073

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-22 11:12:00 +02:00
7002c055d5 patch 9.1.0512: Mode message for spell completion doesn't match allowed keys
Problem:  Mode message for spell completion doesn't match allowed keys
          (Kyle Kovacs)
Solution: Show "^S" instead of "s".
          (zeertzjq)

This matches the code in vim_is_ctrl_x_key():

	case CTRL_X_SPELL:
	    return (c == Ctrl_S || c == Ctrl_P || c == Ctrl_N);

fixes: neovim/neovim#29431
closes: #15065

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-21 07:55:07 +02:00
bc6f96708e patch 9.1.0511: CursorMovedC triggered wrongly with setcmdpos()
Problem:  CursorMovedC triggered wrongly with setcmdpos()
          (after v9.1.0507)
Solution: Remove the premature triggering.  Also don't trigger when
          cursor didn't move. (zeertzjq)

closes: #15064

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-21 07:51:40 +02:00
17e0a1969d runtime(scheme): update runtime files
Add TODO highlighting, disable text-wrapping, add "define-library" to
lispwords on CHICKEN. Update MAINTAINERS.

closes: #15063

Signed-off-by: Evan Hanson <evhan@foldling.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-21 07:49:39 +02:00
6bc11c06d2 patch 9.1.0510: CI: test_gettext fails on MacOS14 + MSVC Win
Problem:  CI: test_gettext fails on MacOS14 + MSVC Win
          (after v9.1.0509)
Solution: Skip the test for now

related: #12447

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-21 07:31:04 +02:00
ce0ef910df patch 9.1.0509: not possible to translate Vim script messages
Problem:  not possible to translate Vim script messages
          (RestorerZ)
Solution: implement bindtextdomain() and gettext() to support Vim script
          message translations (Christ van Willegen)

fixes: #11637
closes: #12447

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 23:41:59 +02:00
f7f8f0b76d patch 9.1.0508: termdebug plugin can be further improved
Problem:  termdebug plugin can be further improved
Solution: add sanity-check, timeout config, change vars to bool
          update docs, add more tests (Ubaldo Tiberi)

fixes: #15061
closes: #15057

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 22:24:26 +02:00
6ccf6da7a2 runtime(gomod): add gomod filetype plugin
closes: #15060

Signed-off-by: yu-yk <yukkuen.yu@linktivity.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 22:08:48 +02:00
d09521476f patch 9.1.0507: hard to detect cursor movement in the command line
Problem:  hard to detect cursor movement in the command line
Solution: Add the CursorMovedC autocommand
          (Shougo Matsushita)

closes: #15040

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 22:05:16 +02:00
beb02ed674 runtime(java): Optionally highlight parameterised types
In the presence of parameterised types whose names begin
with a capital letter and end with a less-than sign "<" that
introduces a type argument or a list of comma-separated type
arguments, followed by a greater-than sign ">", a variable
"g:java_highlight_generics" can be defined to have some
components of such types uniformly coloured (by picking
highlight groups for javaGenericsC{1,2}, javaWildcardBound).

For example,
------------------------------------------------------------
java.io.InputStream stream = java.io.InputStream.nullInputStream();
java.util.function.Function<String,
    java.util.function.BiFunction<String, String, String>> updater =
	property -> (oldValue, newValue) -> oldValue;
java.util.logging.LogManager.getLogManager()
    .updateConfiguration(stream, updater);
------------------------------------------------------------

Note that the diamond form and explicit type arguments do
not qualify for this kind of recognition.

For example,
------------------------------------------------------------
new java.util.HashSet<>().<String>toArray(new String[0]);
------------------------------------------------------------

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-4.html#jls-4.5
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.9
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.12.2.1

closes: #15050

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 21:00:53 +02:00
49012cd8c2 patch 9.1.0506: filetype: .envrc & .prettierignore not recognized
Problem:  filetype: .envrc & .prettierignore not recognized
Solution: Detect '.envrc' as shell and '.prettierignore' as gitignore
          filetype (Tyler Miller)

Support ft detection for `.envrc` files used by direnv, and
`.prettierignore` files used by prettier.

closes: #15053
resolves: neovim/neovim#29405

Signed-off-by: Tyler Miller <tmillr@proton.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-20 20:31:32 +02:00
aa61b8a908 patch 9.1.0505: filetype: Faust files are not recognized
Problem:  filetype: Faust files are not recognized
Solution: Detect '*.lib' files as Faust filetype, add detection for
          '*.dsp' files (Faust or Make), remove '*.lib' from Cobol
          filetype (PowerUser64)

closes: #14894

Signed-off-by: PowerUser64 <blake@blakenorth.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:32:11 +02:00
ca7f93e6f3 patch 9.1.0504: inner-tag textobject confused about ">" in attributes
Problem:  inner-tag textobject confused about ">" in attributes
Solution: Skip over quoted '>' when determining the start position

fixes: #15043
closes: #15049

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:26:51 +02:00
43eef882ff patch 9.1.0503: cannot use fuzzy keyword completion
Problem:  cannot use fuzzy keyword completion
          (Maxim Kim)
Solution: add the "fuzzycollect" value for the 'completeopt'
          setting, to gather matches using fuzzy logic (glepnir)

fixes: #14912
closes: #14976

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:25:01 +02:00
94c5d8a5e2 runtime(java): Remove the group exclusion list from @javaTop
Instances of anonymous classes can be passed as method
arguments and should be subject to line folding as well.

closes: #15048

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:10:47 +02:00
c98bfb9f59 runtime(doc): wrong return type for execute() function
The description clearly explains that this function returns a string.  I
think the 'Number' here is a copy/paste error.

closes: #15045

Signed-off-by: Marius Gedminas <marius@gedmin.as>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 20:00:00 +02:00
56f587b3f8 patch 9.1.0502: MS-Windows: too much legacy code
Problem:  MS-Windows: too much legacy code
Solution: Clean up old code
          (Ken Takata)

* Remove very old codes for Cygwin version of GCC.
  Nowadays Cygwin GCC cannot be used for building Win32 Vim.
  (The `-mno-cygwin` option was removed in Cygwin GCC4.)
* Remove old codes for old versions of MinGW.
  Remove `__MINGW32__` as much as possible.
* Adjust makefile.

closes: #15044

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 19:56:03 +02:00
46f2823807 patch 9.1.0501: too complicated mapping restore in termdebug
Problem:  too complicated mapping restore in termdebug
Solution: simplify unmapping logic, add a few more tests
          (Ubaldo Tiberi)

closes: #15046

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 19:50:32 +02:00
aeca7176f3 runtime(nohlsearch): simplify mapping
Use <cmd> instead of <expr> with execute(...)[-1]

closes: #15047

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-19 19:42:47 +02:00
fbc37f138a patch 9.1.0500: cannot switch buffer in a popup
Problem:  cannot switch buffer in a popup
          (Yggdroot)
Solution: add popup_setbuf() function

fixes: #15006
closes: #15026

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 21:01:23 +02:00
23c5ebeb95 patch 9.1.0499: MS-Windows: doesn't handle symlinks properly
Problem:  MS-Windows: doesn't handle symlinks properly
          (Timothy Madden)
Solution: Implement lstat() on MS-Windows
          (author)

lstat() differs from stat() in how it handles symbolic links, the former
doesn't resolve the symlink while the latter does so.

Implement a simple yet effective fallback using Win32 APIs.

fixes #14933
closes: #15014

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: LemonBoy <thatlemon@gmail.com>
Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 20:43:51 +02:00
a821b609f9 patch 9.1.0498: getcmdcompltype() interferes with cmdline completion
Problem:  getcmdcompltype() interferes with cmdline completion.
Solution: Don't set expand context when it's already set.
          (zeertzjq)

closes: #15036

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 20:31:08 +02:00
a48637c105 patch 9.1.0497: termdebug can be further improved
Problem:  termdebug can be further improved
Solution: refactor save/restore, update docs,
          add a new save/restore test (Ubaldo Tiberi)

closes: #15032

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@google.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 20:24:54 +02:00
9718ed7ab9 runtime(filetype): update htmldjango detection
- update tags to detect djangohtml based on
  https://docs.djangoproject.com/en/5.0/ref/templates/builtins/#built-in-tag-reference

- increase the lines to inspect to 40 lines

  10 lines is too few and might result in high false negative.
  Increasing it to 40 lines should reduce the false negative.

closes: #15037

Signed-off-by: Afiq Nazrie <afnazrie@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:59:53 +02:00
2dadf5304a translation(tr): Improve Turkish documentation
closes: #15041

Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:50:14 +02:00
1ce65e35ac runtime(csv): include a simple csv filetype and syntax plugin
fixes: #15038

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:48:15 +02:00
26de90c631 runtime(nohlsearch): include the the simple nohlsearch package
fixes: #15039
closes: #15042

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-18 19:32:39 +02:00
f189138b39 patch 9.1.0496: matched text is highlighted case-sensitively
Problem:  matched text is highlighted case-sensitively
Solution: use MB_STRNICMP, update highlighting when the base changes
          (glepnir)

fixes: #15021
closes: #15023

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 18:35:25 +02:00
d8c9340fc6 patch 9.1.0495: Matched text isn't highlighted in cmdline pum
Problem:  Matched text isn't highlighted in cmdline pum.
Solution: Use cmdline completion pattern in cmdline mode.
          (zeertzjq)

closes: #15029

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 18:25:32 +02:00
84ac2126f4 runtime(doc): Fix typos in several documents
closes: #15034

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 18:12:51 +02:00
946f61c405 runtime(doc): clarify when text properties are cleared
related: #15030

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 13:17:58 +02:00
ca47114532 runtime(doc): improve the vim-shebang example
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 13:09:25 +02:00
c52a856079 runtime(doc): revert unintended formatting changes for termdebug
fixes: #15028

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-17 05:30:37 +02:00
0ddab582fa runtime(java): Add a config variable for commonly used compiler options
The value of g:javac_makeprg_params, if set, is added to the value of
'makeprg' as an option string.

closes: #14999

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:58:09 +02:00
63901e8963 patch 9.1.0494: Wrong matched text highlighted in pum with 'rightleft'
Problem:  Wrong matched text highlighted in pum with 'rightleft'.
Solution: Match using the original text instead of the reversed text.
          (zeertzjq)

closes: #15020

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:51:25 +02:00
917ff8a19d runtime(html): bump length of character references in syntax script (#15022)
This allows handling longer references such as
`&CounterClockwiseContourIntegral;`.

Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:47:36 +02:00
a5af73ae34 runtime(termdebug): properly check mapping variables using null_dict
closes: #15013

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 16:44:53 +02:00
79da22de75 runtime(kdl): fix KdlIndent and kdlComment in indent script (#15019)
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:47:47 +02:00
acc8746941 patch 9.1.0493: Test for patch 9.1.0489 doesn't fail without the fix
Problem:  Test for patch 9.1.0489 doesn't fail without the fix.
Solution: Use "!" flag of feedkeys() so that ex_normal_busy is not set
          and ins_compl_check_keys() is not skipped (zeertzjq).

closes: #15018

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:44:05 +02:00
371bab0594 runtime(java): Fold multi-line comments with the syntax kind of &fdm (#15016)
Also:

- Restore the capability to mark as an error braces nested
  in parens with g:javaInParen.
- Try not to fold top-level-type bodies.  (Defining multiple
  package-private top level types in a single source file is
  not recommended as it can impose order among compilation
  units; so it is assumed that only one such top level type
  is usually defined.)
- Compose ‘method header’ highlighting and block braces
  folding.
- Do not highlight block braces whenever ‘method header’
  highlighting is requested.

This bundling of ‘method headers’ and block braces for
highlighting can be traced back to Vim v5.0; however, no
comment or documentation entry conveys any justification.
For example, it is hard to discover the connection between
block braces for "while", "if", etc., statements and method
body block braces.  The former behaviour can be attained in,
e.g. ~/.vim/after/syntax/java.vim:

------------------------------------------------------------
if exists("g:java_highlight_functions")
    syn clear javaBlock javaInParen
    syn match javaBlockOther "[{}]"
    syn region javaBlock transparent matchgroup=javaBlockStart
	\ start="\%(^\|^\S[^:]\+\)\@120<!{" end="}" fold
    hi def link javaBlockStart javaFuncDef
    hi def link javaBlockOther javaBlockStart

    if exists("g:java_mark_braces_in_parens_as_errors")
	syn match javaInParen contained "[{}]"
    endif
endif
------------------------------------------------------------

Note: Read ‘a method header omitting a _throws_ clause’ for
every ‘method header’ appellation used above.


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:42:55 +02:00
f127dce188 runtime(termdebug): using wrong type for PlaceSign()
Make sure to convert them to numbers.

fixes: #14994
closes: #15015

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:37:23 +02:00
0d4d23dac0 patch 9.1.0492: filetype: Vim-script files not detected by shebang line
Problem:  Vim-script files may not be recognised
Solution: Add shebang line detection (Doug Kearns)

closes: #15012

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-16 08:32:15 +02:00
52f2ff0363 runtime(zip): revert unintended change to zip#Write()
This was wrongly included as of patch 1c67342912
because apparently I messed up the use of git apply :/

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 16:05:35 +02:00
f4bc59c4f6 runtime(doc): add another tag for vim-shebang feature
related: #15011

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:52:53 +02:00
883018feff patch 9.1.0491: Cmdline pum doesn't work properly with 'rightleft'
Problem:  Cmdline pum doesn't work properly with 'rightleft'.
Solution: Don't use curwin->w_p_rl in cmdline mode in pum_redraw().  Use
          a static variable since pum_may_redraw() may be called in any
          mode.  Also correct position of other popups with 'rightleft'.
          (zeertzjq)

closes: #15005

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:37:11 +02:00
105f741fac patch 9.1.0490: minor style problems with patch 9.1.0487
Problem:  minor style problems with patch 9.1.0487
Solution: use shown_compl instead of after_first_compl variable
          (glepnir)

closes: #15008

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
fix(completion): use exist shown_compl instead after_first_compl
2024-06-15 15:32:22 +02:00
aced8c2f4f patch 9.1.0489: default completion may break with fuzzy
Problem:  default completion may break with fuzzy
Solution: check that completion_match_array is not null
          (glepnir)

closes: #15010

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:27:09 +02:00
a2324373eb patch 9.1.0488: Wrong padding for pum "kind" with 'rightleft'
Problem:  Wrong padding for pum "kind" with 'rightleft'.
Solution: Fix off-by-one error (zeertzjq).

The screen_fill() above is end-exclusive, and
- With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`,
  so the next `col` should be `pum_col - pum_base_width - n`.
- With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`,
  so the next `col` should be `pum_col - pum_base_width + n`.

closes: #15004

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:08:27 +02:00
ae321b51f7 runtime(vim): Update base-syntax, match shebang lines (#15011)
Match shebang lines in Vim9 and legacy script.

Mark these as an error if they appear anywhere other than the first line
of a legacy-script file.  In Vim9 script these match as normal line
comments rather than an error.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 15:06:17 +02:00
1c67342912 runtime(zip): MS-Windows: handle files with spaces properly
This change does the following 3 things:

1) non need to quote the file to be extracted

The zipfile plugin used to quote and fnameescape() the path to the
file to be extracted. However testing with unzip showed, that while this
works on Linux on Windows you shall not escape the blanks in filenames.

As long as the pathname is properly quoted, this words on Linux and
Windows.

2) reset shellslash (MS-Windows only)

When shellslash is set, filenames to the zip archive will be forward
quoted. However since the filename is eventually handed over to the
unzip command, we need to make sure to use native paths so that the
command will understand what file to open. Therefore, if shellslash is
set (and the shell is cmd.exe), replace any forward slashes by the
expected backslashes

3) style:
Use tabs for the Header, remove a few comments in the s:Escape() and
zip#read() functions

fixes: #14998

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-15 14:51:07 +02:00
6dd5840fdf runtime(html): Restore HTML syntax file tests
Rendered element content results in test failures on macOS and FreeBSD.

The included content for these elements was incidental to the primary
intent of the test to check element tag highlighting so set
g:html_no_rendering to disable content rendering.

FreeBSD fails for even an empty <strike> element.

See #13591 and #14215.

closes: #13595

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 21:18:33 +02:00
f94c9c482a patch 9.1.0487: completed item not update on fuzzy completion
Problem:  completed item not update on fuzzy completion
Solution: reset compl_shown_match when at original match position
          (glepnir)

closes: #14955

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 21:11:56 +02:00
82a579e15a patch 9.1.0486: filetype: Snakemake files are not recognized
Problem:  filetype: Snakemake files are not recognized
Solution: Detect '*.smk' and Snakefile files as snakemake filetype
          (Riley Bruins)

See:
https://snakemake.readthedocs.io/en/stable/snakefiles/deployment.html#distribution-and-reproducibility

closes: #14992

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:47:05 +02:00
17e702a51a runtime(termdebug): make TermDebugSendCommand() a global function again
TermDebugSendCommand lost it's global visibility when converted to
vim9script. Restore it.

Fixes: 23f29ffc64 ("runtime(termdebug): convert termdebug plugin to
       Vim9 script")
closes: #14997

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:42:35 +02:00
fce324f557 runtime(termdebug): close all buffers in the same way
For ASM and Variables buffer, check were done to make sure they existed
before attempting to close them, but not for debugged program or gdb
communication. The debugged program window is a user-facing one and
user might close it manually, so it's better to check if it exists.

Signed-off-by: Damien Riegel <damien@riegel.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:41:36 +02:00
afbe5359e9 patch 9.1.0485: Matched text shouldn't be highlighted in "kind" and "menu"
Problem:  Matched text shouldn't be highlighted in "kind" and "menu".
Solution: Pass hlf_T instead of the attribute.  Fix indent.
          (zeertzjq)

closes: #14996

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:24:22 +02:00
c509c009bb runtime(doc): fix wrong helptag for :defer
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:23:00 +02:00
262e25e5a1 runtime(vim): Update base-syntax, match :sleep arg
Match :sleep arg properly including a lone "m" with a leading count.

closes: #15003

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:16:35 +02:00
79a14c061b runtime(keymap): include Georgian keymap
closes: #15002

Signed-off-by: Misho <nnamper@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:13:39 +02:00
8e56747fd2 patch 9.1.0484: Sorting of completeopt+=fuzzy is not stable
Problem:  Sorting of completeopt+=fuzzy is not stable.
Solution: Compare original indexes when scores are the same.
          (zeertzjq)

closes: #14988

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 20:04:42 +02:00
440746158c runtime(netrw): correctly test for windows in NetrwGlob()
use has("win32") instead of has("win64") otherwise it
won't work on x86 systems.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-14 08:19:22 +02:00
1487947fb6 runtime(netrw): glob() on windows fails with [] in directory name
fixes: #14952
closes: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:25:35 +02:00
d6d4e13336 runtime(doc): rewrite mkdir() doc and simplify {flags} meaning
related: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:24:51 +02:00
8b34aea1b0 patch 9.1.0483: glob() not sufficiently tested
Problem:  glob() not sufficiently tested
Solution: Add more tests for directory containing [] chars

related: #14991

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 21:20:20 +02:00
1cd31a4501 runtime(doc): update return type for job_info()
related: #14982

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 20:46:23 +02:00
4225f28855 README.md: Update link to release archives
The releases page doesn't have anything listed.

closes: #14990

Signed-off-by: Patrick Brinich-Langlois <pbrinichlanglois@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 20:22:13 +02:00
ef8eab86e2 patch 9.1.0482: termdebug plugin needs more love
Problem:  termdebug plugin needs more love
Solution: start with some more Vim9 refactoring
          to improve maintenance and readability
          (Ubaldo Tiberi)

List of Changes and the Reasoning Behind Them:

1) Introduction of InitScriptVariables() Function:

Reasoning: This function has been introduced to ensure that when you open and
close Termdebug, and then open it again, there are no leftover script variable
values from the previous session. Leftover values could potentially cause
issues. The goal is for each Termdebug session to be independent of previous
sessions. At startup, all script variables are initialized. The only exception
is g:termdebug_loaded located at the very beginning of the script to prevent
sourcing the script twice. The variables are declared at script level and
defined in InitScriptVariables().

2) More Descriptive Variable Names:

Reasoning: The names of variables have been made more comprehensive. Almost
every Termdebug buffer now has a variable to indicate its name and another
variable to indicate its number, improving code readability and
maintainability. Due to the latest discussion around the &mousemodel option
save/restore mechanism, perhaps some other variables shall be prepended with
saved_.

3) Consistent Naming for GDB Terminal Buffers:

Reasoning: The name of the GDB terminal buffer now matches the name of the GDB
program being used, e.g., 'gdb', 'mygdb', 'arm-eabi-none-gdb', etc. This
ensures clarity and consistency in identifying buffers.

4) Other minor improvements:
Moved EchoErr() on top, added another test, some refactoring, mainly changed
several 0 and 1 to true and false

closes: #14980

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 19:23:07 +02:00
1a946044fe runtime(doc): correct return types for job_start() and job_status()
fixes: #14982

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 19:13:28 +02:00
a3bddb759e runtime(vim): Update base-syntax, match :catch and :throw args (#14989)
Match :catch /{pattern}/ and :throw {expr1}.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:48:10 +02:00
902b766858 runtime(java): Include element values in non-marker annotations (#14979)
Make a formal definition for normal and single-element kinds
of annotations that otherwise require for their containment
to repeat each time all syntax groups that describe element
values.

Reference:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-9.html#jls-9.7

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:30:09 +02:00
a78eb25db3 patch 9.1.0481: Vim9: term_getjob() throws an exception on error
Problem:  Vim9: term_getjob() throws an exception on error
Solution: Return null_job instead, when there is no job
          (Ernie Rael)

closes: #14984

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:24:54 +02:00
1c29602662 patch 9.1.0480: fuzzy string matching executed when not needed
Problem:  fuzzy string matching executed when not needed
Solution: when no leader is available, can skip fuzzy logic, so return
          early (glepnir)

closes: #14986

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:21:24 +02:00
2f95ca9fce patch 9.1.0479: fuzzy_match_str_with_pos() does unnecessary list operations
Problem:  fuzzy_match_str_with_pos() does unnecessary list operations.
Solution: Use fuzzy_match() directly (zeertzjq).

closes: #14987

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:14:27 +02:00
d353d27820 runtime(doc): restore description of "$" in col() and virtcol() (#14981)
These are different from line() and getpos().

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-13 17:00:25 +02:00
02f3ebacfb runtime(doc): deduplicate getpos(), line(), col(), virtcol()
Move the main description to getpos() and link to that from the other
functions.

closes: #14970

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 21:04:10 +02:00
31441d509a runtime(vim): Update g:vimsyn_comment_strings dump file tests
Leading whitespace is no longer matched as part of the line comment as
of #13936.

closes: #14971

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 20:44:10 +02:00
83d0028026 runtime(termdebug): Use string interpolation instead of string concat
closes: #14972

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 20:37:05 +02:00
7c57940e3b patch 9.1.0478: potential deref of NULL pointer in fuzzy_match_str_with_pos
Problem:  potential deref of NULL pointer in fuzzy_match_str_with_pos()
          on cleanup (after v9.1.0476)
Solution: Only free the pointer if it is non-NULL (glepnir)

closes: #14973

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-12 20:31:13 +02:00
1fb9eae579 patch 9.1.0477: block_editing errors out when using <enter>
Problem:  block_editing errors out when using <enter>
          (Ali Rizvi-Santiago, after v9.1.0274)
Solution: Change ins_len from size_t to int so that the test
          if ins_len is negative actually works properly

Add a test, so that this doesn't regress.

fixes: #14960

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 20:37:59 +02:00
959c3c887b runtime(vim): Update base-syntax, configurable comment string highlighting (#14931)
Allow highlighting of strings within comments to be disabled by setting
g:vimsyn_comment_strings to false.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 20:18:08 +02:00
b4e648a006 runtime(doc): fix typos in syntax.txt
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:45:53 +02:00
40c1c3317d patch 9.1.0476: Cannot see matched text in popup menu
Problem:  Cannot see matched text in popup menu
Solution: Introduce 2 new highlighting groups: PmenuMatch and
          PmenuMatchSel (glepnir)

ping @habamax, @neutaaaaan @romainl because vim/colorschemes may need
some updates, @lifepillar for updating vim-colortemplate

closes: #14694

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:40:50 +02:00
059cbe8933 runtime(vim): Update base-syntax, match multiline continued comments (#13936)
Match multiline (continued) line comments.

Continued tail comments are not supported yet.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:27:53 +02:00
210b39c2d6 runtime(doc): clarify documentation for "v" position at line()
Problem: the previous documentation falsely states that "v" always
refers to the start of a visual area.  In fact, the reference of "v" and
"." complement each other.  If the cursor is at the start of
a (characterwise) visual area, then "v" refers to the end of the area.

Solution: be more verbose and explicit about the connection between "."
and "v" and also refer to |v_o| which many vim users will be familiar
with for visual areas.

Signed-off-by: Peter Aronoff <peter@aronoff.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:23:08 +02:00
4877cb411f patch 9.1.0475: cmod_split modifier is always reset in term_start()
Problem:  cmod_split modifier is always reset in term_start()
Solution: only clear the WSP_VERT flag, if it is not already in
          cmdmod.cmod_split (Yegappan Lakshmanan)

closes: #14961

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:18:12 +02:00
971378eed9 runtime(termdebug): remove line-continuation characters
Those are no longer needed for Vim9.

related: #14961

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:17:36 +02:00
2e3b2a8d89 runtime(kdl): use shiftwidth() instead of &tabstop in indent script
closes: #14962

Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:07:16 +02:00
6ea3dfe8de runtime(vim): Remove orphaned screen dump files (#14965)
These are no longer generated by the current test input files.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-11 19:04:46 +02:00
2d88210b3c runtime(kdl): include syntax, indent and ftplugin files
closes: #14956

Co-authored-by: Aram Drevekenin <aram@poor.dev>
Signed-off-by: inzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 21:13:56 +02:00
d03882baac patch 9.1.0474: CI: Test_ColonEight() fails on github runners
Problem:  CI: Test_ColonEight() fails on github runners
          (Ken Takata)
Solution: Run the test for files on the C: drive, where dos shortnames
          are still enabled, refactor the tests to use a single setup
          function for the preparation

fixes: #14954
closes: #14958

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 21:06:55 +02:00
b8076f92a1 runtime(deb822sources): add missing Enabled field in syntax script
closes: #14898

It lacks the support of Enabled: boolean option field [1]:

e.g.

  Types: deb
  Uris: https://paulcarroty.gitlab.io/vscodium-deb-rpm-repo/debs/
  Components: main
  Suites: vscodium
  Architectures: amd64 i386 arm64 armhf
  Enabled: yes
  Signed-By: /var/lib/extrepo/keys/vscodium.asc

This patch was also forwarded to upstream. [2]

[1] https://manpages.debian.org/unstable/apt/sources.list.5.en.html#DEB822-STYLE_FORMAT
[2] https://salsa.debian.org/vim-team/vim-debian/-/merge_requests/16

Signed-off-by: Kentaro Hayashi <kenhys@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:22:31 +02:00
7e9a1a75b8 runtime(svelte): basic svelte ftplugin file
closes: #14949

Signed-off-by: Igor <igorlfs@ufmg.br>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:20:04 +02:00
d603e95609 patch 9.1.0473: term_start() does not clear vertical modifier
Problem:  term_start() does not clear vertical modifier
Solution: Clear the flag after splitting the window
          (Yegappan Lakshmanan)

closes: #14953

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:16:34 +02:00
dfc21db0b0 runtime(termdebug): fix mousemodel restoration by comparing against null_string
closes: #14951

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-10 18:12:07 +02:00
c593b9ead9 runtime(doc): Added definitions of Vim scripts and plugins
closes: #14935

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:48:08 +02:00
d6b4afb636 runtime(java): Exclude lambda expressions from _when_ _switch-case_ label clauses (#14945)
These guard clauses are always boolean expressions, whereas
lambda expressions can only appear in either an assignment,
a casting, or an invocation context.

References:
https://docs.oracle.com/javase/specs/jls/se21/html/jls-14.html#jls-14.11.1
https://docs.oracle.com/javase/specs/jls/se21/html/jls-15.html#jls-15.27

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:39:52 +02:00
477402ecf9 runtime(termdebug): Fix saved_mousemodel check
Fix issue introduced by 23f29ffc64 where
saved_mousemodel is introduced as a variable, so the exists check will
always be true.

Move to check the value of saved_mousemodel instead.

closes: #14946

Signed-off-by: laburnumT <laburnumtec@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:38:37 +02:00
aa925eeb97 patch 9.1.0472: Inconsistencies between functions for option flags
Problem:  Inconsistencies between functions for option flags.
Solution: Consistently use "unsigned int" as return type and rename
          get_bkc_value() to get_bkc_flags() (zeertzjq).

closes: #14925

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 18:24:05 +02:00
2d1d5c6c27 patch 9.1.0471: Crash when using autocmd_get() after removing event inside autocmd
Problem:  Crash when using autocmd_get() after removing event inside
          autocmd (Sergey Vlasov)
Solution: Check that the pattern is NULL (zeertzjq).

fixes: #14937
closes: #14939

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 16:44:33 +02:00
03a3df15ca runtime(termdebug: Fix errors in using the latest termdebug.vim
closes: #14941

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 16:42:45 +02:00
9c4389acc3 runtime(doc): Fix small style issues
closes: #14942

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 16:32:48 +02:00
5674c9a7de runtime(doc): add return type info for Vim function descriptions
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-09 00:19:16 +02:00
4032daaa11 translation(it): Update Italian Vim manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-07 13:32:22 +02:00
6dcd7f1a4d runtime(man): disable the q mapping
fixes: #8210

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-06 19:27:17 +02:00
ce47d32b03 runtime(cpp): Change 'cms' for C++ to '// %s'
fixes: #14911
closes: #14926

Signed-off-by: Luc Hermitte <luc.hermitte@csgroup.eu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-06 18:44:52 +02:00
d9ec676911 runtime(ccomplete): fix type mismatch error
fixes: #14927
closes: #14928

Signed-off-by: Lars T. Kyllingstad <lars.kyllingstad@sintef.no>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-06 18:39:03 +02:00
ae4641d68e runtime(termdebug): Fix wrong email address
related: #14903

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 22:24:24 +02:00
23f29ffc64 runtime(termdebug): convert termdebug plugin to Vim9 script
closes: #14903

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 21:37:53 +02:00
7cbed350f8 patch 9.1.0470: tests: Test_ColonEight_MultiByte() fails sporadically
Problem:  tests: Test_ColonEight_MultiByte() fails on MS-Windows
Solution: mark test as flaky

This single line change should have happened as part of v9.1.469 (and I
mentioned it in the Commit message), but forgot to actually include the
change :facepalm

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 20:34:55 +02:00
529b9ad62a patch 9.1.0469: Cannot have buffer-local value for 'completeopt'
Problem:  Cannot have buffer-local value for 'completeopt'
          (Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).

Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.

fixes: #5487
closes: #14922

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 20:27:06 +02:00
84d9611b67 patch 9.1.0468: GvimExt does not consult HKEY_CURRENT_USER
Problem:  GvimExt does not consult HKEY_CURRENT_USER
Solution: Make GvimExt first consult HKEY_CURRENT_USER and then fall
          back to HKEY_LOCAL_MACHINE to find gvim (David Wagner)

fixes: #14904
closes: #14917

Signed-off-by: David Wagner <dwagner@rydia.us>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 20:01:19 +02:00
9c60890518 CI: update FreeBSD runner to 14.1 (#13937)
closes: #14918

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 19:57:48 +02:00
551d8c372e patch 9.1.0467: typos in some comments
Problem:  typos in some comments
          (after v9.1.0466)
Solution: fix comments
          (zeertzjq)

closes: #14919

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 19:53:32 +02:00
92f4e91590 runtime(vim): Update base-syntax, allow whitespace before :substitute pattern
Allow whitespace between the :substitute command and its pattern
argument.  Although unusual, it is supported and there are examples in
the wild.

Match Vi compatible :substitute commands like :s\/{string}/.  See :help
E1270.

fixes: #14920
closes: #14923

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-05 19:47:04 +02:00
dca57fb542 patch 9.1.0466: Missing comments for fuzzy completion
Problem:  Missing comments for fuzzy completion (after 9.1.0463)
Solution: Add more comments, adjust indentation slightly
          (glepnir)

closes: #14910

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 22:01:21 +02:00
ce6fe84db2 runtime(man): update Vim manpage
fixes: #14916

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 21:58:32 +02:00
98fb81846d runtime(comment): clarify the usage of 'commentstring' option value
fixes: #14905

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 20:59:08 +02:00
2a2c4fffd7 runtime(doc): clarify how fuzzy 'completeopt' should work
related: #14912

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 20:27:18 +02:00
98b73eb645 runtime(netrw): prevent accidental data loss
fixes: #14915

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-04 18:18:16 +02:00
60c8743ab6 patch 9.1.0465: missing filecopy() function
Problem:  missing filecopy() function
Solution: implement filecopy() Vim script function
          (Shougo Matsushita)

closes: #12346

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-03 23:01:40 +02:00
0a0830624a patch 9.1.0464: no whitespace padding in commentstring option in ftplugins
Problem:  no whitespace padding in commentstring option in ftplugins
Solution: Change default to include whitespace padding, update
          existing filetype plugins with the new default value
          (Riley Bruins)

closes: #14843

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-03 20:40:45 +02:00
a218cc6cda patch 9.1.0463: no fuzzy-matching support for insert-completion
Problem:  no fuzzy-matching support for insert-completion
Solution: enable insert-mode completion with fuzzy-matching
          using :set completopt+=fuzzy (glepnir).

closes: #14878

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-03 19:46:13 +02:00
734286e4c6 patch 9.1.0462: eval5() and eval7 are too complex
Problem:  eval5() and eval7 are too complex
Solution: Refactor eval5() and eval7() in eval.c
          (Yegappan Lakshmanan)

closes: #14900

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-03 18:52:22 +02:00
f51ff96532 patch 9.1.0461: too many strlen() calls in drawline.c
Problem:  too many strlen() calls in drawline.c
Solution: Refactor code to avoid strlen()
          (John Marriott)

closes: #14890

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-02 19:44:11 +02:00
7577afd5ef patch 9.1.0460: filetype: lintstagedrc files are not recognized
Problem:  filetype: lintstagedrc files are not recognized
Solution: recognize '.lintstagedrc' files as json filetype
          (İlyas Akın)

see: https://github.com/lint-staged/lint-staged

closes: #14897

Signed-off-by: İlyas Akın <ilyas.akin@kuika.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-02 16:57:00 +02:00
36b6676719 patch 9.1.0459: Vim9: import autoload does not work with symlink
Problem:  Vim9: import autoload does not work with symlink
          (Olivier Dormond)
Solution: set sn_autoload_prefix in check_script_symlink
          (nwounkn)

fixes: #14775
closes: #14885

Signed-off-by: nwounkn <nwounkn@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-02 16:10:07 +02:00
7737ce519b patch 9.1.0458: Coverity complains about division by zero
Problem:  Coverity complains about division by zero
Solution: Check explicitly for sw_val being zero

Shouldn't happen, since tabstop value should always be larger than zero.
So just add this as a safety measure.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-02 16:04:43 +02:00
e5bc2e4bc9 patch 9.1.0457: tests: test_gui fails on Wayland
v:windowid is set in GUI buils with Wayland

Problem:  tests: test_gui fails on Wayland
          (after: 9.1.0064, Gary Johnson)
Solution: drop the "empty($WAYLAND_DISPLAY)" condition in the test

fixes: #14886

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-01 20:59:14 +02:00
88d4f255b7 patch 9.1.0456: Left shift is incorrect with vartabstop and shiftwidth=0
Problem:  Left shift is incorrect with vartabstop and shiftwidth=0
Solution: make tabstop_at() function aware of shift direction
          (Gary Johnson)

The problem was that with 'vartabstop' set and 'shiftwidth' equal 0,
left shifts using << were shifting the line to the wrong column.  The
tabstop to the right of the first character in the line was being used
as the shift amount instead of the tabstop to the left of that first
character.

The reason was that the tabstop_at() function always returned the value
of the tabstop to the right of the given column and was not accounting
for the direction of the shift.

The solution was to make tabstop_at() aware of the direction of the
shift and to choose the tabtop accordingly.

A test was added to check this behavior and make sure it doesn't
regress.

While at it, also fix a few indentation/alignment issues.

fixes: #14864
closes: #14887

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-01 20:51:33 +02:00
e299591498 runtime(doc): clarify 'shortmess' flag "S"
fixes: #14893

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-01 20:43:47 +02:00
16b63bd002 patch 9.1.0455: MS-Windows: compiler warning for size_t to int conversion
Problem:  MS-Windows: compiler warning for size_t to int conversion
Solution: Add a few type casts to resolve warning on Windows
          (Mike Williams)

closes: #14884

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-06-01 11:33:40 +02:00
bad9577b9a runtime(doc): include some vim9 script examples in the help
closes: #14848

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-31 15:09:42 +02:00
f3dd6f617c patch 9.1.0454: minor issues in test_filetype with rasi test
Problem:  minor issues in test_filetype with rasi test
          (after 9.1.0453)
Solution: re-sort test_filetype, fix wrong syntax.txt help tags

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-31 12:26:12 +02:00
280e5b13ca patch 9.1.0453: filetype: rasi files are not recognized
Problem:  filetype: rasi files are not recognized
Solution: regonize '*.rasi' files as rasi filetype,
          include a filetype and syntax plugin
          (Pierrick Guillaume)

ported from: https://github.com/Fymyte/rasi.vim

closes: #14821

Signed-off-by: Pierrick Guillaume <pierguill@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-31 12:00:49 +02:00
7129f2ad2f runtime(java): Improve the matching of lambda expressions (#14880)
- Distinguish some formal parameters.
- Support multi-line definitions.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-31 11:11:34 +02:00
1acc67ac44 patch 9.1.0452: Configure checks for libelf unnecessarily
Problem:  Configure checks for libelf unnecessarily
Solution: Remove configure check (youcai)

closes: #14879

Signed-off-by: youcai <omegacoleman@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 19:31:36 +02:00
88c8c547d5 patch 9.1.0451: No test for escaping '<' with shellescape()
Problem:  No test for escaping '<' with shellescape()
Solution: Add a test.  Use memcpy() in code to make it easier to
          understand.  Fix a typo (zeertzjq).

closes: #14876

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 19:27:25 +02:00
32a5faa6d7 check.vim complains about overlong comment lines
Problem:  check.vim complains about overlong comment lines
Solution: only check the length of non-commented lines

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 09:51:47 +02:00
ed43711b66 translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 09:49:40 +02:00
51c45e89b5 patch 9.1.0450: evalc. code too complex
Problem:  eval.c code too complex
Solution: refactor eval6() and eval9() functions into several smaller
          functions (Yegappan Lakshmanan)

closes: #14875

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 07:52:44 +02:00
51024bbc1a patch 9.1.0449: MS-Windows: Compiler warnings
Problem:  MS-Windows: Compiler warnings
Solution: Resolve size_t to int warnings

closes: #14874

A couple of warnings in ex_docmd.c have been resolved by modifying their
function argument types, followed by some changes in various function
call sites.  This also allowed removal of some casts to cope with
size_t/int conversion.

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-30 07:46:30 +02:00
8904d672be patch 9.1.0448: compiler warning in eval.c
Problem:  compiler warning in eval.c (after v9.1.0429)
Solution: refactor code (Yegappan Lakshmanan)

fixes: #14847
closes: #14867

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-29 07:51:50 +02:00
0b74eeceb8 runtime(stylus): remove remaining css code (#14866)
This seems to be a forgotten fixup in 2d919d2744 (r141568461)

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-28 07:23:41 +01:00
0bdc5d8241 runtime(doc): Add ft_hare.txt to Reference Manual TOC
while at it, also re-align ft_context.txt with the rest of the
list.

closes: #14863

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-27 17:14:17 +02:00
393708cff6 runtime(vim): re-generate vim syntax from generator
related: #14861

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-27 15:50:07 +02:00
c984b2fd9d runtime(vim): fix syntax vim bug (Close #14858) (#14861)
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-27 15:40:25 +02:00
53387c55a1 patch 9.1.0447: completion may be wrong when deleting all chars
Problem:  completion may be wrong when deleting all chars
Solution: reset compl_shown_match

closes: #14854

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-27 15:14:51 +02:00
ef73374dc3 patch 9.1.0446: getregionpos() inconsistent for partly-selected multibyte char
Problem:  getregionpos() behaves inconsistently for a partly-selected
          multibyte char.
Solution: Always use column of the first byte for a partly-selected
          multibyte char (zeertzjq).

closes: #14851

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-26 18:42:18 +02:00
86071925ed runtime(typescriptreact): fix highlighting nested and escaped quotes in string props (#14852)
Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-26 18:22:26 +02:00
76174e7110 runtime(asm): remove the indent plugin since it has too many issues
fixes: #14791

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-26 18:04:19 +02:00
0076ddc07d runtime(debian): update Debian runtime files (#14849)
* Add space in template for 'commentstring'
* Add 'comments' and 'commentstring' support to debcontrol
* debversions: Move Ubuntu releases outside of standard support to unsupported
  Although trust, xenial, and bionic are not EOL yet, their standard support period has ended.

Reported-by: Riley Bruins <ribru17@gmail.com>
Co-authored-by: Riley Bruins <ribru17@gmail.com>
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-25 20:56:49 +02:00
dbac0da631 patch 9.1.0445: Coverity warning after 9.1.0440
Problem:  Coverity warning after 9.1.0440
Solution: Fix Coverity warning, add a test and
          reduce the calls to clear_tv()
          (Yegappan Lakshmanan).

closes: #14845

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-25 20:23:54 +02:00
dff55a3358 patch 9.1.0444: Not enough tests for getregion() with multibyte chars
Problem:  Not enough tests for getregion() with multibyte chars.
Solution: Add a few more tests (zeertzjq).

closes: #14844

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-25 10:25:36 +02:00
afc2295c22 patch 9.1.0443: Can't use blockwise selection with width for getregion()
Problem:  Can't use a blockwise selection with a width for getregion().
Solution: Add support for blockwise selection with width like the return
          value of getregtype() or the "regtype" value of TextYankPost
          (zeertzjq).

closes: #14842

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 19:07:12 +02:00
5e45715084 runtime(typescript): update outdated syntax files
fixes: #14721
fixes: HerringtonDarkholme/yats.vim#277
closes: #14840

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 19:03:03 +02:00
b1ffc52694 runtime(i3config/swayconfig): fix floating_modifier highlight (#14841)
Signed-off-by: JosefLitos <litosjos@fit.cvut.cz>
Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 17:31:36 +02:00
35dfe58a54 patch 9.1.0442: hare runtime files outdated
Problem:  hare runtime files outdated
Solution: runtime(hare): update hare.vim to match upstream
          (Amelia Clarke)

closes: #14836

Signed-off-by: Amelia Clarke <selene@perilune.dev>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 08:05:00 +02:00
2b09de9104 patch 9.1.0441: getregionpos() can't properly indicate positions beyond eol
Problem:  getregionpos() can't properly indicate positions beyond eol.
Solution: Add an "eol" flag that enables handling positions beyond end
          of line like getpos() does (zeertzjq).

Also fix the problem that a position still has the coladd beyond the end
of the line when its column has been clamped.  In the last test case
with TABs at the end of the line the old behavior is obviously wrong.

I decided to gate this behind a flag because returning positions that
don't correspond to actual characters in the line may lead to mistakes
for callers that want to calculate the length of the selected text, so
the behavior is only enabled if the caller wants it.

closes: #14838

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 07:48:51 +02:00
44cadaa18c patch 9.1.0440: function get_lval() is too long
Problem:  function get_lval() is too long
Solution: factor out the get_lval_subscript() function
          (Yegappan Lakshmanan)

closes: #14839

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 07:44:10 +02:00
42a5b5a6d0 patch 9.1.0439: Cannot filter the history
Problem:  Cannot filter the history
Solution: Implement :filter :history

closes: #14835

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 07:39:34 +02:00
3074137542 patch 9.1.0438: Wrong Ex command executed when :g uses '?' as delimiter
Problem:  Wrong Ex command executed when :g uses '?' as delimiter and
          pattern contains escaped '?'.
Solution: Don't use "*newp" when it's not allocated (zeertzjq).

closes: #14837

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-24 07:37:36 +02:00
22ac941208 runtime(i3config/swayconfig): support floating_modifier none; revert broken highlighting
- fix floating_modifier $mod normal|inverse was being hightlighted as error
  reverting the floating_modifier change from dd83b63
- will currently allow invalid syntax after floating_modifier

fixes: #14826
closes: #14827

Co-authored-by: JosefLitos <litosjos@fit.cvut.cz>
Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 20:48:54 +02:00
742062f31f patch 9.1.0437: Motif requires non-const char pointer for XPM data
Problem:  Motif requires non-const char pointer for XPM data shared with
          GTK (Tony Mechelynck, after v9.1.0432)
Solution: Cast non-const to const char pointer for GTK (Drew Vogel).

closes: #14834

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 17:49:39 +02:00
789679cfc4 patch 9.1.0436: Crash when using '?' as separator for :s
Problem:  Crash when using '?' as separator for :s and pattern contains
          escaped '?'s (after 9.1.0409).
Solution: Always compute startplen. (zeertzjq).

related: neovim/neovim#28935
closes: 14832

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 17:41:26 +02:00
cd79f8fbd3 patch 9.1.0435: filetype: cygport files are not recognized
Problem:  filetype: cygport files are not recognized
Solution: Recognize '*.cygport' files as sh filetype
          (Ken Takata)

https://cygwin.github.io/cygport/cygport_in.html

closes: #14833

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 17:31:26 +02:00
3554d9bfcc patch 9.1.0434: make errors trying to access autoload/zig
Problem:  make errors trying to access autoload/zig
Solution: Remove autoload/zig from Makefile, adjust Filelist
          (Derek Schrock)

Commit d1d9316c6 removed autoload/zig/ files and install/uninstall target
of the Makefile fail since the directory doesn't exist any longer.

closes: #14828

Signed-off-by: Derek Schrock <dereks@lifeofadishwasher.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 17:27:05 +02:00
701ad50a9e patch 9.1.0433: Wrong yanking with exclusive selection and ve=all
Problem:  Wrong yanking with exclusive selection and virtualedit=all,
          and integer overflow when using getregion() on it.
Solution: Set coladd when decreasing column and 'virtualedit' is active.
          Add more tests for getregion() with 'virtualedit' (zeertzjq).

closes: #14830

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 07:47:55 +02:00
f2d74e3b63 runtime(comment): add missing help tags file
fixes: #14829

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-23 07:24:29 +02:00
5090f838bb patch 9.1.0432: Ancient XPM preprocessor hack may cause build errors
Problem:  Ancient XPM preprocessor hack may cause build errors.
Solution: Simplify XPM includes and get rid of complicated #ifdef magic
          (Drew Vogel).

closes: #14816

Signed-off-by: Drew Vogel <dvogel@github>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 16:51:53 +02:00
802fc04a78 runtime(rescript): include basic rescript ftplugin file (#14822)
Reference: https://rescript-lang.org/docs/manual/latest/overview#comments

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 16:49:17 +02:00
25536f415e patch 9.1.0431: eval.c is too long
Problem:  eval.c is too long
Solution: Move garbage collection code to new gc.c file
          (Yegappan Lakshmanan)

closes: #14824

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 16:45:04 +02:00
52a6f34887 patch 9.1.0430: getregionpos() doesn't handle one char selection
Problem:  getregionpos() doesn't handle one char selection.
Solution: Handle startspaces differently when is_oneChar is set.
          Also add a test for an exclusive charwise selection with
          multibyte chars (zeertzjq)

closes: #14825

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 16:42:44 +02:00
95ff39f8e3 CI: disable -O2 for Coverity after v9.1.0429
gcc -O2 outputs this warning and turns it into an error when running
Coverity action:

```
eval.c: In function ‘echo_string_core’:
cc1: warning: function may return address of local variable [-Wreturn-local-addr]
eval.c:6495:12: note: declared here
 6495 |     char_u buf[MAX_FUNC_NAME_LEN];
      |            ^~~
```

This seems to be a false positive, so disable -O2 for Coverity
specifically.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-22 07:56:24 +02:00
62ccaa60d5 runtime(termdebug): check for gdb file/dir before using as buffer name
Add test so that this doesn't regress.

fixes: #12718
closes: #14792

Signed-off-by: Ubaldo Tiberi <ubaldo.tiberi@volvo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 23:33:03 +02:00
d1d9316c66 runtime(zig): refactor zig ftplugin, remove auto format
Refactored zig ftplugin, removed upstream comment, aucmd and
auto formatting support. Updated documentation for zig configuration
settings and added new maintainer.

closes: #13803

Signed-off-by: Tiseno <mathias.lindgren@stabelo.se>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 23:27:03 +02:00
b335a9312c patch 9.1.0429: Coverity complains about eval.c refactor
Problem:  Coverity complains about eval.c refactor
          (after v9.1.0422)
Solution: Check that buf is not used un-initialized,
          add explicit conditions for save and restore
          of copyID

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 18:39:10 +02:00
42cd192daa patch 9.1.0428: Tag guessing leaves wrong search history with very short names
Problem:  Tag guessing leaves wrong search history with very short names
          (after 9.1.0426).
Solution: Use the correct variable for pattern length (zeertzjq).

closes: #14817

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 17:19:58 +02:00
ffed1540f3 patch 9.1.0427: tests: some issues with termdebug mapping test
Problem:  tests: some issues with termdebug mapping test
Solution: Use assert_{true,false} if suitable, change
          order of expected and actual arguments in assert() calls.
          (Ken Takata)

closes: #14818
related: 7fbbd7f

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-21 17:14:56 +02:00
8cf29e4c4a runtime(matchit): update matchit plugin to v1.20
fixes: #14814

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 20:02:16 +02:00
8c85a2a49a patch 9.1.0426: too many strlen() calls in search.c
Problem:  too many strlen() calls in search.c
Solution: refactor code and remove more strlen() calls,
          use explicit variable to remember strlen
          (John Marriott)

closes: #14796

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 19:18:26 +02:00
69dff00dfb runtime(verilog): set commentstring option
closes: #14810

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 18:14:25 +02:00
af2254d2f3 runtime(vb): update vb indent plugin as vim9script
Include an updated vb indent script using vim9script.
Also update the runtime indent test files

Signed-off-by: Michael Soyka <mssr953@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:38:10 +02:00
155583a5c3 patch 9.1.0425: filetype: purescript files are not recognized
Problem:  filetype: purescript files are not recognized
Solution: recognize '*.purs' files as purescript filetype,
          include basic purescript filetype plugin
          (Riley Bruins)

Reference: https://github.com/purescript/documentation/blob/master/language/Syntax.md#comments

closes: #14813

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:21:53 +02:00
aa3104b07a patch 9.1.0424: filetype: slint files are not recognized
Problem:  filetype: slint files are not recognized
Solution: Detect '*.slint' files as slint filetype,
          include basic sling filetype plugin
          (Riley Bruins)

closes: #14808

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:20:09 +02:00
f295050fa5 runtime(nim): basic nim ftplugin file for comments (#14812)
Reference: https://nim-by-example.github.io/comments/#:~:text=Comments%20in%20Nim%20begin%20with%20the%20hash%20character.&text=Multiline%20or%20block%20comments%20begin,line%20comments%20can%20be%20nested.

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:16:17 +02:00
957d903cb7 runtime(arduino): Add Arduino ftplugin and indent files (#14811)
We already have Arduino syntax file, but we didn't have ftplugin and
indent files.

This commit adds a basic ftplugin file and a basic indent file.
Both of them are derived from {ftplugin,indent}/c.vim.

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:13:35 +02:00
c3d5c2fc87 runtime(typst): include basic typst ftplugin file (#14809)
Reference: https://typst.app/docs/reference/syntax/#comments

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:08:49 +02:00
9c4d14dbb4 runtime(prisma): include basic prisma ftplugin file (#14807)
Reference: https://www.prisma.io/docs/orm/prisma-schema/overview#comments

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:07:30 +02:00
1b5e3d21f6 runtime(v): include basic v ftplugin for comment support (#14806)
Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:03:46 +02:00
c95e64f41f patch 9.1.0423: getregionpos() wrong with blockwise mode and multibyte
Problem:  getregionpos() wrong with blockwise mode and multibyte.
Solution: Use textcol and textlen instead of start_vcol and end_vcol.
          Handle coladd properly (zeertzjq).

Also remove unnecessary buflist_findnr() in add_regionpos_range(), as
getregionpos() has already switched buffer.

closes: #14805

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 14:00:31 +02:00
22029edb6c patch 9.1.0422: function echo_string_core() is too long
Problem:  function echo_string_core() is too long
Solution: Refactor into several smaller functions
          (Yegappan Lakshmanan)

closes: #14804

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-20 13:57:11 +02:00
5f1b115afd patch 9.1.0421: filetype: hyprlang files are not recognized
Problem:  filetype: hyprlang files are not recognized
Solution: recognize 'hypr{land,paper,idle,lock}.conf' files
          as 'hyprlang' filetype, add hyprlang ftplugin
          (Riley Bruins)

closes: #14803

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 11:26:44 +02:00
4d7892bfb1 runtime(dart): add basic dart ftplugin file
fixes #14793
closes #14802

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:31:46 +02:00
36e974fdf3 runtime(graphql): basic ftplugin file for graphql
closes: #14801

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:30:12 +02:00
d801edfb1b runtime(doc): mention comment plugin at :h 'commentstring'
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:29:02 +02:00
df859a36d3 runtime(sql): set commentstring for sql files in ftplugin
closes: #14800

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:24:17 +02:00
0b0f7d6be0 patch 9.1.0420: :browse oldfiles prompts even with single entry
Problem:  :browse oldfiles prompts even with single entry
Solution: Do not prompt, but edit the file directly,
          also when using :filter /pat/ browse oldfiles

closes: #14794

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:11:09 +02:00
4776e64e72 patch 9.1.0419: eval.c not sufficiently tested
Problem:  eval.c not sufficiently tested
Solution: Add a few more additional tests for eval.c,
          (Yegappan Lakshmanan)

closes: #14799

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-19 09:06:50 +02:00
5f75714730 runtime(doc): clarify why E195 is returned
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-18 19:11:29 +02:00
5cf5301e28 runtime(doc): clarify temporary file clean up
related: #14770

Co-authored-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-18 10:15:04 +02:00
9404378019 runtime(matchparen): fix :NoMatchParen not working (#14797)
fixes: neovim/neovim#28828

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-18 08:55:49 +02:00
8e4c4c7d87 patch 9.1.0418: Cannot move to previous/next rare word
Problem:  Cannot move to previous/next rare word
          (Colin Kennedy)
Solution: Add the ]r and [r motions (Christ van Willegen)

fixes: #14773
closes: #14780

Signed-off-by: Christ van Willegen - van Noort <github.com@vanwillegen-vannoort.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:52:45 +02:00
cf78d0df51 runtime(sshdconfig): add basic ftplugin file for sshdconfig (#14790)
Signed-off-by: Yinzuo Jiang <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:39:24 +02:00
f0905a8613 patch 9.1.0417: if_py: find_module has been removed in Python 3.12.0a7
Problem:  if_py: find_module has been removed in Python 3.12.0a7
          (@Ghost-LZW)
Solution: Do not include find_module for Python >= 3.12.0a7

fixes: #14776
closes: #14781

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:30:26 +02:00
2e642734f4 patch 9.1.0416: some screen dump tests can be improved
Problem:  some screen dump tests can be improved (after 9.1.0414)
Solution: Make sure screen state changes properly and is captured in the
          screen dumps (Luuk van Baal)

closes: #14788

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:28:02 +02:00
fe424d13ef patch 9.1.0415: Some functions are not tested
Problem:  Some functions are not tested
Solution: Add a few more tests, fix a few minor problems
          (Yegappan Lakshmanan)

closes: #14789

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 18:20:43 +02:00
e595e9c31b runtime(doc): clarify instal instructions for comment package
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-17 17:30:04 +02:00
b32055e504 patch 9.1.0414: Unable to leave long line with 'smoothscroll' and 'scrolloff'
Problem:  Unable to leave long line with 'smoothscroll' and 'scrolloff'.
          Corrupted screen near the end of a long line with 'scrolloff'.
          (Ernie Rael, after 9.1.0280)
Solution: Only correct cursor in case scroll_cursor_bot() was not itself
          called to make the cursor visible. Avoid adjusting for
          'scrolloff' beyond the text line height (Luuk van Baal)

fixes: #14726
closes: #14783

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-16 20:44:09 +02:00
f5c8f520ba runtime(doc): fix typo in vim9script help file (#14782)
This commit fixes a typo in the first example of the vim9script help
file. Trying to execute the given example before resulted in a "trailing
characters" error.

Signed-off-by: jbm950 <jmilam343@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-16 19:53:39 +02:00
c0e038b59f runtime(doc): Remove trailing spaces (#14784)
Fix the issues introduced by #14770.
2024-05-16 12:39:01 +09:00
5faeb60480 runtime(doc): clarify {special} argument for shellescape()
closes: #14770

Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-15 21:54:19 +02:00
8314de8fd4 CI: Upload failed screendump tests when run in github actions
It's a bit of a pain to debug failing screendump tests without knowing
exactly what went wrong. Therefore include actions/upload-artifact for
the Github CI runners and have them uploaded those failing screen dump
tests automatically.

Let's add this step to each of the Linux/MacOS/Windows workflows but do
not duplicate the code, factor it out to a single file
.github/actions/screendump/action.yml and reference this one from the
main ci.yml file

Example:
https://github.com/chrisbra/vim/actions/runs/9085493619

closes: #14771

Co-authored-by: dundargoc <gocdundar@gmail.com>
Co-authored-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-15 21:48:11 +02:00
eff20eb35d patch 9.1.0413: smoothscroll may cause infinite loop
Problem:  smoothscroll may cause infinite loop, with
          very narrow windows
          (Jaehwang Jung, after v9.1.0280)
Solution: Check for width1 being negative, verify
          that win_linetabsize does not overflow

fixes: #14750
closes: #14772

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-15 21:35:36 +02:00
fed01960d2 runtime(doc): add missing entries for the keys CTRL-W g<Tab> and <C-Tab>
fixes: #14777
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-15 21:05:23 +02:00
93e0d2e815 runtime(doc): update vi_diff.txt: add default value for 'flash'
The "flash" option was added relatively late and seems to be exclusive
to System V. (It's not in 4.4BSD and it's not in V8 UNIX, checked [on
TUHS](https://www.tuhs.org/cgi-bin/utree.pl).) The oldest occurrence of
`flash` in "a vi" I could find is in SysV R2 for the VAX, where it
[defaults to
1](https://github.com/ryanwoodsmall/oldsysv/blob/master/sysvr2-vax/src/cmd/vi/vax/ex_data.c)
= on.

closes: #14778

Signed-off-by: Cthulhux <github@tuxproject.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-15 20:54:35 +02:00
6043024cd4 patch 9.1.0412: typo in regexp_bt.c in DEBUG code
Problem:  typo in regexp_bt.c in DEBUG code, causing
          compile error (@kfleong7, after v9.1.0409)
Solution: Replace bulen by buflen

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-14 11:19:47 +02:00
679f5abb99 runtime(i3config/swayconfig): allow indented commands (#14757)
fixes: #14752

Co-authored-by: jamespeapen <jamespeapen@users.noreply.github.com>
Signed-off-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-13 22:03:42 +02:00
7961210b86 runtime(python): Fix wrong define regex in ftplugin (#14763)
Signed-off-by: Tom Picton <tom@tompicton.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-13 22:00:40 +02:00
2f5ff73827 runtime(syntax-tests): Filter out non-Latin-1 characters for syntax tests (#14767)
Syntax tests are run with the LC_ALL=C environment variable
passed to "make".  Occasionally, there are CI failures for
such test files containing non-Latin-1 characters with error
messages pointing to multi-byte characters:

https://github.com/vim/vim/actions/runs/8824925004/job/24228298023#step:10:16370 ,
https://github.com/vim/vim/actions/runs/8840856619/job/24276935260#step:10:16347 ,
https://github.com/vim/vim/actions/runs/8854043458/job/24316210645#step:10:16362 ,
https://github.com/vim/vim/actions/runs/8856501136/job/24322848765#step:10:16354 ,
https://github.com/vim/vim/actions/runs/9038417238/job/24839482152#step:11:16980 .

But since the very same unchanged tests pass at other times:

https://github.com/vim/vim/actions/runs/8827593571/job/24235935458#step:10:16353 ,
https://github.com/vim/vim/actions/runs/9065214647/job/24905321661#step:11:17002 ;

these failures are unrelated to the nature of syntax tests
and should be considered false positives.

As a temporary workaround, all bytes of known non-Latin-1
characters can be replaced in memory with an arbitrary ASCII
byte (?) by applying a filter

> " To ignore part of the dump, provide a "dumps/{filename}.vim" file with
> " Vim commands to be applied to both the reference and the current dump, so
> " that parts that are irrelevant are not used for the comparison.  The result
> " is NOT written, thus "term_dumpdiff()" shows the difference anyway.

before lines are compared between files.


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-13 21:06:05 +02:00
43f2edc096 runtime(netrw): prefer scp over pscp
regression introduced in ce2ad9ffd7

The current logic is a bit funny, in that it checks for an executable of
scp, then pscp and if neither exists, it uses: scp :/
Anyway, let's fall back to the logic used before the above commit.

related: #14739

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-13 21:01:06 +02:00
b7258738f8 runtime(doc): fix typo in usr_52.txt
fixes: #14758

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-12 19:04:47 +02:00
4ceb4dc825 patch 9.1.0411: too long functions in eval.c
Problem:  too long functions in eval.c
Solution: refactor functions (Yegappan Lakshmanan)

closes: #14755

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-12 09:24:35 +02:00
d01e699348 patch 9.1.0410: warning about uninitialized variable
Problem:  warning about uninitialized variable
          (Tony Mechelynck, after 9.1.0409)
Solution: initialize variable (John Marriott)

closes: #14754

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-12 09:01:38 +02:00
82792db631 patch 9.1.0409: too many strlen() calls in the regexp engine
Problem:  too many strlen() calls in the regexp engine
Solution: refactor code to retrieve strlen differently, make use
          of bsearch() for getting the character class
          (John Marriott)

closes: #14648

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-12 00:07:17 +02:00
86f6e2c2ee ftplugin(python): E16 fix, async keyword support for define (#14751)
This change includes the following changes:
- Fix "E16: Invalid range" when using a count with jump to start/end of class/method
- Update define with optional async keyword
- Update maintainer email

Signed-off-by: Tom Picton <tom@tompicton.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 20:26:06 +02:00
9c0ff47098 patch 9.1.0408: configure fails on Fedora when including perl
Problem:  configure fails on Fedora when including perl
          (chesheer-smile)
Solution: Filter out -spec=<path> from $LIBS and $LDFLAGS to avoid
          linking relocation errors for unrelated autoconf tests.

closes: #14526

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 20:22:32 +02:00
58448e09be patch 9.1.0407: Stuck with long line and half-page scrolling
Problem:  No scrolling happens with half-page scrolling with line
          filling entire window when 'smoothscroll' is disabled.
          (Mathias Rav, after v9.1.0285)
Solution: Adjust amount to move cursor by so that it is moved the same
          number of lines as was scrolled, even when scrolling different
          number of lines than requested with 'nosmoothscroll'.

fixes: #14743
closes: #14746

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 11:27:52 +02:00
031a745608 patch 9.1.0406: Divide by zero with getmousepos() and 'smoothscroll'
Problem:  Divide by zero with getmousepos() and 'smoothscroll'.
Solution: Don't compute skip_lines when width1 is zero.
          (zeertzjq)

closes: #14747

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 11:23:37 +02:00
1c5728e0c4 runtime(doc): update and remove some invalid links
closes: #14748

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-11 11:16:21 +02:00
9e4bfb219f translation(it): update translation of xxd manpage
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 23:53:58 +02:00
c16c4a21eb runtime(netrw): Recursively delete directories by default with netrw delete command
closes: #14742

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 23:43:29 +02:00
d3952e8cfe runtime(java): Strive to remain compatible for at least Vim 7.0 (#14744)
Also:

- Limit all look-behind regexp patterns.
- Cache regexp capabilities for [:upper:] and [:lower:].

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 23:39:31 +02:00
b7deb1b69e patch 9.1.0405: tests: xxd buffer overflow fails on 32-bit
Problem:  tests: xxd buffer overflow fails on 32-bit
Solution: Skip test on 32-bit architecture

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 20:03:21 +02:00
06bdac1580 runtime(java): Stop handpicking syntax groups for @javaTop (#14727)
* runtime(java): Stop handpicking syntax groups for @javaTop

Also:

- Remove the obsolete comment for g:java_allow_cpp_keywords.
- Remove the commented out groups java\%[Debug\]StringError.
- Infer and set the preferred formatting Vim options from
  the modeline.

Since vim-6-0u, non-contained syntax groups can be referred
to by using the "contains=TOP..." argument.

* Set &encoding and &termencoding to "utf-8" for test files

* Limit non-ASCII charset to [§ƒɐɘʬʭΑ-Τα-μ] for test files

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 14:49:06 +02:00
67797191e0 patch 9.1.0404: [security] xxd: buffer-overflow with specific flags
Problem:  [security] xxd: buffer-overflow with specific flags
Solution: Correctly calculate the required buffer space
          (Lennard Hofmann)

xxd writes each output line into a global buffer before printing.
The maximum size of that buffer was not calculated correctly.

This command was crashing in AddressSanitizer:
$ xxd -Ralways -g1 -c256 -d -o 9223372036854775808 /etc/passwd

This prints a line of 6680 bytes but the buffer only had room for 6549 bytes.
If the output from "-b" was colored, the line could be even longer.

closes: #14738

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Lennard Hofmann <lennard.hofmann@web.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 14:41:18 +02:00
8c35c26c1f patch 9.1.0403: Vim9: not able to import file from start dir
Problem:  Vim9: not able to import file from start dir
          (Danielle McLean)
Solution: Allow to import from start directory
          (Yegappan Lakshmanan)

fixes: #13313
closes: #14740

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 13:10:54 +02:00
63f2a5b8ad patch 9.1.0402: filetype: mdd files detected as zsh filetype
Problem:  filetype: mdd files detected as zsh filetype
Solution: detect '*.mdd' files as sh filetype, add links
          to reference documentation (Wu, Zhenyu)

closes: #14741

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-10 13:01:54 +02:00
887a38cee7 patch 9.1.0401: filetype: zsh module files are not recognized
Problem:  filetype: zsh module files are not recognized
Solution: Detect '*.mdh' and '*.epro' as C filetype, '*.mdd' as zsh
          filetype, determine zsh-modules '*.pro' from from it's content
          (Wu, Zhenyu)

closes: #14737

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-09 20:35:13 +02:00
ce2ad9ffd7 runtime(netrw): Remove hardcoded private.ppk logic from netrw
closes: #14739

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-09 20:20:36 +02:00
1b53172901 patch 9.1.0400: Vim9: confusing error message for unknown type
Problem:  Vim9: confusing error message for unknown type
          (Doug Kearns)
Solution: For an unknown type, display only the type name in the error
          message (Yegappan Lakshmanan)

fixes: #13153
closes: #14736

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-09 09:15:02 +02:00
d5c8c0920e patch 9.1.0399: block_editing errors out when using del
Problem:  block_editing errors out when using del
          (@Jamarley)
Solution: Change ins_len from size_t to int and
          properly check that it doesn't become negative

There is a check in os.c that verifies that `ins_len` does not become
negative:
```
if (pre_textlen >= 0 && (ins_len = len - pre_textlen - offset) > 0)
```
However this only works, if ins_len can actually become negative and
unfortunately, ins_len has been declared as `size_t` so instead of
becoming negative it will wrap around and be very large.

So let's define it as integer, after which the condition above
properly catches this condition.

fixes: #14734
closes: #14735

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 22:17:19 +02:00
cb3691811b runtime(spec): add new items to scripts section in syntax plugin
- %generate_buildrequires — added in RPM 4.15
- %conf — added in RPM 4.18

closes: #14723

Ref: https://rpm-software-management.github.io/rpm/manual/spec.html#build-scriptlets

Signed-off-by: author
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 20:28:51 +02:00
9937d8b619 patch 9.1.0398: Vim9: imported vars are not properly type checked
Problem:  Vim9: imported vars are not properly type checked
Solution: Check the imported variable type properly
          (Yegappan Lakshmanan)

closes: #14729

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 20:24:33 +02:00
c7a8eb5ff2 patch 9.1.0397: Wrong display with 'smoothscroll' when changing quickfix list
Problem:  Wrong display with 'smoothscroll' when changing quickfix list.
Solution: Reset w_skipcol when replacing quickfix list (zeertzjq).

closes: #14730

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 20:22:40 +02:00
6a4ea471d2 patch 9.1.0396: filetype: jj files are not recognized
Problem:  jj files are not recognized
Solution: recognize '*.jjdescription' files as jj filetype
          (Gregory Anders)

See: https://github.com/martinvonz/jj

closes: #14733

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 20:17:43 +02:00
b8ecedce79 patch 9.1.0395: getregionpos() may leak memory on error
Problem:  regionpos may leak memory on error, coverity
          complains about dereferencing Null pointer
Solution: free all list pointers (after v9.1.394),
          return early if buflist_findnr() returns NULL

closes: #14731

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 19:50:26 +02:00
3ac83c7141 The CODEOWNERS File is not useful
Github is complaining about "This file has errors" and is just noisy
and for that reason does not ping maintainers if a new issue/PR is
created.
Let's just rename it to MAINTAINERS file instead and update the
documentation.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 19:39:54 +02:00
1e34b95e44 runtime(netrw): Remove and cleanup Win9x legacy from netrw
closes: #14732

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-08 19:19:34 +02:00
fb745756db runtime(doc): add MsgArea to 'highlight' option description
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-07 21:21:30 +02:00
b4757e627e patch 9.1.0394: Cannot get a list of positions describing a region
Problem:  Cannot get a list of positions describing a region
          (Justin M. Keyes, after v9.1.0120)
Solution: Add the getregionpos() function
          (Shougo Matsushita)

fixes: #14609
closes: #14617

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-07 20:49:24 +02:00
c5def6561d runtime(cpp): Fix digit separator in syntax script for octals and floats
Also fix the incorrect rendering of floats that start with ".".

closes: #14724

Signed-off-by: Wu Yongwei <wuyongwei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-07 18:33:30 +02:00
4e9adfa3d1 README.md: Update link to Wikipedia Vi page
fixes: #14725

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-07 18:17:00 +02:00
8d8cb45756 runtime(sh,zsh): clear $MANPAGER in ftplugin before shelling out
Say you use Vim and set MANPAGER='vim -M +MANPAGER --not-a-term -'; then
:{Zs,S}hKeywordPrg (or K) will crap out and spew terminal garbage into
less when bash's "help" fails. This was introduced by 2f25e40b1
(runtime: configure keywordpg for some file types (#5566), 2023-08-23)
and may be present in other files touched by that commit.

Make the "man" invocation sensible by unsetting MANPAGER in the
environment.

Note that changing MANPAGER for `:terminal` is not needed; Vim within
Vim is perfectly fine.

closes: #14679

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-06 19:55:23 +02:00
53753f6a49 runtime(doc): Fix typos in help documents
closes: #14720

Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-05 18:42:31 +02:00
c3e6e393cb patch 9.1.0393: 'viewdir' not respecting $XDG_CONFIG_HOME
Problem:  'viewdir' not respecting $XDG_CONFIG_HOME
          (Danilo Rezende, after v9.1.327)
Solution: adjust 'viewdir' option when enabling XDG config mode

fixes: #14680
closes: #14708

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-04 09:48:15 +02:00
7edde3f39e patch 9.1.0392: tests: Vim9 debug tests may be flaky
Problem:  tests: Vim9 debug tests may be flaky
          (Shane-XB-Qian)
Solution: Give a few more lines so that line-wrapping won't
          cause a hit-enter prompt

The two tests Run_Test_debug_running_out_of_lines() and
Run_Test_debug_with_lambda() test debugging of Vim script functions.

Depending from what file-path the tests are run, it may cause
line wrapping to occur on the following output:

Entering Debug mode.  Type "cont" to continue.
command line..script
/home/chrisbra/code/vim-upstream/src/testdir/XdebugFunc[15]..function
<SNR>9_Crash

and if the window is too small, this will cause a hit-enter prompt and so
the WaitForAssert() fails, causing failure of the following tests.

So increase the (internal) Vim window by a few more lines, so that even
if line-wrapping occurs, no hit-enter prompts happens and so the tests
can finish.

fixes: #14596
closes: #14691

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-04 09:38:59 +02:00
ad4881cb3c runtime(doc): correct getscriptinfo() example (#14718)
When "sid" is specified, it returns a List with a single item.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-04 09:35:30 +02:00
5715a72628 patch 9.1.0391: Vim9: could improve testing
Problem:  Vim9: could improve testing
          (Ernie Rael)
Solution: Support defcompile for test_override() to
          improve testing (Yegappan Lakshmanan)

fixes: #14553
closes: #14712

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-03 18:27:51 +02:00
c8330b8fff CI: test_sound fails on macos-12 (#14715)
Signed-off-by: ichizok <gclient.gaap@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-03 18:22:35 +02:00
5bf7446ba2 translation(sr): update Serbian menu
closes: #14669
closes: #10722

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 22:17:05 +02:00
75c3161f8f translation(sk): update Slovak menu
closes: #14671
closes: #10721

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 22:10:41 +02:00
dfbf6f3ae5 translation(sl): update Slovenian menu
closes: #14673

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 22:08:13 +02:00
d88a39e0d6 translation(pt): update Portuguese menu
closes: #10718
closes: #10717
closes: #14674

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 22:05:45 +02:00
c3016a8bf0 translation(nl): update Dutch menu
closes: #14682

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 22:02:30 +02:00
f2211cb1ca translation(ko): update Korean menu
closes: #14683

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 21:59:58 +02:00
247dbd0e7b translation(is): update Icelandic menu
closes: #14685

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 21:56:45 +02:00
5ba554011e translation(CZ): update Czech menu
closes: #14704

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 21:44:56 +02:00
e0d0ad675e translation(af): update Afrikaans menu
closes: #14706

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 21:40:43 +02:00
f1d3913a80 translation(de): update German menu
closes: #14702

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 13:16:21 +02:00
a01968448a patch 9.1.0390: filetype: inko files are not recognized
Problem:  filetype: inko files are not recognized
Solution: Detect '*.inko' as ink filetype
          (Yorick Peterse)

See:
- https://github.com/inko-lang/inko.vim
- https://inko-lang.org/

closes: #14699

Signed-off-by: Yorick Peterse <git@yorickpeterse.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 13:11:44 +02:00
54e79157c5 patch 9.1.0389: filetype: templ files are not recognized
Problem:  filetype: templ files are not recognized
Solution: Detect '*.templ' files as filetype templ
          (Tristan Knight)

See:
- https://github.com/a-h/templ
- https://templ.guide/

closes: #14697

Signed-off-by: tris203 <admin@snappeh.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 13:08:25 +02:00
2ffdae7948 patch 9.1.0388: cursor() and getregion() don't handle v:maxcol well
Problem:  cursor() and getregion() don't handle v:maxcol well.
Solution: Add special handling for v:maxcol like setpos() does.
          (zeertzjq)

closes: #14698

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 13:06:24 +02:00
da9d345b3d patch 9.1.0387: Vim9: null value tests not sufficient
Problem:  Vim9: null value tests not sufficient
Solution: Add a more comprehensive test for null values
          (Yegappan Lakshmanan)

closes: #14701

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 13:02:36 +02:00
3ca2ae180a translation(ca): update Catalan menu
closes: #14705

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-02 13:00:37 +02:00
2d919d2744 patch 9.1.0386: filetype: stylus files not recognized
Problem:  filetype: stylus files not recognized
Solution: Detect '*.styl' and '*.stylus' as stylus filetype,
          include indent, filetype and syntax plugin
          (Philip H)

closes: #14656

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-01 18:42:11 +02:00
94a05d5545 translation(es): update spanish menu localization
closes: #14690

Signed-off-by: Oleg Zadorozhnyi <lesorubshayan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-01 18:08:34 +02:00
370e36829b runtime(doc): regenerate helptags (#14695)
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-01 16:52:40 +02:00
b2e42b9be0 patch 9.1.0385: Vim9: crash with null_class and null_object
Problem:  Vim9: crash with null_class and null_object
          (Aliaksei Budavei)
Solution: Handle null_class and null_object correctly
          (Yegappan Lakshmanan)

fixes: #14678
closes: #14681

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-01 11:44:17 +02:00
ca4b81a7ae runtime(doc): Add tags about lazyloading of menu (#14688)
Close #14672

Also add the `g:` prefix.

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-05-01 11:35:32 +02:00
83d3b3b8a4 patch 9.1.0384: tests: vt420 terminfo entry may not be found
Problem:  tests: vt420 terminfo entry may not be found
          (Shane-XB-Qian)
Solution: check existence of terminfo vt420 and infocmp command

related: #14595
closes: #14677

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-30 20:45:09 +02:00
e35478bc9d patch 9.1.0383: filetype: .out files recognized as tex files
Problem:  filetype: .out files recognized as tex files
Solution: Do not set an explicit filetype until it is clear what this
          should be (shane.xb.qian)

closes: #14670

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-30 20:35:53 +02:00
5cbc9a69e5 patch 9.1.0382: filetype: Kbuild files are not recognized
Problem:  Kbuild files are not recognized.
Solution: Detect Kbuild files as make files.
          (Bruno Belanyi)

closes: #14676

Signed-off-by: Bruno Belanyi <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-30 20:16:01 +02:00
652c821366 patch 9.1.0381: cbuffer and similar commands don't accept a range
Problem:  cbuffer and similar quickfix and locationlist commands don't
          accept a range, even so it is documented they should
          (ilan-schemoul, after 8.1.1241)
Solution: Define ex commands with ADDR_LINES instead of ADDR_OTHER

fixes: #14638
closes: #14657

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-29 20:36:49 +02:00
c4d0c8c812 runtime(java): Improve the recognition of the "indent" method declarations (#14659)
There is a flaw in the current implementation that has been
exacerbated around v5.2.  It lies in the recognition of all
three indentation styles simultaneously: a tab, two space,
and eight space character(s).  With it, it is not uncommon
to misidentify various constructs as method declarations
when they belong to two-space indented members and other
blocks of a type and are offset at eight space characters or
a tab from the start of the line.

For example,

------------------------------------------------------------
class Test
{
  static String hello() { return "hello"; }

  public static void main(String[] args)
  {
    try {
      if (args.length > 0) {
        // FIXME: eight spaces.
        System.out.println(args[0]);
      } else {
        // FIXME: a tab.
	System.out.println(hello());
      }
    } catch (Exception e) {
      throw new Error(e);
    }
  }
}
------------------------------------------------------------

------------------------------------------------------------
:let g:java_highlight_functions = 'indent'
:doautocmd Syntax
------------------------------------------------------------

A better approach is to pick an only indentation style out
of all supported styles (so either two spaces _or_ eight
spaces _or_ a tab).  Note that tabs and spaces can still be
mixed, only the leading tab or the leading run of spaces
matters for the recognition.  And there is no reason to not
complement the set of valid styles with any number of spaces
from 1 to 8, inclusively.

Please proceed with the necessary change as follows:

- rename from "indent" to "indent2" for a 2-space run;
- rename from "indent" to "indent8" for an 8-space run;
- continue to have "indent" for a tab run;
- define an "indent" variable with a suffix number denoting
  the preferred amount of indentation for any other run of
  spaces [1-8].

As before, this alternative style of recognition of method
declarations still does not prescribe naming conventions and
still cannot recognise method declarations in nested types
that are conventionally indented.

The proposed changes also follow suit of "style" in stopping
the claiming of constructor and enum constant declarations.


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-29 20:24:35 +02:00
04e1aaa94e runtime(doc): Fix a typo in usr_30.txt
closes: #14662

Signed-off-by: UM-Li <um-li@tuta.io>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-29 20:22:46 +02:00
dc5c905541 runtime(jq): remove undefined var s:save_cpoptions and add include setting
closes: #14661
closes: #14663

Co-authored-by: itchyny <itchyny@cybozu.co.jp>
Signed-off-by: GodFather <vito.blog@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-29 20:18:26 +02:00
2e9b9e9a9e runtime(asm): missing setlocal in indent plugin (#14658)
Signed-off-by: Marc Sven Schulte <167623652+msschulte@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-28 21:43:03 +02:00
32d701f51b patch 9.1.0380: Calculating line height for unnecessary amount of lines
Problem:  Calculating line height for unnecessary amount of lines with
          half-page scrolling (zhscn, after 9.1.0280)
Solution: Replace "limit_winheight" argument with higher resolution
          "max" argument to which to limit the calculated line height
          in plines_m_win() to (Luuk van Baal)

fixes: #14650
closes: #14652

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-28 16:24:02 +02:00
f351fd8292 runtime(ssa): improve syntax file performance (#14654)
fixes: #14653

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-28 16:22:55 +02:00
75a73551a1 patch 9.1.0379: There are a few typos
Problem:  There are a few typos
Solution: Fix them (zeertzjq)

closes: #14655

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-28 16:20:55 +02:00
fe55c31752 patch 9.1.0378: Vim9: no comments allowed after class vars
Problem:  Vim9: no comments allowed after class vars
          (Christian Robinson, after 9.1.376)
Solution: Allow trailing comments after class vars
          (Yegappan Lakshmanan)

closes: #14651

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-28 09:54:09 +02:00
1125051040 runtime(doc): CI: remove trailing white space in documentation
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-27 12:01:15 +02:00
86ef815959 patch 9.1.0377: Formatting text wrong when 'breakindent' is set
Problem:  formatting text wrong when 'breakindent' is set
          (Gary Johnson)
Solution: temporarily disable 'breakindent' option when formatting text,
          so that the breakindent is not wrongly taken into account for
          the line length

fixes: #14630
closes: #14637

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-27 11:55:08 +02:00
92917069b1 runtime(debversions): Add oracular (24.10) as Ubuntu release name
closes: #14645

Signed-off-by: Simon Quigley <simon@tsimonq2.net>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-27 11:51:45 +02:00
ac7731895c patch 9.1.0376: Vim9: Trailing commands after class/enum keywords ignored
Problem:  Vim9: Trailing commands after class/enum keywords ignored
Solution: Remove EX_TRLBAR keyword from command definition
          (Yegappan Lakshmanan)

closes: #14649

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-27 11:48:26 +02:00
340643e977 patch 9.1.0375: tests: 1-second delay after Test_BufEnter_botline()
Problem:  tests: 1-second delay after Test_BufEnter_botline()
          (after v9.1.0374)
Solution: Wipe the created buffers (zeertzjq).

closes: #14647

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-27 11:33:24 +02:00
93df2285a0 runtime(doc): update helptags for jq syntax (#14646)
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-27 11:31:53 +02:00
79952b9c67 runtime(jq): include syntax, ftplugin and compiler plugin
closes: #14619

Signed-off-by: Vito <vito.blog@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 22:39:41 +02:00
9525f62136 runtime(doc): fix typo synconcealend -> synconcealed (#14644)
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 19:57:20 +02:00
5400a5d426 runtime(comment): include a simple comment toggling plugin
fixes #14626
closes: #14634

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 19:53:13 +02:00
00ae5c5cba runtime(doc): fix typo
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 18:56:21 +02:00
eb80b8304e patch 9.1.0374: wrong botline in BufEnter
Problem:  When :edit an existing buffer, line('w$') may return a
          wrong result.
Solution: Reset w_valid in curwin_init() (Jaehwang Jung)

`do_ecmd()` reinitializes the current window (`curwin_init()`) whose
`w_valid` field may have `VALID_BOTLINE` set. Resetting `w_botline`
without marking it as invalid makes subsequent `validate_botline()`
calls a no-op, thus resulting in wrong `line('w$')` value.

closes: #14642

Signed-off-by: Jaehwang Jung <tomtomjhj@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 18:48:48 +02:00
4b9fc8247a CI: ubuntu-toolchain-r/test repository will be removed (#14641)
* CI: ubuntu-toolchain-r/test repository will be removed

The ubuntu-toolchain-r/test PPA will be removed from Ubuntu images.
The images rollout process will start on May 6 and take 3-4 days.
Mitigation ways

The repository can still be added manually in runtime by calling to following commands:

sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y

* fixup: add a note what this repo is for

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 18:45:41 +02:00
fe1e2b5e2d runtime(doc): clarify syntax vs matching mechanism
fixes: #14643

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-26 18:44:03 +02:00
98b12ede31 runtime(asm): fix undefined variable in indent plugin
It's an indent script, so we need to set the  b:undo_indent variable
instead of the b:undo_ftplugin var.

fixes: #14602

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 22:42:05 +02:00
38b9f45253 patch 9.1.0373: ops.c code uses too many strlen() calls
Problem:  ops.c code uses too many strlen() calls
Solution: Refactor code and remove more strlen() calls
          (John Marriott)

closes: #14598

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 21:39:18 +02:00
f68517c167 patch 9.1.0372: Calling CLEAR_FIELD() on the same struct twice
Problem:  Calling CLEAR_FIELD() on the same struct twice.
Solution: Remove the second CLEAR_FIELD().  Move the assignment of
          cookie.sourceing_lnum (zeertzjq).

closes: #14627

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 21:34:10 +02:00
f6c1fb20e3 patch 9.1.0371: Vim9: compile_def_function() still too long
Problem:  Vim9: compile_def_function() still too long
Solution: Refactor the code into separate functions
          (Yegappan Lakshmanan)

closes: #14632

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 21:33:24 +02:00
e679a37e17 translation(sr): Update Serbian messages (#14633)
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 21:29:58 +02:00
ec67ee09d2 patch 9.1.0370: MS-Windows: patch number is zero in installer
Problem:  MS-Windows: patch number is zero in installer
          (jonathan-b-wiebe)
Solution: Set VIM_VERSION_PATCHLEVEL, fix a few typos in the installer
          (RestorerZ)

fixes: #14629
closes: #14635

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 21:25:19 +02:00
addf9ed620 runtime(doc): clarify the effect of setting the shell to powershell
fixes: #14636

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-25 21:21:37 +02:00
a4c085a3e6 runtime(java): Improve the recognition of the "style" method declarations
- Request the new regexp engine (v7.3.970) for [:upper:] and
  [:lower:].

- Recognise declarations of in-line annotated methods.

- Recognise declarations of _strictfp_ methods.

- Establish partial order for method modifiers as shown in
  the MethodModifier production; namely, _public_ and
  friends should be written the leftmost, possibly followed
  by _abstract_ or _default_, or possibly followed by other
  modifiers.

- Stop looking for parameterisable primitive types (void<?>,
  int<Object>, etc., are malformed).

- Stop looking for arrays of _void_.

- Acknowledge the prevailing convention for method names to
  begin with a small letter and for class/interface names to
  begin with a capital letter; and, therefore, desist from
  claiming declarations of enum constants and constructors
  with javaFuncDef.
  Rationale:
    + Constructor is distinct from method:
      * its (overloaded) name is not arbitrary;
      * its return type is implicit;
      * its _throws_ clause depends on indirect vagaries of
        instance (variable) initialisers;
      * its invocation makes other constructors of its type
        hierarchy invoked one by one, concluding with the
        primordial constructor;
      * its explicit invocation, via _this_ or _super_, can
        only appear as the first statement in a constructor
        (not anymore, see JEP 447); else, its _super_ call
        cannot appear in constructors of _record_ or _enum_;
        and neither invocation is allowed for the primordial
        constructor;
      * it is not a member of its class, like initialisers,
        and is never inherited;
      * it is never _abstract_ or _native_.
    + Constructor declarations tend to be few in number and
      merit visual recognition from method declarations.
    + Enum constants define a fixed set of type instances
      and more resemble class variable initialisers.

Note that the code duplicated for @javaFuncParams is written
keeping in mind for g:java_highlight_functions a pending 3rd
variant, which would require none of the :syn-cluster added
groups.

closes: #14620

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-24 21:04:25 +02:00
3f821d6de2 patch 9.1.0369: Vim9: problem when importing autoloaded scripts
Problem:  Vim9: problem when importing autoloaded scripts
Solution: In `:def` handle storing to vim9 autoload export
          (Ernie Rael)

Problem occurs when `import autoload ./.../autoload/...`. The autoload
in the specified path causes the use of an autoload_prefix which combines
with the `import autoload` to create trouble.

In `generate_store_var()` `case dest_script` use ISN_STOREEXPORT,
when needed, instead of ISN_STORES. When executing ISN_STOREEXPORT,
check for autoload_prefix.

fixes: #14606
closes: #14615

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-04-24 20:07:50 +02:00
04e8943556 CI: remove microsoft-prod.list repository (#14628)
This is added by default, and it is often broken, but we don't need anything from it.

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-24 19:55:11 +02:00
dc5cd1cac1 patch 9.1.0368: MS-Windows: Hard to define the Vim Patchlevel with leading zeroes
Problem:  MS-Windows: Hard to define the Vim Patchlevel with leading
          zeroes for the installer
Solution: re-define VIM_VERSION_PATCHLEVEL_STR with leading zeroes,
          interpret Patchlevel as decimal in Make_mvc.mak
          (RestorerZ)

closes: #14471

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-23 20:33:38 +02:00
a16f251333 patch 9.1.0367: compile_def_function is too long
Problem:  compile_def_function is too long
Solution: Move out the code to compile the body of a function
          (Yegappan Lakshmanan)

closes: #14622

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-23 20:14:46 +02:00
ea999037a4 patch 9.1.0366: filetype: ondir files are not recognized
Problem:  filetype: ondir files are not recognized
Solution: Detect '.ondirrc' as ondir filetype
          (Jon Parise)

closes: #14604

Signed-off-by: Jon Parise <jon@indelible.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-22 21:07:41 +02:00
6b13e3d4e4 patch 9.1.0365: Crash when typing many keys with D- modifier
Problem:  Crash when typing many keys with D- modifier (after 9.1.0227).
Solution: Don't treat a 0x80 byte inside a special sequence as the start
          of a special sequence (zeertzjq).

closes: #14613

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-22 21:04:29 +02:00
22697b6179 patch 9.1.0364: tests: test_vim9_builtin is a bit slow
Problem:  tests: test_vim9_builtin is a bit slow
Solution: source tests from a buffer instead of
          writing and sourcing a file (Yegappan Lakshmanan)

closes: #14614

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-22 20:58:24 +02:00
f7a38650ea runtime(doc): update documentation
closes: #14616

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-22 20:55:32 +02:00
fbeea681ce CI: change the download URL of "libsodium" (#14618)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-22 20:48:43 +02:00
4baf908d60 patch 9.1.0363: tests: test_winfixbuf is a bit slow
Problem:  tests: test_winfixbuf is a bit slow
Solution: use defer if possible, reset hidden option, use --not-a-term
          when starting Vim using system() (Yegappan Lakshmanan)

closes: #14611

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-21 19:50:21 +02:00
d3ff129ce8 runtime(astro): Add filetype, syntax and indent plugin
related: #14558
closes: #14561

ported from: https://github.com/wuelnerdotexe/vim-astro

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-21 15:50:31 +02:00
b09fa35a04 patch 9.1.0362: expanding rc config files does not work well
Problem:  expanding rc config files does not work well
          (Michał Sieroń, after v9.1.0327)
Solution: initialize chartab option, required to expand
          evironment variables

fixes: #14597

Co-authored-by: author
Signed-off-by: author
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-21 14:55:36 +02:00
5eaa4d98f7 patch 9.1.0361: Vim9: vim9type.c is too complicated
Problem:  Vim9: vim9type.c is too complicated
Solution: Refactor a few functions in vim9type.c
          (Yegappan Lakshmanan)

closes: #14605

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-21 14:48:57 +02:00
84f6dc7ed2 patch 9.1.0360: Vim9: does not handle autoloaded variables well
Problem:  Vim9: does not handle autoloaded variables well
Solution: Better handle script-level exported variable references from
          autoload files (Ernie Rael).

fixes: #14591
closes: #14607

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-21 14:45:48 +02:00
158673680f runtime(doc): minor spell fix in starting.txt
closes: #14608

Signed-off-by: Diego Viola <diego.viola@gmail.com>
2024-04-21 14:40:42 +02:00
f135fa28e4 patch 9.1.0359: MS-Windows: relative import in a script sourced from a buffer doesn't work
Problem:  MS-Windows: Relative import in a script sourced from a buffer
          doesn't work (Ernie Rael)
Solution: Set a filename, so that we are not trying to use
          script-relative filename (Yegappan Lakshmanan)

When a script is sourced from a buffer, the file name is set to ":source
buffer=". In MS-Windows, the ":" is a path separator character (used
after a drive letter). This results in the code trying to use the ":"
prefix to import the script on MS-Windows. To fix this, when importing a
script from a script sourced from a buffer with nofile, don't use
a script relative path name.

fixes #14588
closes: #14603

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-20 18:31:21 +02:00
8927c9b720 patch 9.1.0358: wrong drawing in GUI with setcellwidth()
Problem:  wrong drawing in GUI with setcellwidth()
          (after v9.1.0344)
Solution: move gui.in_use condition (h-east)

closes: #14600

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-20 18:04:06 +02:00
564166f681 ftplugin(cmake): Add include and suffixesadd
closes: #14520

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-20 17:55:05 +02:00
4b6b0c4024 patch 9.1.0357: Page scrolling should place cursor at window boundaries
Problem:  Page scrolling does not always place the cursor at the top or
          bottom of the window (Mathias Rav)
Solution: Place the cursor at the top or bottom of the window.
          (Luuk van Baal)

fixes: #14585
closes: #14586

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-20 17:38:20 +02:00
59356019eb runtime(doc): align command line table
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-20 17:12:59 +02:00
a13290f823 runtime(doc): minor fixes to starting.txt
closes: #14593

Signed-off-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-19 15:51:44 +02:00
349f5cd818 patch 9.1.0356: MS-Windows: --remote may change working directory
Problem:  MS-Windows: --remote may change working directory when
          'shellslash' is set
Solution: normalize directory separators on MS-Windows

fixes: #14549
closes: #14587

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-19 15:26:21 +02:00
cee034112d runtime(bp): fix comment definition in filetype plugin (#14594)
I somehow messed up the previous patch, I think a copy-paste error when
creating the file.

Blueprint files have C and C++ style comments, not shell-like '#'
comments.

Signed-off-by: Bruno BELANYI <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-19 15:19:31 +02:00
ce736033ae patch 9.1.0355: filetype: flake.lock files are not recognized
Problem:  filetype: flake.lock files are not recognized
Solution: Detect 'flake.lock' as json filetype
          (Riley Bruins)

closes: #14589

Signed-off-by: Riley Bruins <ribru17@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-19 15:13:38 +02:00
4b3fab14db patch 9.1.0354: runtime(uci): No support for uci file types
Problem:  runtime(uci): No support for uci file types
          (Wu, Zhenyu)
Solution: include basic uci ftplugin and syntax plugins
          (Colin Caine)

closes: #14575

Co-authored-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Colin Caine <complaints@cmcaine.co.uk>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 23:53:02 +02:00
36e667ab83 runtime(java): Support "g:ftplugin_java_source_path" with archived files
Also, document for "g:ftplugin_java_source_path" its current
modification of the local value of the 'path' option.

closes: #14570

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 23:08:59 +02:00
6f1d05b85a patch 9.1.0353: tests: Test_autoload_import_relative_compiled fails on Windows
Problem:  tests: Test_autoload_import_relative_compiled fails on Windows
Solution: Disable on Windows for now, add missing :bw for clean-up (Ernie Rael)

closes: #14579

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 22:53:33 +02:00
ed908f760d patch 9.1.0352: Finding cmd modifiers and cmdline-specials is inefficient
Problem:  Finding cmd modifiers and cmdline-specials is inefficient
Solution: Use binary search to find ex command modifiers and
          cmdline-special characters and reduce the number of strlen()
          (John Marriott)

closes: #14534

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 22:46:56 +02:00
094c4390bd patch 9.1.0351: No test that completing a partial mapping clears 'showcmd'
Problem:  No test that completing a partial mapping clears 'showcmd'.
Solution: Complete partial mappings in Test_showcmd_part_map() instead
          of using :echo.  Adjust some comments (zeertzjq).

closes: #14580

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 22:09:37 +02:00
1fa22e3ad6 patch 9.1.0350: tests: test_vim9_dissamble may fail
Problem:  tests: test_vim9_dissamble may fail
Solution: Instead of hard-coding the lambda number, accept
          just any number (Julio B)

closes: #14581

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 22:05:12 +02:00
76ba252e61 patch 9.1.0349: Vim9: need static type for typealias
Problem:  Vim9: need static type for typealias
Solution: Refactor the typval2type() function and add a static type for
          typealias (Yegappan Lakshmanan)

closes: #14582

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 21:33:27 +02:00
baedc998b0 patch 9.1.0348: X11 does not ignore smooth scroll event
Problem:  X11 does not ignore smooth scroll event
          (laniakea64)
Solution: Correctly ignore unwanted smooth scroll events on X11
          (lilydjwg)

fixes #14578
closes: #14583

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 21:25:36 +02:00
133ed2a592 patch 9.1.0347: A few typos in test_xdg when testing gvimrc
Problem:  A few typos in test_xdg when testing gvimrc
Solution: Fix them (Diego Viola)

closes: #14584

Signed-off-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-18 20:58:02 +02:00
1433ac93eb patch 9.1.0346: Patch v9.1.0338 fixed sourcing a script with import
Problem:  Patch v9.1.0338 fixed sourcing a script with import
Solution: Add test `import './file.vim' and verify it works with `:source`
          so it does not regress (Ernie Rael)

closes: #14577

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-17 22:39:34 +02:00
a34ba82107 patch 9.1.0345: Problem: gvimrc not sourced from XDG_CONFIG_HOME
Problem:  gvimrc not sourced from XDG_CONFIG_HOME (after v9.1.0327)
Solution: Also try to source from ~/.config/vim/gvimrc and
          $XDG_CONFIG_HOME/vim/gvimrc (Maxim Kim)

fixes: #14567
closes: #14568

Signed-off-by: Maxim Kim <habamax@haba-debian.habamax>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-17 22:30:50 +02:00
e20fa59903 patch 9.1.0344: Cursor wrong after using setcellwidth() in terminal
Problem:  Cursor wrong after using setcellwidth() in terminal
          (mikoto2000)
Solution: output additional spaces, so the behaviour matches the GUI
          (mikoto2000)

fixes: #14539
closes: #14540

Signed-off-by: mikoto2000 <mikoto2000@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Fix CUI `setcellwidths` characters draw behavior to same GUI behavior.
2024-04-17 22:06:54 +02:00
acdfb8a979 patch 9.1.0343: 'showcmd' wrong for partial mapping with multibyte
Problem:  'showcmd' is wrong for partial mapping with multibyte char,
          and isn't very readable with modifyOtherKeys.
Solution: Decode multibyte char and merge modifiers into the char.
          (zeertzjq)

This improves the following situations:
- Multibyte chars whose individual bytes are considered unprintable are
  now shown properly in 'showcmd' area.
- Ctrl-W with modifyOtherKeys now shows ^W in 'showcmd' area.

The following situation may still need improvement:
- If the char is a special key or has modifiers that cannot be merged
  into it, internal keycodes are shown in 'showcmd' area like before.
  This applies to keys typed in Normal mode commands as well, and it's
  hard to decide how to make it more readable due to the limited space
  taken by 'showcmd', so I'll leave it for later.

closes: #14572

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-17 21:28:54 +02:00
ae7e61c928 patch 9.1.0342: tests: test_taglist fails when 'helplang' contains non-english
Problem:  tests: test_taglist fails when 'helplang' contains non-english
Solution: Allow 1 or 2 tagfiles for now (Julio B)

related: #14312
closes: #14566

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-16 22:59:31 +02:00
29269a71b5 patch 9.1.0341: Problem: a few memory leaks are found
Problem:  a few memory leaks are found
          (LuMingYinDetect )
Solution: properly free the memory

Fixes the following problems:
- Memory leak in f_maplist()
  fixes: #14486

- Memory leak in option.c
  fixes: #14485

- Memory leak in f_resolve()
  fixes: #14484

- Memory leak in f_autocmd_get()
  related: #14474

- Memory leak in dict_extend_func()
  fixes: #14477
  fixes: #14238

closes: #14517

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-16 22:44:31 +02:00
f7d31adcc2 patch 9.1.0340: Problem: Error with matchaddpos() and empty list
Problem:  Error with matchaddpos() and empty list
          (@rickhow)
Solution: Return early for an empty list

fixes: #14525
closes: #14563

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-16 22:23:17 +02:00
8560e6cf97 patch 9.1.0339: tests: xdg test uses screen dumps
Problem:  tests: xdg test uses screen dumps
Solution: Convert screen dump to normal test
          (Yegappan Lakshmanan)

closes: #14564

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-16 22:19:38 +02:00
9a90179a11 patch 9.1.0338: Vim9: import through symlinks not correctly handled
Problem:  Vim9: import through symlinks not correctly handled
Solution: Check for script being a symlink but only once
          (Ernie Rael)

closes: #14565

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-16 22:11:56 +02:00
d1068a2bb0 patch 9.1.0337: Missing entry for XDG vimrc file in :version
Problem:  Missing entry for XDG vimrc file in :version
Solution: Add 4th user vimrc entry to :version output
          (Diego Viola)

related: #14182
closes: #14569

Signed-off-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-16 21:50:33 +02:00
2da68c8b61 patch 9.1.0336: tests: typo in test_xdg
Problem:  tests: typo in test_xdg
Solution: fix typo (Diego Viola)

closes: #14562

Signed-off-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 20:08:38 +02:00
dd83b63eb5 runtime(i3config/swayconfig): update syntax scripts
modifications with the goals of:
- simplifying structure by using group `cluster`s
- improving visual highlighting responsiveness by using `nextgroup`
- improving recursive wm-msg command highlighting
- separating command variants meant for runtime and for config only

closes: #14544

Signed-off-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 19:38:04 +02:00
fb8f31ea7d runtime(doc): document pandoc compiler and enable configuring arguments
closes: #14550

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 19:33:33 +02:00
bce51d9005 patch 9.1.0335: String interpolation fails for List type
Problem:  String interpolation fails for List type
Solution: use implicit string(list) for string interpolation and :put =
          (Yegappan Lakshmanan)

related: #14529
closes: #14556

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 19:19:52 +02:00
a59e031aa0 patch 9.1.0334: No test for highlight behavior with 'ambiwidth'
Problem:  No test for highlight behavior with 'ambiwidth'.
Solution: Add a screendump test for 'ambiwidth' with 'cursorline'.
          (zeertzjq)

closes: #14554

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 19:14:38 +02:00
29358d2a18 patch 9.1.0333: tests: test_xdg fails on the appimage repo
Problem:  tests: test_xdg fails on the appimage repo
Solution: compare only the last 30 right characters of $MYVIMRC

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 19:11:15 +02:00
757f32141b patch 9.1.0332: tests: some assert_equal() calls have wrong order of args
Problem:  tests: some assert_equal() calls have wrong order of args
Solution: Correct the order (zeertzjq).

closes: #14555

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 19:01:04 +02:00
fc1dabd77b patch 9.1.0331: make install does not install all files
Problem:  make install does not install all files (Nick Jensen)
Solution: Adjust the Makefile rule to install and uninstall cargo and
          rust directories (Matt Hammerly)

fixes: #14551
closes: #14552
closes: #14557

Signed-off-by: Matt Hammerly <hammerly.matt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 18:54:38 +02:00
014b7759e3 runtime(doc): fix typos in starting.txt
closes: #14559

Signed-off-by: Diego Viola <diego.viola@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-15 18:51:58 +02:00
f231934965 patch 9.1.0330: v9.1.0327 contains an unrelated change
Problem:  v9.1.0327 contains an unrelated change
Solution: Revert back $USR_VIMRC_FILE to $HOME instead of ~

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 23:45:16 +02:00
f01493c550 patch 9.1.0329: String interpolation fails for Dict type
Problem:  String interpolation fails for Dict type
Solution: Support Dict data type properly, also support :put =Dict
          (without having to convert it to string() first)
          (Yegappan Lakshmanan)

fixes: #14529
closes: #14541

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 23:21:02 +02:00
0d87e3c711 patch 9.1.0328: CI fails with t_?? test
Problem:  CI fails with t_?? test
Solution: use assert_match instead of assert_equal
          and test only until t_xo, depending on system
          there may be several more termcap codes coming

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 23:15:05 +02:00
c9df1fb35a patch 9.1.0327: No support for using $XDG_CONFIG_HOME
Problem:  No support for using $XDG_CONFIG_HOME
Solution: optionally source $XDG_CONFIG_HOME/vim/vimrc
          (Luca Saccarola)

fixes: #2034
closes: #14182

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 22:57:50 +02:00
f9f5424d3e patch 9.1.0326: filetype: some requirements files are not recognized
Problem:  filetype: some requirements files are not recognized
Solution: Detect '*-requirements.txt', 'constraints.txt',
          'requirements.in', 'requirements/*.txt' and 'requires/*.txt'
          as requirements filetype, include pip compiler, include
          requirements filetype and syntax plugin
          (Wu, Zhenyu, @raimon49)

closes: #14379

Co-authored-by: raimon <raimon49@hotmail.com>
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:43:27 +02:00
62c09e032c patch 9.1.0325: filetype: CMakeCache.txt files not recognized
Problem:  filetype: CMakeCache.txt files not recognized
Solution: Detect 'CMakeCache.txt' files as cmakecache filetype,
          include basic syntax script for cmakecache
          (Wu, Zhenyu, @bfrg)

closes: #14384

Co-authored-by: bfrg <bfrg@users.noreply.github.com>
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:34:22 +02:00
4ba70cab37 runtime(vim): Update base-syntax, fix nested function folding (#14397)
Only match function folding start and end patterns at the start of a
line, excluding heredocs and :append/:change/:insert commands.

Fixes #14393

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2024-04-14 20:32:56 +02:00
c59a8648b2 patch 9.1.0324: filetype: some json files are not recognized
Problem:  filetype: some json files are not recognized
Solution: Detect '.jscsrc' and '.vsconfig' as jsonc filetype
          (Wu, Zhenyu)

See:
- https://github.com/microsoft/PowerToys/blob/main/.vsconfig
- https://jscs-dev.github.io/

closes: #14452

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:29:43 +02:00
wzy
8a31de6dd2 compiler(rime_deployer): include new compiler, use it for '*.custom.yaml' files (#14460)
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:28:29 +02:00
799dedec0e patch 9.1.0323: filetype: cabal config files may not be recognized
Problem:  filetype: cabal config files may not be recognized
Solution: Change filetype pattern to '*/{,.}cabal/config'
          (Wu Zhenyu)

closes: #14498

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:22:19 +02:00
e92ed1b45c runtime(vim): don't set compiler, update a comment for vimdoc compiler (#14532)
Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:20:01 +02:00
a7a9a476cf patch 9.1.0322: filetype: some mail tools not recognized
Problem:  filetype: some mail tools not recognized
Solution: Detect '.mbsncrc' as conf, '.msmtprc' as msmtp
          and '.notmuch-config' as ini filetype
          (Shane-XB-Qian)

closes: #14533

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:17:14 +02:00
49528da8a6 patch 9.1.0321: Garbled output on serial terminals with XON/XOFF flow control
Problem:  When used terminal with XON/XOFF flow control, vim tries to
          still make CTRL-S mapping available, which results in severe
          screen corruption, especially on large redraws, and even
          spurious inputs (John Tsiombikas)
Solution: Disallow CTRL-S mapping if such terminal is recognized.
          Don't remove IXON from the bitmask inversion.
          (Anton Sharonov)

*** When started like this:

    TERM=vt420 vim

:set termcap

    shows "t_xon=y"

map <C-S> :echo "abc"<CR>

    does nothing (after <C-S> output freezes and subsequent <C-Q>
    unfreezes it)

*** When started like this:

    TERM=xterm vim

:set termcap

    shows "t_xon="

map <C-S> :echo "abc"<CR>

    works (after <C-S> one see "abc" string echo-ed)

fixes: #12674
closes: #14542

Signed-off-by: Anton Sharonov <anton.sharonov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 20:02:50 +02:00
4052474a1b runtime(java): Recognise non-ASCII identifiers (#14543)
* runtime(java): Recognise non-ASCII identifiers

Also:

- Remove the already commented out and less general in its
  definition javaFuncDef alternative.

- Stop recognising some bespoke {p,trace} debugging API.

Non-ASCII identifiers have been supported from the outset
of the Java language.

> An _identifier_ is an unlimited-length sequence of _Java
> letters_ and _Java digits_, the first of which must be a
> Java letter.  An identifier cannot have the same spelling
> (Unicode character sequence) as a keyword . . . Boolean
> literal . . . or the null literal . . .
> . . . . . . . .
> Letters and digits may be drawn from the entire Unicode
> character set . . .
> . . . . . . . .
> A Java letter is a character for which the method
> Character.isJavaLetter . . . returns true.  A Java
> letter-or-digit is a character for which the method
> Character.isJavaLetterOrDigit . . . returns true.
> . . . . . . . .
> The Java letters include . . . for historical reasons, the
> ASCII underscore (_) . . . and dollar sign ($) . . .

(Separate syntax tests will be written when particular parts
now touched will have been further improved.)

Reference:
https://javaalmanac.io/jdk/1.0/langspec.pdf [§3.8]

* Take on the maintenance of Java filetype and syntax files


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 18:57:00 +02:00
05aacec6ab patch 9.1.0320: Wrong cursor position after using setcellwidths()
Problem:  Wrong cursor position after using setcellwidths().
Solution: Invalidate cursor position in addition to redrawing.
          (zeertzjq)

closes: #14545

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 18:52:49 +02:00
3d93630605 patch 9.1.0319: Using heredoc in string not tested with :execute
Problem:  Using heredoc in string not tested with :execute.
Solution: Test with both :execute and execute() (zeertzjq).

closes: #14546

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 18:49:56 +02:00
acba5af957 CI: use explicit version tags for macos runners (#14548)
as we do on others like ubuntu

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-14 18:48:34 +02:00
4b5cd7257e patch 9.1.0318: filetype: translate shell config files are not recognized
Problem:  filetype: translate shell config files are not recognized
Solution: Detect 'init.trans', 'translate-shell' and '.trans' files as
          clojure (Wu, Zhenyu)

See: https://github.com/soimort/translate-shell/wiki/Configuration

closes: #14499

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 18:28:28 +02:00
55d4f3c006 patch 9.1.0317: filetype: matplotlibrc files are not recognized
Problem:  filetype: matplotlibrc files are not recognized
Solution: Detect 'matplotlibrc' file as yaml filetype
          (Wu, Zhenyu)

See: https://matplotlib.org/stable/users/explain/customizing.html#the-matplotlibrc-file

closes: #14501

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 18:25:38 +02:00
ce06493aeb runtime(vim): Update base-syntax, add legacy header folding
Allow for syntax-based folding of Vim9 script legacy header regions.

This is enabled with the "H" flag of the g:vimsyn_folding config variable.

closes: #14530

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
2024-04-13 18:24:01 +02:00
5a9f7e6750 patch 9.1.0316: filetype: some sh and confini files not recognized
Problem:  filetype: some sh and confini files not recognized
Solution: Detect neofetch, '.xprofile', XDG-User-Dirs files,
          paru and makepkg config files
          (Wu, Zhenyu)

See:
- https://github.com/dylanaraps/neofetch/wiki/Customizing-Info#config-file-location
- https://www.freedesktop.org/wiki/Software/xdg-user-dirs/

closes: #14505

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 18:19:20 +02:00
0881329d12 patch 9.1.0315: filetype: a few more dosini files are not recognized
Problem:  filetype: a few more dosini files are not recognized
Solution: Detect wakatime, reply config files, flatpak, nfs config files
          and a few more python tools as dosini (or toml)
          (Wu, Zhenyu)

Refer:
- https://packaging.python.org/en/latest/specifications/pypirc/
- https://jorisroovers.com/gitlint/latest/configuration/
- https://pylint.pycqa.org/en/latest/user_guide/usage/run.html#command-line-options
- https://docs.bpython-interpreter.org/en/latest/configuration.html
- https://mypy.readthedocs.io/en/stable/config_file.html#the-mypy-configuration-file
- https://black.readthedocs.io/en/stable/usage_and_configuration/the_basics.html#configuration-via-a-file
- https://github.com/wakatime/wakatime-cli?tab=readme-ov-file#usage
- https://metacpan.org/dist/Reply/view/bin/reply#-cfg-~/.replyrc

close: #14512

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 18:13:42 +02:00
5392970921 runtime(i3config): Line continuation is not detected for 'set' command (#14531)
Problem:  Valid i3config syntax is highlighted as error.
Solution: Skip over line-breaks correctly.

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Josef Litoš <54900518+JosefLitos@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 18:10:10 +02:00
c51578fed8 patch 9.1.0314: Vim9: Can define a class in a function
Problem:  Vim9: Can define a class in a function
          (Doug Kearns)
Solution: Give an error for a class defined in a function,
          slightly reword some public error messages
          (Yegappan Lakshmanan)

fixes: #13184
fixes: #13326
closes: #14537

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 18:04:53 +02:00
122d068585 runtime(go): fix highlighting import string followed by some comment (#14538)
Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 17:56:17 +02:00
1f5175d9af patch 9.1.0313: Crash when using heredoc with comment in command block
Problem:  Crash when using heredoc with comment in command block.
Solution: Handle a newline more like the end of the line, fix coverity
          warning (zeertzjq).

closes: #14535

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-13 17:52:26 +02:00
e74cad3321 patch 9.1.0312: heredocs are not supported for :commands
Problem:  heredocs are not supported for :commands
          (@balki)
Solution: Add heredoc support
          (Yegappan Lakshmanan)

fixes: #14491
closes: #14528

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-12 18:53:08 +02:00
a1dcd76ce7 patch 9.1.0311: filetype: Some config files are not recognized
Problem:  Some config files are not recognized
Solution: Add some patterns for chktex, ripgreprc and ctags config
          files.

See: https://www.nongnu.org/chktex/
See: https://github.com/BurntSushi/ripgrep/blob/master/GUIDE.md#configuration-file
See: https://docs.ctags.io/en/latest/option-file.html#order-of-loading-option-files

closes: #14506

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-12 18:46:05 +02:00
9232554087 patch 9.1.0310: Filler lines not checked properly in get_scroll_overlap()
Problem:  Filler lines not checked properly in get_scroll_overlap().
Solution: Add missing parentheses (zeertzjq).

The missing parentheses causes the second argument to diff_check_fill()
to always be 0 as it is the result of a comparison between a positive
integer and -1 (the value of BACKWARD), in which case diff_check_fill()
always returns 0 instead of the number of filler lines above a line.

It's very hard to add a test for this, because this mistake at most
leads to 2 screen lines of difference in scrolling behavior, and in
cases where it may indeed lead to a difference in behavior, neither
behavior achieves complete symmetry between CTRL-F and CTRL-B.

closes: #14527

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-12 18:38:38 +02:00
wzy
0549c503ba runtime(dts): include ftplugin support (#14522)
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-12 18:36:57 +02:00
159dc0fcf9 runtime(kconfig): add include to ftplugin (#14524)
related: #14521

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-12 18:33:48 +02:00
83424105cb runtime(doc): mention :argded for :argedit
related: #14464

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-12 10:17:57 +02:00
c858382482 Problem: Commit 6f585d breaks CI
Problem:  Commit 6f585d breaks CI
Solution: Don't error out, simply return an error message.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 23:10:54 +02:00
bba79808cb patch 9.1.0309: crash when 'textwidth' > MAX_INT
Problem:  crash when 'textwidth' > MAX_INT (after vv9.1.0055)
          (Zoltan Balogh)
Solution: limit textwidth to MAX_INT

fixes: #14482
closes: #14489

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 22:54:44 +02:00
7b0c4b64e3 runtime(doc): typo in intro.txt 2024-04-11 22:11:21 +02:00
6f585da00b Overlong translation files may cause repo to become "dirty"
Problem:  Overlong translation files may cause repo to become "dirty"
Solution: Add a test into check.vim to warn for lines being longer than
          80 virt columns

related: #14490

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 22:05:11 +02:00
87319173ba patch 9.1.0308: configure: msgfmt hardcoded
Problem:  configure: msgfmt hardcoded (after v9.1.0173)
Solution: use $MSGFMT instead of msgfmt in configure script,
          regenerate the configure script
          (Vladimír Marek)

fixes: #14515

Signed-off-by: Vladimír Marek <vlmarek13@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 21:57:02 +02:00
fcbefe74f1 runtime(compiler): add vimdoc
closes: #14459

https://github.com/google/vimdoc generates vim help files from vimscript files

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 21:25:39 +02:00
3cb2b37767 runtime(doc): clarify behaviour or :argadd and :argedit
related: #14464

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 21:21:51 +02:00
7fdbd1bb58 patch 9.1.0307: filetype: texdoc config files is not recognized
Problem:  filetype: texdoc config files is not recognized
Solution: Detect 'texdoc.cnf' as conf filetype
          (Wu, Zhenyu)

See: https://github.com/TeX-Live/texdoc/blob/master/texdoc.cnf

closes: #14507

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 20:53:33 +02:00
58ce78ad43 patch 9.1.0306: filetype: x11vnc config file is not recognized
Problem:  filetype: x11vnc config file is not recognized
Solution: Detect '.x11vncrc' as conf filetype
          (Wu, Zhenyu)

See: https://linux.die.net/man/1/x11vnc

closes: #14511

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 20:47:45 +02:00
da70feabea patch 9.1.0305: filetype: some history files are not recognized
Problem:  filetype: some history files are not recognized
Solution: Add some history patterns to filetype.vim
          (Wu, Zhenyu)

closes: #14513

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-11 20:43:00 +02:00
dbca7d8045 ftplugin(asm): add Matchit support
closes: #14461

Refer https://github.com/vim/vim/blob/master/runtime/ftplugin/masm.vim#L18-L29

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:58:03 +02:00
1492fe6903 patch 9.1.0304: filetype: cgdb config file is not recognized
Problem:  filetype: cgdb config file is not recognized
Solution: Detect cgdbrc files as cgdbrc filetype
          (Wu, Zhenyu)

closes: #14458

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:52:40 +02:00
27f17a6d34 runtime(asm): add basic indent support
closes: #14383

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:48:57 +02:00
556c621659 ftplugin(gdb): add matchit support
closes: #14462

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:44:21 +02:00
e54a8e7c73 patch 9.1.0303: filetype: some protocol buffer files not recognized
Problem:  filetype: some protocol buffer files not recognized
Solution: Detect '*.textproto', '*.textpb', '*.txtpb' as pbtxt files
          (Bruno Belanyi)

See: https://protobuf.dev/reference/protobuf/textformat-spec/#text-format-files

closes: #14463

Signed-off-by: Bruno BELANYI <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:34:42 +02:00
6be7ef5bc7 patch 9.1.0302: filetype: blueprint files are not recognized
Problem:  filetype: blueprint files are not recognized
Solution: Detect '*.bp' files as blueprint files, add
          a minimal filetype plugin (Bruno Belanyi)

See: https://source.android.com/docs/setup/build

closes: #14488

Signed-off-by: Bruno BELANYI <bruno@belanyi.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:28:28 +02:00
04e5363b82 runtime(vim): Improve Vim9 and legacy-script comment highlighting (#13104)
This is a first-pass attempt to limit matching of Vim9 and legacy-script
comments to the appropriate syntactic contexts.

Vim9-script comments are highlighted at top level in a Vim9-script file,
in all :def functions, and in all :autocmd and :commmand command blocks.
Legacy-script comments are highlighted at top level in a legacy script
file, in all :func functions and in the Vim9-script preamble before the
:vim9script marker command.

Fixes #13047, #11307 and #9587.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 22:18:37 +02:00
1817ccdb10 patch 9.1.0301: Vim9: heredoc start may be recognized in string
Problem:  Vim9: heredoc start may be recognized in string.
Solution: Don't skip to closing bracket for invalid list assignment.
          (zeertzjq)

closes: #14472

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 17:37:47 +02:00
aa8e22b035 patch 9.1.0300: Missing test for what patch v9.1.0285 fixes
Problem:  Missing test for what patch v9.1.0285 fixes
Solution: Add a test for cursor movement at buffer boundaries.
          (Luuk van Baal)

closes: #14470

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 17:33:43 +02:00
7f5202143b patch 9.1.0299: Vim9: return type not set for a lambda assigned to script var
Problem:  Vim9: return type not set for a lambda assigned to script var
          (Ernie Rael)
Solution: Correctly determine the return type (Yegappan Lakshmanan)

fixes: #14445
closes: #14473

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 17:18:19 +02:00
b988c7a95f add runtime/doc/tags-* to ignore files (#14479)
closes: #14479

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 17:15:34 +02:00
8fcc129773 translation(ru): Updated translation (#14481)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 17:05:24 +02:00
c9ec20d94e runtime(doc): Update documentation
- Add security e-mail for private bugreports
- Remove mentioning of the voting feature

closes: #14483

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 16:57:46 +02:00
2f27c65410 patch 9.1.0298: MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak
Problem:  MS-Windows: GETTEXT_PATH hard-coded in src/po/Make_mvc.mak
Solution: Add IFNDEF/ENDIF around the definition of GETTEXT_PATH
          (Cthulhux)

It makes no sense to enforce modifying Vim source files just because
your build stuff is not where it's expected. My change is supposed to
add support for a locally-defined %GETTEXT_PATH%.

closes: #14480

Signed-off-by: Cthulhux <github@tuxproject.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 16:34:49 +02:00
c97f4d61cd patch 9.1.0297: Patch 9.1.0296 causes too many issues
Problem:  Patch 9.1.0296 causes too many issues
          (Tony Mechelynck, @chdiza, CI)
Solution: Back out the change for now

Revert "patch 9.1.0296: regexp: engines do not handle case-folding well"

This reverts commit 7a27c108e0 it causes
issues with syntax highlighting and breaks the FreeBSD and MacOS CI. It
needs more work.

fixes: #14487

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-10 16:22:17 +02:00
49f1e1979f NSIS: Fix a few issues with gvim.nsi
- correctly find libsodium.dll
- disable inclusion of libgcc_s_sjlj-1.dll
- generate PATCHLEVEL correctly

related: #14214
closes: #14465

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 23:04:44 +02:00
7a27c108e0 patch 9.1.0296: regexp: engines do not handle case-folding well
Problem:  Regex engines do not handle case-folding well
Solution: Correctly calculate byte length of characters to skip

When the regexp engine compares two utf-8 codepoints case insensitively
it may match an adjacent character, because it assumes it can step over
as many bytes as the pattern contains.

This however is not necessarily true because of case-folding, a
multi-byte UTF-8 character can be considered equal to some single-byte
value.

Let's consider the pattern 'ſ' and the string 's'. When comparing and
ignoring case, the single character 's' matches, and since it matches
Vim will try to step over the match (by the amount of bytes of the
pattern), assuming that since it matches, the length of both strings is
the same.

However in that case, it should only step over the single byte
value 's' so by 1 byte and try to start matching after it again. So for the
backtracking engine we need to ensure:
- we try to match the correct length for the pattern and the text
- in case of a match, we step over it correctly

The same thing can happen for the NFA engine, when skipping to the next
character to test for a match. We are skipping over the regstart
pointer, however we do not consider the case that because of
case-folding we may need to adjust the number of bytes to skip over. So
this needs to be adjusted in find_match_text() as well.

A related issue turned out, when prog->match_text is actually empty. In
that case we should try to find the next match and skip this condition.

fixes: #14294
closes: #14433

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:53:19 +02:00
d2b95b8446 patch 9.1.0295: filetype: pip config files are not recognized
Problem:  filetype: pip config files are not recognized
Solution: detect pip.conf as dosini filetype
          (Wu, Zhenyu)

closes: #14448

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:49:19 +02:00
08b0f632c1 patch 9.1.0294: Text height function does not respect it's argument
Problem:  plines_m_win() does not take into account it's "limit_winheight"
          argument for filler lines below the last line of the buffer.
          (after v9.1.0280)
Solution: Check window height when "limit_winheight" is TRUE.
          (Luuk van Baal)

closes: #14449

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:43:49 +02:00
41208884b8 patch 9.1.0293: filetype: lxqt config files are not recognized
Problem:  filetype: lxqt config files are not recognized
Solution: Detect {lxqt,screengrab}/*.conf files as dosini,
          fix failing filetype test for */tex/latex/**.cfg
          (Wu, Zhenyu)

closes: #14450

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:39:53 +02:00
efd752ec38 patch 9.1.0292: filetype: XDG mimeapps.list file is not recognized
Problem:  filetype: XDG mimeapps.list file is not recognized
Solution: Detect mimeapps.list as dosini filetype
          (Wu, Zhenyu)

Refer: https://wiki.archlinux.org/title/XDG_MIME_Applications#Format

closes: #14451

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:25:41 +02:00
73c89bcf79 patch 9.1.0291: filetype: libreoffice config files are not recognized
Problem:  filetype: libreoffice config files are not recognized
Solution: Detect Libreoffice config fils as xml/dosini
          (Wu, Zhenyu)

closes: #14453

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:20:55 +02:00
614691ceef patch 9.1.0290: filetype: xilinx files are not recognized
Problem:  filetype: xilinx files are not recognized
Solution: Add a few xilinx specific file patterns,
          inspect lpr files for being xml/pascal
          (Wu, Zhenyu)

closes: #14454

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:14:37 +02:00
61ee833a50 patch 9.1.0289: filetype: some TeX files are not recognized
Problem:  filetype: some TeX files are not recognized
Solution: Add more patterns for TeX files and inspect
          a few more files for being TeX files
          (Wu, Zhenyu)

closes: #14456

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:09:30 +02:00
72a156b4ed patch 9.1.0288: MS-Windows: compiler warning for size_t to int conversion
Problem:  MS-Windows: compiler warning for size_t to int conversion
          (after  v9.1.0282)
Solution: Use size_t instead of int in highlight_set_termgui_attr
          (Mike Williams)

closes: #14457

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 22:04:54 +02:00
9a91d2b72c patch 9.1.0287: Vim9: comment may be treated as heredoc start
Problem:  Vim9: comment may be treated as heredoc start.
          (Ernie Rael)
Solution: Use skip_var_list() instead of find_name_end().
          (zeertzjq)

fixes: #14444
closes: #14446

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 21:47:10 +02:00
1af0fbf955 patch 9.1.0286: Vim9: E1027 with defcompile for abstract methods
Problem:  Vim9: E1027 with defcompile for abstract methods with
          non-void return types, but still compiles it
          (zzzyxwvut)
Solution: Don't compile abstract methods
          (Yegappan Lakshmanan)

fixes: #14443
closes: #14447

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 21:39:27 +02:00
78c51500f1 patch 9.1.0285: Still problems with cursor position for CTRL-D/U
Problem:  Problems with cursor position when scrolling half a page.
Solution: Rework the cursor logic. (Luuk van Baal)

closes: #14455

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 21:30:19 +02:00
6ce07edd60 runtime(compiler): fix inaccuracies in pandoc compiler (#14467)
as kindly pointed out by @Freed-Wu

Signed-off-by: Enno <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 21:26:55 +02:00
e20c7d7f44 patch 9.1.0284: make testclean is not able to delete failed screendumps
Problem:  make testclean is not able to delete failed screendumps.
Solution: Remove the "failed" directory when necessary.
          (Julio B)

Patch 8.1.1080 changed the way that failed screendumps are saved, but
the "rm -rf *.failed" clean command was not ported correctly.

closes: #14468

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 21:22:41 +02:00
e43ace558a runtime(vim): Update base-syntax, no curly-brace names in Vim9 script (#14466)
Remove curly-brace name matching for :def functions.  This is not
supported in Vim9 script.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 21:19:41 +02:00
a040019be6 patch 9.1.0282: Several small issues in doc and tests
Problem:  Wrong doc style for pandoc syntax description,
          Test_diff_eob_halfpage() may fail depending on
          screen size, using braces in highlight.c when
          not necessary
Solution: Fix pandoc documentation, make sure the window
          for the test has 7 lines, remove the braces.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-09 08:06:52 +02:00
34f00dd4ab patch 9.1.0282: Finding highlighting attributes is inefficient
Problem:  Finding highlighting attributes is inefficient
Solution: Use binary search to find highlighting attributes and color
          names (John Marriott)

closes: #14426

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 23:32:30 +02:00
d33cb3f65e patch 9.1.0281: CI: fails Test_compiler_completion
Problem:  CI: fails Test_compiler_completion
Solution: Add pandoc compiler

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 22:55:25 +02:00
a2385c2334 runtime(cuda): Update cuda keywords, remove uncommonly used enumeration constants
closes: #14406

Signed-off-by: jiangyinzuo <jiangyinzuo@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 22:50:51 +02:00
9148ba8a46 patch 9.1.0280: several issues with 'smoothscroll' support
Problem:  Logic to make sure cursor is in visible part of the screen after
          scrolling the text with 'smoothscroll' is scattered, asymmetric
          and contains bugs.
Solution: Adjust and create helper function for 'smoothscroll' cursor logic.
          (Luuk van Baal)

closes: #14410

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 22:27:41 +02:00
196b6678c5 patch 9.1.0279: filetype: roc files are not recognized
Problem:  filetype: roc files are not recognized
Solution: Detect '*.roc' files as roc filetype,
          add a basic filetype plugin (nat-418)

closes: #14416

Signed-off-by: nat-418 <93013864+nat-418@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 22:23:22 +02:00
72d81a66ed patch 9.1.0278: filetype: zathurarc files not recognized
Problem:  filetype: zathurarc files not recognized
Solution: Detect '.zathurarc' files as zathurarc filetype,
          add zathurarc filetype (Wu, Zhenyu)

closes: #14380

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 22:19:06 +02:00
be2b03c6ee patch 9.1.0277: Cannot highlight the Command-line
Problem:  Cannot highlight the Command-line
Solution: Add the MsgArea highlighting group
          (Shougo Matsushita)

closes: #14327

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 22:16:33 +02:00
7005b7ee7f patch 9.1.0276: No pandoc syntax support
Problem:  No pandoc syntax support
Solution: Add pandoc syntax and compiler plugins
          (Wu, Zhenyu, Konfekt)

closes: #14389

Co-authored-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 21:45:40 +02:00
fc21b6437c patch 9.1.0275: filetype: R history files are not recognized
Problem:  filetype: R history files are not recognized
Solution: Detect '.Rhistory' files as r filetype
          (Wu, Zhenyu)

closes: #14440

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-08 20:26:29 +02:00
aca8f55596 patch 9.1.0274: MS-Windows: a few compiler warnings
Problem:  MS-Windows: a few compiler warnings
Solution: Change variable types to resolve compiler warnings
          (Mike Williams)

Windows compiles were reporting a few size_t to signed integer
conversion warnings that can be resolved by changing the variable
declarations to be size_t to start with.

closes: #14429

Signed-off-by: Mike Williams <mrmrdubya@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-07 18:26:22 +02:00
b78753db5f patch 9.1.0273: filetype: keymap files are not recognized
Problem:  filetype: keymap files are not recognized
Solution: Detect '*.keymap' files as Device Tree Files
          (0xadk)

closes: #14434

Signed-off-by: 0xadk <0xadk@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-07 18:22:41 +02:00
9d956ee8ea patch 9.1.0272: autocmd may change cwd after :tcd and :lcd
Problem:  Autocommand may change currect directory after :tcd and :lcd.
Solution: Also clear tp_localdir and w_localdir when using aucmd_win.
          (zeertzjq)

closes: #14435

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-07 18:16:10 +02:00
a44ced5763 runtime(vim): Update syntax generator, autocmd event list parsing
Track changes to the autocommand event list introduced in commit
78d742a (Patch 9.1.0256).

closes: #14430

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-07 17:49:57 +02:00
9cd9e759ab runtime(doc): Normalise builtin-function optional parameter formatting
These should generally be formatted as func([{arg}]) and referenced as
{arg} in the description.

closes: #14438

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-07 17:42:17 +02:00
3c4d2e7a09 patch 9.1.0271: CI sound test aborts with undefined variable
Problem:  CI sound test aborts with undefined variable
Solution: initialize g:result in test_sound.vim

closes: #14424

Signed-off-by:
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 20:16:46 +02:00
19ecb46c55 NSIS: Correctly distribute libsodium with the installer (#14422)
closes: vim/vim-win32-installer#337

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 20:14:46 +02:00
915f3bf4c1 patch 9.1.0270: a few minor issues to fix
The following is a collection of some small fixes:

- Problem:  Vim9: funcref pointer pt leaks, when function is not found
  Solution: Free funcref pointer in case of error (fixes: #14254)

- Problem:  memory leak of crypt state pointer allocation fails
  Solution: free crypt state pointer properly (fixes: #14253)

- Problem:  Vim9: Leaking memory when compiling dict fails
  Solution: Free the memory in case of error (fixes: #14252)

- Problem:  Coverity complains about derefencing obj_members pointer
            (after v9.1.0261)
  Solution: Verify that obj_members ptr is non-null before accessing it

  References: https://scan5.scan.coverity.com/#/project-view/41242/10101?selectedIssue=1596133

closes: #14412

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 20:12:19 +02:00
e9ff79a7c9 patch 9.1.0269: Test for TextChanged is still flaky with ASAN
Problem:  Test for TextChanged is still flaky with ASAN.
Solution: Don't index the result of readfile().
          (zeertzjq)

It turns out that with ASAN the file may become empty during a write
even if it's non-empty both before and after the write, in which case
indexing the result of readfile() will error, so use join() instead.

Also don't delete the file halfway the test, just in case it may cause
errors on the next read.

closes: #14421

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 20:07:39 +02:00
83cd2c7bf0 patch 9.1.0268: Two tests in test_filechanged.vim are slow
Problem:  Two tests in test_filechanged.vim are slow.
Solution: Sleep for shorter if the +nanotime feature is available.
          (zeertzjq)

closes: #14418

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 20:05:11 +02:00
c20bdf1107 patch 9.1.0267: File name entered in GUI dialog is ignored
Problem:  File name entered in GUI dialog is ignored (after v9.1.0265)
Solution: Only set file name to "Untitled" if GUI dialog didn't set it.
          (zeertzjq)

closes: #14417

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 20:02:55 +02:00
b73faa1c02 runtime: fix :compiler leaving behind a g:makeprg variable (#14414)
Problem:  :compiler may leave behind a g:makeprg variable after #14336.
Solution: Use a script local variable.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 20:01:16 +02:00
cec44eae82 runtime: Remove more fallback :CompilerSet definitions from compiler plugins (#14413)
Continue with #14399

Signed-off-by: jiangyinzuo <jiangyinzuo@foxmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 19:59:39 +02:00
28e5e7c484 patch 9.1.0266: filetype: earthfile files are not recognized
Problem:  filetype: earthfile files are not recognized
Solution: Detect 'Earthfile' as earthfile
          (Gaëtan Lehmann)

closes: #14408

Signed-off-by: Gaëtan Lehmann <gaetan.lehmann@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-05 19:52:38 +02:00
df46115fc8 patch 9.1.0265: console dialog cannot save unnamed buffers
Problem:  console dialog cannot save unnamed buffers
Solution: set bufname before save (glepnir). Define dialog_con_gui
          to test for GUI+Console dialog support, use it to skip
          the test when the GUI feature has been defined.

Note: The dialog_changed() function will also try to call the
browse_save_fname() function, when FEAT_BROWSE is defined (which is only
defined in a GUI build of Vim). This will eventually lead to a call of
do_browse(), which causes an error message if a GUI is not currently
running (see the TODO: in do_browse()) and will then lead to a failure
in Test_goto_buf_with_onfirm().

Therefore, we must disable the Test_goto_buf_with_onfirm(), when the
dialog_con_gui feature is enabled (which basically means dialog feature
for GUI and Console builds, in contrast to the dialog_con and dialog_gui
feature).

(Previously this wasn't a problem, because the test aborted in the YES
case for the :confirm :b XgotoConf case and did therefore not run into
the browse function call)

closes: #14398

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 23:43:19 +02:00
9574022580 runtime(doc): Fill in a few details regarding :enums (#14349)
- Mention the support of eval() for enumeration values.

- Clarify the extent of immutability for enumeration values.

- Specify the requirements for class methods to meet for
  class variable initialisation and their use in nested
  functions and lambda expressions.

- Remove a duplicate sentence that describes how to access
  parent class methods in derivative classes (see another
  "copy" two paragraphs below).


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 22:05:33 +02:00
408281e16a runtime: Remove fallback :CompilerSet definition from compiler plugins
The :CompilerSet command was added in version Vim 6.4 which was released
twenty years ago.  Other runtime files do not support versions of that
vintage so it is reasonable to remove this fallback command definition
now.

closes: #14399

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 22:00:58 +02:00
cc59d62215 patch 9.1.0264: libgpm may delete some signal handlers
Problem:  libgpm may delete some signal handlers
Solution: restore these signal handlers after calling gpm
          (Julio B)

When 'mouse' is set, vim is trying to detect mouse support on startup.
Eventually, vim resorts to using libgpm as the final method of
mouse detection. This library may delete some signals handlers that were
initially set up by vim.

This is how:
- mch_setmouse() calls gpm_open()
- Gpm_Open is executed, which returns early on line 210 [1]
- Keep in mind that lines 353-373 [2] are skipped, so
  gpm_saved_suspend_hook and gpm_saved_winch_hook are empty
- Finally, Gpm_Close is called, which will reset [3] SIGWINCH and
  SIGTSTP to an empty sigaction.

[1] e82d1a653c/src/lib/liblow.c (L210)
[2] e82d1a653c/src/lib/liblow.c (L353-L373)
[3] e82d1a653c/src/lib/liblow.c (L419-L424)

fixes: #12154
closes: #14401

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 21:55:10 +02:00
5ccdcc482e runtime(java): Improve the matching of contextual keywords
- Recognise a _record_ contextual keyword.
- Recognise _non-sealed_, _sealed_, and _permits_ contextual
  keywords.
- Admit _$_ to keyword characters.
- Group _abstract_, _final_, _default_, _(non-)sealed_
  (apart from _(non-)sealed_, the incompossibility of these
  modifiers calls for attention).
- Remove another _synchronized_ keyword redefinition.

I have also replaced a function with an expression.  Before
patch 8.1.0515, it should have been declared :function! to
work with repeatable script sourcing; there is less to worry
about with an expression.

References:
https://openjdk.org/jeps/395 (Records)
https://openjdk.org/jeps/409 (Sealed Classes)
https://docs.oracle.com/javase/specs/jls/se21/html/jls-3.html#jls-3.8

closes: #14403

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 21:51:18 +02:00
3fa8f7728a patch 9.1.0263: Vim9: Problem with lambda blocks in enums and classes
Problem:  Vim9: Problem with lambda blocks in enums and classes
          (Aliaksei Budavei)
Solution: Support evaluating lambda blocks from a string, skip over
          comments (Yegappan Lakshmanan)

fixes: #14350
closes: #14405

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 21:42:07 +02:00
4a65391ca2 patch 9.1.0262: Test for TextChanged is flaky with ASAN
Problem:  Test for TextChanged is flaky with ASAN.
Solution: Wait for the file to be non-empty.
          (zeertzjq)

closes: #14404

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 21:33:36 +02:00
3e33650b3a patch 9.1.0261: Vim9: protected class and funcrefs accessible outside the class
Problem:  Vim9: protected class and funcrefs accessible outside the class
          (Aliaksei Budavei)
Solution: Check if class and object funcrefs are protected
          (Yegappan)

closes: #14407

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-04 19:35:59 +02:00
bd28cae1f1 patch 9.1.0260: Problems with "zb" and scrolling to new topline with 'smoothscroll'
Problem: "zb" does not reveal filler lines at the start of a buffer.
          Scrolled cursor position with 'smoothscroll' is unpredictable,
          and may reset skipcol later if it is not visible (after v9.1.258)
Solution: Replace confusing for loop that reaches final control value too
          early with while loop. Set "w_curswant" accordingly so cursor
          will be placed in visible part of topline.
          (Luuk van Baal)

closes: #14394

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-03 22:50:40 +02:00
08d2401fbc runtime(netrw): filetype not detected when editing remote files
fixes: #14400

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-03 22:47:54 +02:00
89cc03af71 runtime(doc): sort filetype.txt in the alphabetical order (#14395)
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-03 22:42:10 +02:00
c422662933 patch 9.1.0259: Normal mode TextChanged isn't tested properly
Problem:  Normal mode TextChanged isn't tested properly.
Solution: Combine Test_Changed_ChangedI() and Test_Changed_ChangedI_2()
          and also run it on Windows. Fix a typo in main.c.
          (zeertzjq)

closes: #14396

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-03 22:38:07 +02:00
cb204e688e patch 9.1.0258: half-page scrolling broke backward compatibility
Problem:  Support for 'smoothscroll' in (half-)page scrolling
          broke backward compatibility and can be made to work better.
          (after v9.1.215)
Solution: Restore the previous cursor and end-of-buffer behavior for
          half-page scrolling and improve 'smoothscroll' support.
          (Luuk van Baal)

fixes: #14338
closes: #14377

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-02 20:49:45 +02:00
f1750ca0c2 patch 9.1.0257: Vim9: :call may not find imported class members
Problem:  Vim9: :call may not find imported class members
          (mityu)
Solution: Set the typval of an imported lval variable correctly
          (Yegappan Lakshmanan)

fixes: #14334
closes: #14386

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-02 20:41:04 +02:00
78d742ab88 patch 9.1.0256: Finding autocmd events is inefficient
Problem:  Finding autocmd events is inefficient
Solution: Use binary search to find events, cache last found events,
          avoid use of strlen(), add SessionWritePost autocmd,
          fix test_codestyle and avoid endless loop
          (John Marriott)

closes: #14287

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-02 20:26:01 +02:00
16cdfa69e0 patch 9.1.0255: Vim9: no indication of script nr in stack trace of classes
Problem:  Vim9: no indication of script nr in stack trace of classes
Solution: Prefix the class name with the script name in the stack trace.
          (Ernie Rael)

fixes: #14376
closes: #14390

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-02 19:05:39 +02:00
0a419e07a7 patch 9.1.0254: [security]: Heap buffer overflow when calling complete_add() in 'cfu'
Problem:  [security]: Heap buffer overflow when calling complete_add()
          in the first call of 'completefunc'
Solution: Call check_cursor() after calling 'completefunc' (zeertzjq)

closes: #14391

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-02 19:01:14 +02:00
6c9f4f98f1 patch 9.1.0253: filetype: typespec files are not recognized
Problem:  filetype: typespec files are not recognized
Solution: Detect '*.tsp' files as typespec
          (Hilmar Wiegand)

Specs is at https://typespec.io/

closes: #14392

Signed-off-by: Hilmar Wiegand <me@hwgnd.de>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-02 18:58:40 +02:00
cc7597c1ed runtime(yaml): improve syntax highlighting for YAML
- Recognize block scalar style to avoid unexpected highlighting by `yamlFlowString` (fix #11517)
- Improve performance of `yamlFlowMappingKey` by allowing execution by the NFA engine (fix #10730)
  - It was intentionally disabled before patterns were optimized by `s:SimplifyToAssumeAllPrintable`.
- Fix detection of flow style mapping indicators (fix #8234).
- Enable highlighting of explicit mapping value indicators and node properties in flow style.
- Add syntax highlighting tests

closes: #14354

Signed-off-by: itchyny <itchyny@cybozu.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-01 14:55:46 +02:00
2ed5a11b1a patch 9.1.0252: Vim9: segfault with static in super class
Problem:  Vim9: segfault with static in super class
          (Ernie Rael)
Solution: When initializing lhs, use the correct class where a class
          variable is defined (Yegappan Lakshmanan)

fixes: #14352
closes: #14372

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-01 14:50:41 +02:00
8eb7523802 patch 9.1.0251: Filetype test fails
Problem:  Filetype test fails.
Solution: Move detection by name before detection by extension.
          Improve TextChanged test and remove wrong test and fix
          a typo in a comment (zeertzjq).

closes: #14373

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-04-01 14:46:20 +02:00
cbb92b5ceb runtime(sshconfig,sshdconfig): update syntax (#14351)
* fix case insensitivity of Host and Hostname keys
* improve regexps
* add keywords

Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 22:02:31 +02:00
4c7098b00a patch 9.1.0250: filetype: ldscripts cannot be recognized
Problem:  filetype: ldscripts cannot be recognized
Solution: Detect '*/ldscripts/*' as ld
          (Wu, Zhenyu)

closes: #14371

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:57:16 +02:00
a917bd58bd patch 9.1.0249: filetype: rock_manifest and config.ld files are not recognized
Problem:  filetype: rock_manifest and config.ld files are not recognized
Solution: Detect 'rock_manifest' and 'config.ld' as lua
          (Wu, Zhenyu)

closes: #14370

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:55:57 +02:00
3b497aa247 patch 9.1.0248: filetype: yarn lock files are not recognized
Problem:  filetype: yarn lock files are not recognized
Solution: Detect 'yarn.lock' files as yaml
          (Wu, Zhenyu)

closes: #14369

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:51:19 +02:00
3f6fa93b3b patch 9.1.0247: filetype: bundle config files are not recognized
Problem:  filetype: bundle config files are not recognized
Solution: Detect '*/.bundle/config' as yaml
          (Wu, Zhenyu)

closes: #14368

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:48:35 +02:00
a2c27b01dc patch 9.1.0246: filetype: fontconfig files are not recognized
Problem:  filetype: fontconfig files are not recognized
Solution: detect 'fonts.conf' as xml
          (Wu, Zhenyu)

closes: #14367

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:45:11 +02:00
a55a22a1a3 patch 9.1.0245: filetype: zsh theme, history and zunit files are not recognized
Problem:  filetype: zsh theme, history and zunit files are not
          recognized.
Solution: Detect '.zsh_history', '*.zsh-theme' and '*.zunit' as zsh
          (Wu, Zhenyu)

closes: #14366

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:42:39 +02:00
84ce55001a patch 9.1.0244: filetype: bash history files are not recognized
Problem:  filetype: bash history files are not recognized
Solution: detect .bash-history and .bash_history files as bash
          (Wu, Zhenyu)

closes: #14365

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:22:51 +02:00
abbb4a4f70 patch 9.1.0243: filetype: netrw history file is not recognized
Problem:  filetype: netrw history file is not recognized
Solution: Detect .netrwhist as vim files (Wu, Zhenyu)

closes: #14364

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:20:14 +02:00
be71ac694f patch 9.1.0242: filetype: octave history files are not recognized
Problem:  filetype: octave history files are not recognized
Solution: Detect octave/history files as octave
          (Wu, Zhenyu)

closes: #14363

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:18:10 +02:00
6b285c8cfd patch 9.1.0241: filetype: mysql history files are not recognized
Problem:  filetype: mysql history files are not recognized
Solution: Detect .mysql_history as mysql
          (Wu, Zhenyu)

closes: #14362

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:15:49 +02:00
665220a17b patch 9.1.0240: filetype: some python tools config files are not recognized
Problem:  filetype: some python tools config files are not recognized
Solution: Detect config files for setuptools, pudb, coverage as dosini
          (Wu, Zhenyu)

closes: #14361

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:12:36 +02:00
8e47eb31cc patch 9.1.0239: filetype: gnuplot history files are not recognised
Problem:  filetype: gnuplot history files are not recognised
Solution: detect .gnuplot_history files as gnuplot
          (Wu, Zhenyu)

closes: #14360

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:10:18 +02:00
75c607dff7 patch 9.1.0238: filetype: jupyterlab and sublime config are not recognized
Problem:  filetype: jupyterlab and sublime config are not recognized
Solution: Detect jupyterlab and sublime config files as json
          (Wu, Zhenyu)

closes: #14359

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:08:07 +02:00
0fd560d46a patch 9.1.0237: filetype: mplstyle files are not recognized
Problem:  filetype: mplstyle files are not recognized
Solution: Detect '*.mplstyle' files as yaml (Wu, Zhenyu)

closes: #14358

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:05:44 +02:00
a75f4791b1 patch 9.1.0236: filetype: texlua files are not recognized
Problem:  filetype: texlua files are not recognized
Solution: Add '*.tlu' pattern for texlua files (Wu, Zhenyu)

Reference: https://github.com/TeX-Live/texdoc/tree/master/script

closes: #14357

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 19:02:26 +02:00
4ff83b904e patch 9.1.0235: filetype: supertux files are not recognized
Problem:  filetype: supertux files are not recognized
Solution: Supertux uses lisp to store hotkeys in config and game stage information,
          so add a pattern for supertux files.
          (Wu, Zhenyu)

Reference: https://github.com/SuperTux/supertux/wiki/S-Expression

closes: #14356

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:58:34 +02:00
e523dd9803 patch 9.1.0234: filetype: support for Intel HEX files is lacking
Problem:  filetype: support for Intel HEX files is lacking
Solution: Add more file extensions that are typical for Intel HEX files
          (Wu, Zhenyu)

Reference: https://en.wikipedia.org/wiki/Intel_HEX

closes: #14355

Signed-off-by: Wu, Zhenyu <wuzhenyu@ustc.edu>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:54:55 +02:00
3cf121ed31 patch 9.1.0233: Vim9: string() output of enum is problematic
Problem:  Vim9: string() output of enum is problematic
Solution: Make string() output for an enum consistent with that of a
          regular object (Yegappan Lakshmanan).

closes: #14343

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:45:35 +02:00
5df961a1bc patch 9.1.0232: Conceal test fails when rightleft feature is disabled
Problem:  Conceal test fails when rightleft feature is disabled.
Solution: Skip test if rightleft feature is missing (Julio B).

closes: #14342

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:43:51 +02:00
5bf6c2117f patch 9.1.0231: Filetype may be undetected when SwapExists sets ft in other buf
Problem:  Filetype may be undetected when a SwapExists autocommand sets
          filetype in another buffer.
Solution: Make filetype detection state buffer-specific.  Also fix a
          similar problem for 'modified' (zeertzjq).

closes: #14344

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:41:27 +02:00
8603270293 patch 9.1.0230: TextChanged autocommand not triggered under some circumstances
Problem:  TextChanged autocommand not triggered under some circumstances
          (Sergey Vlasov)
Solution: Trigger TextChanged when TextChangedI has not been triggered

fixes: #14332
closes: #14339

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:38:09 +02:00
18d730d7b5 runtime(compilers): ensure compiler! sets global options (#14336)
Previously some options were only set locally by
&l:makeprg/errorformat

This suffices for :compiler (without a trailing bang)
but falls short for :compiler! that sets &g:makeprg/errorformat as
well

Also apply kind suggestions by @dkearns and @lifepillar 

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:37:05 +02:00
80aabaab66 runtime(vim): Distinguish Vim9 builtin object methods from namesake builtin functions (#14348)
Currently, the overriding object method definitions are
matched as vimFunctionError (:help builtin-object-methods,
v9.1.0148).

For example:
------------------------------------------------------------
vim9script

class Test
	def string(): string
		return "Test"
	enddef
endclass

echo string(Test.new()) == Test.new().string()
------------------------------------------------------------

Instead, let's introduce a new syntax group vimMethodName
and make these methods its members.  In order to emphasise
the link between the overriding methods and the overridden
functions for highlighting, vimMethodName is linked by
default to vimFuncName.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:26:32 +02:00
807fff135d runtime(pamconf): add support for Debian specific @includes
fixes: #14335

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 18:04:21 +02:00
b64cec217f patch 9.1.0229: Error E877 is not translated
Problem:  Error E877 is not translated (RestorerZ)
Solution: Declare the error with N_ to mark it as translatable, add _()
          around the error message in regexp_nfa.c

fixes: #14333

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-31 17:56:17 +02:00
4fa06bb179 NSIS: fix path of uganda.nsis.txt in german.nsi file (#14331)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 18:40:02 +01:00
ad493ef3ea patch 9.1.0228: Two unrelated things are tested by a single test
Problem:  Two unrelated things are tested by a single test.
Solution: Split it into two, restoring the old Test_brace_single_line().
          Add missing cleanup to some tests.
          (zeertzjq)

closes: #14323

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 10:25:52 +01:00
7f0bba2595 runtime(doc): Improve docs for empty(), len(), and string() on objects
closes: #14324

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 10:14:41 +01:00
ea95f1a5ad patch 9.1.0227: Recording may still be wrong in Select mode
Problem:  Recording may still be wrong in Select mode (after 8.2.3993).
Solution: Make sure a character isn't split between two buffer blocks.
          (zeertzjq)

closes: #14326

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 10:11:42 +01:00
abedca96ef patch 9.1.0226: Not able to assign enum values to an enum static variable
Problem:  Not able to assign enum values to an enum static variable
          (zzzyxwvut)
Solution: Make it work
          (Yegappan Lakshmanan)

related: #14224
closes: #14329

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-29 10:08:23 +01:00
059aeac2be patch 9.1.0225: test_matchparen not run in CI
Problem:  test_matchparen not run in CI
Solution: add test_matchparen.res to NEW_TESTS_RES in Makefile,
          update changed highlighting dump from v9.1.61

closes: #14322

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 17:10:44 +01:00
515f734e68 patch 9.1.0224: cursor may move too many lines over "right" & "below" virt text
Problem:  If a line has "right" & "below" virtual text properties,
          where the "below" property may be stored first due to lack of
          ordering between them, then the line height is calculated to
          be 1 more and causes the cursor to far over the line.
Solution: Remove some unnecessary setting of a
          `next_right_goes_below = TRUE` flag for "below" and "above"
          text properties. (Dylan Thacker-Smith)

I modified a regression test I recently added to cover this case,
leveraging the fact that "after", "right" & "below" text properties are
being stored in the reverse of the order they are added in.  The
previous version of this regression test was crafted to workaround this
issue so it can be addressed by this separate patch.

closes: #14317

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 12:01:14 +01:00
1134fdd1b3 patch 9.1.0223: code duplication in loop to add active text properties
Problem:  There are two dense conditions with duplication that needs to
          be kept in sync between the while loop break condition and the
          condition to skip certain text properties.
Solution: Refactor the loop by moving while loop conditions into the
          body of the while loop so they can be shared with skip
          conditions. `break` and an `active` variable are used to
          handle the outcome of these merged conditions.
          (Dylan Thacker-Smith)

closes: #14307

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 11:51:10 +01:00
fe0a76b2bc patch 9.1.0222: missing 'below' virt text if truncation precedes after/right text
Problem:  When a line is truncated just before 'after'/'right' virtual
          text and the line also has 'below' virtual text, then the
          'below' virtual text would not be displayed, depending on the
          order these text properties were added.
Solution: In the loop to make text properties active, skip instead of
          break for 'after'/'right' virtual text properties that are
          ignored due to truncation, so following 'below' text
          properties can still be made active.
          Similarly, a loop is needed to determine if a text property
          follows at the end of the screen. (Dylan Thacker-Smith)

related: #14307

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 11:51:10 +01:00
b6fac4db36 patch 9.1.0221: lines following virt text (that fills the window) might be truncated
Problem:  The if branch to set `text_prop_follows` was both checking if
          it was at the end of the buffer text line or if it was at the
          end of the screen line, but the former being true skipped
          a guard condition in the latter to only consider 'below'
          virtual text to follow. `text_prop_follows` being improperly
          set caused it to skip a conditional block to break at the end
          as well as one to move `ptr` to the end of the text line,
          while repeated for each following line of the window.
Solution: Move the check for whether 'below' virtual text should follow
          so it is also used when at the end of the buffer text line.
          (Dylan Thacker-Smith)

fixes: #12213
related: #14307

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 11:51:05 +01:00
c029c131ea patch 9.1.0220: Few typos in source and test files
Problem:  Typos in code and tests.
Solution: Fix typos (zeertzjq).

closes: #14321

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 11:37:26 +01:00
3164cf8f12 patch 9.1.0219: Vim9: No enum support
Problem:  No enum support
Solution: Implement enums for Vim9 script
          (Yegappan Lakshmanan)

closes: #14224

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:38:28 +01:00
8ede7a0694 patch 9.1.0218: Unnecessary multiplications in backspace code
Problem:  Unnecessary multiplications in backspace code, as
          "col / ts * ts" is the same as "col - col % ts".
Solution: Change "col / ts * ts" to "col - col % ts".  Adjust the loop
          and the comments ins_bs() to be easier to understand.  Update
          tests to reset 'smarttab' properly.
          (zeertzjq)

closes: #14308

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:30:08 +01:00
2ca7d5f483 translation(ru): Add translation for README.txt and uganda.txt (#14312)
* translation(ru): The main file README.txt and uganda.txt
* removed tags-ru

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:27:17 +01:00
46fa3c7e27 patch 9.1.0217: regexp: verymagic cannot match before/after a mark
Problem:  regexp: verymagic cannot match before/after a mark
Solution: Correctly check for the very magic check (Julio B)

Fix regexp parser for \v%>'m and \v%<'m
Currently \v%'m works fine, but it is unable to match before or after
the position of mark m.

closes: #14309

Signed-off-by: Julio B <julio.bacel@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:23:37 +01:00
74a2331846 NSIS: Possibility to include translated license and README.txt files (#14311)
* NSIS: Possibility to include translated license and README.txt files
* fixed a missing semicolon
* Disable always show dialog choice language

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:19:44 +01:00
b75825f749 Update README.txt and README.md (#14313)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:14:47 +01:00
620e85265c patch 9.1.0216: Error on exit with EXITFREE and 'winfixbuf'
Problem:  Error on exit with EXITFREE and 'winfixbuf'.
Solution: Handle DT_FREE before checking for 'winfixbuf'.
          (zeertzjq)

closes: #14314

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:11:57 +01:00
5a2e3ec9ac patch 9.1.0215: Half-page scrolling does not support smooth-scrolling
Problem:  Page-wise scrolling with Ctrl-D/Ctrl-U implements
          it's own logic to change the topline and cursor.
          More logic than necessary for scrolling with Ctrl-F/Ctrl-B
          was removed in patch 9.1.0211.
Solution: Re-use the logic from Ctrl-E/Ctrl-Y/Ctrl-F/Ctrl-B while
          staying backward compatible as much as possible.
          Restore some of the logic that determined how many lines will
          be scrolled (Luuk van Baal)

closes: #14316

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:10:40 +01:00
982e191b38 runtime(vim): Update base-syntax, match empty blob and :abclear modifiers (#14318)
- Match empty blob literals.
- Match modifier arguments to :abclear commands.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:06:03 +01:00
5532d3b3f0 patch 9.1.0214: Duplicate condition in win_lbr_chartabsize()
Problem:  Duplicate condition in win_lbr_chartabsize().
Solution: Remove the duplicate condition, as it's already checked above.
          (zeertzjq)

closes: #14320

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:04:25 +01:00
b2e1fee72c runtime(haskell): allow TODO keywords in comments
closes: #14319

Signed-off-by: Enrico Maria De Angelis <enricomaria.dean6elis@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 10:02:36 +01:00
677cd95681 runtime(debcontrol): add Static-Built-Using field (#14306)
Signed-off-by: Guilherme Puida <guilherme@puida.xyz>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 09:56:50 +01:00
aed6554b46 patch 9.1.0213: CI: MS-Windows fails in test_winfixbuf
Problem:  CI: MS-Windows fails in test_winfixbuf
          (after v9.1.208)
Solution: Instead of skipping the test, write the file
          so it exists on disk, to verify that MS-Windows
          short filename expansion is successful.
          (Sean Dewar)

related: #14286

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-28 09:48:34 +01:00
79b2867ce3 patch 9.1.0212: CI: MS-Windows fails in test_winfixbuf
Problem:  CI: MS-Windows fails in test_winfixbuf
          (after v9.1.208)
Solution: Skip Ms-Windows for now, fix style

related: #14286

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-27 10:48:40 +01:00
63833bb021 runtime(json5): add basic indent support (#14298)
Signed-off-by: Rocco Mao <dapeng.mao@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 19:02:44 +01:00
b9f5b95b7b patch 9.1.0211: page-wise scrolling does not support smooth-scrolling
Problem:  Page-wise scrolling with Ctrl-F/Ctrl-B implements
          it's own logic to change the topline and cursor.
          In doing so, skipcol is not handled properly for
          'smoothscroll', and virtual lines.
Solution: Re-use the logic from Ctrl-E/Ctrl-Y while staying
          backward compatible as much as possible.

closes: #14268

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:53:24 +01:00
9ccc297237 patch 9.1.0210: Motif: leaking memory when mui_mch_dialog() fails
Problem:  Motif: leaking memory when mui_mch_dialog() fails
          (LuMingYinDetect)
Solution: When allocating the label using the XmStringCreateLtoR()
          function fails, before returning also free the allocated
          buttons pointer.

fixes: #14247
closes: #14280

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:44:48 +01:00
86eddced7e patch 9.1.0209: leaking memory in exe_newdict() on error
Problem:  leaking memory in exe_newdict() on error
          (LuMingYinDetect)
Solution: free allocated dict if GA_GROW_FALIS()

fixes: #14255
closes: #14281

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:42:52 +01:00
65e580bd56 patch 9.1.0208: winfixbuf does not allow to re-edit current buffer
Problem:  winfixbuf does not allow to re-edit current buffer
          (Tim Pope, after v9.1.0147)
Solution: Explicitly allow :e even when 'winfixbuf' is set,
          since it just re-loads the current buffer
          (Colin Kennedy)

fixes: #14237
closes: #14286

Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:29:30 +01:00
e5f2280381 patch 9.1.0207: No autocommand when writing session file
Problem:  No autocommand when writing session file
Solution: Add SessionWritePost autocommand
          (Colin Kennedy)

fixes: ##14242
closes: #14288

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:23:06 +01:00
63d68c2c21 runtime(java): Update java[CR]_JavaLang type lists (#14297)
- Add to the list of java.lang runtime exceptions two new
  types: MatchException (Pattern Matching for _switch_) and
  WrongThreadException (Virtual Threads).
- "Demote" Compiler (removed in JDK 21) from the list of
  java.lang class types to a new list javaLangDeprecated.

References:
https://bugs.openjdk.org/browse/JDK-8205129
https://bugs.openjdk.org/browse/JDK-8282274
https://bugs.openjdk.org/browse/JDK-8284161

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:12:05 +01:00
e6e3a7aaf0 Update README.md (#14302)
fix URL for MacVim

Signed-off-by: partev <petrosyan@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:09:05 +01:00
c8b47f26d8 patch 9.1.0206: unused display_text_first boolean var in win_line()
Problem:  unused display_text_first boolean var in win_line()
Solution: Remove unused display_text_first boolean variable
          (Dylan Thacker-Smith)

The only place it is used, uses its initial constant value, then the
following conditionally values set to the variable are unused.

Specifically, it was commit 234c3fab28
that changed the use of display_text_first such that it doesn't have any
effect.

closes: #14305

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-26 18:05:01 +01:00
076faac537 patch 9.1.0205: Cannot use modifiers before :-Ntabmove
Problem:  Cannot use modifiers before :-Ntabmove.
Solution: Check backwards from the command instead of checking from the
          start of the command line. Slightly adjust docs to make them
          more consistent (zeertzjq).

closes: #14289

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:41:06 +01:00
6dcf59b89f NSIS: Redesigning the appearance of the vimrc settings page (#14292)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:38:37 +01:00
0185c77014 patch 9.1.0204: Backspace inserts spaces with virtual text and 'smarttab'
Problem:  Backspace inserts spaces with virtual text and 'smarttab'.
Solution: Ignore virtual text and wrapping when backspacing.
          (zeertzjq)

related: neovim/neovim#28005
closes: #14296

Co-authored-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:34:51 +01:00
ab01adf7c6 runtime(doc): Update options.txt
closes: #14295

Signed-off-by: Song-Tianxiang <149415622+Song-Tianxiang@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:31:41 +01:00
4a95377593 patch 9.1.0203: build-error on GNU/Hurd
Problem:  build-error on GNU HURD
Solution: Define _XOPEN_SOURCE like for Android and Cygwin
          (James McCoy)

strptime() requires _XOPEN_SOURCE to be defined for its declaration to
be visible.  This is already done for non-Android Linux and Cygwin, but
also needs to be exposed for GNU/Hurd.

closes: #14285

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:22:49 +01:00
8e59a7ba88 runtime(java): Recognise the inline kind of the {@return} tag (#14284)
Also:

- Refine comment matching (javaComment{Error\ and,Start}).
- Continue rewriting regexps (prefer atom grouping with
  non-capturing parens; factor out common prefixes in
  alternations).
- Allow for relative paths with the _file_ attribute of
  {@snippet}.
- Anticipate HTML in the @see tags.
- Match the nullary method parens in javaDocSeeTagParam.
- Improve the boundary patterns for summary sentences of
  documentation.

> This sentence ends at ... or at the first tag (as defined
> below).

There are Java documentation tags (@) and there are HTML
tags (<?>) (with Markdown looming large; see JEP 467).  With
block tags, e.g. @param, @return, @see, we begin another
documentation "sentence" whether or not the author has
terminated the summary sentence with a period; with
.<!-- -->, we may follow abbreviations, enumerations,
initials, (but instead consider @literal or &nbsp;) _within_
the summary sentence.  On the other hand, inline tags, e.g.
@code, @link, @literal, should not terminate the summary
sentence.

References:
https://bugs.openjdk.org/browse/JDK-8075778
https://www.oracle.com/technical-resources/articles/java/javadoc-tool.html#firstsentence
https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-25 16:18:28 +01:00
4b715bdaf4 runtime(netrw): Fix typo in netrw#NetWrite (#14283)
Fix typo in netrw#NetWrite (http) error message call.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 17:47:37 +01:00
51c94b6506 NSIS: Update nsis installer and nsis docs (#14256)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 10:41:18 +01:00
6f438199c9 runtime(compiler): update errorformat for dot and neato compiler (#14257)
* add errorformat for dot compiler
* add errorformat for neato compiler

Signed-off-by: Konfekt <Konfekt@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 10:37:56 +01:00
7a2f217988 patch 9.1.0202: leaking memory in add_user() on failure
Problem:  leaking memory in add_user() (LuMingYinDetect)
Solution: free user_copy pointer instead of the user ptr

add_user() is called with a user pointer and the user pointer comes
from these functions:
- return value from the getpwent() function (Unix).
- return value from the getpwnam() function (Unix).
- return value from the NetUserEnum() function (MS Windows).

For the first 2 callers, the man page for those functions directly says,
one should not free the returned pointer (since it comes from static
memory).
For the third caller (on MS Windows), the returned buffer is already
freed directly after calling the add_user() function in
NetApiBufferFree(), so this would lead to a double free().

This all indicates, the user ptr is wrongly freed in the add_user()
function and the intention was to free the user_copy pointer instead in
case of an error.

So let's just use that now.

fixes: #14250
closes: #14260

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 09:50:03 +01:00
366c81a200 patch 9.1.0201: gM not working correctly with virt text
Problem:  `gM` would include outer virtual text and its padding when
          getting the line length used to calculate the middle of the
          line, putting the cursor much closer to virtual text lines.
Solution: Exclude outer virtual text in getting the line length for
          `gM`, so that virtual text doesn't influence where the cursor
          is moved to (Dylan Thacker-Smith).

closes: #14262

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 09:46:56 +01:00
b2d124c625 patch 9.1.0200: gj/gk not skipping over outer virtual text lines
Problem:  `gj`/`gk` was updating the desired cursor virtual column to
          the outer virtual text, even though the actual cursor position
          was moved to not be on the virtual text, leading the need to
          do an extra `gj`/`gk` to move past each virtual text line.
          (rickhowe)
Solution: Exclude the outer virtual text when getting the line length
          for moving the cursor with `gj`/`gk`, so that no extra
          movement is needed to skip over virtual text lines.
          (Dylan Thacker-Smith)

fixes: #12028
related: #14262

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 09:43:25 +01:00
d3c0ff5d5a runtime(termdebug): allow multibyte characters as breakpoint signs (#14274)
Allow multibyte characters as termdebug signs using slice() function

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Mihai Ciuraru <mihai.ciuraru@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-24 09:11:06 +01:00
ad38769030 patch 9.1.0199: Not enough tests for the slice() function
Problem:  Not enough tests for the slice() function.
Solution: Test with multibyte chars, and in both Legacy and Vim9 script.
          Update docs to be clearer about how it treats composing chars.
          (zeertzjq)

closes: #14275

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-23 08:25:41 +01:00
d990bf08d8 patch 9.1.0198: Vim9: compound operators broken for lambdas in an object
Problem:  Vim9: compound operators broken for lambdas in an object
          (girishji)
Solution: When using an object from the outer scope, use the LOADOUTER
          instruction to load the object (Yegappan Lakshmanan).

fixes: #14236
closes: #14266

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22 19:56:17 +01:00
76d62985c1 runtime(vim): Update base-syntax, remove old unused syntax groups. (#14146)
Remove old unused syntax groups.

- vimRegion, vimPattern and vimKeyword removed in Vim 5.3.
- vimAuSyntax, vimAutoCmdOpt, vimAutoSet and vimStatement removed in 5.6.

The following were linked in :hi commands but never defined with :syn
and, most likely, never used:
 - vimHLMod introduced in 5.0.
 - vimKeycode and vimKeycodeError introduced in 5.4.
 - vimElseif introduced in 5.6.
 - vimFold introduced in 6.4.
 - vimOperStar (and vimoperStar) introduced in 9.0.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22 19:55:25 +01:00
5d77364e4a patch 9.1.0197: Vim9: problem evaluating negated boolean logic
Problem:  Vim9: problem evaluating negated boolean logic
          (lxhillwind)
Solution: Don't clear the first value on short circuit evaluation
          (Yegappan Lakshmanan)

fixes: #14265
closes: #14269

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22 19:37:29 +01:00
8e37daf620 CI: Fix for Sodium version 1.0.19 and MinGW (#14267)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22 19:34:52 +01:00
3e72bf10a0 runtime(java): Recognise the {@snippet} documentation tag (#14271)
Remember that ‘code fragments are typically Java source
code, but they may also be fragments of properties files,
source code in other languages, or plain text.’  Therefore,
with these changes, markup tags are highlighted in the Java
source files (as external snippets) and in the {@snippet}
tags.

Also:

- Improve matching of the multi-line {@code} documentation
  tag with any contained balanced braces.
- Recognise the {@literal} documentation tag.
- Highlight stray blanks in comments.

Related to an enhancement proposal for PCRE-like callouts
discussed at https://github.com/vim/vim/issues/11217.

References:
https://openjdk.org/jeps/413
https://docs.oracle.com/en/java/javase/21/docs/specs/javadoc/doc-comment-spec.html

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-22 19:32:48 +01:00
f976e2c956 CI: mingw complains about unknown escape sequence: '\l', fails with libsodium (#14259)
Problem:  CI: mingw complains about unknown escape sequence: '\l', fails with sodium v1.0.19
Solution: Use other slash instead, also revert sodium version to v1.0.18

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21 21:55:22 +01:00
35e6f4ca27 runtime(vim): Update base-syntax, improve function definition highlighting (#14203)
Improve function definition highlighting.

- Match bang and function modifiers - abort etc.
- Only match valid scope modifiers.
- Match listing commands.
- Don't match ex commands in function names.
- Split function syntax groups into :func and :def subgroups.
- Match Vim9-script parameter and return types.
- Limit legacy-script and Vim9-script comments to :func and :def
  definitions, respectively.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21 20:41:10 +01:00
3a6bd0c5c7 patch 9.1.0196: filetype: support for gnuplot files is lacking
Problem:  filetype: support for gnuplot files is lacking
Solution: Also detect *.gnuplot files
          (RobbiZ98)

closes: #14243

Signed-off-by: RobbiZ98 <113035863+RobbiZ98@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21 20:24:51 +01:00
85a769d466 patch 9.1.0195: memleak with ex_drop, NULL dereference
Problem:  memleak with ex_drop(), NULL dereference
          (zeertzjq)
Solution: revert back to ex_rewind(), use curbuf instead of buf

fixes: #14246
closes: #14251

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21 20:19:00 +01:00
9eb236f455 patch 9.1.0194: gcc complains about uninitialized var
Problem:  gcc complains about uninitialized var
          (Tony Mechelynck)
Solution: initialize to NULL

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21 20:12:59 +01:00
70e566b0bd patch 9.1.0193: May leak memory in completion when ga_grow() fails
Problem:  May leak memory in completion when ga_grow() fails.
Solution: Free "wca" when ga_grow() fails (zeertzjq).

fixes: #14248
closes: #14249

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-21 07:11:58 +01:00
6d1d18084b runtime(colors): don't unnecessarily reload v:colornames dict
fixes: #14234
closes: #14235

Signed-off-by: Alin Mr <almr.oss@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20 20:27:26 +01:00
978178823b patch 9.1.0192: drop: don't rewind when editing the same file
Problem:  :drop tries to :rewind the argumentlist, which results in E37
          (after v9.1.0046)
Solution: instead of calling ex_rewind(), call open_buffer() only when
          re-using the initial empty buffer

fixes: #14219
closes: #14220

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20 20:20:39 +01:00
2680a074d4 patch 9.1.0191: Installer does not remove all files
Problem:  Installer does not remove all files
Solution: Update installer and delete all files on uninstall
          update Sodium library dependency, update Readme
          (RestorerZ)

closes: #14214

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20 20:18:18 +01:00
8950bf7f8b patch 9.1.0190: complete_info() returns wrong order of items
Problem:  complete_info() returns wrong order of items
          (after v9.0.2018)
Solution: Revert Patch v9.0.2018
          (Girish Palya)

bug fix: complete_info() gives wrong results

1) complete_info() reverses list of items during <c-p>
2) 'selected' item index is wrong during <c-p>
3) number of items returnd can be wrong

Solution:
- Decouple 'cp_number' from 'selected' index since they need not be
  correlated
- Do not iterate the list backwards
- Add targeted tests

Regression introduced by 69fb5afb3b
Following are unnecessary commits to patch problems from above:
fef6630166
daef8c7437

All the tests from above commits are retained though.

fixes: #14204
closes: #14241

Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20 20:11:26 +01:00
2708c0b585 runtime(deb822sources): Add minimal ftplugin (#14240)
Set comment related options and avoid automatic line wrapping.

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20 19:55:05 +01:00
918b92b961 patch 9.1.0189: Memory leak with "above" virttext and 'relativenumber'
Problem:  Memory leak with "above" virtual text and 'relativenumber'.
Solution: Free "text_props" and "text_prop_idxs" before returning.
          Also fix off-by-one error causing line number to be drawn
          beyond end of window (zeertzjq).

fixes: #14239
closes: #14241

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-20 19:49:20 +01:00
9f26e5a9bc patch 9.1.0188: filetype: no support for Vento files
Problem:  Vento files are not recognized.
Solution: Recognize *.vto files as filetype "vento" (wrapperup)

Vento is a templating engine https://vento.js.org/

closes: #14229

Signed-off-by: wrapperup <wrapperup4@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-19 18:09:13 +01:00
ec21bafc13 runtime(vim): Update base-syntax, disallow '.' at start of menu item names (#14232)
Disallow '.' at the start of a menu item name.

This is the menu path separator character and should be escaped with a
'\' in this case.

Partially fixes #14230.  "popup" is still incorrectly matched as the Ex
command.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-19 18:04:42 +01:00
702f7923f6 runtime(syntax-tests): regenerate c_00 and markdown dumps
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 22:07:22 +01:00
a2addebca3 runtime(syntax-tests): include missing changes
related: #14215

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 20:40:54 +01:00
ef21bcaab1 runtime(rust): Respect no_plugin_maps and no_rust_maps globals (#14221)
Signed-off-by: myypo <nikirsmcgl@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 19:38:09 +01:00
a9bc195d64 runtime(syntax-tests): Retrofit input/c.c. with TEST_SETUP
Also:

- Include a syntax test for Markdown that takes advantage of
  a sourceable setup configuration.
- Update Filelist

closes: #14215

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 19:32:48 +01:00
f6069a7ddc runtime(syntax-tests): Support sourceable Vim configuration for syntax tests
Not all programming languages support comments; without such
support, the TEST_SETUP functionality that offers embeddable
Vim Ex commands may no longer be applicable.

We can achieve similar functionality by storing Ex commands
in a Vim file with its basename matching the basename of the
test file, and having this Vim file sourced, and then having
the test file loaded and tested.  When such a Vim file would
be used for a language that has comments and whose matching
test file has embedded TEST_SETUP lines, we will accommodate
it by letting the TEST_SETUP lines augment and/or overrule
sourced configuration.

Further details can be found in the discussion thread at
https://github.com/vim/vim/discussions/14117.

related: #14215

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 19:32:48 +01:00
93edd254d5 runtime(syntax-tests): Support embeddable Vim configuration for syntax tests
Currently, the very same syntax file for which a test can
be written is the only place where global variables can be
defined so that the file parts guarded with such variables
can be read during screen dump generation.  This approach
would lead to littering the syntax file with test-related
queries.

Instead, we could borrow the idea of comment-based mechanism
for test setup from the indent test runner.  With it, the
first 20 lines of each test file would be ALWAYS scanned in
search of the TEST_SETUP markers and, when found, the part
between the end of the marker and the end of the line would
be treated as a Vim Ex command.

Note that with these changes, runtime/defaults.vim is no
longer sourced for screen dump generation; however, some of
its functionality is reintroduced.

Further details can be found in the discussion thread at
https://github.com/vim/vim/discussions/14117.

related: #14215

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 19:32:16 +01:00
78c189837a runtime(doc): Recover some missed commas and periods in starting.txt
Also:

- Insert some missing words;
- Strive for consistency with capitalisation of words;
- Improve shell alias examples.

The gvim words were left alone for now, but they deserve to
be treated like proper names, GVim or GUI Vim, unless these
refer to executable filenames (on *nix systems).

closes: #14194

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 19:25:27 +01:00
4e334d0443 patch 9.1.0187: filetype: no support for Dafny files
Problem:  Dafny files are not recognized.
Solution: Recognize *.dfy files as filetype "dafny" (zeertzjq).

Ref: https://dafny.org/
Ref: https://github.com/mlr-msft/vim-loves-dafny

closes: #14226

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 19:21:48 +01:00
9530fe4f3a runtime(vim): Update base-syntax, improve :highlight command (#14228)
Improve :highlight command highlighting

- Use the same highlight groups for "default link" with and without
  bang.
- Match some common line-continuation use.
- Match :hi clear variants.
- Highlight color-name values.

Resync vim.vim and generator/vim.vim.base.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-18 19:19:51 +01:00
0e17f7e972 runtime(doc): clarify close behaviour for :term
closes: #14207

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17 20:14:25 +01:00
3d46de703c runtime(go): goPackageComment highlighting too broad
Previously this would highlight any comment before a line starting
`package`, for example

    var (
      // This comment would be highlighted as a goPackageComment
      packages []string
    )

The package clause is only valid when followed by a space[1], so include
this restriction

This is upstreaming a change from `go-vim`[2]

[1] https://go.dev/ref/spec#Package_clause
[2] d1c36cc417

Signed-off-by: Matthew Hughes <matthewhughes934@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17 20:05:43 +01:00
deb2204bff patch 9.1.0186: cursor pos wrong on mouse click after eol with 'rl', 've' and conceal
Problem:  Wrong cursor position when clicking after end of line with
          'rightleft', 'virtualedit' and conceal.
Solution: Set values in ScreenCols[] also with SLF_RIGHTLEFT.  Also fix
          off-by-one cursor position with 'colorcolumn' (zeertzjq).

closes: #14218

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17 19:44:30 +01:00
f6272551bd patch 9.1.0185: 'wincolor' hl missing with 'rightleft', "below" virttext, 'nowrap'
Problem:  'wincolor' highlight missing with 'rightleft', "below" virtual
          text and 'nowrap'.
Solution: Handle 'rightleft' in draw_screen_line() (zeertzjq).

closes: #14216

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-17 10:01:47 +01:00
8291e91c6b runtime(indent-test): MS-Windows: Add Makefile for running indent tests
A few more unrelated changes:
- fix Vim script style of indent test
- Change comments to complete sentences in Filelist

closes: #14198
2024-03-16 15:13:21 +01:00
d0c1b7723f patch 9.1.0184: Cursor pos wrong when clicking with conceal and wrap
Problem:  Cursor position wrong when clicking with conceal and wrap.
Solution: Use the virtual column of the last char for ScreenCols[] in
          boguscols.  Remove use of MAXCOL in ScreenCols[].  Rename
          third argument of wlv_screen_line() to "clear_end" as that's
          clearer what it does (zeertzjq).

related: 14192
closes: #14200

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16 15:03:33 +01:00
9e7f1fc2f1 patch 9.1.0183: Wrong display or screenpos() result when toggling diff mode
Problem:  Wrong display or screenpos() result when toggling diff mode.
Solution: Reset w_skipcol when disabling 'wrap'.  Reset w_leftcol when
          enabling 'wrap' (zeertzjq).

fixes: #14210
closes: #14211

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16 09:40:22 +01:00
6a04bf5ee5 patch 9.1.0182: Can define function with invalid name inside 'formatexpr'
Problem:  Can define function with invalid name inside 'formatexpr'.
Solution: Use goto instead of checking for did_emsg later.
          (zeertzjq)

closes: #14209

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16 09:39:06 +01:00
20eaf8b78d tools/rename.bat uses 'mv' and "move" (#14201)
refactor tools/rename.bat and support both "mv" for Linux build environments
and "move" for Windows build environments

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16 09:38:10 +01:00
989faa4fce runtime(doc): make :h tag-! more consistent (#14208)
- Use "on" and "off" for 'winfixbuf' option values.
- Retab the table.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-16 09:21:20 +01:00
b4b3d7de24 runtime(vim): Update base-syntax, revert last change to vimUserFunc (#14202)
Fix highlighting of ":echo (expr)" (broken in commit 61887b3) by
re-enabling the original fix for #9987.

Addresses https://github.com/vim/vim/pull/14199#issuecomment-1999732062.

This will be fixed more generally when there is context-sensitive
matching for commands and functions.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-15 18:53:53 +01:00
61887b3d6f runtime(vim): Update base-syntax, improve :echo and :execute highlighting (#14199)
Improve :echo and :execute highlighting.

- Add better line-continuation support for both commands.
- Improve the :execute command's expression argument matching.
- Remove the fix for issue #9987 as this is now handled by correctly
  matching the parens in :echo (...) as operator parens.


Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-15 12:45:48 +00:00
c35fc03dbd patch 9.1.0181: no overflow check for string formatting
Problem:  no overflow check for string formatting
Solution: Check message formatting function for overflow.
          (Chris van Willegen)

closes: #13799

Signed-off-by: Christ van Willegen <cvwillegen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14 18:58:04 +01:00
010e1539d6 patch 9.1.0180: Cursor pos wrong when double-width chars are concealed
Problem:  Cursor pos wrong when double-width chars are concealed.
Solution: Advance one more virtual column for a double-width char.
          Run some tests with both 'wrap' and 'nowrap' (zeertzjq).

closes: #14197

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14 18:22:17 +01:00
9352c28292 patch 9.1.0179: 'wincolor' highlight missing with "below" virtual text
Problem:  'wincolor' highlight missing with "below" virtual text.
Solution: Subtract n_attr_skip from n_attr.  Combine 'wincolor' with
          other highlights when 'nowrap' is set. (zeertzjq)

closes: #14196

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14 18:16:56 +01:00
45da32964d runtime(mswin): still another clipboard_working test
Commit 760f664213 missed to revert back
another test for `if has('clipboard_working')`

So change the remaining check around the inoremap <c-v> mappings.

fixes #14195

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-14 07:59:09 +01:00
0a32b8854b patch 9.1.0178: E1513 might be confusing
Problem:  E1513 might be confusing
          (Christoph Thoma)
Solution: reword error message, fix test to not
          depend on the actual message

fixes: #14189

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13 20:59:27 +01:00
8c55d60658 patch 9.1.0177: Coverity reports dead code
Problem:  Coverity reports dead code.
Solution: Remove the dead code. Also fix a mistake in ml_get_pos_len()
          and update some comments (zeertzjq).

closes: #14189

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13 20:42:26 +01:00
253ff4dece patch 9.1.0176: Cursor column wrong with 'virtualedit' and conceal
Problem:  Cursor column wrong with 'virtualedit' and conceal.
Solution: Correct cursor column at end of line if never reached.
          (zeertzjq)

closes: #14190

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13 20:38:26 +01:00
5866bc3a0f patch 9.1.0175: wrong window positions with 'winfix{width,height}'
Problem:  winframe functions incorrectly recompute window positions if
          the altframe wasn't adjacent to the closed frame, which is
          possible if adjacent windows had 'winfix{width,height}' set.

Solution: recompute for windows within the parent of the altframe and
          closed frame. Skip this (as before) if the altframe was
          top/left, but only if adjacent to the closed frame, as
          positions won't change in that case. Also correct the return
          value documentation for win_screenpos. (Sean Dewar)

The issue revealed itself after removing the win_comp_pos call below
winframe_restore in win_splitmove. Similarly, wrong positions could result from
windows closed in other tabpages, as win_free_mem uses winframe_remove (at least
until it is entered later, where enter_tabpage calls win_comp_pos).

NOTE: As win_comp_pos handles only curtab, it's possible via other means for
positions in non-current tabpages to be wrong (e.g: after changing 'laststatus',
'showtabline', etc.). Given enter_tabpage recomputes it, maybe it's intentional
as an optimization? Should probably be documented in win_screenpos then, but I
won't address that here.

closes: #14191

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13 20:17:24 +01:00
21b0a3df8c patch 9.1.0174: 'cursorline' and 'wincolor' hl missing with conceal and wrap
Problem:  'cursorline' and 'wincolor' highlight missing with concealed and
          wrapped lines.
Solution: Apply 'cursorline' and 'wincolor' highlight to boguscols.
          (zeertzjq)

Since 'cursorline' and 'wincolor' highlight apply after the end of the
line, it is more consistent to have them also apply to boguscols.

Assigning MAXCOL to values in ScreenCols[] make mouse click behave the
same with 'cursorline' and 'nocursorline', but such behavior may be
incorrect, as it puts the cursor on the next screen line.  That may be
fixed in a future PR.

closes: #14192

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13 20:09:02 +01:00
760f664213 runtime(mswin): revert back the check for clipboard_working support
Commit d9ebd46bd0 changed the condition to
check if the clipboard is available from:
```
has('clipboard')
```
to
```
has('clipboard_working')
```
Assuming that is the more accurate test because even when clipboard
support is enabled at compile time it may not be actually working (e.g.
if no X11 environment is available, or when working on a remote server).

However it seems that condition does not evaluate to true, when the GUI
has not been started up yet (and there was no X11 Connection yet possible).

So let's just revert back the check to `has('clipboard')`, since that
has been proven to be working well enough.

related: #13809

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-13 16:38:16 +01:00
e498cafe74 patch 9.1.0173: msgfmt ver. 0.22 forcibly converts text to UTF-8
Problem:  msgfmt ver. 0.22 forcibly converts text to UTF-8
Solution: use '--no-convert' if msgfmt supports it. Add a configure
          check for the msgfmt version (RestorerZ).

closes: #14163

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12 22:14:39 +01:00
9a660d2883 runtime(doc): add reference to matchbufline() at :h search()
related: #14173

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12 22:03:45 +01:00
94b7c3233e patch 9.1.0172: More code can use ml_get_buf_len() instead of STRLEN()
Problem:  More code can use ml_get_buf_len() instead of STRLEN().
Solution: Change more STRLEN() calls to ml_get_buf_len().  Also do not
          set ml_line_textlen in ml_replace_len() if "has_props" is set,
          because "len_arg" also includes the size of text properties in
          that case. (zeertzjq)

closes: #14183

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12 21:50:32 +01:00
5cac1a9bee patch 9.1.0171: Small split-move related improvements
Problem:  small improvements can be made to split-move related
          functions.
Solution: apply them (Sean Dewar):

- Improve some doc comments (frame_flatten should still work for non-current
  tabpages, despite the topframe check, which looks benign, though I'm unsure if
  it's still needed; see #2467).

- f_win_splitmove should check_split_disallowed on wp, not targetwin, as that's
  what win_splitmove checks (though it's probably unnecessary to check
  b_locked_split at all; see #14109, which I hope to get around to finishing at
  some point).

- Make winframe_restore restore window positions for the altframe, which
  winframe_remove changes. This doesn't affect the prior behaviour, as we called
  win_comp_pos after, but as win_comp_pos only works for curtab, and
  winframe_remove supports non-current tabpages, we should undo it. Regardless,
  this should mean we don't need win_comp_pos anymore; adjust tests to check
  that window positions remain unchanged.

  I'm not sure win_comp_pos is needed after last_status anyway if it doesn't
  steal rows from another frame to make room for a new statusline, which
  shouldn't be the case after winframe_remove? To be safe, I'll leave it as is.

closes: #14185

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12 21:11:39 +01:00
d64801e913 patch 9.1.0170: Re-allow curwin == prevwin, but document it instead
Problem:  more places exist where curwin == prevwin, and it may even be
          expected in some cases.
Solution: revert v9.1.0001, but document that it's possible instead.
          (Sean Dewar)

I've had a change of heart for the following reasons:

- A quick 'n dirty [GitHub code
  search](https://github.com/search?q=%2F%28winnr%5C%28%5C%29%5Cs*%3D%3D%5Cs*winnr%5C%28%5B%27%22%5D%23%5B%27%22%5D%5C%29%7Cwinnr%5C%28%5B%27%22%5D%23%5B%27%22%5D%5C%29%5Cs*%3D%3D%5Cs*winnr%5C%28%5C%29%29%2F&type=code)
  reveals some cases where it's expected in the wild.

  Particularly, it made me aware `winnr() == winnr('#')` is possible when curwin
  is changed temporarily during the evaluation of a &statusline expression item
  (`%{...}`), and is used to show something different on the statusline
  belonging to the previous window; that behaviour wasn't changed in v9.1.0001,
  but it means curwin == prevwin makes sense in some cases.

- The definition and call sites of back_to_prevwin imply some expectation that
  prevwin == wp (== curwin) is possible, as it's used to skip entering the
  prevwin in that case.

- Prior to v9.1.0001, `:wincmd p` would not beep in the case that was patched in
  v9.1.0001, but now does. That resulted in #14047 being opened, as it affected
  the CtrlP plugin.

  I find it odd that `:wincmd p` had cases where it wouldn't beep despite doing
  nothing, but it may be preferable to keep things that way (or instead also
  beep if curwin == prevwin, if that's preferred).

- After more digging, I found cases in win_free_mem, enter_tabpage,
  aucmd_restbuf and qf_open_new_cwindow where curwin == prevwin is possible
  (many of them from autocommands). Others probably exist too, especially in
  places where curwin is changed temporarily.

fixes: #14047
closes: #14186

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12 20:50:27 +01:00
e101028a5c patch 9.1.0169: current window number returned by tabpagewinnr may be outdated
Problem:  current window number returned by tabpagewinnr may be outdated
          when called from win_execute for the original tabpage.
Solution: update the original tabpage's tp_curwin in switch_win; use
          {un}use_tabpage instead. Don't do it in restore_win to ensure
          tp_curwin of the temporarily visited tabpage is unchanged from
          switch_win visiting it, as before. (Sean Dewar)

Maybe restore_win should only restore tp_curwin if
`curtab == switchwin->sw_curtab`, in case the user changed tabpages from within
win_execute, but not doing that is consistent with the old behaviour.

related: #14186

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-12 20:42:25 +01:00
bfcc895482 patch 9.1.0168: too many STRLEN() calls
Problem:  too many STRLEN() calls
Solution: Make use of ml_get_len() calls instead
          (John Marriott)

closes: #14123

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 22:04:45 +01:00
5cd86c6cff runtime(vim): Update base-syntax, improve number matching (#14175)
- Limit blob literals to an even number of hexadecimal digits and
  correctly located dots.
- Match octal numbers.

The current version unsuccessfully attempts to match a leading '-' as
part of the float literal.  It's actually parsed as part of the literal
for all numbers but the syntax file hasn't matched it like that for a
long time and highlights negative numbers as UNARY-MINUS NUMBER.  This
will be fixed when better expression matching is implemented.


Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 21:40:58 +01:00
49ffb6b428 patch 9.1.0167: Changing buffer in another window causes it to show matchparen
Problem:  Changing buffer in another window using win_execute() causes
          it to show matchparen (after 9.0.0969).
Solution: Delay highlighting with SafeState in BufWinEnter.
          (zeertzjq)

closes: #14177

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 21:38:58 +01:00
5406eb8722 patch 9.1.0166: Internal error with blockwise getregion() in another buffer
Problem:  Internal error with blockwise getregion() in another buffer
Solution: Also change curwin->w_buffer when changing curbuf (zeertzjq)

closes: #14179

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 21:36:42 +01:00
cb942cc4ca translation(lt): Update Lithuanian translation of Vim tutor to v.1.7 (#14176)
Signed-off-by: Rimas Kudelis <rimas@kudelis.lt>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 15:15:04 +00:00
0049a495c8 runtime(doc): improve 'winfixbuf' docs (#14180)
- Make it not sound like a buffer option.
- "!" is called a modifier, not an option.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-11 15:13:16 +00:00
675cbfb47f runtime(doc): Update Markdown syntax, add missing configs
fixes: #14168

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-10 19:34:32 +01:00
fa63008727 patch 9.1.0165: Vim9: Importing an autoload imported script fails
Problem:  Vim9: Importing an autoload imported script fails
          (Song-Tianxiang)
Solution: Return the script ID in this case
          (Yegappan Lakshmanan)

fixes: #14171
closes: #14174

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-10 19:22:38 +01:00
26dd09ad5e patch 9.1.0164: Internal error when passing invalid position to getregion()
Problem:  Internal error or crash when passing invalid position to
          getregion().
Solution: Give an error for invalid position (zeertzjq).

closes: #14172

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-10 15:46:58 +01:00
82e079df81 patch 9.1.0163: Calling STRLEN() to compute ml_line_textlen when not needed
Problem:  Calling STRLEN() to compute ml_line_textlen when not needed.
Solution: Use 0 when STRLEN() will be required and call STRLEN() later.
          (zeertzjq)

closes: #14155

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-10 08:55:42 +01:00
14759ded57 patch 9.1.0162: problem with writing extended attributes on failure
Problem:  problem with writing extended attributes on failure
Solution: Change return type to ssize_t and check listxattr's return
          value correctly on failure (Paul Tagliamonte)

The existing logic will return when the listxattr call returns with the
errno set to ENOTSUP (or a size of 0 bytes), without checking to see if
listxattr actually failed. listxattr can fail with at least E2BIG,
ENOTSUP, ERANGE, or anything that `stat(2)` can fail with (in my case;
ENOENT from stat).

The returned size is stored to a size_t, but the return type is a
ssize_t. On failure, listxattr returns -1, which will get translated to
size_t's MAX. If the listxattr call failed with anything other than
ENOTSUP, this triggers a request for size_t MAX bytes.

This means that, if the listxattr call fails with anything other than
ENOTSUP on save, vim will error with

`E342: Out of memory!  (allocating 18446744073709551615 bytes)`

(keen observers will note 18446744073709551615 is 0xffffffffffffffff)

In reality, this is likely masking a different (usually filesystem?)
error -- but at least it's an error being pushed to the user now, and we
don't try to allocate size_t MAX bytes.

I've opted to change the type that we store listxattr to from size_t to
ssize_t, to match listxattr(2)'s signature, and to check for the -1
return value. Additionally, I've removed the errno check -- if we get a
listxattr failure for any reason, we may as well bail without trying;
it's not like we can even recover.

closes: #14169

Signed-off-by: Paul Tagliamonte <paultag@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-10 08:53:33 +01:00
ca0e0d2708 translation(lt): Added Lithuanian translation of Tutor v. 1.4 by Laurynas Stančikas (#14118)
This translation has been available for free download from lietuvybe.org,
then lietuvybe.akl.lt, then lietuvybė.lt since at least 2006[1], but noone
ever bothered to contribute it upstream.

[1] https://web.archive.org/web/20060222162117/http://lietuvybe.org/files/vim-tutor-lt.txt

Co-authored-by: Laurynas Stančikas <lasas@gim.ktu.lt>
Signed-off-by: 	Rimas Kudelis <rimas@kudelis.lt>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-09 18:27:46 +01:00
a2c65809da runtime(java): Recognise string templates (#14150)
As this is encouraged in the referenced JEPs, "to visually
distinguish a string template from a string literal, and
a text block template from a text block", the default
colours for java\%[Debug]StrTempl are made distinct from
java\%[Debug]String.

According to §3.2 Lexical Translations (JLS, c. 1996 or any
more recent version), line terminators, white space, and
comments are discarded before tokens are accepted. Since
a template expression comprises a template processor, a dot,
and a template, it may be visually appealing to break up
its head across a few lines whenever its tail already spans
multiple lines.  Curiously, no allowance for it is made in
the distributed tests for OpenJDK 21; the proposed regexp
patterns take in consideration a line terminator and white
space after a dot.

References:
https://openjdk.org/jeps/430 (Preview)
https://openjdk.org/jeps/459 (Second Preview)
https://openjdk.org/jeps/465

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-09 18:03:11 +01:00
5d67aef306 runtime(vim): Update base-syntax, improve :map highlighting (#14141)
Improve :map command highlighting.

- Fix multiline RHS matching, allow continued lines and comments.
- Allow ^V-escaped whitespace in LHS.
- Handle map-bar properly and allow trailing commands.

Fixes issue #12672.


Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-09 18:01:22 +01:00
13a014452a patch 9.1.0161: expand() removes slash after env variable that ends with colon
Problem:  expand() removes a slash after an environment variable that
          ends with a colon on Windows.
Solution: Check the correct char for a colon (zeertzjq)

closes: #14161

Note: Vim still removes the path-separator at the end, if another path separator
follows directly after it, e.g. on:

```
    echo $FOO='/usr/'
    echo expand('$FOO/bar') == '/usr/bar'
```

see:

,----[ misc1.c:1630 ]
|   // if var[] ends in a path separator and tail[] starts
|   // with it, skip a character
|   if (after_pathsep(dst, dst + c)
| #if defined(BACKSLASH_IN_FILENAME) || defined(AMIGA)
| 	  && (dst == save_dst || dst[-1] != ':')
| #endif
| 	  && vim_ispathsep(*tail))
|       ++tail;
`----

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-09 17:44:46 +01:00
62b26040eb runtime(vim): Update base-syntax, improve :menu{,translate} highlighting (#14162)
Improve :menu and :menutranslate highlighting.

- Match args to :menutranslation and :popup.
- Only highlight special notation in {rhs} of :menu, like :map.
- Allow line continuations in {rhs} of :menu and between {english} and
  {mylang} of :menutranslation, matching common usage.
- Bug fixes.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-09 17:43:28 +01:00
35b867b685 patch 9.1.0160: Vim9: Add support for using a class type of itself in an object method
Problem:  Add support for using a class type of itself in an object
          method (thinca)
Solution: Vim9: Add support for using a class type of itself in an
          object method (Yegappan Lakshmanan)

fixes: #12369
closes: #14165

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-09 15:44:19 +01:00
b2ec0da080 patch 9.1.0159: Crash in WinClosed after BufUnload closes other windows
Problem:  Crash in WinClosed after BufUnload closes other windows
Solution: Don't trigger WinClosed if the buffer is NULL (zeertzjq)

Now win_close_othertab() doesn't trigger any autocommands if the buffer
is NULL, so remove the autocmd blocking above (which was added not long
ago in patch v9.0.0550) for consistency.

Also remove an unreachable close_last_window_tabpage() above:
- It is only reached if only_one_window() returns TRUE and last_window()
  returns FALSE.
- If only_one_window() returns TRUE, there is only one tabpage.
- If there is only one tabpage and last_window() returns FALSE, the
  one_window() in last_window() must return FALSE, and the ONE_WINDOW
  in close_last_window_tabpage() must also be FALSE.
- So close_last_window_tabpage() doesn't do anything and returns FALSE.

Then the curtab != prev_curtab check also doesn't make much sense, and
the only_one_window() can be replaced with a check for popup and a call
to last_window() since this is a stricter check than only_one_window().

closes: #14166

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-09 15:39:27 +01:00
8a01744c56 patch 9.1.0158: 'shortmess' "F" flag doesn't work properly with 'autoread'
Problem:  'shortmess' "F" flag doesn't work properly with 'autoread'
          (after 9.1.0154)
Solution: Hide the file info message instead of the warning dialog
          (zeertzjq)

closes: #14159
closes: #14158

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-07 21:48:33 +01:00
0df8f93bda patch 9.1.0157: Duplicate assignment in f_getregion()
Problem:  Duplicate assignment in f_getregion().
Solution: Remove the duplicate assignment.  Also improve getregion()
          docs wording and fix an unrelated typo (zeertzjq)

closes: #14154

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-07 21:43:21 +01:00
769eb2d0c3 patch 9.1.0156: Make 'wfb' failing to split still report E1513
Problem:  may not be clear why failing to split causes an ":Xdo" command
          to abort if 'wfb' is set.
Solution: do not return immediately if win_split fails, so E1513 is
          still given. Expect both errors in the test. Also fix tests to
          pass CI.
          (Sean Dewar)

closes: #14152

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-07 21:38:21 +01:00
64de03a22b runtime(syntax-tests): remove executable bit from sh test file
related: #14138

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-07 21:33:51 +01:00
84bf6e658d patch 9.1.0155: can only get getregion() from current buffer
Problem:  can only call getregion() for current buffer
Solution: Allow to retrieve selections from different buffers
          (Shougo Matsushita)

closes: #14131

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-06 21:39:35 +01:00
9db39b0ec9 patch 9.1.0154: shm=F not respected when reloading buffer with 'autoread'
Problem:  shm=F not respected when reloading buffer with 'autoread'
Solution: Check SHM_FILEINFO in buf_check_timestamp()
          (Shougo Matsushita)

closes: #14144

Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-06 20:58:41 +01:00
7ac1145fbe patch 9.1.0153: Text properties corrupted with fo+=aw and backspace
Problem:  Text properties corrupted with fo+=aw and backspace
Solution: Allocate line and move text properties
          (zeertzjq)

closes: #14147

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-06 20:54:22 +01:00
c62dacb7ed translation(gr): add translation of the installer (#14148)
Add greek translation of the installer

Signed-off-by: Christos Longros <98426896+chrislongros@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-06 20:53:02 +01:00
e3f2ef0eec translation(it): Update Italian translation for winfixbuf
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-06 20:44:10 +01:00
af7ae81600 patch 9.1.0152: Coverity complains about ignoring return value
Problem:  Coverity complains about ignoring return value of win_split()
          (after v9.1.150)
Solution: Check if win_split() failed, add winfixbuf.res to Makefile
2024-03-06 20:43:05 +01:00
a72d1be5a9 patch 9.1.0151: ml_get_buf_len() does not consider text properties
Problem:  ml_get_buf_len() does not consider text properties
          (zeertzj)
Solution: Store text length excluding text properties length
          in addition in the memline

related #14123
closes: #14133

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-05 20:43:25 +01:00
4bb505e28c patch 9.1.0150: Several minor 'winfixbuf' issues
Problem:  several minor 'winfixbuf' issues exist, mostly relating to the
          quickfix list
Solution: address them and adjust tests. Retab and reflow a few things too.
          (Sean Dewar)

Things touched include:

- Replace the semsgs with gettext'd emsgs.

- Handle window switching in ex_listdo properly, so curbuf and curwin
  are kept in-sync and trigger autocommands; handle those properly.

- Don't change the list entry index in qf_jump_edit_buffer if we fail
  due to 'wfb' (achieved by returning FAIL; QF_ABORT should only be used
  if the list was changed).

- Make qf_jump_edit_buffer actually switch to prevwin when using `:cXX`
  commands **outside** of the list window if 'wfb' is set in curwin.
  Handle autocommands properly in case they mess with the list.

  NOTE: previously, it seemed to split if 'wfb' was set, but do nothing
  and fail if prevwin is *valid*. This behaviour seemed strange, and maybe
  unintentional? Now it aligns more with what's described for the `:cXX`
  commands in the original PR description when used outside a list window,
  I think.

- In both functions, only consider prevwin if 'wfb' isn't set for it;
  fallback to splitting otherwise.

- Use win_split to split. Not sure if there was a specific reason for
  using ex_splitview. win_split is simpler and respects modifiers like
  :vertical that may have been used. Plus, its return value can be checked
  for setting opened_window in qf code (technically win_split_ins autocmds
  could immediately close it or change windows, in which the qf code might
  close some other window on failure; it's already the case elsewhere,
  though).

closes: #14142

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-05 20:39:07 +01:00
e1051924c7 translation(sr): Update Serbian messages (#14143)
* translation(sr): Update Serbian messages
* Update serbian.nsi
* Update gvim.nsi

Add serbian language to the installer

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-05 20:34:00 +01:00
63c39e4ef7 runtime(c): Recognize "__inline" (#14145)
`__inline` is recognized by GCC, and may even be preferred, as MSVC does
not recognize `__inline__`.

Signed-off-by: Wu Yongwei <wuyongwei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-05 20:27:27 +01:00
e5c9ba6015 runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups (#14137)
* runtime(vim): Update base-syntax, fix escaping :syn and :hi sub-groups

- Remove contained :syntax and :highlight sub-groups from the function
  body cluster.  These should only match in the respective commands.
- Remove vimSynLine syntax group from several clusters.  The definition
  of vimSynLine was removed in Vim 5.3.

* runtime(vim): Update syntax generator, use standard Last Change date format

The de facto standard date format is YYYY MMM DD.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-04 19:15:42 +01:00
1bdc9435c1 runtime(sh): Update syntax file, fix issue #962 (#14138)
Allow the opening parenthesis of a multiline array assignment, within an
if statement, to appear at EOL.

Fixes issue #962.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-04 19:14:08 +01:00
5131f224da patch 9.1.0149: null pointer member access when accessing 'winfixbuf' property
Problem:  qf_goto_win_with_qfl_file may check if prevwin has 'winfixbuf'
          set without checking if it's valid first.
Solution: Reverse the condition. Add a test, a modeline, and a missing
          CheckFeature. (Searn Dewar)

closes: #14140

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-04 19:09:26 +01:00
e84490311b runtime(css): update syntax script
Signed-off-by: Jay Sitter <jay@jaysitter.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-04 16:19:48 +01:00
691aee8b07 runtime(vim): Update base-syntax, fix issue #14135 (#14136)
Fix incorrect error highlighting for function calls in :command
definitions.  vimFunctionError should be restricted to :function header
lines.

fixes: #14135

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 19:02:47 +01:00
58f1e5c089 runtime(doc): Highlight the error message at *E1513*
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 16:47:47 +01:00
c4aef9a97b runtime(vim): Update base-syntax, improve :augroup highlighting (#14125)
- Explicitly match the bang and group name in :aug! {name}.
- Allow any characters in a group name.
- Match default group switch marker, END.
- Match :aug without arguments (list command).

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 16:42:47 +01:00
d9ebd46bd0 runtime(mswin): Use unnamed register when clipboard not working (#13813)
* Use unnamed register while clipboard not exist
* Do not need to specify the unnamed register explicitly
fixes: #13809

Signed-off-by: Shixian Li <lsx7@sina.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 16:41:46 +01:00
d3eae7bc11 patch 9.1.0148: Vim9: can't call internal methods with objects
Problem:  Vim9: can't call internal methods with objects
Solution: Add support for empty(), len() and string() function
          calls for objects (Yegappan Lakshmanan)

closes: #14129

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 16:34:51 +01:00
2157035637 patch 9.1.0147: Cannot keep a buffer focused in a window
Problem:  Cannot keep a buffer focused in a window
          (Amit Levy)
Solution: Add the 'winfixbuf' window-local option
          (Colin Kennedy)

fixes:  #6445
closes: #13903

Signed-off-by: Colin Kennedy <colinvfx@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 16:16:47 +01:00
353faa373e translation(ru): Updated Russian installer translation (#14134)
* translation(ru): Updated Russian translation for NSIS
* update CODEOWNERS

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 15:52:37 +01:00
b3030b653b runtime(java): Recognise text blocks (#14128)
Also, accept as valid the space escape sequence `\s`.

Also, consistently use the claimed `javaDebug` prefix for
syntax group definitions kept under `g:java_highlight_debug`.

Since `javaStringError` is commented out for its generality,
let's comment out `javaDebugStringError`, its copy, as well.

References:
https://openjdk.org/jeps/378
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7

Closes #10910.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-03 15:51:01 +01:00
e93afc2e61 runtime(r,rhelp,rmd,rnoweb,rrst): Update ftplugin, browsefilter labels (#14126)
Use the standard format for browsefilter labels:
  "File Description (*.ext1, *.ext2, *.ext3)"

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-02 19:27:47 +01:00
100a665634 runtime(java): Improve the recognition of literals (#14120)
* Emend the Unicode and octal escape sequence patterns;
* Accept the (repeated) underscore separators in all
  numerical literals;
* Recognise hexadecimal floating-point literals.

(The space escape sequence '\s' will be introduced along
with text blocks in another PR.)

References:
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.3
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.1
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.2
https://docs.oracle.com/javase/specs/jls/se17/html/jls-3.html#jls-3.10.7


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-01 23:11:14 +01:00
c27fcf4857 patch 9.1.0146: v:echospace wrong with invalid value of 'showcmdloc'
Problem:  v:echospace wrong after setting invalid value to 'showcmdloc'.
Solution: Only call comp_col() if value is valid.
          (zeertzjq)

closes: #14119

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-01 23:03:16 +01:00
87410ab3f5 runtime(doc): some improvements to getregion() docs (#14122)
- Mention the default selection behavior
- Remove useless sentence
- Correct description about space padding

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-03-01 23:00:23 +01:00
8fad5d5887 runtime(doc,netrw): update "Last Change header", remove trailing whitespace
Update Last-Change Header for netrw and doc/indent.txt, fix a trailing
whitespace in indent.txt and make CI happy.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-29 18:13:04 +01:00
56b7da3c05 runtime(netrw): handle file/dir symlinks specifically in tree mode
fixes: #2386
related: #3609

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-29 17:48:14 +01:00
062141b1a7 patch 9.1.0145: v:echospace not correct when 'showcmdloc' != last
Problem:  the amount of available space (v:echospace) on the command
          line is not correct when showcmdloc is drawn into the
          statusline or tabline.
Solution: only add SHOWCMD_COLS to the shown command column when
          'showcmdloc' is set to last (Sam-programs)

closes: #14108

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Sam-programs <130783534+Sam-programs@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-29 17:40:29 +01:00
4d55c54e30 patch 9.1.0144: getregion() needs more tests
Problem:  getregion() needs more tests
Solution: Run the getregion() test in both the legacy and Vim9 contexts
          (Yegappan Lakshmanan)

closes: #14114

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-29 17:30:43 +01:00
b4eb3f1e44 runtime(yaml): disable multiline_scalar detection by default
There have been many complaints about Yaml indenting too much, because
it considers values to be multi-line by default, which leads to
unintended indenting for (apparently most) users.

So let's hide this feature behind the new feature flag, keep it
simple and prefer single line value key pairs by default.

If you want the old behaviour, set the following value: >

  :let g:yaml_indent_multiline_scalar = 1

If not set, it will indent the same as the previous line.

closes #13845

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-29 17:28:07 +01:00
55f8bba73b patch 9.1.0143: [security]: autocmd causes use-after-free in set_curbuf()
Problem:  [security]: autocmd cause use-after-free in set_curbuf()
          (kawarimidoll)
Solution: check side-effect of BufLeave autocommand, when the number
          of windows changed, close windows containing buffers that will
          be wiped, if curbuf changed unexpectedly make sure b_nwindows
          is decremented otherwise it cannot be wiped

set_curbuf() already makes some efforts to ensure the BufLeave
autocommands do not cause issues.  However there are still 2 issues
that are not taken care of:

1) If a BufLeave autocommand opens a new window containing the same
buffer as that is going got be closed in close_buffer() a bit later,
we suddenly have another window open, containing a free'd buffer.  So we
must check if the number of windows changed and if it does (and the
current buffer is going to be wiped (according to the 'bufhidden'
setting), let's immediately close all windows containing the current
buffer using close_windows()

2) If a BufLeave autocommand changes our current buffer (displays it in
the current window), buf->b_nwindow will be incremented. As part of
set_curbuf() we will however enter another buffer soon, which means, the
newly created curbuf will have b_nwindows still have set, even so the
buffer is no longer displayed in a window. This causes later problems,
because it will no longer be possible to wipe such a buffer. So just
before entering the final buffer, check if the curbuf changed when
calling the BufLeave autocommand and if it does (and curbuf is still
valid), decrement curbuf->b_nwindows.

Both issues can be verified using the provided test (however the second
issue only because such an impacted buffer won't be wiped, causing
futher issues in later tests).

fixes: #13839
closes: #14104

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 23:32:00 +01:00
0fdd18596f CI: enable apt upgrade on github runners again to fix i386 build
This reverts commit 7f630e6f35 which
reverted 7349c5160a

Let's see how many more iterations of reverting a commit we can
achieve...

closes: #14113

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 23:28:34 +01:00
19b718828d patch 9.1.0142: getregion() can be improved
Problem:  getregion() can be improved (after v9.1.120)
Solution: change getregion() implementation to use pos as lists and
          one optional {opt} dictionary (Shougo Matsushita)

Note: The following is a breaking change!

Currently, the getregion() function (included as of patch v9.1.120) takes
3 arguments: the first 2 arguments are strings, describing a position,
arg3 is the type string.

However, that is slightly inflexible, there is no way to specify
additional arguments. So let's instead change the function signature to:

getregion(pos1, pos2 [, {Dict}]) where both pos1 and pos2 are lists.
This is slightly cleaner, and gives us the flexibility to specify
additional arguments as key/value pairs to the optional Dict arg.

Now it supports the "type" key to specify the selection type
(characterwise, blockwise or linewise) and now in addition one can also
define the selection type, independently of what the 'selection' option
actually is.

Technically, this is a breaking change, but since the getregion()
Vimscript function is still quite new, this should be fine.

closes: #14090

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 22:49:03 +01:00
d0d4adb609 runtime(Filelist): include runtime/syntax/testdir/ftplugin
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 21:53:26 +01:00
4e141c66b9 patch 9.1.0141: Put in Visual mode wrong if it replaces fold marker
Problem:  Put in Visual mode wrong if it replaces fold marker.
Solution: Temporarily disable folding during put in Visual mode.
          (zeertzjq)

fixes: #14097
closes: #14100

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 21:49:51 +01:00
b1289f19ef runtime(doc): Fix typo under *kitty-terminal* in term.txt
closes: #14106

Signed-off-by: elig0n <31196036+elig0n@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 21:46:15 +01:00
97a35ae356 translation(sr): Update Serbian translation (#14107)
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 21:41:27 +01:00
9ecf02cd5f runtime(java): Recognise _when_ clauses in _switch_ blocks
Also:

- distinguish _yield_ when used as a contextual keyword from
  when used qualified as a method or a method reference (as
  can be seen in testdir/input/java_switch.java, variables
  and method declarations named _yield_ will be recognised
  as the namesake keyword--consider picking other names for
  variables, and defining g:java_highlight_functions to have
  method names painted; since _yield_ statements can have
  trailing parens, they must be recognised as statements,
  for only qualified _yield_ method calls are supported);

- recognise grouped _default_ _case_ labels;

- describe primitive types for _case_ labels (JLS, §14.11,
  §3.10.1);

- recognise some non-ASCII identifiers (see javaLambdaDef,
  javaUserLabel) (further improvement for better recognition
  of identifiers will be arranged in a separate PR).

Because the arrow '->' is used in two kinds of expressions,
lambda (abstractions) and _switch_, necessary changes were
made for the recognition of either (and further improvement
touching lambda expressions will be separately arranged).

Because 'default' is used for instance method declarations
in interfaces and in _switch_ labels, necessary changes were
made for the recognition of either (and further improvement
touching method declarations will be separately arranged).

Finally, it deemed appropriate to put 'yield' in the syntax
group of javaOperator rather than javaStatement, for its
member 'var' is also another contextual keyword (e.g., this
is valid syntax: "var var = var(test.var);").

References:
https://openjdk.org/jeps/361 (Switch Expressions)
https://openjdk.org/jeps/440 (Record Patterns)
https://openjdk.org/jeps/441 (Pattern Matching for switch)

Also, add a Java specific filetype plugin for the syntax
test, so that no soft-wrapping of long indented lines occur.

Otherwise the syntax scripts would miss a few lines during
scrolling and verification of the screen dumps.

closes: #14105

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 21:33:45 +01:00
56824430c0 runtime(syntax-tests): simplify code and allow filetype options
The whole testdir/runtest.vim is a bit of a mess. So this is an attempt
to improving the current state. First of all, let's move most of the
code into a single RunTest() function so that it's easier to run this
manually.

Then, let's add the possibility to customize filetype specific tests by
applying filetype specific options. We will make use of it in the next
commit, where the provided java file uses tabs, which cause line
wrapping which will then cause the scrolling to miss some lines when
redrawing (see #14105)

related: #14105

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-28 21:24:25 +01:00
0c98a71236 translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-27 22:41:22 +01:00
da0c9137d1 patch 9.1.0140: cursor on wrong row after 1 char 'below' virtual text when EOL is shown
Problem:  The cursor screen row was incorrectly being calculated when the
          cursor follows a 1 character text_align 'below' virtual text line,
          resulting in the cursor being shown on the wrong line.
          This was caused by a cell size of 2 instead of 1 being used for the EOL
          character, which propagated to the calculation of space for putting the
          'below' virtual text on its own line. (rickhowe)
Solution: Fix the size used for the EOL character in calculating the
          cursor's screen position (Dylan Thacker-Smith)

fixes: #11959
related: #12028
closes: #14096

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-27 20:25:10 +01:00
e84d2d4432 runtime(sh): Update ftplugin, fix #14101 (#14102)
Add the 'b' flag to 'comments', so that the shebang line is not detected as comment.

Fixes #14101.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-27 20:00:32 +01:00
b1427b46f5 runtime(vim): Update base-syntax, improve :echo highlighting (#14103)
- Normalise behaviour of :echo commands and improve expression matching.
- Allow continued argument lines.
- Refine string interpolation groups.
- Remove duplicated :menu and :map generated commands that are handled
  specially later in the file.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-27 19:59:30 +01:00
c7ddc9b735 runtime(debian): update Debian syntax files (#14098)
* debversions.vim: Move lunar to unsupported release
* debsources: Add word boundaries around keyword match patterns

Co-authored-by: James Addison <jay@jp-hosting.net>
Signed-off-by: James Addison <jay@jp-hosting.net>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-27 06:34:45 +00:00
2f02638aa8 patch 9.1.0139: MS-Windows: ligatures map cleared on startup
Problem:  MS-Windows: ligatures map cleared on startup
Solution: Don't clear the ligatures_map, if the guiligatures
          option has already been set (Erik S. V. Jansson)

If guiligatures is set from a .vimrc it's possible
that it will be cleared on start-up (e.g. in Win32
that's what happens).

So don't clear the ligatures map if gui_set_ligatures()
has already been called (e.g. after setting 'ligatures'
from .vimrc)

closes: #14094

Signed-off-by: Erik S. V. Jansson <caffeineviking@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-26 22:23:05 +01:00
02d7a6c6cf patch 9.1.0138: too many STRLEN calls when getting a memline
Problem:  too many STRLEN calls when getting a memline
Solution: Optimize calls to STRLEN(), add a few functions in memline.c
          that return the byte length instead of relying on STRLEN()
          (John Marriott)

closes: #14052

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-26 21:25:03 +01:00
2c51e15b66 runtime(vim): Update syntax file, improve :substitute matching (#14093)
- Differentiate between :substitute and substitute(), fixes #13883.
- Match all allowed :substitute delimiters.
- Remove leading context from :substitute matches.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-26 21:10:18 +01:00
ff2b79d239 patch 9.1.0137: <Del> in cmdline mode doesn't delete composing chars
Problem:  <Del> in cmdline mode doesn't delete composing chars
Solution: Use mb_head_off() and mb_ptr2len() (zeertzjq)

closes: #14095

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-26 20:38:36 +01:00
db7622ea82 runtime(doc): Fix typo in usr_41.txt
closes: #14092

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-25 15:23:02 +01:00
d086b8f646 runtime(doc): fix inconsistent indent (#14089)
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-25 08:42:52 +01:00
a2ebb6e917 patch 9.1.0136: Vim9: need more test for exists()
methods

Problem:  Vim9: need more test for exists()
Solution: Add test for exists() with class/objct variables and methods
          (Yegappan Lakshmanan)

closes: #14088

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-25 08:40:10 +01:00
374e26aba2 runtime(doc): clarify ':set[l] {option}<' behaviour
closes: #14062

Signed-off-by: Matt Ellis <m.t.ellis@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 17:04:07 +01:00
cd3a13e774 patch 9.1.0135: Insufficient testing for 'delcombine'
Problem:  Insufficient testing for 'delcombine'.
Solution: Add test for both Normal and Insert modes without Arabic.
          (zeertzjq)

closes: #14086

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 16:51:32 +01:00
6a46c19b25 patch 9.1.0134: CI: Test_term_gettitle() is flaky on MacOS 14
Problem:  Test_term_gettitle() is flaky on MacOS 14 and Github runners
Solution: Skip the test on Github CI

closes: #14085

It fails with this: '^\\[No Name\\] - VIM\\d*$' does not match 'e] - VIM'
It is not clear why term_gettitle() only get's the last part of the
expected title (perhaps there is a Carriage return in there or the
terminal window is too small?)

So let's just skip this test for now.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 15:58:04 +01:00
8b1e749ca6 patch 9.1.0133: MS-Windows: ligatures not rendering correctly
Problem:  font ligatures don't render correctly in the Win32 GUI-version
          of gvim even when set rop=type:directx is used. Setting
          guiligatures also doesn't make any difference. This leads to
          broken font ligatures when the cursor passes through them. It
          does not recover from this, and they remain broken until you
          re-render the whole buffer (e.g. by using Ctrl+L).

Solution: the problem is that we only re-draw the current and previous
          character in gui_undraw_cursor() and only have the special case
          for GTK when it comes to rendering ligatures. So let's enable
          gui_adjust_undraw_cursor_for_ligatures() to also happen for
          Win32 GUI if guiligatures is setup correctly (all this does is
          expand the range of gui_undraw_cursor() with ligature characters).

related: #9181
related: #12901
closes: #14084

Signed-off-by: Erik S. V. Jansson <caffeineviking@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 14:26:52 +01:00
048761bcd4 patch 9.1.0132: "C" doesn't include composing chars with 'virtualedit'
Problem:  using "C" and 've=all' set, doesn't include composing chars
          when changing a line, keeps the composing chars for whatever
          is typed afterwards.
Solution: Use mb_head_off() and mb_ptr2len() instead of mb_tail_off().
          (zeertzjq)

closes: #14083

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 14:21:39 +01:00
0dc0bff000 patch 9.1.0131: buffer-completion may not always find all matches
Problem:  buffer-completion code too complicated and does not always
          find all matches (irisjae)
Solution: do not try to anchor pattern to beginning of line or
          directory-separator, always return all matches

Note: we are considering the non-fuzzy buffer-matching here.

Currently, the buffer-completion code makes 2 attempts to match a
pattern against the list of available patterns. First try is to match
the pattern and anchor it to either the beginning of the file name or
at a directory-separator (// or \\).

When a match is found, Vim returns the matching buffers and does not try
to find a match anywhere within a buffer name. So if you have opened two
buffers like /tmp/Foobar.c and /tmp/MyFoobar.c using `:b Foo` will only
complete to the first filename, but not the second (the same happens
with `getcompletion('Foo', 'buffer')`).

It may make sense, that completion priorities buffer names at directory
boundaries, but it inconsistent, may cause confusion why a certain
buffer name is not completed when typing `:b Foo<C-D>` which returns
only a single file name and then pressing Enter (to switch to that
buffer), Vim will error with 'E93: More than one match for Foo').
Similar things may happen when wiping the /tmp/Foobar.c pattern and
afterwards the completion starts completing other buffers.

So let's simplify the code and always match the pattern anywhere in the
buffer name, do not try to favor matches at directory boundaries. This
is also simplifies the code a bit, we do not need to run over the list
of buffers several times, but only twice.

fixes #13894
closes: #14082

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 14:17:33 +01:00
abf7030a5c patch 9.1.0130: [security]: UAF if win_split_ins autocommands delete "wp"
Problem:  heap-use-after-free in win_splitmove if Enter/Leave
          autocommands from win_split_ins immediately closes "wp".
Solution: check that "wp" is valid after win_split_ins.
          (Sean Dewar)

closes: #14078

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 10:20:24 +01:00
f548ae7b63 patch 9.1.0129: Fix truncation of text_wrap 'wrap' virt text after EOL list char
Problem:  Virtual text with text_wrap 'wrap' was effectively being
          truncated by a break conditional on the EOL list character
          being added to the screen line. (BigPeet)
Solution: Remove the condition that was leading to the early break and
          instead fix a similar but incorrectly written outer condition
          that checks if there is more to add at the end of the screen
          line. (Dylan Thacker-Smith)

Also, related:
- update comment in win_line()
- remove no longer necessary at_end_str variable in win_line()

fixes: #12725
closes: #14079

Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 10:17:11 +01:00
a35235e824 runtime(doc) Update help text for matchbufline() and matchstrlist()
closes: #14080

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 10:09:43 +01:00
aa31346da4 runtime(tutor): small fixes to the zh tutor (#14081)
dragonish <no.web.developer@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-24 10:08:19 +01:00
315cd1fbcb runtime(spec): Recognize SourceLicense tag name in RPM spec syntax (#14046)
rpm-4.19.0 added a new SourceLicense tag. It is used at the same place
as License tag.

This patch adds the new tag name into a Vim syntax file to be
highligted the same way as the License tag. Note that it has to be
defined in the syntax file before Source\d* regexp. Otherwise it's not
recognized by Vim.

Signed-off-by: Petr Písař <ppisar@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 20:39:09 +01:00
2a65e73944 patch 9.1.0128: win_gotoid() may abort even when not switching a window
Problem:  win_gotoid() checks for textlock and other things when switching
          to a window that is already current (after v9.1.0119)
Solution: return early with success when attempting to switch to curwin
          (Sean Dewar)

Other potential causes of E565 from win_gotoid after v9.1.0119 should be
correct. Plugins can consider using win_execute() instead if they wish to
temporarily switch windows during textlock.

fixes: #14073
closes: #14074

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 19:53:33 +01:00
5e3674b42d patch 9.1.0127: Naming a non-pointer variable "oap" is strange
Problem:  Naming a non-pointer variable "oap" is strange.
Solution: Rename it to "oa". Also prevent using freed memory in case of
          memory allocation failure. (zeertzjq)

closes: #14075

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 19:51:34 +01:00
421b597470 patch 9.1.0126: Internal error when using upper-case mark in getregion()
Problem:  Internal error when passing mark in another buffer to
          getregion().
Solution: Don't allow marks in another buffer (zeertzjq)

closes: #14076

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Internal error when passing mark in another buffer to getregion()
2024-02-22 19:48:06 +01:00
1624970d32 runtime(vim): Update base-syntax, fix :unabbrev highlighting (#14077)
Fixes issue #7876

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 19:45:05 +01:00
20d61e1b94 runtime(java): add syntax support for Java switch expressions (#9124)
Signed-off-by: Nick Hanley <nicholasjhanley@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-22 15:06:19 +01:00
83925be1e6 patch 9.1.0125: unused init of text_prop_idxs in win_line()
Problem:  unused init of text_prop_idxs in win_line
Solution: Remove it, fix typo
          (Dylan Thacker-Smith)

Later use of text_prop_idxs treats it as empty, incrementing
text_props_active as new elements are added to this array, so remove
this unused conditional initialization when text_props_active is 0.

closes: #14063

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 21:03:10 +01:00
8055721c2d patch 9.1.0124: display of below/right virtual text with non-virtual text overlap
Problem:  Virtual text with text_align 'right'/'below' wasn't being
          used when a non-virtual text property overlaps with the end of
          the line. This was because the non-virtual text property had a
          higher priority, preventing the virtual text from being used.
Solution: Fix the sorting of text properties so virtual text properties
          have a higher priority than non-virtual text properties.
          (Dylan Thacker-Smith)

related: #14063

Signed-off-by: Dylan Thacker-Smith <dylan.ah.smith@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 21:00:59 +01:00
ec9c32637f runtime(doc): clarify expand() for :terminal windows
While adding to the documentation, also mention the rolled-back key-translation
strategy in version9.txt

closes: #14069

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 20:42:16 +01:00
52ecc76c7f patch 9.1.0123: MS-Windows: system() may deadlock
Problem:  MS-Windows: system() may deadlock when calling binaries that
          expect stdin
Solution: Ignore the SHELL_EXPAND flag
          (GuyBrush)

This happens on binaries that expect stdin. For example:

:echo system("xxd")

will cause a deadlock.

SHELL_EXPAND is a flag devoted to support the linux implementation of
the backtick-expansion mechanism.

On linux backtic-expansion relies in the function mch_expand_wildchars()
(os_unix.c) that delegates on each specific shell (bash, sh, csh, zsh)
the expansion. Basically it composes a shell command that does the
expansion and redirects the output to a file and call_shell() it. On
windows backtick-expansion is performed by Vim itself.

On linux SHELL_EXPAND modifies how mch_call_shell_fork() (os_unix.c)
works. This function:

- relies on posix fork() to spawn a child process to execute a
  external command.
- Child and parent process communicate using pipes (or pseudoterminal
  if available).
  User input (type ahead content) is processed in a loop only if
  !(SHELL_EXPAND || SHELL_COOKED).
  Though signals are used to detect Ctrl-C in all cases (the input
  loop is not necessary to interrupt the function).
  In the backtick-expansion the external command is the shell command
  that provides the expansion. For the child redirection:
  -  SHELL_EXPAND replaces stdin, stdout & stderr to /dev/null. This is
     why the shell command composed includes redirection (otherwise
     output would be lost).

  -  !SHELL_EXPAND replaces stdin, stdout & stderr with the parent
     created pipes (or pseudoterminal).
     Note that the use of SIGINT signal prevents mch_call_shell_fork()
     from hanging vim.

On Windows mch_system_piped() (os_win32.c) (which is only used when the
GUI is running) mimics mch_call_shell_fork() (os_unix.c).
Win32 lacks fork() and relies on CreateProcessW() and only has pipe
support (not pseudoterminal) which makes the implementation much
different.

But, the key idea is that windows lacks signals, the OS provides support
for console apps but gvim is not one. The only way of detecting a Ctrl-C
is actually processing user input (type ahead content). By ignoring the
user input under SHELL_EXPAND the function can hang gvim.

Ignoring SHELL_EXPAND flag has no consequence in Windows because as
mentioned above it is only meaningful in linux.

closes: #13988

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 20:16:38 +01:00
9ca335aad2 patch 9.1.0122: Some minor issues with the getregion() function
Problem:  Some minor issues with the getregion() function
Solution: Fix examples in the help, use OP_NOP op_type and MBLOCK
          as motion_type in f_getreg(), update vim syntax to
          for getregion() (Maxim Kim)

```
:xnoremap <CR>
\ <Cmd>echow getregion('v', '.', mode())<CR>
```
`echo` while in visual mode has no visible effect, thus people trying
example might be frustrated as it looks like nothing happens.

So the option is to change it to `echow` or `echom`.
With `echom` it is again has no visible effect but one can at least inspect `:messages`.
On the other hand `echow` showes selected text in a popup window.

```
Can also be used as a |method|: >
'.'->getregion("'a', 'v')
```

Here is the typo, which makes example invalid, should be `("'a", ...`

closes: #14064

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 19:53:02 +01:00
e8f6af6091 runtime(tmux): Update tmux syntax (#14065)
Signed-off-by: Eric Pruitt <eric.pruitt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 19:46:47 +01:00
02fcae02a9 patch 9.1.0121: Infinite loop or signed overflow with 'smoothscroll'
Problem:  infinite loop in win_update with 'smoothscroll' set when
          window width is equal to textoff, or signed integer overflow
          if smaller.
Solution: don't revalidate wp->w_skipcol in that case, as no buffer text
          is being shown. (Sean Dewar)

Don't instead reset w_skipcol; that would lose the scroll position
within the line, which may be undesirable if the window is made wider
later.

Also include changes from the splitmove PR #14042 that I (in my infinite
Git wisdom) forgot to commit. This includes a change to
Test_window_split_no_room to ensure it doesn't fail for some screen
sizes.

Move Test_smoothscroll_in_zero_width_window to test_scroll_opt.vim, as
that file feels more appropriate.

closes: #14068

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 19:40:44 +01:00
3f905ab3c4 patch 9.1.0120: hard to get visual region using Vim script
Problem:  hard to get visual region using Vim script
Solution: Add getregion() Vim script function
          (Shougo Matsushita, Jakub Łuczyński)

closes: #13998
closes: #11579

Co-authored-by: =?UTF-8?q?Jakub=20=C5=81uczy=C5=84ski?= <doubleloop@o2.pl>
Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-21 00:02:45 +01:00
f865895c87 patch 9.1.0119: can move away from cmdwin using win_splitmove()
Problem:  can switch windows while textlocked via f_win_gotoid and
          f_win_splitmove (which also allows switching in the cmdwin).
Solution: Check text_or_buf_locked in f_win_splitmove()
          (Sean Dewar)

While at it, call text_or_buf_locked() in f_win_gotoid() instead of
testing for cmdwin_type() (which text_buf_locked() does and
in addition will also verify that the buffer is not locked).

closes: #14042

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-20 22:05:10 +01:00
704966c254 patch 9.1.0118: Use different restoration strategy in win_splitmove
Problem:  saving and restoring all frames to split-move is overkill now
          that WinNewPre is not fired when split-moving.
Solution: defer the flattening of frames until win_split_ins begins
          reorganising them, and attempt to restore the layout by
          undoing our changes. (Sean Dewar)

This also means we no longer must allocate.

related: #14042

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-20 22:00:33 +01:00
96cc4aef3d patch 9.1.0117: Stop split-moving from firing WinNew and WinNewPre autocommands
Problem:  win_splitmove fires WinNewPre and possibly WinNew when moving
          windows, even though no new windows are created.
Solution: don't fire WinNew and WinNewPre when inserting an existing
          window, even if it isn't the current window. Improve the
          accuracy of related documentation. (Sean Dewar)

Likewise, before this patch, WinClosed was not fired anyway (even for :wincmd
H/J/K/L, which also didn't fire WinNew, but did still fire WinNewPre), despite
documentation saying windows are "closed". Note that :wincmd T actually indeed
works by creating a new window (and closing the old one), unlike the others.

This also fixes issues where WinNewPre is fired when split-moving while curwin
doesn't yet have a frame or entry in the window list, causing many things to not
work (it's not considered valid at that point). This was guaranteed when using
:wincmd H/J/K/L.

Because WinNewPre is no longer fired when split-moving, this makes restoring the
previous window layout on failure easier, as we can be sure that frames are not
resized from WinNewPre autocommands if win_split_ins fails. This allows us to
use a different strategy in the following commit.

--

In my opinion, this leaves questions about the current usefulness of WinNewPre.
A motivation described in #10635 states how creating a new window can steal room
from other windows, and how WinNewPre will be useful for detecting that, but
this is also true when inserting an existing window, which now doesn't fire it.
Maybe the autocommand should be changed to have a better name?

There are also other issues I found with the current implementation of WinNewPre
that need addressing:

- it allows switching windows and tabpages, which can cause incorrect windows to
  be split/moved, and big problems when switching tabpages.

- it fires before win_split_ins checks for room, before it makes any changes to
  window sizes or before it considers allocating a new window. This should be
  changed or documented.

I hope to address some of this stuff in a different PR, if possible.

related: #14038

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-20 21:52:31 +01:00
0fd44a5ad8 patch 9.1.0116: win_split_ins may not check available room
Problem:  win_split_ins has no check for E36 when moving an existing
          window
Solution: check for room and fix the issues in f_win_splitmove()
          (Sean Dewar)

win_split_ins has no check for E36 when moving an existing window,
allowing for layouts with many overlapping zero-sized windows to be
created (which may also cause drawing issues with tablines and such).
f_win_splitmove also has some bugs.

So check for room and fix the issues in f_win_splitmove. Handle failure
in the two relevant win_split_ins callers by restoring the original
layout, and factor the common logic into win_splitmove.

Don't check for room when opening an autocommand window, as it's a
temporary window that's rarely interacted with or drawn anyhow, and is
rather important for some autocommands.

Issues fixed in f_win_splitmove:
- Error if splitting is disallowed.
- Fix heap-use-after-frees if autocommands fired from switching to "targetwin"
  close "wp" or "oldwin".
- Fix splitting the wrong window if autocommands fired from switching to
  "targetwin" switch to a different window.
- Ensure -1 is returned for all errors.

Also handle allocation failure a bit earlier in make_snapshot (callers,
except win_splitmove, don't really care if a snapshot can't be made, so
just ignore the return value).

Note: Test_smoothscroll_in_zero_width_window failed after these changes with
E36, as it was using the previous behaviour to create a zero-width window.
I've fixed the test such that it fails with UBSAN as expected when v9.0.1367 is
reverted (and simplified it too).

related: #14042

Signed-off-by: Sean Dewar <6256228+seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-20 20:35:41 +01:00
15935e7f54 runtime(doc): Add a place holder section for version 9.2 (#14060)
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-20 19:48:22 +01:00
ef387c062b runtime(filetype): Modula-2 files with priority not detected (#14055)
Problem:  Modula-2 files with a specified priority are not detected.
Solution: Match the priority syntax in module header lines when
          performing heuristic content detection.

Disable the :defcompile debug line.  This was accidentally left enabled
in commit 68a8947.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-19 20:58:30 +01:00
72a1f45e93 CI: install gnudiff and enable Test_diffmode on macos-14 runner again (#14056)
Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-19 20:55:55 +01:00
f9ca139e3a runtime(misc): announce adoption of various runtime files
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-19 20:46:49 +01:00
dfcef890cb runtime(vim): Distinguish Vim9 constructor definitions from the :new ex command (#14050)
With the arrival of Vim9 classes, the syntax must allow for
_new_ constructors; multiple constructor definitions are
supported for a class, provided distinct suffix-names are
used.  Currently, the defined constructors match either
vimCommand or vimFunctionError (for any newBar).

For example:
------------------------------------------------------------
vim9script

class Foo
    def new()
    enddef

    def newBar()
    enddef
endclass
------------------------------------------------------------

Since every constructor is required to bear a lower-cased
_new_ prefix name, it should suffice to distinguish them
from functions, and so there are no new highlight or syntax
groups introduced.


Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-18 19:02:14 +01:00
c86bff1771 patch 9.1.0115: Using freed memory with full tag stack and user data
Problem:  Using freed memory with full tag stack and user data
          (Konstantin Khlebnikov)
Solution: Clear the user data pointer of the newest entry.
          (zeertzjq, Konstantin Khlebnikov)

fixes: neovim/neovim#27498
closes: #14053

Co-authored-by: Konstantin Khlebnikov koct9i@gmail.com
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Konstantin Khlebnikov koct9i@gmail.com
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-18 18:57:07 +01:00
026b17404a runtime(doc): Fix typo in testing.txt (#14054)
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-18 18:51:46 +01:00
fcaed6a70f patch 9.1.0114: Setting some options may change curswant
Problem:  Setting some options changes curswant unnecessarily.
Solution: Add a P_HLONLY flag that prevents changing curswant.
          (zeertzjq)

closes: #14044

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-18 09:33:54 +01:00
79230f027a runtime(less): update "Last Change:" header
Commit 103f1dfb7d forgot to update the
"Last Change:" header. So update it now.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-15 22:15:58 +01:00
103f1dfb7d runtime(less): reset readonly setting when disabling less mode
While at it, also do the unmap only if a specific key has been mapped.
There are some keys that are only selectively mapped and it would cause
an error if we are trying to unmap such a key (e.g. z when your
foldmethod is not manual).

fixes: #14040

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-15 21:44:05 +01:00
9071ed8107 patch 9.1.0113: duplicate code when cleaning undo stack
Problem:  duplicate code when cleaning undo stack
Solution: refactor undo cleanup into a single public function

related: #13928

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-15 20:17:37 +01:00
f0d3d4a426 patch 9.1.0112: Remove undo information, when cleaning quickfix buffer
Problem:  When the quickfix buffer has been modified an autocommand
          may invalidate the undo stack (kawarimidoll)
Solution: When clearing the quickfix buffer, also wipe the undo stack

fixes: #13905
closes: #13928

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-15 20:15:04 +01:00
d00fb4b3a2 patch 9.1.0111: filetype: no support for bats files
The '*.bats' file type is for Bash Automated Testing System (BATS)
scripts. BATS scripts are Bash with a special '@test' extension but they
otherwise work with Vim's bash filetype.

See https://github.com/bats-core/bats-core

closes: #14039

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-15 00:17:05 +01:00
5f20f050ef patch 9.1.0110: filetype: add 'Config.in' filetype detection
The 'Config.in' file type is for Buildroot configuration files.
Buildroot Config.in files use the same Kconfig backend as the Linux
kernel's Kconfig files.

Buildroot also has other filename variants that follow "Config.in.*",
they are used to distinguish multiple Config.in files in the same
directory.

See https://buildroot.org/downloads/manual/manual.html#_literal_config_in_literal_file

closes: #14038

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 22:30:06 +01:00
1da0e85816 runtime(asciidoc): include basic ftplugin
closes: #13873

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 22:26:43 +01:00
cf1d65e060 patch 9.1.0109: filetype: no support for its files
Problem:  filetype: no support for its files
Solution: Add detection for *.its files as dts file type
          (Brandon Maier)

The '*.its' file type is for U-Boot Flattened Image Trees (FIT) which
use the flattened devicetree format.

See https://github.com/u-boot/u-boot/blob/master/doc/usage/fit/source_file_format.rst#terminology

closes: #14037

Signed-off-by: Brandon Maier <brandon.maier@collins.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 21:33:40 +01:00
1633de8c35 runtime(vim): Update base-syntax, remove unused vimString region
These were included with the initial release of the syntax file for Vim
5 and were probably intended to allow for syn-region start/skip/end
patterns with a '!' or '+' delimiter.  However, these cases are
currently handled by the vimSynRegPat group.

The removed patterns never match anywhere in the distributed runtime
files and it is believed that this is generally true.

closes: #14035

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 21:28:44 +01:00
fe6d5b0ae4 runtime(vim): Update base-syntax, fix :behave highlighting
closes: #14036

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 21:17:43 +01:00
5c3855bcab runtime(vim): update Vim Syntax generator
- Add missing "Last Change:" line.
- The date on this line in vim.vim is updated by update_date.vim at
  Make time. (I made a mistake in the file path)
- Remove unnecessary "b:loaded_syntax_vim_ex".
- Remove "Base File Date:" line in vim.vim.base
- Add Doug Kearns as Maintainer

closes: #14031

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 21:00:01 +01:00
b1700fb33f patch 9.1.0108: filetype: no support for dtso files
Problem:  filetype: no support for dtso files
Solution: Add detection for *.dtso files as dts file type
          (Markus Schneider-Pargmann)

*.dtso files are devicetree overlay files which have the same syntax as dts or dtsi files.

closes: #14026

Signed-off-by: Markus Schneider-Pargmann <msp@baylibre.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 20:44:28 +01:00
49f2ba6d41 patch 9.1.0107: CI: Fix MacOS-14 tests
Problem:  CI: Fix MacOS-14 tests (after 9.1.0070)
Solution: Re-enable sound tests by granting Mic access,
          disable Test_diff_screen because of buggy MacOS diff
          (non GNU version), re-enable Test_term_gettitle()
          (Yee Cheng Chin)

macos-14 runner was turned on in #13943, but it had to turn off a few
tests in order for CI to run. Re-enable them and fix the underlying
issues.

* `Test_diff_screen`: The test failure is due to a bug in Apple's diff
  utility. Apple introduced a new diff tool based on FreeBSD in macOS 13
  and it has buggy behaviors when using unified diff (`-U0`) and the
  diff is on the first line of the file. Simply disable this test for
  now if we detect Apple diff (instead of the old GNU diff). Can
  re-enable this in the future if Apple fixes the issue.
* `Test_play_event` / `Test_play_silent`: GitHub Actions currently has
  an issue with playing sound in CI in macos-14 runners. It for some
  reason triggers a microphone permission dialog popup which blocks the
  CI action (see https://github.com/actions/runner-images/issues/9330).
  To fix this, add a temporary step in macos-14 to manually allow
  microphone permissions in the runner.
* `Test_term_gettitle`: I could not reproduce the failure, so I just
  turned it on and it seems to run just fine. Maybe it's a timing issue
  and whatnot but either way that should be fixed when we can reproduce
  the issue.

closes: #14032

Signed-off-by: Yee Cheng Chin <ychin.git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 20:34:58 +01:00
34e4a05d02 patch 9.1.0106: Visual highlight hard to read with 'termguicolors'
Problem:  Visual highlight hard to read with 'termguicolors'
          (Maxim Kim)
Solution: Set Visual GUI foreground to black (with background=light)
          and lightgrey (with background=dark)
          (Maxim Kim)

fixes: #14024
closes: #14025

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-14 20:28:17 +01:00
9b53c052d5 runtime(vim): include Vim Syntax generator
fixes: #13939
closes: #14021
related: vim-jp/syntax-vim-ex#28

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-13 21:11:22 +01:00
e71022082d patch 9.1.0105: Style: typos found
Problem:  Style: typos found
Solution: correct them
          (zeertzjq)

closes: #14023

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-13 20:32:04 +01:00
2f9aef42af patch 9.1.0104: Linking fails with -lto because of PERL_CFLAGS
Problem:  Linking fails with -lto because of PERL_CFLAGS
          (Zoltan Toth)
Solution: Filter out -flto argument from Perl CFLAGS.

fixes: #14012

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12 23:14:19 +01:00
f0a9d65e0a patch 9.1.0103: 'breakindentopt' "min" not correct with 'signcolumn'
Problem:  'breakindentopt' "min" works incorrectly with 'signcolumn'.
Solution: Use win_col_off() and win_col_off2().
          (zeertzjq)

closes: #14014

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12 22:53:20 +01:00
b47fbb4083 patch 9.1.0102: settabvar() may change the last accessed tabpage
Problem:  settabvar() may change the last accessed tabpage.
Solution: Save and restore lastused_tabpage.
          (zeertzjq)

closes: #14017

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12 22:50:26 +01:00
bd1232a1fa patch 9.1.0101: upper-case of German sharp s should be U+1E9E
Problem:  upper-case of ß should be U+1E9E (CAPITAL LETTER SHARP S)
          (fenuks)
Solution: Make gU, ~ and g~ convert the U+00DF LATIN SMALL LETTER SHARP S (ß)
          to U+1E9E LATIN CAPITAL LETTER SHARP S (ẞ), update tests
          (glepnir)

This is part of Unicode 5.1.0 from April 2008, so should be fairly safe
to use now and since 2017 is part of the German standard orthography,
according to Wikipedia:
https://en.wikipedia.org/wiki/Capital_%E1%BA%9E#cite_note-auto-12

There is however one exception: UnicodeData.txt for U+00DF
LATIN SMALL LETTER SHARP S does NOT define U+1E9E LATIN CAPITAL LETTER
SHARP S as its upper case version. Therefore, toupper() won't be able
to convert from lower sharp s to upper case sharp s (the other way
around however works, since U+00DF is considered the lower case
character of U+1E9E and therefore tolower() works correctly for the
upper case version).

fixes: #5573
closes: #14018

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12 22:39:40 +01:00
f2d90a3511 patch 9.1.0100: Redrawing can be improved with undo and 'spell'
Problem:  When undoing with 'spell', redrawWinline() is called after
          changed_lines(), while later win_update() sets redraw type to
          UPD_NOT_VALID, even though w_redraw_top and w_redraw_bot are
          still valid.
Solution: Only set redraw type to UPD_NOT_VALID when inserting/deleting
          lines after parts of window has pending redraw, i.e., when
          changed_lines() is called after redrawWinline().
          (zeertzjq)

closes: #14019

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12 20:28:01 +01:00
a0010a186d patch 9.1.0099: Not able to use diff() with 'diffexpr'
Problem:  Not able to use diff() with 'diffexpr'
          (rickhowe, after v9.1.0096)
Solution: Use a default context length of 0, update diff() help text,
          add a test for using diff() with 'diffexpr'
          (Yegappan Lakshmanan)

closes: #14013

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-12 20:24:56 +01:00
6d91227267 runtime(gpg): Mark dangerous use-embedded-filename with WarningMsg
The syntax highlighter is likely to encourage people to use the listed
commands.

But `use-embedded-filename` is a dangerous option that can cause GnuPG
to write arbitrary data to arbitrary files whenever GnuPG encounters
malicious data.

GnuPG upstream explicitly warns against using this option:

https://dev.gnupg.org/T4500
https://dev.gnupg.org/T6972

However, since this is a valid option, we cannot just drop it from the
syntax script. Instead, let's mark it with the WarningMsg highlighting
to make it obvious, that this option is different (and should not be
used for security reasons).

closes: #13961

Co-authored-by: Daniel Kahn Gillmor <dkg@fifthhorseman.net>
Signed-off-by:  Christian Brabandt <cb@256bit.org>
2024-02-11 18:19:45 +01:00
0d3c0a66a3 patch 9.1.0098: CompletionChanged not triggered when new leader added without matches
Problem:  CompletionChanged not triggered when new leader added causing
          no matching item in the completion menu
Solution: When completion is active but no items matched still trigger
          CompletChanged event
          (glepnir)

closes: #13982

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-11 17:52:40 +01:00
efabd7c8d4 patch 9.1.0097: 'breakindent' behaves inconsistently with 'list' and splits
Problem:  'breakindent' behaves inconsistently with 'list' and splits.
Solution: Use 'listchars' from the correct window and handle caching
          properly. Move cheaper comparisons to the top.
          (zeertzjq)

closes: #14008

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-11 17:16:19 +01:00
b614b284ee runtime(vim): Update syntax file (#14009)
- allow comments after :highight commands
- match the bang in a :highlight[!] command
- highlight the bang in :map[!], :menu[!] and :unlet[!] with vimOper
  like all other commands

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-11 17:13:34 +01:00
be156a31c5 patch 9.1.0096: diff() function uses 'diffexpr'
Problem:  diff() function uses 'diffexpr'
          (rickhowe)
Solution: Make diff() always use internal diff(), add support for
          unified diff context length, sort diff() options in help
          (Yegappan Lakshmanan)

fixes: #13989
closes: #14010

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-11 17:08:29 +01:00
52eb0b8677 patch 9.1.0095: tests: test_restricted() fails
Problem:  tests: test_restricted() fails
          (after: v9.1.0091)
Solution: Add a space before the pipecmd and the actual Vim command to
          run

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-10 13:50:54 +01:00
0022148773 patch 9.1.0094: xxd: buffer-overflow when writing color output
Problem:  xxd: buffer-overflow when writing color output
Solution: properly account for the color escape sequences and
          adjust LLEN macro
          (Goffredo Baroncelli)

xxd: crash with higer number of column

xxd writes the data into a buffer before printing. Unfortunately
the buffer doesn't consider the space consumed by the escape
sequences used to change the color of the character.

BEFORE:
$ xxd -Ralways -c 256 /etc/passwd
Segmentation fault (core dumped)

AFTER:
$ ./xxd -Ralways -c 256 /etc/passwd
00000000: 726f 6f74 3a78 3a30 3a30 3a72 6f6f 743a 2f72 [...]

To solve this issue I had to increase the size of the buffer
considering for each byte of data 11 further characters for the
color escape sequence.

closes: #14003

Signed-off-by: Goffredo Baroncelli <kreijack@libero.it>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-10 13:31:06 +01:00
77078276bf patch 9.1.0093: Still a qsort() comparison function that returns result of subtraction
Problem:  Still a qsort() comparison function fuzzy_match_item_compare()
          that returns result of subtraction (after 9.1.0089).
Solution: Use an explicit comparison instead of subtraction.
          (zeertzjq)

closes: #14004

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-10 13:24:03 +01:00
c908371aec patch 9.1.0092: Compiler warning for missing type in scroll_event()
Problem:  Compiler warning for missing type in scroll_event()
          (chdiza)
Solution: Declare display_type explicitly as integer

fixes: #14005

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-10 13:17:16 +01:00
627c950e5b patch 9.1.0091: Syntax test fails when run with non C locale
Problem:  Syntax test fails when run with non C locale
Solution: Run syntax tests with C locale, clean up Xtestscript file,
          strip environment variables from GetVimCommand()
          (h-east)

closes: #14007

Co-authored-by: h-east <h.east.727@gmail.com>
Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-10 13:02:17 +01:00
45932c5c4a patch 9.1.0090: Assigning wrong colors when parsing terminal OSC response
Problem:  Assigning wrong colors when parsing terminal OSC response
Solution: Correctly assign Green and Blue from the terminal response
          (Maxim Kim)

closes: #13981

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 23:11:54 +01:00
415a5a951b runtime(vim): Fix indent after line with literal dict
closes: #13966

Signed-off-by: Andrew Radev <andrey.radev@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 19:46:59 +01:00
e06e437665 patch 9.1.0089: qsort() comparison functions should be transitive
Problem:  qsort() comparison functions should be transitive
Solution: Do not subtract values, but rather use explicit comparisons

Improve qsort() comparison functions

There has been a recent report on qsort() causing out-of-bounds read &
write in glibc for non transitive comparison functions
https://www.qualys.com/2024/01/30/qsort.txt

Even so the bug is in glibc's implementation of the qsort() algorithm,
it's bad style to just use substraction for the comparison functions,
which may cause overflow issues and as hinted at in OpenBSD's manual
page for qsort(): "It is almost always an error to use subtraction to
compute the return value of the comparison function."

So check the qsort() comparison functions and change them to be safe.

closes: #13980

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 19:39:14 +01:00
c9e79e5284 patch 9.1.0088: TextChanged not triggered for :norm! commands
Problem:  TextChanged not triggered for :norm! commands
          (machakann, after v9.0.2031)
Solution: Only reset curbuf->b_last_changedtick if TextChangedI
          was triggered in insert mode (and not blocked)

Note: for unknown reasons, the test fails on Windows (but seems to work
fine when running interactively)

fixes: #13967
closes: #13984

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 19:34:36 +01:00
2975a54f28 patch 9.1.0087: Restoring lastused_tabpage too early in do_arg_all()
Problem:  Restore lastused_tabpage too early in do_arg_all() function it
          will change later in the function.
Solution: Restore lastused_tabpage a bit later, when being done with
          tabpages (glepnir)

closes: #13992

Signed-off-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 19:30:26 +01:00
725c7c31a4 patch 9.1.0086: Problem when scrolling using slow touchpads scroll event
Problem:  Problem when scrolling using slow touchpads scroll event
Solution: better ways to determine if a smooth scroll has ended (when
          available) (lilydjwg)

related: #13997

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 19:24:23 +01:00
c4d4a1e041 patch 9.1.0085: X11 scroll size changes after accessing clipboard
Problem:  X11 scroll size changes after accessing clipboard
          (Ernie Rael)
Solution: use GDK_SCROLL_MASK for X11 and GDK_SMOOTH_SCROLL_MASK for
          Wayland (lilydjwg)

because GDK_SCROLL_SMOOTH events don't work well for x11 (see comments).

fixes #13994
closes: #13997

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 19:13:12 +01:00
bd2f45a6e5 CI: Add Codecov token (#13999)
codecov-action@4 requires a token.
Add it to the repository secrets.

See: https://github.com/vim/vim/pull/13978#issuecomment-1935336624

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 18:18:11 +01:00
df23d7f4bd patch 9.1.0084: Visual hl wrong when it ends before multibyte 'showbreak'
Problem:  Visual hl wrong when it ends before multibyte 'showbreak'.
          (lacygoil)
Solution: Use vcol_sbr instead of adding n_extra.
          (zeertzjq)

fixes: #11272
closes: #13996

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-09 18:14:12 +01:00
ae07ebc04b patch 9.1.0083: Redrawing can be improved when deleting lines with 'number'
Problem:  Redrawing can be improved when inserting/deleting lines with 'number'.
Solution: Only redraw the number column of lines below changed lines.
          Add a test as this wasn't previously tested.
          (zeertzjq)

closes: #13985

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-08 11:37:40 +01:00
7ce34c9a94 patch 9.1.0082: Redrawing can be improved when deleting lines with 'cursorline'
Problem:  Redrawing can be improved when deleting lines with 'cursorline'.
Solution: Use smarter invalidation and adjustment.  Remove unnecessary
          UPD_VALID as it is already set at the top of the loop.  Make
          the test for #4862 fail without the fix.
          (zeertzjq)

closes: #13986

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-08 11:34:55 +01:00
b8170143c8 runtime(doc): further improve docs about List/Blob += operator
closes: #13990

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-08 11:23:22 +01:00
1efb1b08a1 patch 9.1.0081: X11 mouse-scrolling stutters
Problem:  X11 mouse-scrolling stutters
          (Ron Aaron, after 9.1.0064)
Solution: Handle GDK_SCROLL_SMOOTH fractional distance events
          (lilydjwg)

I don't know why, but with GDK_SMOOTH_SCROLL_MASK we get wheel events as
GDK_SCROLL_SMOOTH. What's more, one wheel scroll is counted as 1.5
distance in Wayland but 1.0 in X11.

I failed to find any docs on gtk.org about this.

fixes: #13987
closes: #13991

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-08 11:04:21 +01:00
c9c2e2d2ff runtime(doc): Clarify list-concatenation a bit more
Make doc list-concatenation more clear as for += and extend().

1. describe `+=` for list-concatenation more accurately
2. add `extend()` example for list-concatenation
3. Fix CI errors for missing helptags reference |+=|

closes: #13983

Signed-off-by: qeatzy <qeatzy@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-07 17:56:35 +01:00
1af35631f8 patch 9.1.0080: unexpected error for modifying final list using +=
Problem:  unexpected error for modifying final list using += operator
          (Ernie Rael)
Solution: Allow List value modification of a final variable using +=
          operator
          (Yegappan Lakshmanan)

fixes: #13745
fixes: #13959
closes: #13962

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 11:03:36 +01:00
ebfd856cfd patch 9.1.0079: LineNrAbove/Below highlighting wrong on wrapped lines
Problem:  LineNrAbove and LineNrBelow background wrong on wrapped lines.
Solution: Update number column also for wrapped part of a line.
          (zeertzjq)

closes: #13974

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 10:59:03 +01:00
f7f33e3719 runtime(dosbatch): improve '::' comment highlighting
Added a syntax region for command blocks so that the highlighting of
`::` comments in them can be controlled.  The `dosbatch_colons_comment`
variable now controls if all `::` comments in a code block are
highlighted as comments or errors.  A `::` comment at the end of a
command block is always highlighted as an error.

This re-enables the highlighting of `::` comments in `.bat` files as
requested in #13666, while allowing control of highlighting them in
command blocks requested in #11778 and first attempted in #11980.

related: #11980
fixes: #13666

Co-authored-by: Mike Williams <mikew@globalgraphics.com>
Signed-off-by: Mike Williams <mikew@globalgraphics.com>
Signed-off-by: mevanlc <mevanlc@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 10:56:26 +01:00
b1457d4cb9 patch 9.1.0078: GTK3: using wrong style for pre-edit area
Problem:  GTK3: using wrong style for pre-edit area
Solution: remove the widget name, adjust css
          (lilydjwg)

closes: #13972

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 10:49:14 +01:00
7f630e6f35 CI: skip apt upgrade on github runners (#13975)
Revert: https://github.com/vim/vim/pull/13680
Fixed in: https://github.com/actions/runner-images/issues/9016

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 10:47:49 +01:00
ea7f2f29af CI: Bump codecov/codecov-action from 3 to 4 (#13978)
Bumps [codecov/codecov-action](https://github.com/codecov/codecov-action) from 3 to 4.
- [Release notes](https://github.com/codecov/codecov-action/releases)
- [Changelog](https://github.com/codecov/codecov-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/codecov/codecov-action/compare/v3...v4)

---
updated-dependencies:
- dependency-name: codecov/codecov-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 10:46:10 +01:00
3f1b5312e0 patch 9.1.0077: Unnecessary call to redraw_for_cursorline() in nv_mousescroll()
Problem:  The call to redraw_for_cursorline() in nv_mousescroll() is
          unnecessary because redraw_for_cursorline() only sets redraw
          type to UPD_VALID, and all code paths in do_mousescroll()
          already set redraw type to at least UPD_VALID.
Solution: Remove call to redraw_for_cursorline() in nv_mousescroll().
          (zeertzjq)

closes: #13979

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-06 10:43:36 +01:00
0f4054feb6 runtime(colors): color names in the v:colornames dict should be lower cased
Vim will lookup color names from the v:colornames dictionary by its
lower case color name. So when sourcing the v:colornames dictionary,
make sure to convert upper case color names to lower case.

Also, while at it, mention in the documentation, that the dictionary
should contain lower case names only.

fixes: #13976
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-05 10:34:26 +01:00
de7f5bde6c patch 9.1.0076: luau config file not detected
Problem:  luau config file not detected
          (lopy)
Solution: Detect it as jsonc
          (lopy)

fixes: #13960
closes: #13970

Signed-off-by: lopy <70210066+lopi-py@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-04 10:27:33 +01:00
7c5aeaffa2 runtime(vim): Update syntax file (#13969)
Improve string interpolation highlighting.

Use the vimSep group to highlight interpolation braces as vimOperParen
has no highlighting of its own and employs vimSep via matchgroup.

Add vimNumber to the interpolation group's contained list.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-03 18:18:31 +01:00
cbb46b4398 patch 9.1.0075: insert completion not correct when adding new leader
Problem:  insert completion not correct when adding new leader
Solution: Reset compl_curr_match to compl_shown_match
          (glepnir)

closes: #13957

Co-authored-by: glepnir <glephunter@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-03 18:11:13 +01:00
eac3fdcfa0 patch 9.1.0074: did_set_breakat() should be in optionstr.c
Problem:  did_set_breakat() should be in optionstr.c as 'breakat' is a
          string option.
Solution: Move did_set_breakat() to optionstr.c.
          (zeertzjq)

closes: #13958

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-03 18:08:09 +01:00
0c989e4a3a patch 9.1.0073: Looping over modifier_keys_table unnecessarily
Problem:  Looping over modifier_keys_table[] unnecessarily with only
          MOD_MASK_ALT or MOD_MASK_CMD, as modifier_keys_table[] only
          contains MOD_MASK_SHIFT and MOD_MASK_CTRL, and the loop won't
          do anything.
Solution: Remove MOD_MASK_ALT and MOD_MASK_CMD from the condition.
          (zeertzjq)

closes: #13963

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-03 18:05:38 +01:00
609370392a patch 9.1.0072: Not able to build without FEAT_DIFF
Problem:  Not able to build without FEAT_DIFF
          (John Marriott, after 9.1.0071)
Solution: Adjust #ifdefs
          (Yegappan Lakshmanan)

closes: #13964

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-03 17:41:54 +01:00
2d205d0a95 translation(ca): Fixe typos in Catalan translation (#13968)
Signed-off-by: Jordi Mas <jmas@softcatala.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-03 17:40:03 +01:00
fa37835b8c patch 9.1.0071: Need a diff() Vim script function
Problem:  Need a diff() Vim script function
Solution: Add the diff() Vim script function using the
          xdiff internal diff library, add support for
          "unified" and "indices" mode.
          (Yegappan Lakshmanan)

fixes: #4241
closes: #12321

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 22:05:27 +01:00
1226b0584a translation(ru): Updated Russian translation of messages (#13947)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:45:32 +01:00
e3e3934bb1 runtime(vim): Update syntax file (#13948)
Improve string escape sequence and special key matching.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:44:26 +01:00
9204f39580 runtime(fortran): update syntax (#13953)
* runtime (Fortran) update syntax
* runtime (Fortran) small fix

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:43:01 +01:00
e93d5cadec patch 9.1.0070: CI: testsuite not run on M1 Mac
Problem:  CI: testsuite not run on M1 Mac
Solution: Make it run on gh runners for M1, disable failing tests for
          now, until we figure the problem with the failings tests out
          (rhysd)

closes: #13943

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:22:14 +01:00
fd472655a9 patch 9.1.0069: ScreenLines may not be correctly initialized, causing hang
Problem:  ScreenLines may not be correctly initialized, causing hang
          (Olaf Seibert, after 9.0.0220)
Solution: always initialize ScreneLines when allocating a screen
          (Olaf Seibert)

ScreenLines and related structures could be left uninitialized
causing a screen update to run into an infinite loop when using latin1
encoding.

Partly caused because by patch 9.0.0220, which makes mb_ptr2len return
zero for NUL

related: #12671
closes: #13946

Signed-off-by: Olaf Seibert <rhialto@falu.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:11:16 +01:00
59bafc8171 patch 9.1.0068: Visual highlighting can still be improved
Problem:  Visual highlighting can still be improved
Solution: Update Visual highlighting for 8 color terminals,
          use uniform grey highlighting for dark and light bg
          (Maxim Kim)

Update terminal Visual

1. Use `ctermbg=Grey ctermfg=Black` for both dark and light

This uniforms Visual highlighting between default dark and light colors
And should work for vim usually detecting light background for terminals
with black/dark background colors.

Previously used `ctermfg=White` leaks `cterm=bold` if available colors
are less than 16.

2. Use `term=reverse cterm=reverse ctermbg=NONE ctermfg=NONE`
   for terminals reporting less than 8 colors available

If the terminal has less than 8 colors, grey just doesn't work right

closes: #13940

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-02-01 21:07:51 +01:00
e1cd1fda69 patch 9.1.0067: gcc still complains about use of uninitialized var
Problem:  gcc still complains about use of uninitialized var
          ((Tony Mechelynck, after 9.1.0064/9.1.0066))
Solution: This time init the correct variable

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 22:12:57 +01:00
83f627ff42 runtime(racket): add missing space to b:undo_indent var (#13945)
This copies commit 2a4862a (fixup! indent: only reset some options when
has vim9, 2024-01-31) from https://github.com/benknoble/vim-racket and
fixes 26b0176a9 (runtime(racket): undo some indent options only when
vim9script is available (#13935), 2024-01-30).

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:53:55 +01:00
f430e7daeb runtime(Filelist): include README_vimlogo.txt (#13944)
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:51:48 +01:00
f2fb7dd3d3 patch 9.1.0066: gcc complains about use of uninitialized var
Problem:  gcc complains about use of uninitialized var
          (Tony Mechelynck, after 9.1.0064)
Solution: initialize button to silence gcc

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:29:07 +01:00
ece7145689 runtime(vimlogo): Include and modernize vimlogo.svg
fix degenerate splines in vimlogo.svg

closes: #13941

Signed-off-by: Shay Hill <shay_public@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:15:03 +01:00
c46c21b4ca runtime(netrw): fixing remote file removal via ssh (#13942)
Make pattern, which retrieves the path component from e.g. 
`scp://user@host//opt/program/file.ext` non-greedy.

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:07:17 +01:00
0a3d369687 CI: get rid of snap and speed up CI (#13938)
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:04:22 +01:00
28db30ddb1 CI: update clang to v18 (#13937)
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-31 20:02:10 +01:00
8fecb472c4 runtime(doc): correct Vim patch for Wayland support
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-30 23:37:41 +01:00
26b0176a98 runtime(racket): undo some indent options only when vim9script is available (#13935)
This copies commit 64edf95 (indent: only reset some options when has
vim9, 2024-01-30) from https://github.com/benknoble/vim-racket.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-30 23:32:59 +01:00
1b7fbe726a runtime(doc): Update help for Wayland support
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-30 20:41:53 +01:00
fef6630166 patch 9.1.0065: Segfault with CompleteChanged autocommand
Problem:  Segfault with CompleteChanged autocommand
          (markonm )
Solution: Test match->cp_prev for being NULL before accessing it

closes: #13929

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-29 21:49:36 +01:00
6e0a18f82b patch 9.1.0064: No Wayland support
Problem:  No Wayland support
Solution: Add Wayland UI support
          (lilydjwg)

closes: #9639

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-29 20:54:28 +01:00
94ff09a093 patch 9.1.0063: GTK code can be improved
Problem:  GTK code can be improved
Solution: Improve GTK code for initial Wayland support
          (lilydjwg)

related: #9639

Signed-off-by: lilydjwg <lilydjwg@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-29 20:18:22 +01:00
e99f068878 patch 9.1.0062: Internal error when :luado/perldo/pydo etc delete lines
Problem:  Internal error when :luado/perldo/pydo etc delete lines
Solution: Test that the line is still valid line number
          (zeertzjq)

closes: #13931

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-29 19:32:39 +01:00
e6d8b4662d patch 9.1.0061: UX of visual highlighting can be improved
Problem:  UX of visual highlighting can be improved
Solution: Improve readibility of visual highlighting,
          by setting better foreground and background
          colors

The default visual highlighting currently is nice in that it overlays
the actual syntax highlighting by using a separate distinct background
color.

However, this can cause hard to read text, because the contrast
between the actual syntax element and the background color is way too
low. That is an issue, that has been bothering colorschemes authors for
quite some time so much, that they are defining the Visual highlighting
group to use a separate foreground and background color, so that the
syntax highlighting vanishes, but the text remains readable (ref:
vim/colorschemes#250)

So this is an attempt to perform the same fix for the default Visual
highlighting and just use a default foreground and background color
instead of using reverse.

I also removed the hard-coded changes to the Visual highlighting in
init_highlight. It's not quite clear to me, why those were there and not
added directly to the highlighting_init_<dark|light> struct.

closes: #13663
related: vim/colorschemes#250

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 23:38:28 +01:00
bdb9d9afba runtime(netrw): Use :exec norm! <leftmouse> before :call mapping in netrw (#12180)
fixes: #12143

Signed-off-by: user202729 <25191436+user202729@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 23:29:21 +01:00
bf321806bf patch 9.1.0060: Recorded register cannot be translated using keytrans()
Problem:  Recorded register cannot be translated using keytrans() when
          it involves character search (iddqd505)
Solution: Record a K_IGNORE instead of a K_NOP (zeertzjq)

related: #13916
closes: #13925

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 19:03:00 +01:00
cf8695d48c runtime(vim): Highlight string interpolation
closes: #13923

Signed-off-by: thinca <thinca@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 18:58:14 +01:00
21ce159e05 runtime(vim): Update syntax and ftplugin files (#13924)
Improve matching of line-continuations and interspersed comments.

These are now also matched in multiline syntax command patterns,
dictionary literals, and parenthesised expressions and argument lists.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-28 18:54:08 +01:00
0cc6108fea runtime(ant): Update syntax file (#13926)
Remove invalid display option from syn-keyword commands.

Take over maintenance of this file.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-27 18:20:46 +01:00
772f8f5425 runtime(hurl): add hurl filetype plugin(#13921)
Signed-off-by: Melker Ulander <melker.ulander@pm.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-27 11:26:14 +01:00
b418a51933 runtime(vim): Update syntax file (#13919)
Add foreach() function.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-27 11:24:45 +01:00
4d49643c3c runtime(doc): style fixes in vim9.txt (#13918)
Remove backticks and a few other style fixes

Signed-off-by: h-east <h.east.727@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-27 11:22:28 +01:00
1f47db75fd patch 9.1.0059: No event triggered before creating a window
Problem:  No event is triggered before creating a window.
          (Sergey Vlasov)
Solution: Add the WinNewPre event (Sergey Vlasov)

fixes: #10635
closes: #12761

Signed-off-by: Sergey Vlasov <sergey@vlasov.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 23:07:00 +01:00
92e90a1e10 patch 9.1.0058: Cannot map Super Keys in GTK UI
Problem:  Cannot map Super Keys in GTK UI
          (Casey Tucker)
Solution: Enable Super Key mappings in GTK using <D-Key>
          (Casey Tucker)

As a developer who works in both Mac and Linux using the same keyboard,
it can be frustrating having to remember different key combinations or
having to rely on system utilities to remap keys.

This change allows `<D-z>` `<D-x>` `<D-c>` `<D-v>` etc. to be recognized
by the `map` commands, along with the `<D-S-...>` shifted variants.

```vimrc
if has('gui_gtk')
	nnoremap  <D-z>    u
	nnoremap  <D-S-Z>  <C-r>
	vnoremap  <D-x>    "+d
	vnoremap  <D-c>    "+y
	cnoremap  <D-v>    <C-R>+
	inoremap  <D-v>    <C-o>"+gP
	nnoremap  <D-v>    "+P
	vnoremap  <D-v>    "-d"+P
	nnoremap  <D-s>    :w<CR>
	inoremap  <D-s>    <C-o>:w<CR>
	nnoremap  <D-w>    :q<CR>
	nnoremap  <D-q>    :qa<CR>
	nnoremap  <D-t>    :tabe<CR>
	nnoremap  <D-S-T>  :vs#<CR><C-w>T
	nnoremap  <D-a>    ggVG
	vnoremap  <D-a>    <ESC>ggVG
	inoremap  <D-a>    <ESC>ggVG
	nnoremap  <D-f>    /
	nnoremap  <D-g>    n
	nnoremap  <D-S-G>  N
	vnoremap  <D-x>    "+x
endif
```

closes: #12698

Signed-off-by: Casey Tucker <dctucker@hotmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 22:44:00 +01:00
6a02eb073e patch 9.1.0057: MS-Windows: Key event test still fails
Problem:  MS-Windows: Key event test still fails
Solution: Skip testing CTRL-C, since it causes an Interrupt
          which causes a test failure (after 9.1.0053)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 22:28:37 +01:00
6638ec8afa patch 9.1.0056: wrong number of trailing spaces inserted after blockwise put
Problem:  Incorrect number of trailing spaces inserted for multibyte
	  characters when pasting a blockwise register in blockwise visual
          mode (VanaIgr)
Solution: Skip over trailing UTF-8 bytes when computing the number of trailing
          spaces (VanaIgr)

When pasting in blockwise visual mode, and the register type is <CTRL-V>, Vim
aligns the text after the replaced area by inserting spaces after pasted
lines that are shorter than the longest line. When a shorter line contains
multibyte characters, each trailing UTF-8 byte's width is counted in addition
to the width of the character itself. Each trailing byte counts as being 4
cells wide (since it would be displayed as <xx>).

closes: #13909

Signed-off-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 21:58:33 +01:00
78019df645 patch 9.1.0055: formatting long lines is slow
Problem:  formatting long lines is slow
          (kawaii-Code)
Solution: optimize gq (internal_format) for long
          lines (kawaii-Code)

Implemented two workarounds that significantly reduce
the amount of pointless calls. Ideally the algorithm
would be rewritten not to be n^2, but it's too complicated
with too many corner cases.

closes: #13914

Signed-off-by: kawaii-Code <nia.personal.0@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 21:40:05 +01:00
703f9bc943 patch 9.1.0054: 'linebreak' may still apply to leading whitespace
Problem:  'linebreak' may still apply to leading whitespace
          (VanaIgr)
Solution: Compare pointers instead of virtual columns.
          (zeertzjq)

related: neovim/neovim#27180
closes: #13915

Co-authored-by: VanaIgr <vanaigranov@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 21:28:56 +01:00
12b9277672 patch 9.1.0053: MS-Windows: Key event test still fails
Problem:  MS-Windows: Key event test still fails
Solution: Catch more interrupts
          (after 9.1.0051)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 21:23:22 +01:00
fa8c971558 patch 9.1.0052: Patch 9.1.0041 causes regressions for users
Problem:  Patch 9.1.0041 causes regressions for users
          (Gleb Fotengauer-Malinovskiy)
Solution: Revert 9.1.0041 and restore old behaviour

Revert "patch 9.1.0041: xxd -i may generate incorrect C statements"

This reverts commit 7062be1312.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 20:50:49 +01:00
f6ebaa7ae6 patch 9.1.0051: MS-Windows: Key event test fail
Problem:  MS-Windows: Key event test fail
          (after 9.1.0050)
Solution: Catch Interrupt and return Ctrl-C

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 20:44:49 +01:00
046a0f75d0 runtime(mail): fix #13913 (#13917)
switch to the DFA engine for the emoji collaction range

Co-authored-by: GI <gi1242+vim@gmail.com>
Signed-off-by: GI <gi1242@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-25 19:52:47 +01:00
a262d3f41b runtime(netrw): Don't change global options (#13910)
Originally reported at: https://github.com/vim-jp/issues/issues/1428
'isk' was unintentionally changed by netrw, regression
introduced in Commit: 71badf9547

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-24 20:10:19 +01:00
e1ddc2d587 runtime(fortran): update syntax and documentation (#13912)
* runtime (doc): update Fortran section
* runtime(syntax): Complete support for Fortran 2023.
   Minor improvements.

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-24 20:08:34 +01:00
68d9472c65 patch 9.1.0050: Win32 Keyboard handling is sub-optimal
Problem:  Win32 Keyboard handling is sub-optimal and has
          many issues with international keyboards
          (risa2000) (after v8.2.4807)
Solution: soft-rollback the change, allow the user to select
          a suitable key-translation strategy
          (Anton Sharonov)

Read about the details in the help:
    :h w32-experimental-keycode-trans-strategy

fixes: #10615
fixes: #12595
closes: #12752

Signed-off-by: Anton Sharonov <anton.sharonov@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 23:19:02 +01:00
1fb4103206 patch 9.1.0049: Make "[Command Line]" a special buffer name
Problem:  E95 is possible if a buffer called "[Command Line]" already
          exists when opening the cmdwin. This can also happen if the
          cmdwin's buffer could not be deleted when closing.

Solution: Un-name the cmdwin buffer, and give it a special name instead,
          similar to what's done for quickfix buffers and for unnamed
          prompt and scratch buffers. As a result, BufFilePre/Post are
          no longer fired when opening the cmdwin. Add a "command" key
          to the dictionary returned by getbufinfo() to differentiate
          the cmdwin buffer instead. (Sean Dewar)

NOTE: This is technically a breaking change... maybe this needs a different
solution? (Or maybe this issue can be ignored...)

A GitHub search reveals some plugins expect the old behaviour. However, many of
those plugins also do not seem to account for the string being translated, so
they are subtly broken anyway (not withstanding the fact that you can call any
old buffer "[Command Line]" too...)

closes: #12819

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 22:37:39 +01:00
43b395ec2e patch 9.1.0048: Abort opening cmdwin if autocmds screw things up
Problem:  Autocmds triggered from opening the cmdwin (in win_split and
          do_ecmd) can cause issues such as E199, as the current checks
          are insufficient.

Solution: Commands executed from the cmdwin apply to the old curwin/buf,
          so they should be kept in a "suspended" state; abort if
          they've changed. Also abort if cmdwin/buf was tampered with,
          and check that curwin is correct. Try to clean up the cmdwin
          buffer (only if hidden and non-current to simplify things; the
          same approach is used when closing cmdwin normally), and add a
          beep. (Sean Dewar)

It'd be nice to also check that curwin was *really* created by win_split, as
autocommands can change curwin before it returns (so it can't be assumed to be
that of the split); for now, this means that the cmdwin may not be the botwin in
that case, which is probably OK.

closes: #12819

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 22:35:05 +01:00
988f74311c patch 9.1.0047: issues with temp curwin/buf while cmdwin is open
Problem:  Things that temporarily change/restore curwin/buf (e.g:
          win_execute, some autocmds) may break assumptions that
          curwin/buf is the cmdwin when "cmdwin_type != 0", causing
          issues.

Solution: Expose the cmdwin's real win/buf and check that instead. Also
          try to ensure these variables are NULL if "cmdwin_type == 0",
          allowing them to be used directly in most cases without
          checking cmdwin_type. (Sean Dewar)

Alternatively, we could ban win_execute in the cmdwin and audit all places that
temporarily change/restore curwin/buf, but I didn't notice any problems arising
from allowing this (standard cmdwin restrictions still apply, so things that may
actually break the cmdwin are still forbidden).

closes: #12819

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 22:31:55 +01:00
4927110a43 CI: regenerate helptags to fix CI job
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 22:29:47 +01:00
ca0e9823a1 runtime(c): Highlight user defined functions
closes: #13763

Signed-off-by: Luca Saccarola <github.e41mv@aleeas.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 21:34:09 +01:00
f96dc8d07f patch 9.1.0046: :drop does not re-use empty buffer
Problem:  :drop does not re-use empty buffer
          (Rocco Mao)
Solution: Make :drop re-use an empty buffer
          (Rocco Mao)

fixes: #13851
closes: #13881

Signed-off-by: Rocco Mao <dapeng.mao@qq.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 21:27:19 +01:00
cc979b49dc patch 9.1.0045: --remote-* does not ignore wilidignore
Problem:  --remote-silent applies the wildignore option
          to each argument, which may result in "E479: No match"
          (hebaronson)
Solution: temporarily reset 'wildignore' setting when building
          the :drop command

closes: #13835

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 21:16:54 +01:00
e13b665a6e runtime(doc): change "VIsual mode" to "Visual mode" in :h SafeState (#13901)
"Visual mode" is used everywhere else in the help when not referring to
something in the source code.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 20:39:04 +01:00
4231ad0852 translation(hu): use correct encoding in header of hu po file (#13902)
closes: #13900 

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 20:38:07 +01:00
9c5b90db03 runtime(vim): Update syntax file (#13906)
Highlight :2match and :3match and add these to :help ex-cmd-index.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 20:34:28 +01:00
50dbe16cd8 runtime(qml): Use shiftwidth() in indent plugin (#13908)
Fixes #13907

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 20:33:32 +01:00
7de2b7c891 translation(it): Update Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 19:51:05 +01:00
GI
36e2c0f293 runtime(mail): updated syntax file
Signed-off-by: GI <gi1242@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-23 19:48:08 +01:00
459867b631 runtime(doc): improve doc makefiles, add clean rule (#13855)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:42:44 +01:00
e8ff5e6df4 runtime(lang): improve makefiles, add clean rule, fix typo (#13856)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:41:47 +01:00
76ba724e1d patch 9.1.0044: po Makefiles can be improved
Problem:  po Makefiles can be improved
Solution: Improve the style of the Makefiles, update
          Makefile variables, update documentation
          (RestorerZ)

closes: #13858
closes: #13857

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:38:38 +01:00
91155eb31f runtime(tutor): simplify tutor makefiles (#13859)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:25:43 +01:00
add31baeda runtime(sh): Add handling for ksh93 shared-state comsubs and mksh valsubs (#13884)
This commit adds support for ksh93 shared-state command
substitutions (syntax: ${ command; }) and mksh's value
substitutions (syntax: ${|command;}) in the sh syntax script.

Also add a syntax test for ksh subshares with dumps included
to make sure it doesn't regress.

fixes: #9514

Signed-off-by: Johnothan King <johnothanking@protonmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:19:54 +01:00
7c71db3a58 patch 9.1.0043: ml_get: invalid lnum when :s replaces visual selection
Problem:  ml_get: invalid lnum when :s replaces visual selection
          (@ropery)
Solution: substitute may decrement the number of lines in a buffer,
          so validate, that the bottom lines of the visual selection
          stays within the max buffer line

fixes: #13890
closes: #13892

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:12:34 +01:00
3b2c27415d runtime(chuck): include ChucK syntax file (#13895)
Co-authored-by: gacallea <gacallea@users.noreply.github.com>
Signed-off-by: gacallea <gacallea@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:10:42 +01:00
ea9a93e5b0 runtime(go): update Go syntax file (#13896)
Update the Go syntax file with some recent changes made to vim-go.

Signed-off-by: Billie Cleek <bhcleek@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:08:44 +01:00
1cee50904e CI: Bump actions/cache from 3 to 4 (#13897)
Bumps [actions/cache](https://github.com/actions/cache) from 3 to 4.
- [Release notes](https://github.com/actions/cache/releases)
- [Changelog](https://github.com/actions/cache/blob/main/RELEASES.md)
- [Commits](https://github.com/actions/cache/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/cache
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-22 20:06:01 +01:00
c1884c94c5 patch 9.1.0042: Missing test for Chuck Filetype
Problem:  Missing test for Chuck filetype
          after commit 27a4632af6
          (Christian Clason)
Solution: Add a filetype test

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-21 09:40:22 +01:00
d08e437802 translation(sr): Update Serbian messages translation (#13889)
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-19 23:31:39 +01:00
27a4632af6 runtime(filetype): detect *.ck files as Chuck filetype (#13888)
closes #13886

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-19 23:30:34 +01:00
7062be1312 patch 9.1.0041: xxd -i may generate incorrect C statements
Problem:  xxd -i may generate incorrect C statements
          (Kuratius)
Solution: xxd: Make size type returned by -i option compatible
          with C standard by using type size_t instead of
          unsigned int (Kuratius)

Also change affected tests to now correctly expect size_t's

fixes: #13876
closes: #13880

Signed-off-by: Kuratius <Kuratius@gmx.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 22:34:51 +01:00
f942db2557 runtime(man): man on AIX does not understand -l
fixes: #13847

Co-authored-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:55:41 +01:00
46d67d22b9 runtime(swayconfig): add focus_follows_mouse and smart_qaps syntax keywords
See:
0aceff7469/sway/sway.5.scd (L680)
`focus_follows_mouse yes|no|always`
0aceff7469/sway/sway.5.scd (L770)

closes: #13797

Signed-off-by: James Eapen <james.eapen@vai.org><author>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:43:31 +01:00
a39af02904 runtime(i3config): remove always from focus_follows_mouse
The always option does not exist in i3, only sway.

From https://i3wm.org/docs/userguide.html:
`focus_follows_mouse yes|no`

Version number incremented by 2 because the last commit did not
increment the version.

Signed-off-by: James Eapen <james.eapen@vai.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:43:12 +01:00
6e5a6c9965 runtime(netrw): minor changes to fix move cmd on windows (#13823)
Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:35:36 +01:00
f267847017 patch 9.1.0040: issue with prompt buffer and hidden buffer
Problem:  Modifying a hidden buffer still interferes with prompt buffer
          mode changes.
Solution: Save and restore b_prompt_insert.
          (zeertzjq)

closes: #13875

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Modifying hidden buffer still interferes with prompt buffer mode changes
2024-01-17 21:22:59 +01:00
6a8d2e1634 patch 9.1.0039: too vague errors for 'listchars'/'fillchars'
Problem:  too vague errors for 'listchars'/'fillchars'
Solution: Include the field name in error message.
          (zeertzjq)

related: neovim/neovim#27050
closes: #13877

Co-authored-by: Cole Frankenhoff <cole.nhf@gmail.com>
Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 21:07:08 +01:00
4ea37f88e8 patch 9.1.0038: Unnecessary loop in getvcol()
Problem:  Unnecessary loop in getvcol().
Solution: Compare next char position with pos->col directly.
          (zeertzjq)

The loop below already handles end of line before checking for posptr,
and the next char is after pos->col whether pos->col is at the start or
in the middle of the char in question, so neither the NUL check nor the
mb_head_off() are needed when comparing the position of the next char
with pos->col directly.

closes: #13878

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 20:52:13 +01:00
5b0722b864 patch 9.1.0037: Calling get_breakindent_win() repeatedly when computing virtcol
Problem:  Calling get_breakindent_win() repeatedly when computing
          virtual column, and get_breakindent_win() does a STRCMP() on
          the whole line since patch 9.0.0016.
Solution: Cache the result, since the line doesn't change.
          (zeertzjq)

closes: #13879

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 20:42:53 +01:00
73e16c7406 patch 9.1.0036: MS-Windows: Warning about unused variable
Problem:  MS-Windows: Warning about unused variable
          (after 9.1.0030, John Marriott)
Solution: Adjust #ifdef and test for HAVE_TGETENT
          (John Marriott)

Signed-off-by: John Marriott <basilisk@internode.on.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-17 20:19:10 +01:00
211211052d runtime(odin): include ftplugin, syntax and indent script (#13867)
Note for Neovim Contributors: this is bundled as Vim9 Script. If you want to use this on Neovim, you need to convert the Vim9 scripts to Vim Script or Lua or leave it out.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-16 17:33:51 +01:00
7d711fe209 patch 9.1.0035: i_CTRL-] triggers InsertCharPre
Problem:  i_CTRL-] triggers InsertCharPre
Solution: Return if CTRL-] is received. InsertCharPre
          is supposed to be only used for chars to be inserted
          but i_CTRL-] triggers expansion and is not inserted
          into the buffer (altermo)

closes: #13853
closes: #13864

Signed-off-by: altermo
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-16 17:25:17 +01:00
ac4cffc6d9 patch 9.1.0034: Window scrolls unexpectedly when 'scrollbind' is set
Problem:  Window may unexpectedly scroll when 'scrollbind' is set
          and setting a buffer-local option using setbufvar()
          (Boris Staletic)
Solution: Save and restore the windows topline before opening the
          popup window.

fixes: #13863
closes: #13869

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-16 17:22:38 +01:00
96958366ad patch 9.1.0033: Insert mode not stopped if closing prompt buffer modifies hidden buffer
Problem:  Insert mode not stopped if an autocommand modifies a hidden
          buffer while closing a prompt buffer.
Solution: Don't set b_prompt_insert if stop_insert_mode is already set.
          (zeertzjq)

closes: #13872

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-16 17:21:04 +01:00
1a9aba8ad4 patch 9.1.0032: MS-Windows installer misses keymaps
Problem:  MS-Windows installer misses keymaps
          (Maxim Kim)
Solution: Include keymaps in the installer archive
          (Ken Takata)

fixes: vim/vim-win32-installer#331
closes: #13871

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-16 17:14:29 +01:00
4afda3307d patch 9.1.0031: Link Error on Windows
Problem:  Link Error on Windows
Solution: Add ifdef HAVE_TGETENT for term_strings_not_set()

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-15 22:52:49 +01:00
ef79c57837 runtime(fortran): update fortran syntax (#13870)
Support most remaining features of Fortran 2018/2023
Small improvements to folding etc,
Code cleanup: use \? instead of mix of \= and \?

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-15 22:42:03 +01:00
9c58191b34 CI: regenerate helptags, fix ci help tags job failing
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-15 22:39:54 +01:00
a606f3ac03 patch 9.1.0030: Cannot use terminal alternate font
Problem:  Cannot use terminal alternate fonts (PMunch)
Solution: Support terminal alternate fonts using
          CSI SGR 10-20 and t_CF code (PMunch)

Add support for alternate font highlighting

This adds support for alternate font highlighting using CSI SGR 10-20.
Few terminals currently support this, but with added tool support this
should improve over time. The change here is more or less taken from how
colors are configured and applied, but there might be some parts I
missed while implementing it. Changing fonts is done through the new
`:hi ctermfont` attribute which takes a number, 0 is the normal font, and
the numbers 1-9 select an "alternative" font. Which fonts are in use is
up to the terminal.

fixes: #13513
closes: #13537

Signed-off-by: PMunch <peterme@peterme.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-15 22:27:35 +01:00
eb3475df0d runtime(doc): Replace non-breaking space with normal space (#13868)
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-15 20:08:25 +01:00
93197fde0f runtime(ftplugin): Use "*" browsefilter pattern to match "All Files"
Problem:  The "*.*" browsefilter pattern only matches all files on
	  Windows (Daryl Lee)
Solution: Use "*" to filter on all platforms but keep "*.*" as the label
	  text on Windows. (Fixes #12685, Doug Kearns)

The *.* browsefilter pattern used to match "All Files" on Windows is a
legacy of the DOS 8.3 filename wildcard matching algorithm.  For reasons
of backward compatibility this still works on Windows to match all
files, even those without an extension.

However, this pattern only matches filenames containing a dot on other
platforms.  This often makes files without an extension difficult to
access from the file dialog, e.g., "Makefile"

On Windows it is still standard practice to use "*.*" for the filter
label so ftplugins should use "All Files (*.*)" on Windows and "All
Files (*)" on other platforms.  This matches Vim's default browsefilter
values.

This commit also normalises the browsefilter conditional test to check
for the Win32 and GTK GUI features and an unset b:browsefilter.

closes: #12759

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-14 21:02:54 +01:00
d7d560374b patch 9.1.0029: Cannot act on various terminal response codes
Problem:  Cannot act on various terminal response codes
Solution: Add the TerminalResponseAll autocommand
          (Danek Duvall)

closes: #13829

Signed-off-by: Danek Duvall <duvall@comfychair.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-14 20:19:59 +01:00
1f13fcc934 patch 9.1.0028: win32: Ctrl-D cannot be used to close a pipe
Problem:  win32: Ctrl-D cannot be used to close a pipe
Solution: Properly detect Ctrl-D when reading from a pipe
          (GuyBrush)

Enabling Ctrl-D for gvim pipeline input
and apply defensive programming on account of PR #12752
so that once PR 12752 is merged, CTRL-D will keep on working

closes: #13849

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-14 20:08:40 +01:00
8102a4c463 CI: Check help tags for errors (duplicates, missing, etc) (#13865)
- Run the doc make html awk script, which also checks, that all
  referenced help tags exists.
- Run the doc maketags awk script, which checks for duplicates
- in case of any error in the previous two steps, exit the CI with
  an error and show the errors.log file, that is generated by the
  previous 2 steps

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-14 19:24:05 +01:00
c92b8bed1f runtime(help): delete duplicate help tag E741 (#13861)
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-14 19:11:07 +01:00
e79e207760 patch 9.1.0027: Vim is missing a foreach() func
Problem:  Vim is missing a foreach() func
Solution: Implement foreach({expr1}, {expr2}) function,
          which applies {expr2} for each item in {expr1}
          without changing it (Ernie Rael)

closes: #12166

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-13 11:47:33 +01:00
d8cb1ddab7 patch 9.1.0026: win32: Windows default font lacking
Problem:  win32: Windows default font lacking (@clach04)
Solution: Improve default font (Ken Takata)

win32: Improve default font

Currently, Fixedsys is the default font on Windows.
It is not suitable for recent High DPI environments.

* Change the default font to Consolas.
* Allow to change the default font by the translation message. E.g.:
  ```
  msgid "DefaultFontNameForWindows"
  msgstr "Courier New"
  ```

fixes: #12919
closes: #13266

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 18:12:04 +01:00
dc4c37b9d5 patch 9.1.0025: A few typos in tests and justify.vim
Problem:  A few typos in tests and justify.vim
Solution: fix them

closes: #13848

Signed-off-by: dundargoc <gocdundar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 18:02:10 +01:00
497e5282b6 patch 9.1.0024: z/OS (MVS) support can be improved
Problem:  z/OS (MVS) support can be improved
Solution: set UTF-8 as the default encoding for z/OS

closes: #13821

Signed-off-by: Igor Todorovski <itodorov@ca.ibm.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:59:18 +01:00
48a75f3dfb patch 9.1.0023: xxd: few problems with EBCDIC for z/OS (MVS)
Problem:  xxd: few problems with EBCDIC for z/OS (MVS)
Solution: Fix xxd build and support ASCII and UTF-8 on z/OS (MVS)
          natively, add MVS guard checks with __CHARSET_LIB,
          support $LIBS in the Makefile
          (Igor Todorovski)

related: #13821

Signed-off-by: Igor Todorovski <itodorov@ca.ibm.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:53:18 +01:00
49471963fe patch 9.1.0022: Coverity complains about improper use of negative value
Problem:  Coverity complains about improper use of negative value
Solution: Add a condition to validate that keytyped is larger or equal
          to 0

Apparently patch 9.1.0006 made it more explicit for Coverity, that the
TOLOWER_LOC() macros do not handle negative values properly. However,
that condition has always been there even before that, so add a
condition to verify that keytyped is indeed at least 0

closes: #13824

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:48:08 +01:00
424ec1f235 patch 9.1.0021: i_CTRL-R- doesn't work for multibyte chars in Replace mode
Problem:  i_CTRL-R- doesn't work for multibyte chars in Replace mode,
          Coverity complains missing return value for u_save_cursor()
Solution: Use mb_charlen() and del_chars() instead, handle failure mode
          for u_save_cursor() correctly (@zeertzjq)

closes: #13846

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:43:05 +01:00
4f32c83a77 patch 9.1.0020: Vim9: cannot compile all methods in a class
Problem:  Vim9: cannot compile all methods in a class
Solution: Support compiling all the methods in a class using :defcompile
          (Yegappan Lakshmanan)

closes: #13844

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:41:09 +01:00
8610f74382 patch 9.1.0019: cmdline may disappear when changing 'cmdheight'
Problem:  cmdline may disappear when changing 'cmdheight'
          (after Patch 9.0.0190, @markonm)
Solution: always re-calculate the old_p_ch value, not only
          when cmdline_row was higher than expected

fixes: #13822
closes: #13826

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:34:40 +01:00
b52600d561 patch 9.1.0018: use of #if instead of #ifdef
Problem:  use of #if instead of #ifdef
Solution: use correct form of #ifdef

`#if FEAT_GUI_HAIKU` was used mistakenly. Use the correct form
`#ifdef FEAT_GUI_HAIKU` instead.

closes: #13843

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:31:07 +01:00
2357765304 runtime(netrw): Decode multibyte percent-encoding filename correctly (#13842)
Use `printf("%c")` instead of `nr2char()` to handle '%xx' as a byte.

Close #13787

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:30:01 +01:00
28d71b566a patch 9.1.0017: [security]: use-after-free in eval1_emsg()
Problem:  use-after-free in eval1_emsg() when an empty
          line follows a lambda (by @yu3s)
Solution: only set evalarg->eval_using_cmdline = FALSE when
          the *arg pointer is not null

fixes: #13833
closes: #13841

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-12 17:27:02 +01:00
71d0ba07a3 runtime(netrw): Sync with netrw 174b (#13836)
* Import netrw v174b
* Revert unwanted changes
* Fix indent
* Revert some changes
* Update tags
* Break long line

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-09 19:21:05 +01:00
5f4cc8ea65 runtime(colorschemes): Add initial support for Added/Removed/Changed highlight groups (#13830)
For some of the colorschemes where diffAdded and diffRemoved were explicitly set up.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-08 20:14:04 +01:00
3a5b3df776 runtime(tar): fix a few problems with the tar plugin
From: #138331:
  - Updating .tar.zst files was broken. Fixes #12639.
  - Extracting files from .tar.zst / .tzs files was also broken and
    works now.
From: #12637:
  - Fixes variable assignment and typo
From: #8109:
  - Rename .tzs to the more standard .tzst

fixes: #12639
fixes: #8105
closes: #8109
closes: #12637
closes: #13831

Co-authored-by: Martin Rys <martin@rys.pw>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Co-authored-by: Carlo Teubner <carlo@cteubner.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-08 20:02:14 +01:00
ceed36873e runtime(vim): accept dot in completionList for Vim9 syntax (#13832)
if you have autoloaded command complete function in vim9script, it shouldn't be highlighted as Error:

```
import autoload "share.vim"
command! -range=% -nargs=? -complete=custom,share.Complete Share share.Paste(<q-args>, <line1>, <line2>)
```

`share.Complete` is a valid complete function.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-08 19:42:02 +01:00
124371c5a1 patch 9.1.0016: default diff highlighting is too noisy
Problem:  default diff highlighting is too noisy
Solution: Link diff highlighting groups to new
          Added/Removed/Changed, revert previous change
          (Romain Lafourcade)

Remove diff* links added in #13776 and doc added in commit b1392be

The links added in #13776 are way too noisy for the contexts in which
the `diff` syntax is applied (git commits, patches, etc.).

This commit:

- removes those links
- adds new default highlighting groups Added, Changed and
  Removed
- links the diff highlighting groups to those new defaults
- removes the doc changes
- adjusts the syntax_completion test for those newly added group
  names

Note: Changes to the default color schemes will be handled separately,
by adding links to those newly created Added/Removed/Changed
highlighting groups.

related: #13776
closes #13825

Signed-off-by: Romain Lafourcade <romain.lafourcade@razorfish.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-07 23:32:19 +01:00
b21499537f runtime(doc): Improve the documentation for Vim9 classes (#13828)
* Emend textual typos
* Emend syntactic errors in examples
* Acknowledge no support for abstract static methods
* Acknowledge the non-ubiquity of instance qualification

"This" was never allowed in method declarations, e.g.:
    class A
        def this.M()
        enddef
    endclass

and, since patch 9.0.2167, "this" can no longer be used in field
declarations, e.g.:
    class B
        var this.f: string
    endclass

* Recognise abstract child classes
* Reword an ambiguous turn of phrase

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-07 15:52:10 +01:00
5d5cbb2b9a patch 9.1.0015: i_CTRL-R- no longer works in replace mode
Problem:  i_CTRL-R- no longer works in replace mode
Solution: delete characters in replace mode before putting, add a test,
          add a bit warning into the documentation, that i_CTRL-R-P/O
          is not supported in Replace mode for now

fixes: #13792
closes: #13816

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 18:19:52 +01:00
b1ed7ec9f7 patch 9.1.0014: incorrect use of W_WINROW in edit.c
Problem:  incorrect use of W_WINROW in edit.c
Solution: compare against curwin->w_height instead

Remove incorrect use of W_WINROW

In structs.h it is mentioned that w_wrow is relative to w_winrow, so
using W_WINROW doesn't make sense when comparing with window height.

This change won't lead to any observable behavior change:

The condition intends to check if there are 'scrolloff' lines between
the current cursor when the bottom of the window. When W_WINROW(curwin)
is added to curwin->w_height - 1 - get_scrolloff_value(), the condition
is instead satisfied when the cursor is on some screen line below that
position. However,
- If 'scrolloff' is smaller than half the window height, this condition
  can only be satisfied when W_WINROW(curwin) == 0. And if it is not
  satisfied, update_topline() does the actual scrolling.
- If 'scrolloff' is larger than half the window height, update_topline()
  will put the cursor at the center of the window soon afterwards
  anyway, because set_topline() now unsets VALID_TOPLINE flag starting
  from 7db7bb45b0.

To put it in another way, 7db7bb45b0
makes the update_topline() just below correct the mistakes made in this
block, so this incorrect use of W_WINROW() no longer affects observable
behavior.

closes: #12331

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 18:11:43 +01:00
68a8947069 patch 9.1.0013: Modula2 filetype support lacking
Problem:  Modula2 filetype support lacking
Solution: Improve the Modula-2 runtime support, add additional modula2
          dialects, add compiler plugin, update syntax highlighting,
          include syntax tests, update Makefiles (Doug Kearns)

closes: #6796
closes: #8115

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Benjamin Kowarsch <trijezdci@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 17:59:04 +01:00
3779516988 patch 9.1.0012: regression with empty inner blocks introduced
Problem:  regression with empty inner blocks introduced
          (after v9.1.0007)
Solution: Set correct cursor position, Check for visual mode
          being active (Maxim Kim)

relates: #13514
closes: #13819

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 17:52:49 +01:00
7b7672d5ca runtime(doc): Fix typos in version9.txt (#13817)
Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 17:47:01 +01:00
963fd7d6e5 runtime(doc): Fix typos in reltime() help. (#13818)
Signed-off-by: Lifepillar <lifepillar@lifepillar.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-05 17:44:57 +01:00
c79646dfb1 runtime(vim): Update syntax file (#13671)
Support multiline :syntax commands.

Match :syn-cchar option in :syn-{keyword,region}.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 22:58:48 +01:00
d2cc51f9a1 patch 9.1.0011: regexp cannot match combining chars in collection
Problem:  regexp cannot match combining chars in collection
Solution: Check for combining characters in regex collections for the
          NFA and BT Regex Engine

Also, while at it, make debug mode work again.

fixes #10286
closes: #12871

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 22:54:08 +01:00
81642d9d6f patch 9.1.0010: Keymap completion is not available
Problem:  Keymap completion is not available
Solution: Add keymap completion (Doug Kearns)

Add keymap completion to the 'keymap' option, user commands and builtin
completion functions.

closes: #13692

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 22:37:44 +01:00
f93b1c881a patch 9.1.0009: Cannot easily get the list of matches
Problem:  Cannot easily get the list of matches
Solution: Add the matchstrlist() and matchbufline() Vim script
          functions (Yegappan Lakshmanan)

closes: #13766

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 22:28:46 +01:00
30994d686c patch 9.1.0008: NSIS installer includes syntax testdir
Problem:  NSIS installer includes syntax test dumps
          (Yegappan Lakshmanan)
Solution: Exclude syntax/testdir when creating the NSIS installer

fixes: vim/vim-win32-installer#328
closes: #13814

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 22:14:28 +01:00
ad4d7f446d patch 9.1.0007: can select empty inner text blocks
Problem:  can select empty inner text blocks
          (laurentalacoque)
Solution: make selecting empty inner text blocks an error

textobjects: Make selecting inner empty blocks an error

fixes: #13514
closes: #13523

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 22:11:33 +01:00
184f71cc68 patch 9.1.0006: is*() and to*() function may be unsafe
Problem:  is*() and to*() function may be unsafe
Solution: Add SAFE_* macros and start using those instead
          (Keith Thompson)

Use SAFE_() macros for is*() and to*() functions

The standard is*() and to*() functions declared in <ctype.h> have
undefined behavior for negative arguments other than EOF.  If plain char
is signed, passing an unchecked value from argv for from user input
to one of these functions has undefined behavior.

Solution: Add SAFE_*() macros that cast the argument to unsigned char.

Most implementations behave sanely for negative arguments, and most
character values in practice are non-negative, but it's still best
to avoid undefined behavior.

The change from #13347 has been omitted, as this has already been
separately fixed in commit ac709e2fc0
(v9.0.2054)

fixes: #13332
closes: #13347

Signed-off-by: Keith Thompson <Keith.S.Thompson@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 21:19:04 +01:00
4d8cb683b1 patch 9.1.0005: OpenVMS does not support python3 and xterm_save
Problem:  OpenVMS build does not support python3 and xterm_save
Solution: Enable python3 + xterm_save feature, fix style issues
          (Zoltan Arpadffy)

closes: #13812

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-04 21:05:18 +01:00
d94ca966ca runtime(fortran): syntax and documentation updates (#13811)
closes: #13802

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:58:21 +01:00
83ad2726ff patch 9.1.0004: reloading colorscheme when not changing 'background'
Problem:  reloading colorscheme when not changing 'background'
Solution: Check, if the background option value actually changed,
          if not, return early.

Only reload colorscheme when bg is changed

Currently the highlight groups are re-initialized and the colorscheme
(if any) is reloaded anytime 'background' is set, even if it is not
changed. This is unnecessary, because if the value was not changed then
there is no need to change highlight groups or do anything with the
colorscheme. Instead, only reload the colorscheme if the value of
'background' was actually changed.

closes: #13700

Signed-off-by: Gregory Anders <greg@gpanders.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:53:59 +01:00
443657b32b patch 9.1.0003: Cannot build against Ruby 33 dynamically
Problem:  Cannot build against Ruby 33 dynamically
Solution: Ruby 33 removed transient heap, so do not use
          rb_ary_transient anymore, NoMethodError format changed,
          so update test for expected error message
          (Isao Sato)

- ruby-3.3 removed transient heap for ruby/dyn

when +ruby/dyn with ruby-3.3 do command :ruby, E448 occur.
ruby-3.3 has no transient heap anymore, so disable rb_ary_transient etc.

$ LC_ALL=C VIMRUNTIME=runtime ./src/vim -u NONE -c 'ruby puts RUBY_VERSION'
"=> Error detected while processing command line:
"=> E448: Could not load library function rb_ary_detransient
"=> E266: Sorry, this command is disabled, the Ruby library could not be
    loaded.

- ruby-3.3 changed NoMethodError format:

$ rvm 3.2.2, 3.3.0-rc1 do ruby -e 'begin; nil.name; rescue => e; puts "%s : %s"%[RUBY_VERSION, e.message]; end '
=> 3.2.2 : undefined method `name' for nil:NilClass
=> 3.3.0 : undefined method `name' for nil

so loose pattern in Test_ruby_Vim_buffer_get()

closes: #13741

Signed-off-by: Isao Sato <svardew@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:46:42 +01:00
0689b87059 patch 9.1.0002: a closing fold expr, may start a new fold
Problem:  a closing fold expression may unexpectedly start a new fold
          when it should end a fold
          (reported by Shota Nozaki)
Solution: if a fold hasn't started yet, do not immediately
          start a new fold with level 1
          (Shota Nozaki)

fixes: #12768
closes: #13748

Signed-off-by: Shota Nozaki <emonkak@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:18:43 +01:00
bf44b69d1f patch 9.1.0001: when closing window, wincmd p may fail
Avoid `prevwin == curwin` when closing `curwin`

Problem:  When closing the current window (or when moving it to a tabpage), the
          previous window may refer to the new current window
          (`winnr() == winnr('#')`) if that window is selected as the
          new current window.

Solution: Set `prevwin = NULL` when switching away from an invalid `curwin` and
          the target window was the `prevwin`.
          (Sean Dewar)

related: #4537
closes: #13762

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 19:07:21 +01:00
b5352931b3 runtime(vim): add jumpoptions to syntax file (#13808)
* Add jumpoptions and jop to vim syntax file
* Clean up some whitespace

Signed-off-by: Hugo van de Vliert <hugo.vandevliert@floryn.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 18:03:29 +01:00
b1392bee70 runtime(doc): document that the diff filetype uses Diff hl groups
related: #13776

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 18:01:45 +01:00
80beeef0c6 runtime(vim): Add support for <ScriptCmd> syntax (#10686)
Adding `<ScriptCmd>` to list of angle-bracket notation syntax, just like `<Cmd>`

`<Cmd>` is already highlighted.
```vim
nnoremap <leader>o <Cmd>Oldfiles()<CR>
```

`<ScriptCmd>` is not.

Signed-off-by: dezza <402927+dezza@users.noreply.github.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 16:20:22 +01:00
d4634a26cd runtime(vim): Add support for syntax foldlevel command (#6182)
Signed-off-by: Brad King <brad.king@kitware.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-03 16:17:24 +01:00
b4ddc6c11e patch 9.1.0000: Vim 9.1 release
Problem:  Need a new release
Solution: Release Vim 9.1

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-02 16:51:11 +01:00
6c1afa3d0b runtime(doc): add missing help tags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 20:50:51 +01:00
34d15155fc runtime(menu): regenerate synmenu
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 20:28:12 +01:00
6a950da86d patch 9.0.2190: proto files need update
Problem:  proto files need update
Solution: re-generate them

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 20:19:09 +01:00
10b4f75d4c runtime(dist/ft): improve filetype detection for *.v (V/Verilog/Coq)
Patch provided by Dan Alt

closes: #13793

Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 19:19:20 +01:00
b16fc98055 runtime(sh): Update sh syntax and add local keyword for bash (#13806)
add `local` in shStatement

Signed-off-by: Lucien Grondin <grondilu@yahoo.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 19:00:41 +01:00
d08059ab48 runtime(ruby): Update ftplugin and omni-complete (#13805)
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 18:58:57 +01:00
0ede5e361f runtime(doc): Update Version9.txt for release 9.1 (#13804)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2024-01-01 18:56:52 +01:00
74512e0ad0 runtime(doc): Add help tags to items in version9.txt (#13801)
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-30 10:40:25 +01:00
d36f590d41 translation(de): Updated German translation (#13796)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-29 16:34:04 +01:00
5528a72937 translation(tr): Improve Turkish documentation (#13800)
Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-29 16:30:40 +01:00
d96f25bd69 runtime(fortran): update syntax and documentation (#13784)
* Update Fortran section of indent.txt
* Small addition to fortran syntax

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>

* Update Fortran section of syntax.txt

* Runtime (Fortran)

Fix regression

* Combine two expressions
2023-12-29 16:29:43 +01:00
7e4f62a257 patch 9.0.2189: Wrong display with 'briopt=sbr' and 'nobreakindent'
Problem:  Wrong display when 'breakindentopt' contains "sbr" and
          'showbreak' and 'nobreakindent' are set.
Solution: Always reset wlv->need_showbreak regardless of the values of
          'breakindent' and 'showbreak', as they aren't checked when
          setting wlv->need_showbreak (zeertzjq)

closes: #13785

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:19:52 +01:00
715a805889 runtime(cucumber): Updates to indent and syntax 2023-12-28 23:17:54 +01:00
244f01658f runtime(markdown): Fix folding of code blocks 2023-12-28 23:17:54 +01:00
a907c91992 runtime(sass): Provide sass_recommended_style option 2023-12-28 23:17:54 +01:00
fda02d03c0 runtime(gitcommit): Updates to ftplugin and syntax 2023-12-28 23:17:54 +01:00
757714c0cb runtime(git): Make diffs foldable 2023-12-28 23:17:54 +01:00
48ddc6a6f8 runtime(git): Add small ftplugin 2023-12-28 23:17:54 +01:00
0efa58184b translation(hu): add Hungarian translation (#13782)
* add Hungarian translation
* Add hu.po to the Make_all file

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:15:19 +01:00
9f239f169a translation(ru): Updated Russian translation (#13788)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:13:10 +01:00
53860eb9ce runtime(Filelist): remove coveralls, move runtime/lang/Make_mvc.mak (#13790)
- File coveralls.yml removed from $(SRC_ALL),  in patch 9.0.1752 (#12851)
- runtime/lang/Make_mvc.mak moved from $(LANG_DOS) to $(RT_DOS)

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:11:48 +01:00
0aed99abf7 runtime(doc): correct the :public example (#13795)
The current example is no longer supported (E1331), as of
patch 9.0.2167.

Signed-off-by: Aliaksei Budavei <0x000c70@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:08:24 +01:00
86fcada95b translation(ru): adjust tutor/README.ru.utf-8.txt (#13789)
Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-28 23:06:38 +01:00
7d0abf2cb6 translation(it): Update Italian translations
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:45:02 +01:00
d1cea03646 runtime(elixir): missing undo_ftplugin for indentkeys
fixup after #13771

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:30:41 +01:00
9e6549d2fb patch 9.0.2188: cursor wrong after { in single line buffer
Problem:  cursor wrong after { in single line buffer
          (Edwin Chan)
Solution: do not place the cursor at the end for a single
          line buffer when moving backwards
          (Gary Johnson)

closes: #13780
closes: #13783

Signed-off-by: Gary Johnson <garyjohn@spocom.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:12:43 +01:00
23627722d3 patch 9.0.2187: Visual not drawn with 'breakindent' when line doesn't fit
Problem:  Visual selection isn't drawn with 'breakindent' when the line
          doesn't fit in the window (Jaehwang Jung)
Solution: Adjust wlv->fromcol also for 'breakindent' (zeertzjq)

closes: #13767
closes: #13768

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:08:53 +01:00
92feeaffc2 runtime(doc): add help tag multiple-constructors. (#13772)
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:07:09 +01:00
7e27411007 runtime(elixir): fix indentation (#13771)
Signed-off-by: George Guimarães <george.guimaraes@gmail.com>
Signed-off-by: Mitchell Hanberg <mitch@mitchellhanberg.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:06:05 +01:00
a03647acc3 runtime(mermaid): Syntax fix (#13774)
* runtime(mermaid): Fix arrow syntax
* runtime(mermaid): Disable syntax for identifier to avoid false match
* runtime(mermaid): Add some C++ type syntax highlight
* runtime(mermaid): Update last change time in header

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 19:02:35 +01:00
38bea30f53 patch 9.0.2186: LTCG compile error ARM64 for write_chars
Problem:  LTCG compile error on Win/ARM64 for `write_chars()`
Solution: Explicitly initialise the storage to use data rather than BSS
          (Saleem Abdulrasool)

win32: add a workaround for a LTCG issue on Windows ARM64

It appears that the implicit initialisation which would push `g_coords`
into BSS causes an aliasing issue with LTCG on ARM64.  By explicitly
initialising the value, we use usual data storage but prevent the
aliasing.  This allows the console version of VIM to run on Windows
ARM64 again.

fixes:  #13453
closes: #13775

Signed-off-by: Saleem Abdulrasool <compnerd@compnerd.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 18:57:12 +01:00
65672ae118 runtime(doc): clarify behaviour of ]m and ]M motions
In particular remove the sentence, that a missing '{'
(for ]m) or '}' (for ]M) after the cursor is an error, since
currently this is not treated as an error.

fixes: #13777

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 18:55:53 +01:00
00b470052b runtime(diff): Update default links (#13776)
Problem: Current default links for `diffAdded`, `diffChanged`, and
              `diffRemoved` do not address the diff nature of the filetype.
Solution: Use `DiffAdd`, `DiffChange`, and `DiffDelete`.

closes: #13759

Signed-off-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 18:51:43 +01:00
0bca4a0018 runtime(context): update ConTeXt keywords and other minor fixes (#13778)
Update to the ConTeXt runtime files. Changes:

1. shared syntax files updated with `mtxrun --script interface --vim`
   using the latest ConTeXt LMTX.

2. fixed reference to `make` tag in the help file.

3. added `keepend` to mitigate issues with embedded Lua syntax (see
   below).

4. the latest revision date of each ConTeXt runtime file has been
   updated to the date of this commit.

The issue about embedded Lua was reported by a user:

>Take the following valid ConTeXt file:

>   \starttext
>   \ctxlua{context("Text generated from Lua.")}
>   \ctxlua{context("Another text generated from Lua.")}
>   \stoptext

>On my Vim installation (including when I start Vim with `--clean`), the
>closing bracket and curly braces on line 2 are highlighted red and the
>syntax highlighting after that is off.

>I was trying to dig a little bit into what was going on, using the
>`synID()` and `synIDattr()` functions. It appears that the closing
>bracket on line 2 is matched as a `luaParentError` instead of the end
>of the `luaParen` region. Therefore, the `luaParen` region continues
>all the way to the end of the file. The closing curly brace on line
>2 is matched as a `luaError`, the 2nd `\ctxlua` on line 3 as
>`luaParen`, etc.

>This issue doesn't occur in a plain Lua file, where the closing bracket
>is correctly matched as the end of the `luaParen` region. So it seems
>that something goes wrong when the Lua syntax file is included in the
>ConTeXt one.

By adding `keepend`, the right parenthesis for some reason is still
highlighted as a `luaParenError`, but at least the right curly brace
should correctly end the Lua block.

From what I've seen, I think it is very difficult to embed Lua syntax
properly without help from the Lua syntax file (that is, without
patching it). It has global rules such as:

   syn match  luaParenError ")"
   syn match  luaError "}"

which make it difficult, if not impossible, to contain Lua syntax
without `keepend` (and its limitations).


Signed-off-by: Lifepillar <lifepillar@lifepillar.me>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-27 18:49:50 +01:00
cea3dac76e runtime(doc): Add variable categories and null related documentation(#13750)
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-25 10:31:23 +01:00
9042bd8b09 runtime(r): Update R runtime files and docs (#13757)
* Update R runtime files
- Fix indentation issue with ggplot().
- Setlocal autoindent in indent/r.vim.
- New syntax option: rmd_include_latex.
- Clear syn iskeyword to recognize _ as keyword.
- Document some options.
- remove the test has("patch-7.4.1142")
- Update changed date of doc files

Signed-off-by: Jakson Alves de Aquino <jalvesaq@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org
2023-12-25 10:22:27 +01:00
377372ed5b translation(ua): Update Ukrainian translation (#13760)
Signed-off-by: Anatolii Sakhnik <sakhnik@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-25 10:19:25 +01:00
6b9492e299 patch 9.0.2185: Coverity complains about not checking return value
Problem:  Coverity complains about not checking return value
          in compare_isn_not_values (after 9.0.2184)
Solution: cast return value to "(void)" to make intention clear

closes: #13751

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-24 11:14:37 +01:00
4e28631f91 runtime(doc): Clarify that new() is not static
closes: #13756

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-24 11:03:31 +01:00
49cdd629a3 runtime(doc): list of new/changed features in version9.txt
closes: #13753

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-24 11:03:06 +01:00
ea9964a36f Runtime(fortran): updates to indent, syntax and ftplugin (#13752)
* runtime update fortran.vim

Add folding for newer features of Fortran

* Runtime Update fortran.vim

Add indent support for newer features of Fortran

* Runtime Update fortran.vim

Add newer features of Fortran to matchit patterns

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-23 11:31:38 +01:00
ec97edcbb9 runtime(debcontrol): Add loong64 arch (#13754)
Co-authored-by: zhangjialing@loongson.cn <zhangjialing@loongson.cn>
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-23 11:23:39 +01:00
1d4fcfe551 runtime(doc): add some error codes to :help vim9class (#13747)
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:34:15 +01:00
e75fde6b04 patch 9.0.2184: Vim9: inconsistent :type/:class messages
Problem:  Vim9: inconsistent :type/:class messages
Solution: Update the Messages (Ernie Rael)

closes: #13706

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:18:54 +01:00
18ab6c3392 runtime(erlang): add support for matchit plugin (#13713)
This commit updates the Erlang runtime files to be in sync with the
`vim-erlang-runtime` repository. In particular, it adds the following
commit (with some cleanup and simplification afterwards):
6ea8b85bc9

Signed-off-by: Csaba Hoch <csaba.hoch@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:16:28 +01:00
3746887997 runtime(masm): add variants of opcodes (#13734)
that can actually be generated by compilers

Signed-off-by: Wu Yongwei <wuyongwei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:12:34 +01:00
59df9ad68b runtime(doc): Include Vim9 class features in version9.txt
closes: #13735

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:09:15 +01:00
fe583b1e59 patch 9.0.2183: Maximum callback depth is not configurable
Problem:  Maximum callback depth is not configurable.
Solution: Revert patch 9.0.2103.  Set 'maxfuncdepth' in test.
          (zeertzjq)

fixes: #13732
closes: #13736

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 17:03:31 +01:00
632b38b45f translation(sr): Update Serbian messages translation (#13737)
Updated with newly added E1411

Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:58:33 +01:00
0630080bbd runtime(doc): reformat and align :h ft-c-syntax (#13738)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:57:09 +01:00
21064ebcd6 runtime(vim): Update syntax file (#13739)
Match all ex commands after ":" and the "|" command separator.

Exceptions are not handled yet and :insert/:change/:append are still not
matched after the command separator bar.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:56:06 +01:00
ff6f0d5c38 patch 9.0.2182: Vim9: need a way to reserve future extension
Problem:  Vim9: need a way to reserve future extension
Solution: reserve double underscore prefix for future use
          (Yegappan Lakshmanan)

related: #13238
closes: #13742

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:46:18 +01:00
cc944b1452 runtime(json5): Add TODO support to syntax script (#13743)
Signed-off-by: Danek Duvall <duvall@comfychair.org>
Signed-off-by: Mazunki Hoksaas <rolferen@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-21 16:44:19 +01:00
5e13315778 patch 9.0.2181: Vim9: missing error messages
Problem:  Vim9: missing error messages
Solution: Add one more error message

closes: #13729

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 22:15:27 +01:00
cb69dc3510 runtime(doc): update helptags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 21:59:14 +01:00
6fdb628082 patch 9.0.2180: POSIX function name in exarg causes issues
Problem:  POSIX function name in exarg struct causes issues
          on OpenVMS
Solution: Rename getline member in exarg struct to ea_getline,
          remove isinf() workaround for VMS

There are compilers that do not treat well POSIX functions - like
getline - usage in the structs.

Older VMS compilers could digest this... but the newer OpenVMS compilers
( like VSI C x86-64 X7.4-843 (GEM 50XB9) ) cannot deal with these
structs. This could be limited to getline() that is defined via
getdelim() and might not affect all POSIX functions in general - but
avoiding POSIX function names usage in the structs is a "safe side"
practice without compromising the functionality or the code readability.

The previous OpenVMS X86 port used a workaround limiting the compiler
capabilities using __CRTL_VER_OVERRIDE=80400000
In order to make the OpenVMS port future proof, this pull request
proposes a possible solution.

closes: #13704

Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:53:07 +01:00
63210c214a patch 9.0.2179: no filetype detection for execline scripts
Problem:  no filetype detection for execline scripts
Solution: Add filetype detection for execline

as a prior to adding syntax support for execline (see
https://github.com/djpohly/vim-execline/issues/2), i went ahead and made
the filetype detection for execline scripts.

closes: #13689

Signed-Off-By: Mazunki Hoksaas <rolferen@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:44:41 +01:00
615202bd0e patch 9.0.2178: reg_executing() wrong for :normal with range
Problem:  reg_executing() returns wrong result in :normal with range
          when 'showcmd' is set (after 8.2.4705).
Solution: Reset "pending_end_reg_executing" when executing a register.

closes: #13707

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:35:40 +01:00
ec14924368 patch 9.0.2177: Wrong cursor position when dragging out of window
Problem:  Wrong cursor position when dragging out of window.
Solution: Don't use ScreenCols[] when mouse is not in current window.

closes: #13717

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:28:31 +01:00
f01bee1bc0 translation(sr): Update Serbian messages translation (#13719)
Signed-off-by: Ivan Pešić <27575106+eevan78@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:24:30 +01:00
fbd72d2d47 runtime(netrw): prevent E11 on FocusGained autocommand (#13718)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:22:18 +01:00
ef07a7651e translation(ja): Update Japanese translation (#13723)
ref: https://github.com/vim-jp/lang-ja/releases/tag/20231219

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:21:40 +01:00
379df7c1db runtime(8th): updated 8th syntax (#13720)
* updated 8th.vim
* removed obsolete code

Signed-off-by: Ron Aaron <ron@aaron-tech.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:20:14 +01:00
3ffc5bc6b8 CI: change dependabot prefix to "CI" (#13724)
The default prefix of dependabot is "build(deps)".  Change it to "CI".

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:17:08 +01:00
955652f6df runtime(doc): Update change.txt (#13725)
Fix-up and clarify commit  e06f2b498c

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:15:47 +01:00
18d0d29b42 patch 9.0.2175: Compile error with Motif UI + mouse support
Problem:  Compile error with Motif UI + mouse support (after v9.0.1262)
Solution: Use correct oldval option pointer

Fix compilation error introduced by 9.0.1262 and found in #13704.

closes: #13726

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:12:29 +01:00
5872bcb6e8 runtime(doc): Create Changelog until v9.0.2175 (#13728)
Patch list created using:
```
git log --grep='^patch' --reverse --pretty='format:%D%gs%n%b' "v9.0.0000~1"..master  |sed -e '/^Signed-off-by:.*/d' -e '/^\(closes\|fixes\)/d' -e 's/^tag: v/Patch /'
```

and then post-processed using vim.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-19 20:10:43 +01:00
2afe381a35 translation(it): Update Italian translations
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 09:09:54 +01:00
b42703a662 runtime(tmux): Update tmux syntax rules (#13708)
Signed-off-by: Eric Pruitt <eric.pruitt@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 09:03:40 +01:00
2f05ad162e translation(tr): Update Turkish translations (#13710)
Signed-off-by: Emir SARI <emir_sari@icloud.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 09:02:04 +01:00
38ce1a7ac8 patch 9.0.2175: Compiler warning for uninitialized var
Problem:  Compiler warning for uninitialized var
Solution: initialize variable to NULL

closes: #13711

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 08:58:29 +01:00
71cbe8e17a runtime(fortan): update fortran syntax rules and doc notes
Update to the Fortran 2023 standard. Reorganize some code to reflect the
dropping of dialect support in the previous commit. Minor improvements.

closes: #13712

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 08:55:44 +01:00
b501108986 patch 9.0.2174: Vim9: segfault when assigning to type
Problem:  Vim9: segfault when assigning to type
Solution: do not clear typeval, add missing patch number

closes: #13714
closes: #13715

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 08:34:41 +01:00
ec497574fc CI: bump github/codeql-action from 2 to 3 (#13716)
Bumps [github/codeql-action](https://github.com/github/codeql-action) from 2 to 3.
- [Release notes](https://github.com/github/codeql-action/releases)
- [Changelog](https://github.com/github/codeql-action/blob/main/CHANGELOG.md)
- [Commits](https://github.com/github/codeql-action/compare/v2...v3)

---
updated-dependencies:
- dependency-name: github/codeql-action
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-18 07:30:50 +00:00
82f19734bf runtime(doc): remove deprecation warning for gdefault
Deprecated can be misunderstood as being slated for removal; slightly
change wording to be clearer.

Signed-off-by: dundargoc <gocdundar@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:56:06 +01:00
062bb6b909 patch 9.0.2173: Vim9: crash when compiling for statement and non-existing type
Problem:  Vim9: Vim crashes when compiling a for statement with a
          non-existing type
Solution: Error out when  lhs_type is not null

closes: #13703

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:46:40 +01:00
a185a31fc0 patch 9.0.2172: Vim9: compiling :defer may fail
Problem:  Vim9: compiling :defer may fail
Solution: compile defer, when ctx_skip is not SKIP_YES

compiling defer fails in an if statement with false condition,
so check the ctx_skip value when compiling :defer

fixes:  #13698
closes: #13702

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:36:08 +01:00
535e8f5941 translation(ie): Updated Irish translation (#13699)
Signed-off-by: Kevin Scannell <kscanne@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:30:12 +01:00
0f61943eb7 runtime(logtalk): Update Logtalk runtime files for the latest language spec (#13697)
Signed-off-by: Paulo Moura <pmoura@logtalk.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:27:09 +01:00
5eb9cb53d6 runtime(racket): update Racket runtime files (#13693)
This brings the included Racket runtime files to commit 43bfc87 (update
headers, 2023-12-15) of https://github.com/benknoble/vim-racket. Note
that not all files from that repository are included. (In particular,
the ftdetect script is omitted for now.)

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:24:15 +01:00
0378f07fba runtime(colorschemes): Update colorschemes (#13691)
Minor changes:

- Regenerated using colortemplate 2.2.3
- Removed reversed gui-cursor for some of the colorschemes (retrobox, wildcharm, lunaperche)
- Change MatchParen for some of colorschemes.

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:22:44 +01:00
ffba4e952b patch 9.0.2171: The options[] array is still not sorted alphabetically
Problem:  The options[] array is still not sorted alphabetically
          (after: v9.0.2154), causing test failures
Solution: Sort the remaining items

This causes an failure for the vim/vim-win32-installer builds, so make
sure it is completely sorted.

closes: #13690

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:14:36 +01:00
e5437c5427 patch 9.0.2170: Vim9: no support for const/final class/objects vars
Problem:  Vim9: no support for const/final class/objects vars
Solution: Support final and const object and class variables

closes: #13655

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:11:19 +01:00
d8bf87c9fb patch 9.0.2169: Vim9: builtin funcs may accept a non-value
Problem:  Vim9: builtin funcs may accept a non-value
Solution: Restrict builtin functions that accept `type`

This PR finishes off detection and prevention of using a type as a
value. It takes care of builtin functions. However there are some
builtin functions, that need to be able to handle types as well as
non-args: instanceof(), type(), typename(), string().

A "bit", FE_X, is added to funcentry_T; when set, the builtin function
can handle a type (class or type-alias) in addition to a value.

Noteworthy change: Discovered that in compile_call() the builtin add()
is compiled inline instead of calling the builtin. Had to add a check
there.

closes: #13688

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 14:03:33 +01:00
df12e39b8b patch 9.0.2168: Moving tabpages on :drop may cause an endless loop
Problem:  Moving tabpages on :drop may cause an endless loop
Solution: Disallow moving tabpages on :drop when cleaning up the arglist
          first

Moving tabpages during drop command may cause an endless loop

When executing a :tab drop command, Vim will close all windows not in
the argument list. This triggers various autocommands. If a user has
created an 'au Tabenter * :tabmove -' autocommand, this can cause Vim to
end up in an endless loop, when trying to iterate over all tabs (which
would trigger the tabmove autocommand, which will change the tpnext
pointer, etc).

So instead of blocking all autocommands before we actually try to edit
the given file, lets simply disallow to move tabpages around. Otherwise,
we may change the expected number of events triggered during a :drop
command, which users may rely on (there is actually a test, that expects
various TabLeave/TabEnter autocommands) and would therefore be a
backwards incompatible change.

Don't make this an error, as this could trigger several times during the
drop command, but silently ignore the :tabmove command in this case (and
it should in fact finally trigger successfully when loading the given
file in a new tab). So let's just be quiet here instead.

fixes:  #13676
closes: #13686

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-16 13:55:32 +01:00
3afc9f2556 runtime(cmake): sync runtime files with upstream (#13597)
Signed-off-by: e-kwsm@users.noreply.github.com
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:38:29 +01:00
17dca3cb97 runtime(doc): grammar & typo fixes
closes: #13654
2023-12-14 20:36:32 +01:00
323dda1484 runtime(termdebug): add Tbreak command
closes: #13656

Signed-off-by: iam28th <artyom28th@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:33:43 +01:00
74da0ee0a2 patch 9.0.2167: Vim9: not consistently using :var for declarations
Problem:  Vim9-script object/class variable declarations use syntax
	  that is inconsistent with the rest of the language.
Solution: Use :var to declare object and class variables.

closes: #13670

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:26:26 +01:00
549f8c0b4e patch 9.0.2166: Memory leak in Configure Script when checking GTK
Problem:  Memory leak in Configure Script when checking GTK
Solution: Free the allocated memory

If the memory is not freed, GTK GUI VIM cannot be build with address
sanitizer for debugging purposes - configure script will report missing
GTK, because the testing file compilation fails due reported memory
leak.

closes: #13672

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:22:49 +01:00
a8f7f92b56 patch 9.0.2165: Vim9: can simplify arg type checking code
Problem:  Vim9: can simplify arg type checking code
Solution: In `f_argcheck` array use `arg_any`, instead of NULL

closes: #13674

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:19:54 +01:00
b077b58809 patch 9.0.2164: Vim9: can use type a func arg/return value
Problem:  Vim9: can use type a func arg/return value
Solution: Check if using type as function argument or return value

closes: #13675

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:14:13 +01:00
9a775b4a2a runtime(netrw): escape curdir in BrowseUpDir (#13681)
fixes #13678

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:09:07 +01:00
fa831102c3 patch 9.0.2163: Vim9: type can be assigned to list/dict
Problem:  Vim9: type can be assigned to list/dict
Solution: Prevent assigning a `type` to a `list` or `dict`

closes: #13683

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:06:39 +01:00
2a71b54d35 patch 9.0.2162: Vim9: type documentation out-dated
Problem:  Vim9: type documentation out-dated
Solution: Update documentation, fix typo in type alias
          definition

closes: #13684

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 20:03:03 +01:00
d2e1c83962 patch 9.0.2161: Vim9: not able to use imported interfaces and classes
Problem:  Vim9: not able to use imported interfaces and classes
Solution: Detect imported class/interfaces names correclty

fixes:  #13661
closes: #13685

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 19:59:45 +01:00
7349c5160a CI: Fix i386 build (#13680)
Fix the following error:
```
The following packages have unmet dependencies:
 binutils : Conflicts: binutils:i386 but 2.38-4ubuntu2.4 is to be installed
 binutils:i386 : Conflicts: binutils but 2.38-4ubuntu2.3 is to be installed
 binutils-common : Breaks: binutils-common:i386 (!= 2.38-4ubuntu2.3) but 2.38-4ubuntu2.4 is to be installed
 binutils-common:i386 : Breaks: binutils-common (!= 2.38-4ubuntu2.4) but 2.38-4ubuntu2.3 is to be installed
 libbinutils : Breaks: libbinutils:i386 (!= 2.38-4ubuntu2.3) but 2.38-4ubuntu2.4 is to be installed
 libbinutils:i386 : Breaks: libbinutils (!= 2.38-4ubuntu2.4) but 2.38-4ubuntu2.3 is to be installed
 libctf0 : Breaks: libctf0:i386 (!= 2.38-4ubuntu2.3) but 2.38-4ubuntu2.4 is to be installed
 libctf0:i386 : Breaks: libctf0 (!= 2.38-4ubuntu2.4) but 2.38-4ubuntu2.3 is to be installed
E: Error, pkgProblemResolver::Resolve generated breaks, this may be caused by held packages.
```

Run `apt-get upgrade` before installing additional packages.

Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-14 06:58:48 +00:00
a02fe3480f CI: Fix labeler.yml (#13677)
* CI: Fix labeler.yml

Use `any-glob-to-any-file` instead of `any-glob-to-all-files` in most
places.

* Adjust indentation
2023-12-13 18:45:57 +09:00
1760331ae3 CI: label.yml: fixup for v5 (#13673)
* label.yml: sync-labels true

* fixup: remove unused lines

Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: K.Takata <kentkt@csc.jp>
2023-12-13 16:50:35 +09:00
2025af165e patch 9.0.2160: instanceof() should use varargs as second arg
Problem:  instanceof() should use varargs as second arg
Solution: Modify `instanceof()` to use varargs instead of list

Modify `instanceof()` to use varargs instead of list
Valid `instanceof()` arguments are `type`s. A `type` is not a value;
it cannot be added to a list.

This change is non-compatible with the current usage of instanceof;
but instanceof is relatively new and it's a trivial change.

fixes: #13421
closes: #13644

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-12 16:58:00 +01:00
c1c3b83816 CI: bump actions/labeler from 4 to 5 (#13658)
Bumps [actions/labeler](https://github.com/actions/labeler) from 4 to 5.
- [Release notes](https://github.com/actions/labeler/releases)
- [Commits](https://github.com/actions/labeler/compare/v4...v5)

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-12 16:51:32 +01:00
1c97b5c0c0 runtime(vim): Update syntax file, fix missing for highlight (#13668)
Fix highlighting of :for command.  Link the vimFor syntax group to the
vimCommand highlight group.

Error introduced in commit f686921

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-12 16:47:43 +01:00
ec54af4e26 patch 9.0.2159: screenpos() may crash with neg. column
Problem:  screenpos() may crash with neg. column
Solution: validate and correct column

closes: #13669

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-12 16:43:44 +01:00
a40e1687e7 CI: labeler.yml: update to v5 (#13664)
Signed-off-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 18:35:52 +01:00
0f28791b21 patch 9.0.2158: [security]: use-after-free in check_argument_type
Problem:  [security]: use-after-free in check_argument_type
Solution: Reset function type pointer when freeing the function type
          list

function pointer fp->uf_func_type may point to the same memory, that was
allocated for fp->uf_type_list. However, when cleaning up a function
definition (e.g. because it was invalid), fp->uf_type_list will be
freed, but fp->uf_func_type may still point to the same (now) invalid
memory address.

So when freeing the fp->uf_type_list, check if fp->func_type points to
any of those types and if it does, reset the fp->uf_func_type pointer to
the t_func_any (default) type pointer

closes: #13652

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:53:25 +01:00
e4a450a87b patch 9.0.2157: Vim9: incorrectly parses :def func definitions
Problem:  Vim9: incorrectly parses :def func definitions
Solution: check for more context when parsing function args

Signed-off-by: Christian Brabandt <cb@256bit.org>
Incorrectly parses def function definitions

Vim currently allows to define the following vim9 function:
  def Func(f=
  )
  enddef

It currently thinks a Lambda is following the `=` but it doesn't check,
that there is actually an expression following. So when such a think is
encountered, remember that an expression should be following.

If no expression is coming in the next few lines, fail parsing the
function arguments, which will Vim no longer accept such a function.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:50:08 +01:00
9ed53752df patch 9.0.2156: Vim9: can use typealias in assignment
Problem:  Vim9: can use typealias in an assignment
Solution: Generate errors when class/typealias involved in the rhs of an
          assignment

closes: #13637

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Generate errors when class/typealias involved in assignment.
2023-12-11 17:40:46 +01:00
fa920da283 runtime(filetype): ft detection maybe wrong if 'fic' set for *.[CH]
So only set the filetype to cpp for *.C and *.H files, if
'fileignorecase' option is not set.

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:34:36 +01:00
1ec115c92c runtime(doc): re-generate helptags
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:32:09 +01:00
5a68cdf149 runtime(sbt): do not set b:did_ftplugin before sourcing scala ftplugin(#13657)
The `b:did_ftplugin` guard was set and prevented us from actually sourcing `ftplugin/scala.vim`. Since the latter script also sets the guard properly, we can simply remove the guard here.

Signed-off-by: =?UTF-8?q?Karl=20Yngve=20Lerv=C3=A5g?= <karl.yngve+git@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:17:20 +01:00
b52e7ac7c6 runtime(netrw): Fix w:netrw_bannercnt ref error with netrw_fastbrowse=2 (#13659)
* NetRW: Fix `w:netrw_bannercnt` ref error with `netrw_fastbrowse=2`
* NetRW: Fix wrong `w:netrw_bannercnt` setting

closes: #13640 

Signed-off-by: yasuda <yasuda@kyoto-sr.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:11:43 +01:00
34b9a15c37 runtime(json): fix examples in comments for JSON formatting (#13660)
Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-11 17:09:38 +01:00
ca7c9b1b59 runtime(json): Add json formating plugin (Issue #11426) (#11506)
related: #11426

Signed-off-by: Maxim Kim <habamax@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-10 15:57:41 +01:00
f6869212c9 runtime(vim): Update syntax file (#13653)
Improve variable highlighting in :let, :unlet, :const and :for commands.

Match registers and local, global and terminal option variables.

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-10 15:53:24 +01:00
61e984e212 runtime(doc): link cmdline completion to to |wildcards| and fix typos (#13636)
The docs for cmdline completion doesn't mention that [abc] is considered
a wildcard, and |wildcards| contains more detailed information, so just
link to it.

Also fix some typos in other help files.

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-09 07:18:33 +00:00
c23fc36476 runtime(doc): Update eval.txt (#13645)
expr5 is also expr6 itself.

Signed-off-by:  K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 20:51:04 +00:00
d33518522a patch 9.0.2155: Vim9: type not kept when assigning vars
Problem:  Vim9: type not kept when assigning vars
Solution: When assigning a List or a Dict value to a variable of type
          'any', keep the type

closes: #13639
closes: #13646

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:47:22 +01:00
f48558e10a patch 9.0.2154: The option[] array is not sorted
Problem:  The options[] array is not sorted alphabetically.
Solution: Sort it alphabetically.  Add a test.  Avoid unnecessary loop
          iterations in findoption().

closes: #13648

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:36:55 +01:00
ff0baca865 runtime(syntax): unlet b:filetype_in_cpp_family for cpp & squirrel
Update runtime/syntax/cpp.vim and runtime/syntax/squirrel.vim to unlet
b:filetype_in_cpp_family as it remains set even after updating the ft of
a file manually or through a modeline, not allowing c specific keywords
to be highlighted.

Since the variable b:filetype_in_cpp_family is only used by the c.vim
syntax script, unlet it directly after sourcing the c.vim runtime file
instead of at the end of the script.

Also update the last Change Header for both files.

closes: #13650

Signed-off-by: laburnumT <laburnumtec@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:28:44 +01:00
e06f2b498c runtime(doc): fix typo in change.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-08 21:22:38 +01:00
6863084d3b runtime(fortran): update syntax and ftplugins
closes: #13629

Signed-off-by: Ajit-Thakkar <142174202+Ajit-Thakkar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 23:08:59 +01:00
4e043b1fc7 runtime(vim): Update syntax file and syntax test (#13632)
Add missing assignment operators (:let*=, :let/= and :let%=).

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 22:58:40 +01:00
3f7855a612 runtime(doc): Sort options.txt alphabetically
Related to: vim/vim#13630

1. Sort section 3 (option-summary) of runtime/doc/options.txt in
   alphabetical order.
2. Remove double newlines in section 3 (option-summary).

I did not alphabetically sort ttimeout and ttimeoutlen because they seem
to belong with timeout and timeoutlen respectively, but I would like
some input on that decision.

Signed-off-by: laburnumT <laburnumtec@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 22:52:13 +01:00
563e6440bf runtime(doc): update todo items (#13631)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 17:19:06 +01:00
0280c0b9af runtime(doc): sort option-list alphabetically (#13630)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 16:37:32 +01:00
1c8e233cb8 patch 9.0.2153: no support to build on OpenVMS
Problem:  no support to build on OpenVMS
Solution: Add OpenVMS X86_64 platform port

closes: #13623

Co-authored-by: errael <errael@raelity.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Zoltan Arpadffy <zoltan.arpadffy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 16:04:23 +01:00
668971958c patch 9.0.2152: Using type unknown for List/Dict containers
Problem:  Using type unknown for List/Dict containers
Solution: Use 'any' instead

fixes: #13582
closes: #13625

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:51:50 +01:00
588f20dece patch 9.0.2151: 'breakindent' is not drawn after diff filler lines
Problem:  'breakindent' is not drawn after diff filler lines.
Solution: Correct check for whether 'breakindent' should be drawn.

closes: #13624

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:49:47 +01:00
2103a56eab runtime(doc): remove non-existent parameter in shift-command (#13626)
The variant with the {count} parameter is explained in the next item.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:44:33 +01:00
620f011694 patch 9.0.2150: Using int for errbuflen in option funcs
Problem:  Using int for errbuflen in option funcs
Solution: Use size_t for errbuflen in string option functions

Use size_t for errbuflen in string option functions

This started as size_t to int warning on Windows in
do_set_option_string().  Other option setting functions are using size_t
for errbuflen so I changed the type in the argument list and then chased
further compiler warnings into the string option functions in
optionstr.c changing ints to size_t as I went.

I also changed the type of os_errbuflen in optset_T to size_t and
updated related argument lists in optionstr.c, as well as updating
set_string_option() to also use size_t for errbuflen for consistency
with other string option setting functions.

closes: #13628

Signed-off-by: Mike Williams <mikew@globalgraphics.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-05 15:38:33 +01:00
5dd41d4b63 patch 9.0.2149: [security]: use-after-free in exec_instructions()
Problem:  [security]: use-after-free in exec_instructions()
Solution: get tv pointer again

[security]: use-after-free in exec_instructions()

exec_instructions may access freed memory, if the GA_GROWS_FAILS()
re-allocates memory. When this happens, the typval tv may still point to
now already freed memory. So let's get that pointer again and compare it
with tv. If those two pointers differ, tv is now invalid and we have to
refresh the tv pointer.

closes: #13621

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 22:54:43 +01:00
1e5d66408e patch 9.0.2148: Vim does not detect pacman.log file
Problem:  Vim does not detect pacman.log file
Solution: Detect pacmanlogs and add syntax highlighting

pacman.log is a filetype common to Arch Liux and related distributions.
Add some simple syntax highlighting for the pacmanlog filetype.

closes: #13618

Signed-off-by: Ronan Pigott <ronan@rjp.ie>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 20:46:15 +01:00
ca2eca7c79 runtime(doc): reference 'go-!' inside os_win32.txt for !start
closes: #13583

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 20:41:47 +01:00
3ee25965e4 patch 9.0.2147: Type check tests fail without the channel feature
Problem:  Type check tests fail without the channel feature
Solution: only run tests, when Vim was build with +channel

fixes: #13617
closes: #13619

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-04 20:31:14 +01:00
0d0b3b1951 patch 9.0.2146: text-property without type errors when joining
Problem:  text-property without type errors when joining
Solution: count all text-properties, with or without type
          before joining lines

Error when joining lines with text properties without a proper type

When joining lines, we need to consider all text properties that are
attached to a line, even when those text properties are invalid and do
not have a type attached to them.

However, since patch v9.0.0993
(commit: 89469d157a)
those text properties won't be counted when joining lines and therefore
this will cause the adjustment for text properties on joining to go
wrong (and may later cause SIGABRT with an invalid free pointer)

I am not sure, why the condition to not count text properties with a
valid type was added in patch v9.0.993, because no test fails if those
condition is removed. So let's just remove this condition and add a test
that verifies, that we are able to join lines, even when the text
properties attached to it do not have a valid type.

fixes: #13609
closes: #13614

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:56:43 +01:00
5b4d1fcbf0 patch 9.0.2145: wrong scrolling in insert mode with smoothscroll
Problem:  Wrong scrolling in Insert mode with 'smoothscroll' at the
          bottom of the window.
Solution: Don't use set_topline() when 'smoothscroll' is set.

fixes: #13612
closes: #13613

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:54:10 +01:00
4e26a9aab6 patch 9.0.2144: Text properties causes wrong line wrapping
Problem:  Text properties causes wrong line wrapping to be drawn.
Solution: Find the index of the last text property that inserts text.

closes: #13611

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:50:47 +01:00
c089c3816b CI: disable the test_terminal_resize2() test for GH CI in gui mode (#13615)
becaues it tends to time-out CI for unknown reasons.

related: #13566

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-03 17:48:29 +01:00
abfa13ebe9 patch 9.0.2143: [security]: buffer-overflow in ex_substitute
Problem:  [security]: buffer-overflow in ex_substitute
Solution: clear memory after allocating

When allocating the new_start pointer in ex_substitute() the memory
pointer points to some garbage that the following for loop in
ex_cmds.c:4743 confuses and causes it to accessing the new_start pointer
beyond it's size, leading to a buffer-overlow.

So fix this by using alloc_clear() instead of alloc(), which will
clear the memory by NUL and therefore cause the loop to terminate
correctly.

Reported by @henices, thanks!

closes: #13596
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:51 +01:00
b39b240c38 patch 9.0.2142: [security]: stack-buffer-overflow in option callback functions
Problem:  [security]: stack-buffer-overflow in option callback functions
Solution: pass size of errbuf down the call stack, use snprintf()
          instead of sprintf()

We pass the error buffer down to the option callback functions, but in
some parts of the code, we simply use sprintf(buf) to write into the error
buffer, which can overflow.

So let's pass down the length of the error buffer and use sprintf(buf, size)
instead.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:51 +01:00
0fb375aae6 patch 9.0.2141: [security]: buffer-overflow in suggest_trie_walk
Problem:  [security]: buffer-overflow in suggest_trie_walk
Solution: Check n before using it as index into byts array

Basically, n as an index into the byts array, can point to beyond the byts
array. So let's double check, that n is within the expected range after
incrementing it from sp->ts_curi and bail out if it would be invalid.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:50 +01:00
eec0c2b3a4 patch 9.0.2140: [security]: use-after-free in win-enter
Problem:  [security]: use-after-free in win-enter
Solution: validate window pointer before calling win_enter()

win_goto() may stop visual mode, if it is active. However, this may in
turn trigger the ModeChanged autocommand, which could potentially free
the wp pointer which was valid before now became stale and points to now
freed memory.

So before calling win_enter(), let's verify one more time, that the
wp pointer still points to a valid window structure.

Reported by @henices, thanks!

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:58:50 +01:00
9cc95aa0d8 CI: check that all files are listed in Filelist (#13601)
Sometimes patches add files that should be included in tarballs for
distribution, but are not added to Filelist (used by Makefile to build
the tar archive).  This can break the build, or it can be silently
ignored as runtime files are simply not included in the distribution.

Add a CI check to ensure all files tracked in the repository are
assigned to a variable in Filelist.  A few files were not listed because
they do not need to be included in builds and tarballs, so add an IGNORE
variable for these exceptions.

Co-authored-by: Peter Simonyi <pts@petersimonyi.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:07:42 +01:00
4f3480c943 patch 9.0.2139: html.angular ft is problematic
Problem:  html.angular ft is problematic
Solution: partly revert v9.0.2137

The html.angular filetype causes issues and does not trigger FileType
autocommands for the html or angular filetypes.

So let's roll back that particular change and detect this only as html
file

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

closes: #13604

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 18:01:17 +01:00
926c3f45a2 CI: disable the test_terminal_resize() test for GH CI in GUI (#13603)
fixes: #13566

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-12-01 17:59:32 +01:00
fda700cb04 patch 9.0.2138: Overflow logic requires long long
Problem:  Overflow logic requires long long
Solution: Define vimlong_T data type to make life easier
          for porters

closes: #13598

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 18:20:00 +01:00
72314bb85f runtime(Filelist): include several missing files (#13600)
These files were discovered to be missing from Filelist, and thus
distribution tarballs:
- editorconfig plugin
- extra files for Rust support
- readme for Haiku OS builds

Co-authored-by: Peter Simonyi <pts@petersimonyi.ca>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 17:46:55 +01:00
7bed263c34 patch 9.0.2137: Can't detect angular & mustache filetypes
Problem:  Can't detect angular & mustache filetypes
Solution: Detect *.mustache as Mustache filetype;
          detect *.component.html as html.angular filetype

closes: #13594

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 17:41:19 +01:00
110dd905dd runtime(syntax-test): ci fails, disable html test for now
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-30 17:33:32 +01:00
8ceb99001b patch 9.0.2136: MSVC errorformat can be improved
Problem:  MSVC errorformat can be improved
Solution: parse error type and column number in MSVC errorformat

closes: #13587

Signed-off-by: Shawn Hatori <shawn.hatori@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:51:07 +01:00
fcaeb3d42b patch 9.0.2135: No test for mode() when executing Ex commands
Problem:  No test for mode() when executing Ex commands
Solution: Add some test cases and simplify several other test cases.
          Also add a few more test cases for ModeChanged.

closes: #13588

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:46:29 +01:00
ffd6d31cb2 runtime(lang): Revise Makefile (#13589)
* Revise runtime/lang/Makefile
* Use predefined variables (`$@`, `$<`) instead of the actual file names.
  (Adding new rules should become easier.)
* Adjust spacing.
* Regenerate converted menu files

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:44:28 +01:00
a9058440b7 runtime(html): Update syntax file (#13591)
Add missing search element and update ARIA attribute list.

Add a very basic test file to check all elements are matched.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-28 20:41:41 +01:00
c4ffeddfe5 patch 9.0.2134: ml_get error when scrolling
Problem:  ml_get error when scrolling after delete
Solution: mark topline to be validated in main_loop
          if it is larger than current buffers line
          count

reset_lnums() is called after e.g. TextChanged autocommands and it may
accidentally cause curwin->w_topline to become invalid, e.g. if the
autocommand has deleted some lines.

So verify that curwin->w_topline points to a valid line and if not, mark
the window to have w_topline recalculated in main_loop() in
update_topline() after reset_lnums() returns.

fixes: #13568
fixes: #13578

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 23:25:03 +01:00
d1c3ef1f47 patch 9.0.2133: Cannot detect overstrike mode in Cmdline mode
Problem:  Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike

closes: #13569

Signed-off-by: Sam-programs <None>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 22:22:51 +01:00
5c23343770 patch 9.0.2132: Duplicate Netbeans Error Message
Problem:  Duplicate Netbeans Error Message
Solution: Remove duplicate message

We have 2 error Messages used for the Netbeans interface:

- EXTERN char e_invalid_buffer_identifier_in_close[]
  INIT(= N_("E648: Invalid buffer identifier in close"));
- EXTERN char e_invalid_buffer_identifier_in_close_2[]
  INIT(= N_("E649: Invalid buffer identifier in close"));

Since the error message is exactly the same, get rid of the  second
message.

closes: #13584

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 20:04:24 +01:00
b9efc72c24 patch 9.0.2131: not all nushell files detected
Problem:  not all nushell files detected
Solution: use *.nu to detect nushell files

closes: #13586

Signed-off-by: Daniel Buch Hansen <boogiewasthere@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 20:00:56 +01:00
c6754de5dd translation(de): Updated German translations (#13585)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-27 19:59:15 +01:00
cf40409e7d runtime(nginx): add additional nginx keywords (#13581)
* Add support for missing keywords to the nginx syntax plugin

This adds support for several keywords from
- the built-in HTTP/2 module,
- the built-in SSL module,
- the built-in uWSGI module,
- the experimental QUIC branch,
- the third-party SSL CT module,
- the third-party dynamic TLS records patch.

Co-Author: ObserverOfTime <chronobserver@disroot.org>

* Add missing http2/ http3 keywords to nginx plugin

Co-authored-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 15:06:27 +01:00
64c6bfd8ee runtime(tutor): add Make_mvc.mak file for tutor (#13580)
* Added Make_mvc.mak file for tutor

* updated Filelist

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 15:01:56 +01:00
2bad26fe2c translation(ru): updated Russian translations for tutorials (#13579)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 10:14:11 +01:00
4e7727dd88 translation(it): updated Italian translation
Signed-off-by: Antonio Giovanni Colombo <azc100@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-26 10:11:54 +01:00
075ad70474 patch 9.0.2130: some errors with translation Makefiles
Problem:  some errors with translation Makefiles
Solution: fix issues

Update src/po/ makefiles after 9.0.2127

* Change how to check `%LANGUAGE%`.
  Check it only when needed.
* Add double quotes to where `GETTEXT_PATH` is used.
  Before 9.0.2127, this worked: `nmake -f Make_mvc.mak GETTEXT_PATH="\"C:\Program Files\Git\usr\bin\""` (which was a bit tricky.)
  9.0.2127 broke this and syntax error occurred.
  This doesn't work either in 9.0.2127: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"`
  With this Commit, this works: `nmake -f Make_mvc.mak GETTEXT_PATH="C:\Program Files\Git\usr\bin"`
* Better error report for the `check` target.
  Show the line number of the error. (Imported from vim-jp/lang-ja.)

closes: #13567

Signed-off-by: Ken Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:51:00 +01:00
a555069b7d patch 9.0.2129: [security]: use-after-free in call_dfunc()
Problem:  [security]: use-after-free in call_dfunc()
Solution: Refresh dfunc pointer

closes: #13571

This Commit fixes a SEGV caused by a use-after-free bug in call_dfunc().
When calling check_ufunc_arg_types() from the call_dfunc() it may cause
def functions to be re-compiled and if there are too many def functions,
the def_functions array will be re-allocated.  Which means, that the
dfunc pointer in call_dfunc() now starts pointing to freed memory.

So we need to reset the dfunc pointer after calling
check_ufunc_arg_types().

Let's also add a test, to ensure we do not regress.

Signed-off-by: mityu <mityu.mail@gmail.com>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:41:20 +01:00
8c14e79737 runtime(doc): Update doc Makefiles with comments from #13567 (#13577)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:39:51 +01:00
813a538bb3 runtime(tsx): add indentation plugin (fixes #13574) (#13576)
for now, let's just use the typescript indent file.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:38:09 +01:00
2e31065a65 patch 9.0.2128: runtime(swig): add syntax and filetype plugins
Add syntax and filetype plugins for SWIG (Simplified Wrapper Interface
Generator) description files.

The default syntax for .i files highlights comments in a reverse
color scheme which doesn't look well.  This syntax builds
on vim's c++ syntax by adding highlighting for common swig
directives and user defined directives.  For an alternative
syntax, see vimscript #1247 (which I found after writing this).

closes: #13562

Co-authored-by: Matěj Cepl <mcepl@cepl.eu>
Co-authored-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Julien Marrec <julien.marrec@gmail.com>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-25 15:30:46 +01:00
e214692718 patch 9.0.2127: translation Makefiles can be improved
Problem:  translation Makefiles can be improved
Solution: Modified and extended po-related Makefiles and
          related files

closes: #13518

Signed-off-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:58:32 +01:00
00624a2fa0 patch 9.0.2126: unused assignments when checking 'listchars'
Problem:  Unused assignments when checking the value of 'listchars'.
Solution: Loop only once when just checking the value.  Add a test to
          check that this change doesn't cause double-free.

closes: #13559

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:47:16 +01:00
40ed6711bd patch 9.0.2125: File info disappears when 'cmdheight' has decreased
Problem:  File info disappears immediately when 'cmdheight' has just
          decreased due to switching tabpage and 'shortmess' doesn't
          contain 'o' or 'O'.
Solution: Make sure msg_row isn't smaller than cmdline_row.

fixes: #13560
closes: #13561

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:37:01 +01:00
2b0882fa65 patch 9.0.2124: INT overflow detection logic can be simplified
Problem:  INT overflow logic can be simplified
Solution: introduce trim_to_int() function

closes: #13556

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:33:05 +01:00
df63da98d8 patch 9.0.2123: Problem with initializing the length of range() lists
Problem:  Problem with initializing the length of range() lists
Solution: Set length explicitly when it shouldn't contain any items

range() may cause a wrong calculation of list length, which may later
then cause a segfault in list_find().  This is usually not a problem,
because range_list_materialize() calculates the length, when it
materializes the list.

In addition, in list_find() when the length of the range was wrongly
initialized, it may seem to be valid, so the check for list index
out-of-bounds will not be true, because it is called before the list is
actually materialized. And so we may eventually try to access a null
pointer, causing a segfault.

So this patch does 3 things:

- In f_range(), when we know that the list should be empty, explicitly
  set the list->lv_len value to zero. This should happen, when
  start is larger than end (in case the stride is positive) or
  end is larger than start when the stride is negative.
  This should fix the underlying issue properly. However,

- as a safety measure, let's check that the requested index is not
  out of range one more time, after the list has been materialized
  and return NULL in case it suddenly is.

- add a few more tests to verify the behaviour.

fixes: #13557
closes: #13563

Co-authored-by: Tim Pope <tpope@github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-23 20:14:28 +01:00
3770574e4a patch 9.0.2122: [security]: prevent overflow in indenting
Problem:  [security]: prevent overflow in indenting
Solution: use long long and remove cast to (int)

The shiftwidth option values are defined as being long. However, when
calculating the actual amount of indent, we cast down to (int), which
may cause the shiftwidth value to become negative and later it may even
cause Vim to try to allocate a huge amount of memory.

We already use long and long long variable types to calculate the indent
(and detect possible overflows), so the cast to (int) seems superfluous
and can be safely removed. So let's just remove the (int) cast and
calculate the indent using longs.

Additionally, the 'shiftwidth' option value is also used when determining
the actual 'cino' options. There it can again cause another overflow, so
make sure it is safe in parse_cino() as well.

fixes: #13554
closes: #13555

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-22 22:18:35 +01:00
26c11c5688 patch 9.0.2121: [security]: use-after-free in ex_substitute
Problem:  [security]: use-after-free in ex_substitute
Solution: always allocate memory

closes: #13552

A recursive :substitute command could cause a heap-use-after free in Vim
(CVE-2023-48706).

The whole reproducible test is a bit tricky, I can only reproduce this
reliably when no previous substitution command has been used yet
(which is the reason, the test needs to run as first one in the
test_substitute.vim file) and as a combination of the `:~` command
together with a :s command that contains the special substitution atom `~\=`
which will make use of a sub-replace special atom and calls a vim script
function.

There was a comment in the existing :s code, that already makes the
`sub` variable allocate memory so that a recursive :s call won't be able
to cause any issues here, so this was known as a potential problem
already.  But for the current test-case that one does not work, because
the substitution does not start with `\=` but with `~\=` (and since
there does not yet exist a previous substitution atom, Vim will simply
increment the `sub` pointer (which then was not allocated dynamically)
and later one happily use a sub-replace special expression (which could
then free the `sub` var).

The following commit fixes this, by making the sub var always using
allocated memory, which also means we need to free the pointer whenever
we leave the function. Since sub is now always an allocated variable,
we also do no longer need the sub_copy variable anymore, since this one
was used to indicated when sub pointed to allocated memory (and had
therefore to be freed on exit) and when not.

Github Security Advisory:
https://github.com/vim/vim/security/advisories/GHSA-c8qm-x72m-q53q

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-22 21:52:45 +01:00
8750e3cf81 runtime(netrw): Fix handling of very long filename on longlist style (#12150)
If there is a file with a very long filename (longer than
g:netrw_maxfilenamelen), and if g:netrw_liststyle is set to 1, no space
is inserted between the filename and the filesize and the file cannot be
opened because of this.

E.g.:
```
$ echo hello > 12345678901234567890123456789012	  # 32 bytes: OK
$ echo hello > 123456789012345678901234567890123  # 33 bytes: not OK
$ echo hello > 1234567890123456789012345678901234 # 34 bytes: not OK
$ echo hello > こんにちは                         # multibyte filename
$ LC_ALL=C.UTF-8 vim . --clean --cmd "set loadplugins" --cmd "let g:netrw_liststyle=1"
```

Then, it will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                              0 Mon Mar 13 19:25:16 2023
./                               0 Mon Mar 13 19:44:58 2023
12345678901234567890123456789012 6 Mon Mar 13 19:29:43 2023
12345678901234567890123456789012346 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901236 Mon Mar 13 19:29:49 2023
こんにちは                  6 Mon Mar 13 19:30:41 2023
```

If the length of the filename is 32 bytes, there is a space between the
filename and the filesize. However, when it is longer than 32 bytes, no
space is shown.

Also, you may find that the filesize of the multibyte named file is not
aligned.

After this patch is applied, the filelist will be shown like this:
```
" ============================================================================
" Netrw Directory Listing                                        (netrw v171)
"   /cygdrive/c/work/netrw-test
"   Sorted by      name
"   Sort sequence: [\/]$,\<core\%(\.\d\+\)\=\>,\.h$,\.c$,\.cpp$,\~\=\*$,*,\.o$,\
"   Quick Help: <F1>:help  -:go up dir  D:delete  R:rename  s:sort-by  x:special
" ==============================================================================
../                                             0 Mon Mar 13 20:49:22 2023
./                                              0 Mon Mar 13 21:12:14 2023
1234567890123456789012345678901             10000 Mon Mar 13 20:57:55 2023
12345678901234567890123456789012                6 Mon Mar 13 19:29:43 2023
123456789012345678901234567890123               6 Mon Mar 13 19:29:49 2023
1234567890123456789012345678901234              6 Mon Mar 13 19:32:40 2023
1234567890123456789012345678901234567       10000 Mon Mar 13 21:03:23 2023
1234567890123456789012345678901234567890    10000 Mon Mar 13 21:03:36 2023
123456789012345678901234567890123456789012  10000 Mon Mar 13 21:03:59 2023
1234567890123456789012345678901234567890123  10000 Mon Mar 13 21:03:45 2023
1234567890123456789012345678901234567890123456  5 Mon Mar 13 21:08:15 2023
12345678901234567890123456789012345678901234567  10 Mon Mar 13 21:05:21 2023
こんにちは                                      6 Mon Mar 13 19:30:41 2023
```

Now we have 32 + 2 + 15 = 49 characters for filename and filesize.
It tries to align the filesize as much as possible.
The last line that has multibyte filename is also aligned.

Also fixed the issue that the file list is not shown correctly when
g:netrw_sort_by is set to 'size' and g:netrw_sizestyle is set to 'h' or
'H'.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-22 10:20:01 +01:00
4e5c3cf07b patch 9.0.2120: un-used assignment in do_source_buffer_init
Problem:  un-used assignment in do_source_buffer_init
Solution: Remove it

Coverity warns about assigning NULL to line in scriptfile.c:1408,
because right after that assignment, in the next iteration of the loop,
line will be overwritten by the next value from vim_strsave().

And in case this was the last iteration, the line variable is no longer
used until the function returns. So we can safely remove that assignment.

closes: #13547

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:59:54 +01:00
6b36645f07 patch 9.0.2119: remove dead-condition in ex_class
Problem:  remove dead-condition in ex_class()
Solution: remove the extra condition

The variable is_class must be true once we reach the

,----
| else if (has_static)
`----

in line 1750, because we break out earlier if is_class is false in line
1598 of vim9class.c. And once 'has_static = TRUE', we must be in a
class and there fore is_class is true.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:57:05 +01:00
a5218a7330 patch 9.0.2118: [security]: avoid double-free in get_style_font_variants
Problem:  [security]: avoid double-free
Solution: Only fee plain_font, when it is not the same as bold_font

When plain_font == bold_font and bold_font is not NULL, we may end up
trying to free bold_font again, which already has been freed a few lines
above.

So only free bold_font, when the condition gui.font_can_bold is true,
which means that bold_font is not pointing to plain_font (so it needs to
be freed separately).

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:54:12 +01:00
567cae2630 patch 9.0.2117: [security] use-after-free in qf_free_items
Problem:  [security] use-after-free in qf_free_items
Solution: only access qfpnext, if it hasn't been freed

Coverity discovered a possible use-after-free in qf_free_items. When
freeing the qfline items, we may access freed memory, when qfp ==
qfpnext.

So only access qfpnext, when it hasn't been freed.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:52:12 +01:00
cb0c113ddc runtime(netrw): expand $COMSPEC without applying 'wildignore' (#13542)
When expanding $COMSPEC and a user has set :set wildignore=*.exe
netrw won't be able to properly cmd.exe, because it does not ignore the
wildignore setting.

So let's explicitly use expand() without applying the 'wildignore' and
'suffixes' settings to the result

closes: #13426

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:48:16 +01:00
69866449dd runtime(vim): Improve keymap file highlighting (#13550)
- Match :loadkeymap to EOF as a region and contain only allowed items.
- Add highlighting for <Char- notation.
- add basic syntax highlighting tests

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:43:40 +01:00
d2c977bb7c runtime(Filelist): include new doc-Makefiles (#13551)
Tags for help files disappeared with the latest Vim update in Fedora,
which is caused by silent error (it didn't stop the build) about missing
file. I use 'make unixall' in Fedora to get the latest patchlevels and
the new files were missing from Filelist file which is used for
generating the tarball.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 19:42:56 +01:00
596a9f29c8 runtime(doc): Fix whitespace and formatting of some help files (#13549)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-21 12:24:23 +00:00
aabca259fa runtime(doc): minor typo fixes (#13548)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-20 00:18:57 +01:00
e670d17342 patch 9.0.2116: No test for defining sign without attribute
Problem:  No test for defining sign without attribute
Solution: Add test for defining sign without attributes

closes: #13544

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-19 10:57:02 +01:00
6701abfb52 patch 9.0.2115: crash when callback function aborts because of recursiveness
Problem:  crash when callback function aborts because of recursiveness
Solution: correctly initialize rettv

Initialize rettv in invoke_popup_callback()

Since v9.0.2030, call_callback may exit early when the callback recurses
too much.  This meant that call_func, which would set rettv->v_type =
VAR_UNKNOWN, was not being called.

Without rettv->v_type being explicitly set, it still contained whatever
garbage was used to initialize the stack value in invoke_popup_callback.
This would lead to possible crashes when calling clear_tv(&rettv).

Rather than rely on action at a distance, explicitly initialize rettv's
type to VAR_UNKNOWN so clear_tv can tell nothing needs to be done.

closes: #13495
closes: #13545
Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-19 10:52:50 +01:00
22cbc8a4e1 patch 9.0.2114: overflow detection not accurate when adding digits
Problem:  overflow detection not accurate when adding digits
Solution: Use a helper function

Use a helper function to better detect overflows before adding integer
digits to a long or an integer variable respectively. Signal the
overflow to the caller function.

closes: #13539

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
2023-11-19 10:47:21 +01:00
22a97fc241 patch 9.0.2113: Coverity warns for another overflow in shift_line()
Problem:  Coverity warns for another overflow in shift_line()
Solution: Test for INT_MAX after the if condition, cast integer values
          to (long long) before multiplying.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Michael Henry <vim@drmikehenry.com>
Signed-off-by: Ernie Rael <errael@raelity.com>
2023-11-19 10:45:24 +01:00
ab4f27e2a8 runtime(doc): Refactor doc-Makefiles (#13519)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-18 17:12:20 +01:00
6ffe084e6e runtime(doc): document proper notation of gVim, document vim-security list
Also, while at it, document the vim-security mailing list.

closes: #13429

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-18 10:13:13 +01:00
cc6be3e755 translation(sr): Update Serbian messages translation (#13538)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-17 12:54:10 +01:00
6bf131888a patch 9.0.2112: [security]: overflow in shift_line
Problem:  [security]: overflow in shift_line
Solution: allow a max indent of INT_MAX

[security]: overflow in shift_line

When shifting lines in operator pending mode and using a very large
value, we may overflow the size of integer. Fix this by using a long
variable, testing if the result would be larger than INT_MAX and if so,
indent by INT_MAX value.

Special case: We cannot use long here, since on 32bit architectures (or
on Windows?), it typically cannot take larger values than a plain int,
so we have to use long long count, decide whether the resulting
multiplication of the shiftwidth value * amount is larger than INT_MAX
and if so, we will store INT_MAX as possible larges value in the long
long count variable.

Then we can safely cast it back to int when calling the functions to set
the indent (set_indent() or change_indent()). So this should be safe.

Add a test that when using a huge value in operator pending mode for
shifting, we will shift by INT_MAX

closes: #13535

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:38 +01:00
73b2d3790c patch 9.0.2111: [security]: overflow in get_number
Problem:  [security]: overflow in get_number
Solution: Return 0 when the count gets too large

[security]: overflow in get_number

When using the z= command, we may overflow the count with values larger
than MAX_INT. So verify that we do not overflow and in case when an
overflow is detected, simply return 0

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:38 +01:00
060623e4a3 patch 9.0.2110: [security]: overflow in ex address parsing
Problem:  [security]: overflow in ex address parsing
Solution: Verify that lnum is positive, before substracting from
          LONG_MAX

[security]: overflow in ex address parsing

When parsing relative ex addresses one may unintentionally cause an
overflow (because LONG_MAX - lnum will overflow for negative addresses).

So verify that lnum is actually positive before doing the overflow
check.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:38 +01:00
58f9befca1 patch 9.0.2109: [security]: overflow in nv_z_get_count
Problem:  [security]: overflow in nv_z_get_count
Solution: break out, if count is too large

When getting the count for a normal z command, it may overflow for large
counts given. So verify, that we can safely store the result in a long.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:37 +01:00
ac63787734 patch 9.0.2108: [security]: overflow with count for :s command
Problem:  [security]: overflow with count for :s command
Solution: Abort the :s command if the count is too large

If the count after the :s command is larger than what fits into a
(signed) long variable, abort with e_value_too_large.

Adds a test with INT_MAX as count and verify it correctly fails.

It seems the return value on Windows using mingw compiler wraps around,
so the initial test using :s/./b/9999999999999999999999999990 doesn't
fail there, since the count is wrapping around several times and finally
is no longer larger than 2147483647. So let's just use 2147483647 in the
test, which hopefully will always cause a failure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:37 +01:00
cb0b99f067 patch 9.0.2107: [security]: FPE in adjust_plines_for_skipcol
Problem:  [security]: FPE in adjust_plines_for_skipcol
Solution: don't divide by zero, return zero

Prevent a floating point exception when calculating w_skipcol (which can
happen with a small window when the number option is set and cpo+=n).

Add a test to verify

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:37 +01:00
25aabc2b8e patch 9.0.2106: [security]: Use-after-free in win_close()
Problem:  [security]: Use-after-free in win_close()
Solution: Check window is valid, before accessing it

If the current window structure is no longer valid (because a previous
autocommand has already freed this window), fail and return before
attempting to set win->w_closing variable.

Add a test to trigger ASAN in CI

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-16 22:04:00 +01:00
67abf1592c runtime(tar): comment out strange error condition check
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 17:17:12 +01:00
bb800a7907 patch 9.0.2105: skipcol not reset when topline changed
Problem:  Skipcol is not reset when topline changed scrolling cursor to top
Solution: reset skipcol

closes: #13528
closes: #13532

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 17:05:18 +01:00
bc8f79d36a patch 9.0.2104: wast filetype should be replaced by wat filetype
Problem:  wast filetype should be replaced by wat filetype
Solution: start using the official wat filetype name

runtime: rename `wast` filetype to `wat` (Wasm text format)

The problem is the name of the current filetype wast. When the plugin
was initially created, the file extension for Wasm text format was not
fixed and .wast was more popular.

However, recently .wat became the official file extension for
WebAssembly text (WAT) format and .wast is now a file extension for the
unofficial WAST format, which is a superset of .wat for the convenience
to describe the Wasm specification conformance tests.

https://webassembly.js.org/docs/contrib-wat-vs-wast.html

However for now, let's keep using the `wat` filetype even for the .wast
extension, so that we at least do not lose the filetype settings and
syntax highlighting. This can be adjusted later, if it turns out to have
a separate need for.

closes: #13533

Signed-off-by: rhysd <lin90162@yahoo.co.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 16:46:07 +01:00
30c762d99a runtime(doc): fix typo in pi_gzip.txt
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-14 16:44:37 +01:00
2076463e38 patch 9.0.2103: recursive callback may cause issues on some archs
Problem:  recursive callback may cause issues on some archs
Solution: Decrease the limit drastically to 20

Recursive callback limit causes problems on some architectures

Since commit 47510f3d65 we have a test
that causes a recursive popup callback function to be executed. However
it seems the current limit of 'maxfuncdepth' option value is still too
recursive for some 32bit architectures (e.g. 32bit ARM).

So instead of allowing a default limit of 100 (default value for
'maxfuncdepth'), let's reduce this limit to 20. I don't think there is a
use case where one would need such a high recursive callback limit and a
limit of 20 seems reasonable (although it is currently hard-coded).

closes: #13495
closes: #13502

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:59:29 +01:00
9588666360 patch 9.0.2102: matchparen highlight not cleared in completion mode
Problem:  matchparen highlight not cleared in completion mode
Solution: Clear matchparen highlighting in completion mode

Remove hard-coded hack in insexpand.c to clear the :3match before
displaying the completion menu.

Add a test for matchparen highlighting. While at it, move all test tests
related to the matchparen plugin into a separate test file.

closes: #13493
closes: #13524

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:55:01 +01:00
2dd613f57b runtime(termdebug): improve the breakpoint sign label (#13525)
// related #12589
// that should be the last chat (I) with Bram, r.i.p

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:53:39 +01:00
4ae16d721a Improve CONTRIBUTING.md
closes: #13521

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 16:49:07 +01:00
fdbadea4b6 patch 9.0.2101: CI: test_termdebug may still fail
Problem:  CI: test_termdebug may still fail
Solution: use term_wait() to make it more robust

closes: #13529

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-12 09:42:12 +01:00
424da590e4 runtime(doc): Renamed "makefile_*.mak" for Vim documentation (#13517)
* Rename makefile_all.mak and makefile_mvc.mak

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 19:26:00 +01:00
2c133f6c1a runtime(lynx): Update for Lynx 2.8.9 (#13510)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 19:06:56 +01:00
9358b8d993 runtime(vim): Improve :let-heredoc syntax highlighting (#12923)
"trim" and "eval" are allowed in any order and whitespace is not
required after "=<<".

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 19:06:01 +01:00
305127f9f2 patch 9.0.2100: CI: test_termdebug fails
Problem:  CI: test_termdebug fails
Solution: only test for a changed winlayout, if the window
          width actually changed

Also, include an unrelated comment (which doesn't warrant its own patch
number)

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 18:59:33 +01:00
1b08d2cd07 runtime(doc): clarify when formatoptions applies
closes: #13503

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 15:51:19 +01:00
5994329667 runtime(i3config): Update for i3 4.23 (#13522)
Co-authored-by: Ivan Grimaldi <grimaldi.ivam@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 13:09:26 +01:00
6cd2d1df92 patch 9.0.2099: win32: terminal codes clear the terminal
Problem:  Terminal control codes¹ are sent even when silent
          mode is on, causing the terminal to clear up
Solution: Block any terminal codes when silent mode is on

¹https://learn.microsoft.com/en-us/windows/console/console-virtual-terminal-sequences

fixes: #12822
closes: #13521

Signed-off-by: Nir Lichtman <nir@lichtman.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 11:33:43 +01:00
ccn
2c5240ec8b runtime(doc): Update usr_51.txt to be more inclusive (#13496)
use their instead of his as the user may not be male


Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:35:50 +01:00
521fb7e143 runtime(doc): Add missing null_<type> help tags (#13498)
Problem:  Not all null_<type> values have a help tag
Solution: Add missing help tags

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:33:43 +01:00
f1952d9fa8 CI: labeler.yml use all instead of any for doc detection (#13507)
fixup: https://github.com/vim/vim/pull/13506#pullrequestreview-1722013761

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:14:48 +01:00
4f9074b96c patch 9.0.2098: No filetype support for xcompose files
Problem:  No filetype support for xcompose files
Solution: Add filetype detection

closes: #13508

Signed-off-by: ObserverOfTime <chronobserver@disroot.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:12:27 +01:00
bee966d3fe runtime(doc): clarify :help inclusion section
Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:10:24 +01:00
cb5e7a2026 CI: labeler.yml: Add some more component detection rules (#13511)
Add rules for `installer`, `platform-mac`, `platform-windows`, `xxd`.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 09:04:31 +01:00
8f0fe20ff1 patch 9.0.2097: No support for cypher files
Problem:  No support for cypher files
Solution: Add cypher filetype detection

Cypher query language support to work with (mostly) graph databases.

Already existing lsp support in Neovim's nvim-lspconfig:
https://github.com/neovim/nvim-lspconfig/blob/master/doc/server_configurations.md#cypher_ls

closes: #13516

Signed-off-by: Gerrit Meier <meistermeier@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 08:58:26 +01:00
03042a2753 patch 9.0.2096: Vim9: confusing usage of private
Problem:  Vim9: confusing usage of private
Solution: clarify and use protected keyword instead

[vim9class] document `_` as protected instead of private

fixes #13504
closes: #13520

Signed-off-by: Ernie Rael <errael@raelity.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-11 08:53:32 +01:00
4b0018feca CI: labeler.yml: add documentation label (#13506)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-09 08:51:03 +00:00
20a94f44b3 runtime(doc): fix grammar in termdebug doc, remove trailing spaces (#13505)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-09 07:21:58 +00:00
ca48202b6f runtime(termdebug): improve window handling, shorten var types
closes #13474

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 22:03:26 +01:00
7fbbd7fdc6 runtime(termdebug): handle buffer-local mappings properly
closes: #13475

Signed-off-by: shane.xb.qian <shane.qian@foxmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 21:46:30 +01:00
6a650bf696 patch 9.0.2095: statusline may look different than expected
Problem:  statusline may look different than expected
Solution: do not check for highlighting of stl and stlnc characters

statusline fillchar may be different than expected

If the highlighting group for the statusline for the current window
|hl-StatusLine| or the non-current window |hl-StatusLineNC| are cleared
(or do not differ from each other), than Vim will use the hard-coded
fallback values '^' (for the non-current windows) or '=' (for the
current window).  I believe this was done, to make sure the statusline
will always be visible and be distinguishable from the rest of the
window.

However, this may be unexpected, if a user explicitly defined those
fillchar characters just to notice that those values are then not used
by Vim.

So, let's assume users know what they are doing and just always return
the configured stl and stlnc values.  And if they want the statusline to
be non-distinguishable from the rest of the window space, so be it.  It
is their responsibility and Vim shall not know better what to use.

fixes: #13366
closes: #13488

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 21:23:29 +01:00
1fc47c2c9b patch 9.0.2094: Vim9: need more assignment tests
Problem:  Vim9: need more assignment tests
Solution: Add test for using different types in assignment, function
          arguments and return values

closes: #13491

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 21:10:11 +01:00
d56f15caf6 runtime(wget): Update for Wget2 2.1.0 (#13497)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 20:53:20 +01:00
4d62a2f443 patch 9.0.2093: Unsupported option causes skipping of modeline test
Problem:  Unsupported option causes rest of modeline test to be skipped.
Solution: Revert the change from patch 8.2.1432.

closes: #13499
closes: #13500

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-08 20:51:02 +01:00
2a94e98792 patch 9.0.2092: tests: failure in test_arabic
Problem:  tests: failure in test_arabic
Solution: adjust the test for the changed arabic keymap

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 19:18:52 +01:00
caee7956a2 runtime(keymap): Switch Hindu-Arabic to Arabic numerals in arabic keymap (#13430)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 17:59:20 +01:00
3570631dc6 translation(ru): Update the translation of Russian messages to Vim 9.0.2091 (#13490)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 17:56:14 +01:00
3d37231437 runtime(tar): improve the error detection
Do not rely on the fact, that the last line matches warning, error,
inappropriate or unrecognized to determine if an error occurred. It
could also be a file, contains such a keyword.

So make the error detection slightly more strict and only assume an
error occured, if in addition to those 4 keywords, also a space matches
(this assumes the error message contains a space), which luckily on Unix
not many files match by default.

The whole if condition seems however slightly dubious.  In case an error
happened, this would probably already be caught in the previous if
statement, since this checks for the return code of the tar program.

There may however be tar implementations, that do not set the exit code
for some kind of error (but print an error message)? But let's keep this
check for now, not many people have noticed this behaviour until now, so
it seems to work reasonably well anyhow.

related: #6425
fixes: #13489
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 17:51:09 +01:00
da4e433dc3 runtime(doc): document vim-script library function
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 10:45:49 +01:00
b2a4c110a5 runtime(dist): Make dist/vim.vim work properly when lacking vim9script support (#13487)
`:return` cannot be used outside of `:function` (or `:def`) in older Vims
lacking Vim9script support or in Neovim, even when evaluation is being skipped
in the dead `:else` branch.

Instead, use the pattern described in `:h vim9-mix`, which uses `:finish` to end
script processing before it reaches the vim9script stuff.

Signed-off-by: Sean Dewar <seandewar@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 10:11:37 +01:00
6709816f78 patch 9.0.2091: Vim9: cannot convert list to string using +=
Problem:  Vim9: cannot convert list to string using +=
          (after 9.0.2072)
Solution: convert dict index to string later in compile_member()

fixes: #13485
closes: #13486

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-05 10:07:03 +01:00
4f174f0de9 runtime(dist): add legacy version for central vim library
Also, enable the zip and gzip plugins by default, unless those variables
were not explicitly set by the user.

related: #13413

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 11:19:28 +01:00
cd8a3eaf53 runtime(dist): centralize safe executable check and add vim library (#13413)
Follow up to 816fbcc26 (patch 9.0.1833: [security] runtime file fixes,
2023-08-31) and f7ac0ef50 (runtime: don't execute external commands when
loading ftplugins, 2023-09-06).

This puts the logic for safe executable checks in a single place, by introducing
a central vim library, so all filetypes benefit from consistency.

Notable changes:
- dist#vim because the (autoload) namespace for a new runtime support
  library. Supporting functions should get documentation. It might make
  life easier for NeoVim devs to make the documentation a new file
  rather than cram it into existing files, though we may want
  cross-references to it somewhere…
- The gzip and zip plugins need to be opted into by enabling execution
  of those programs (or the global plugin_exec). This needs
  documentation or discussion.
- This fixes a bug in the zig plugin: code setting s:tmp_cwd was removed
  in f7ac0ef50 (runtime: don't execute external commands when loading
  ftplugins, 2023-09-06), but the variable was still referenced. Since
  the new function takes care of that automatically, the variable is no
  longer needed.

Signed-off-by: D. Ben Knoble <ben.knoble+github@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 10:11:17 +01:00
08b1c61e8b runtime(doc): clarify terminal capabilities for focus reporting
closes: #13440

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 10:03:52 +01:00
57f9ce1a09 patch 9.0.2090: complete_info() skips entries with 'noselect'
Problem:  complete_info() skips entries with 'noselect'
Solution: Check, if first entry is at original text state

Unfortunately, Commit daef8c7437
introduced a regression, that when ':set completeopt+=noselect' is set
and no completion item has been selected yet, it did not fill the
complete_info['items'] list.

This happened, because the current match item did not have the
CP_ORIGINAL_TEXT flag set and then the cp->prev pointer did point to the
original flag item, which caused the following while loop to not being
run but being skipped instead.

So when the 'noselect' is set, only start with to the previous selection
item, if the initial completion item has the CP_ORIGINAL_TEXT flag set,
else use the 2nd previous item instead.

fixes: #13451
closes: #13452

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:58:14 +01:00
b23c1fc596 runtime(doc): Add Makefile for the Vim documentation on Windows (#13467)
* Makefile for the Vim documentation on Windows

* Corrected comments

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:57:09 +01:00
15d270019e patch 9.0.2089: sound_playfile() fails when using powershell
Problem:  sound_playfile() fails when using powershell
Solution: quote filename using doublequotes, don't escape filename,
          because it doesn't use the shell

Avoiding powershell escaping because mci open command doesn't support
single quoted filenames: open 'C:\whatever\sound.wav' is not valid.

closes: #13471

Signed-off-by: GuyBrush <miguel.barro@live.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:54:00 +01:00
5a53925a6e patch 9.0.2088: Vim9: still allows abstract static methods
Problem:  Vim9: still allows abstract static methods
          (after v9.0.2084, v9.0.2085 and v9.0.2087)
Solution: Disallow abstract static methods

closes: #13479

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:42:46 +01:00
ce3b0136c6 runtime(sh): Update sh syntax and add shDerefOffset to shDerefVarArray for bash (#13480)
Add shDerefOffset to shDerefVarArray.

Example code:

```bash
declare -a a=({a..z})

echo "${a[@]:1:3}"
```


Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:41:37 +01:00
2f54c13292 runtime(script.vim): make strace ft check less strict (#13482)
Strace output, depending on parameters (-ttf this time), can dump both
times and pid:
  1038  07:14:20.959262 execve("./e.py", ["./e.py"], 0x7ffca1422840 /* 51 vars */) = 0 <0.000150>

So loose the regexp matching this, so that the above is matched too.

Fixes #13481.

Co-authored-by: Jiri Slaby (SUSE) <jirislaby@kernel.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-04 09:39:54 +01:00
33c1da7ff4 patch 9.0.2087: build-failure in vim9class
Problem:  build-failure in vim9class
Solution: reference correct error message,
          disable non-failing test

closes: #13476
closes: #13477

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 22:45:12 +01:00
deba02ddd4 patch 9.0.2086: code cleanup for option callbacks needed
Problem:  code cleanup for option callbacks needed
Solution: remove flag os_doskip, it's not necessary, as we can check,
          whether an error message was returned

Remove unnecessary field os_doskip

Callback functions for boolean options set os_doskip immediately before
returning an error message, so os_doskip isn't actually needed.

closes: #13461

Signed-off-by: zeertzjq <zeertzjq@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 21:01:19 +01:00
2b358adde0 patch 9.0.2085: Vim9: abstract can be used in interface
Problem:  Vim9: abstract can be used in interface
Solution: Disallow the use of abstract in an interface

fixes: #13456
closes: #13464

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:58:58 +01:00
ef9e3f8924 patch 9.0.2084: Vim9: abstract static methods are possible
Problem:  Vim9: abstract static methods are possible
Solution: Disallow abstract static methods

fixes: #13462
closes: #13466

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:43:57 +01:00
1858e2b22a runtime(sh) Update sh syntax and add shDblParen to shCaseList (#13469)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:33:56 +01:00
1b1c9f272d patch 9.0.2083: Perl: xsubpp may be in non-standard location
Problem:  Perl: xsubpp may be in non-standard location
Solution: Add --with-subpp configure option

configure.ac: Add --with-xsubpp configure option

Some environments (such as flatpaks) cannot count on xsubpp being
in the common Perl directory, so a configure option should be used for
clean solution.

closes: #13470

Signed-off-by: Zdenek Dohnal <zdohnal@redhat.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:19:06 +01:00
2b89afd5eb runtime(debversions): Add noble (24.04 LTS) as Ubuntu release name (#13472)
Signed-off-by: James McCoy <jamessan@debian.org>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:12:29 +01:00
43cb8e1c3b patch 9.0.2082: test_channel may fail because of IPv6 config issue
Problem:  test_channel may fail because of IPv6 config issues
Solution: Catch and skip the test, if getaddrinfo() fails with
          'Address family not supported'

Mark tests as skipped when ch_open encounters E901

On some of the Debian build systems, the IPv6 channel tests fail because
`ch_open('[::1]:<port>', ...)` raises the error "E901: getaddrinfo() in
channel_open(): Address family for hostname not supported".

This appears to happen because getaddrinfo() can't perform the reverse
lookup for the ::1, which is a config issue on that system.  Therefore,
instead of reporting a test failure, mark the test as skipped due to the
bad network config

closes: #13473

Signed-off-by: James McCoy <jamessan@jamessan.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-11-02 20:05:38 +01:00
1bf1bf569b patch 9.0.2081: smoothscroll may result in wrong cursor position
Problem:  With 'smoothscroll' set, "w_skipcol" is not reset when unsetting 'wrap'.
          Resulting in incorrect calculation of the cursor position.
Solution: Reset "w_skipcol" when unsetting 'wrap'.

fixes:  #12970
closes: #13439

Signed-off-by: Luuk van Baal <luukvbaal@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:43:31 +02:00
a390e984db runtime(sh): add shDblParen to shLoopList for bash (#13445)
add shDblParen to shLoopList to correctly highlight
arithmetic expressions for Bash and Ksh

This should allow code such as:

```bash
declare -i i j
for i in foo bar
do ((j = 1 << j))
done
```

Signed-off-by: Lucien Grondin <grondilu@yahoo.fr>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:40:48 +02:00
171c50e0b0 patch 9.0.2080: vim9_script test too large
Problem:  vim9_script test too large
Solution: split vim9 type alias test into
          separate test file

Move type alias tests to a separate test file

closes: #13447

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:31:53 +02:00
8ebdbc9e6d runtime(doc): all secure options should note this restriction in the documentation (#13448)
Problem:  Not all secure options document their status
Solution: Describe secure context :set restrictions in each help entry

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:26:19 +02:00
c1c177a47b patch 9.0.2079: Not all Dart files detected
Problem:  Not all Dart files detected
Solution: Add shebang filetype detection for Dart

closes: #13449

Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 21:21:49 +02:00
feaccd2395 patch 9.0.2078: several problems with type aliases
Problem:  several problems with type aliases
Solution: Check for more error conditions, add tests,
          fix issues

Check for more error conditions and add additional tests

fixes  #13434
fixes  #13437
fixes  #13438
closes #13441

Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-28 15:53:55 +02:00
87ca5e86fa patch 9.0.2077: CI fails because of trailing whitespace in test
Problem:  CI fails because of trailing whitespace in test
Solution: Remove it

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27 19:48:38 +02:00
ec3cebbd2b patch 9.0.2076: Vim9: No support for type aliases
Problem:  Vim9: No support for type aliases
Solution: Implement :type command

A type definition is giving a name to a type specification.  This also known
type alias.

	:type ListOfStrings = list<string>

The type alias can be used wherever a built-in type can be used.  The type
alias name must start with an upper case character.

closes: #13407

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-27 19:35:26 +02:00
4bca4897a1 patch 9.0.2075: TextChangedI may not always trigger
Problem:  TextChangedI may not always trigger
Solution: trigger it in more cases: for insert/
          append/change operations, and when
          opening a new line,

fixes: #13367
closes: #13375

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2023-10-27 19:26:49 +02:00
daef8c7437 patch 9.0.2074: Completion menu may be wrong
Problem:  Completion menu may be wrong
Solution: Check for the original direction of the completion menu,
          add more tests, make it work with 'noselect'

completion: move in right direction when  filling completion_info()

When moving through the insert completion menu and switching directions,
we need to make sure we start at the correct position in the list and
move correctly forward/backwards through it, so that we do not skip
entries and the selected item points to the correct entry in the list
of completion entries generated by the completion_info() function.

The general case is this:

1) CTRL-X CTRL-N, we will traverse the list starting from
   compl_first_match and then go forwards (using the cp->next pointer)
   through the list (skipping the very first entry, which has the
   CP_ORIGINAL_TEXT flag set (since that is the empty/non-selected entry

2) CTRL-X CTRL-P, we will traverse the list starting from
   compl_first_match (which now points to the last entry). The previous
   entry will have the CP_ORIGINAL_TEXT flag set, so we need to start
   traversing the list from the second prev pointer.

There are in fact 2 special cases after starting the completion menu
with CTRL-X:

3)  CTRL-N and then going backwards by pressing CTRL-P again.
    compl_first_match will point to the same entry as in step 1 above,
    but since compl_dir_foward() has been switched by pressing CTRL-P
    to backwards we need to pretend to be in still in case 1 and still
    traverse the list in forward direction using the cp_next pointer

4)  CTRL-P and then going forwards by pressing CTRL-N again.
    compl_first_match will point to the same entry as in step 2 above,
    but since compl_dir_foward() has been switched by pressing CTRL-N
    to forwards we need to pretend to be in still in case 2 and still
    traverse the list in backward direction using the cp_prev pointer

For the 'noselect' case however, this is slightly different again. When
going backwards, we only need to go one cp_prev pointer back. And
resting of the direction works again slightly different. So we need to
take the noselect option into account when deciding in which direction
to iterate through the list of matches.

related: #13402
related: #12971
closes: #13408

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27 19:16:26 +02:00
650dcfc8d1 runtime(netrw): don't echo empty lines (#13431)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-27 19:07:38 +02:00
b0221819f3 patch 9.0.2073: typo in quickfix.c comments
Problem:  typo in quickfix.c comments
Solution: fix them

closes: #13422

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-26 23:15:44 +02:00
7b7cda67a1 runtime(debian): update debian related runtime files (#13423)
* Update Debian runtime files

Add mantic as a supported Ubuntu release and move buster/kinetic to
unsupported.

Add syntax highlighting for deb822sources filetype.

Add debsources ftplugin to set relevant comment options.

Move common version information to shared/debversions.vim

Closes #11934

Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Signed-off-by: James McCoy <jamessan@jamessan.com>

* Add myself as codeowner for Debian-related runtime files

Signed-off-by: James McCoy <jamessan@jamessan.com>

---------

Signed-off-by: James McCoy <jamessan@jamessan.com>
Co-authored-by: Heinrich Schuchardt <heinrich.schuchardt@canonical.com>
Co-authored-by: James Addison <jay@jp-hosting.net>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 23:14:30 +02:00
c229a6ac07 patch 9.0.2072: Vim9: no nr2str conversion in list-unpack
Problem:  Vim9: no nr2str conversion in list-unpack
Solution: Generate 2STRING instruction to convert dict index to string

Generate instruction to convert dict index to a string

fixes:  #13417
closes: #13424

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-26 23:05:07 +02:00
10407df7a9 patch 9.0.2071: objdump files not recognized
Problem:  objdump files not recognized
Solution: detect *.objdump files, add a filetype plugin

Added the objdump file/text format

closes: #13425

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Colin Kennedy <colinvfx@gmail.com>
2023-10-26 23:03:15 +02:00
6b89dd6a72 patch 9.0.2070: [security] disallow setting env in restricted mode
Problem:  [security] disallow setting env in restricted mode
Solution: Setting environment variables in restricted mode could
          potentially be used to execute shell commands. Disallow this.

restricted mode: disable allow setting of environment variables

Setting environment variables in restricted mode, may have some unwanted
consequences. So, for example by setting $GCONV_PATH in restricted mode
and then calling the iconv() function, one may be able to execute some
unwanted payload, because the `iconv_open()` function internally uses
the `$GCONV_PATH` variable to find its conversion data.

So let's disable setting environment variables, even so this is no
complete protection, since we are not clearing the existing environment.
I tried a few ways but wasn't successful :(

One could also argue to disable the iconv() function completely in
restricted mode, but who knows what other API functions can be
influenced by setting some other unrelated environment variables.
So let's leave it as it is currently.

closes: #13394
See: https://huntr.com/bounties/b0a2eda1-459c-4e36-98e6-0cc7d7faccfe/

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 22:24:17 +02:00
67ec655383 patch 9.0.2069: possible to escape bracketed paste mode with Ctrl-C
Problem:  possible to escape bracketed paste mode with Ctrl-C
Solution: Do not handle Ctrl-C specially when key_protocol
          is in use, makes bracketed paste mode more robust

When a key protocol is in use Ctrl-C will be sent as an escape sequence,
but a raw Ctrl-C can be sent when pasting data. Pass this through, so
that a Ctrl-C can be pasted and won't result in exiting insert mode
(where the rest of the pasted keys can cause all kind of nasty
side-effects).

Many terminals will strip control characters in paste data (and xterm
will strip ^C since version 388), but this provides some defense in
depth if users change settings like xterm's allowPasteControls.

closes: #13398

Signed-off-by: David Leadbeater <dgl@dgl.cx>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 22:08:41 +02:00
9198c1f2b1 patch 9.0.2068: [security] overflow in :history
Problem:  [security] overflow in :history
Solution: Check that value fits into int

The get_list_range() function, used to parse numbers for the :history
and :clist command internally uses long variables to store the numbers.
However function arguments are integer pointers, which can then
overflow.

Check that the return value from the vim_str2nr() function is not larger
than INT_MAX and if yes, bail out with an error. I guess nobody uses a
cmdline/clist history that needs so many entries... (famous last words).

It is only a moderate vulnerability, so impact should be low.

Github Advisory:
https://github.com/vim/vim/security/advisories/GHSA-q22m-h7m2-9mgm

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-26 21:29:32 +02:00
5f5131d775 runtime(doc): clarify bracketed paste mode
related: #13398

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 21:53:09 +02:00
a56f02d824 runtime(doc): missing code formatting in if_pyth.txt
fixes: #13418

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 21:21:56 +02:00
c4a4038603 patch 9.0.2067: xxd: coloring was disabled on Cygwin
Problem:  xxd: coloring was disabled on Cygwin
Solution: don't include WIN32

xxd: Fix that color was disabled on Cygwin

"windows.h" was unintentionally included on Cygwin since 9.0.1834.
This accidentally disabled coloring on Cygwin.
Stop including "windows.h" on Cygwin.

closes: #13414

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-25 21:17:35 +02:00
1c14030aff patch 9.0.2066: xxd: corrupting files when reversing bit dumps
Problem:  xxd: corrupting files when reversing bit dumps
Solution: handle reversing bit dump slightly differently

fixes:  #13410
closes: #13415

Co-authored-by: OldWorldOrdr <joey.t.reinhart@gmail.com>
Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: K.Takata <kentkt@csc.jp>
Signed-off-by: tristhaus <tristhaus@yahoo.de>
2023-10-25 20:57:30 +02:00
3932072ab4 patch 9.0.2065: EXPAND flag set for filetype option
Problem:  EXPAND flag set for filetype option
Solution: Remove P_EXPAND flag from the 'filetype' option

Remove P_EXPAND flag from the 'filetype' option

Problem:  P_EXPAND flag is erroneously set for 'filetype' option
Solution: Remove the P_EXPAND flag

This flag is used by string options that accept file path values.  See
:help set_env.

This appears to have been included in d5e8c92 and resulted from an
incorrect implementation of 'filetype' completion.

See #12900 for a small discussion.

related: #12900
closes: #13416

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-10-25 20:54:00 +02:00
b731800522 patch 9.0.2064: cannot use buffer-number for errorformat
Problem:  cannot use buffer-number for errorformat
Solution: add support for parsing a buffer number using '%b' in
          'errorformat'

closes: #13419

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-25 20:50:28 +02:00
5985879e3c runtime(doc): Fix typos in several documents (#13420)
* Fix typos in several documents
* Update runtime/doc/terminal.txt

Co-authored-by: K.Takata <kentkt@csc.jp>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-25 14:47:05 +01:00
50f3ec2898 please report security issues to the vim-security list
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-23 19:59:22 +02:00
7d254dbc2d patch 9.0.2063: pacman hooks are detected as conf filetype
Problem:  pacman hooks are detected as conf filetype
Solution: make it consistent to pacman.conf and detect those
          hooks as confini

Because confini has much better syntax highlighting than conf.

For reference, I identified pacman.conf and pacman hooks as dosini in
https://github.com/vim/vim/pull/6335, then
https://github.com/vim/vim/pull/10213 changed them to conf, then
https://github.com/vim/vim/pull/10518 changed pacman.conf to confini but
forgot to change hooks.

closes: #13399

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Guido Cella <guido@guidocella.xyz>
2023-10-23 19:27:06 +02:00
c038427d2a patch 9.0.2062: Janet files are not recognised
Problem:  Janet files are not recognised
Solution: Add filename and shebang detection (without
          adding an extra filetype plugin)

Those are used by the Janet language:
http://www.janet-lang.org

closes: #13400

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
2023-10-23 19:24:05 +02:00
ae9021a840 patch 9.0.2061: not able to detect xkb filetypes
Problem:  not able to detect xkb filetypes
Solution: Detect files below /u/s/X11/xkb as xkb files (without adding
          an extra filetype)

Those files are used from the X11 xkb extension

closes: #13401

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Guido Cella <guido@guidocella.xyz>
2023-10-23 19:19:46 +02:00
84394f2be4 patch 9.0.2060: *.{gn,gni} files are not recognized
Problem:  *.{gn,gni} files are not recognized
Solution: Detect some as gn filetype (without adding an extra filetype)

Those come from: https://gn.googlesource.com/gn/

closes: #13405

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Amaan Qureshi <amaanq12@gmail.com>
2023-10-23 19:16:14 +02:00
a5a1534753 runtime(doc): small updates to the documentation for varargs
- update and correct the documentation for varargs for Vim9 and make
  sure to mention that a <list> type is required.
- mention that 3match is used the matchparen plugin before 9.0.2054
  (actually this is not correct, but before that patch, Vim used the
  hardcoded id 3)

closes: #13403
closes: #13409

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-23 19:13:16 +02:00
fea96c00e5 runtime(vim): Update ftplugin - comment motions (#13412)
Fix the pattern used by comment-motion mappings to match the start of a
block comment.

Block-comment start lines were being ignored if the previous line
contained a double-quote character anywhere in the line.  Line comments
should only be ignored if the previous line is a full-line comment and,
therefore, part of the current block comment.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-23 18:16:44 +02:00
0ab500dede patch 9.0.2059: outstanding exceptions may be skipped
Problem:  outstanding exceptions may be skipped
Solution: When restoring exception state, process remaining outstanding
          exceptions

closes: #13386

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-21 11:59:42 +02:00
a36acb7ac4 patch 9.0.2058: tests: avoid error when no swap files exist
Problem:  tests: avoid error when no swap files exist
Solution: use unlet! so that no error message is reported
          in case the variable does not exists

When s:GetSwapFileList() does not find any swapfiles, it will return an
empty list []. This means, that the variable 'name' will not be
declared, cause the following unlet command to fail and causing a 1 sec
delay on running the tests.

So let's instead use the :unlet! command which simply skips reporting an
error when the variable given as parameter does not exists.

closes: #13396

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-21 11:50:26 +02:00
3ec6c1fe3b patch 9.0.2057: Vim9: no strict type checks for funcrefs varargs
Problem:  Vim9: no strict type checks for funcrefs varargs
Solution: Perform strict type checking when declaring funcrefs
          with vararg declaration, add tests

closes: #13397

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-21 11:45:38 +02:00
d3e277f279 matchparen: do not use hard-coded match id (#13393)
* matchparen: do not use hard-coded match id

Instead of using the hard-coded match id 3, which may also be used by
other plugins, let the matchparen plugin use whatever ids are
automatically returned when calling matchaddpos().

For backwards-compatibility, keep the `:3match` call, which will still
use the hard-coded id 3 (as mentioned in :h :3match).

closes: #13381

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-21 11:06:50 +02:00
47416d1a74 patch 9.0.2056: no digraph for quadruple prime
Problem:  no digraph for quadruple prime
Solution: add quadruple prime digraph using 4'

closes: #13380

Signed-off-by: Jonathan Wright <quaggy@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Jonathan Wright <quaggy@gmail.com>
2023-10-20 12:08:09 +02:00
d4802ec485 patch 9.0.2055: Vim9: non-consistent error messages
Problem:  Vim9: non-consistent error messages
Solution: make error messages more consistent with common structure

Adjust vim9class messages to follow common pattern.
[Variable|Method] "var-or-meth-name" ... class "class-name"

closes: #13391

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-20 11:59:00 +02:00
ac709e2fc0 patch 9.0.2054: win32: iscygpty needs update
Problem:  win32: iscygpty needs update
Solution: Update iscygpty to the latest version, make use iswascii()
          API function

Import the latest version from https://github.com/k-takata/ptycheck.
This addresses #13332 for iscygpty()

closes: #13392

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-20 11:57:08 +02:00
d5dc58aeed runtime(json5): Add new ftplugin (#13385)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 20:00:12 +02:00
a8c664a042 patch 9.0.2053: zig filetype detection test wrong
Problem:  zig filetype detection test wrong
Solution: Remove .zir pattern, add new test for .zon pattern

closes: #13389

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2023-10-19 19:57:57 +02:00
c6944913f0 patch 9.0.2052: win32: using deprecated wsock32 api
Problem:  win32: using deprecated wsock32 api
Solution: Use winsock2 (ws2_32) consistently

win32: Stop using wsock32

We have already used ws2_32 (winsock2) and already dropped support for
Windows 95 and NT4.  So, we don't need to care about wsock32.

Use ws2_32 consistently.

closes: #13383

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-19 17:24:02 +02:00
00b55370b3 patch 9.0.2051: Vim9: wrong error for non-existing object var
Problem:  Vim9: wrong error for non-existing object var
Solution: mention object or class depending on whether
          the var is an object or class variable.

closes: #13384
closes: #13387

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-19 17:18:28 +02:00
e08bfef88b runtime(zig): Update Zig runtime files (#13388)
Update runtime files from upstream (https://github.com/zig/zig.vim) at
commit 54c216e5306a5c3878a60596aacb94dca8652ab9.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 17:16:59 +02:00
198734897e Remove mention of huntr.dev since they do no longer support us
They do no longer support us, since they are shifting away to AI/ML
projects only. So remove any mentioned of using huntr.dev
https://huntr.com/new-huntr-faq/

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 17:12:19 +02:00
ba75507c62 Patch 9.0.2050v2: Missing change to version.c
Problem:  v9.0.2050 missed the change to version.c
Solution: include the version.c change

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-19 17:04:04 +02:00
c59c1e0d88 patch 9.0.2050: Vim9: crash with deferred function call and exception
Problem:  Vim9: crash with deferred function call and exception
Solution: Save and restore exception state

Crash when a deferred function is called after an exception and another
exception is thrown

closes: #13376
closes: #13377

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-19 10:52:34 +02:00
d7b616d0ad patch 9.0.2049: Vim9: not recognizing qualified class vars for infix ops
Problem:  Vim9: not recognizing qualified class vars for infix ops
Solution: Drop the class type from the stack before generating the
          CLASSMEMBER instruction

closes: #13378
closes: #13379

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-19 10:47:53 +02:00
982ef16059 patch 9.0.2048: python: uninitialized warning
Problem:  python: uninitialized warning
Solution: initialize 'minor' always

win32,py3: Fix uninitialized warning

Fix the following warning:
```
if_python3.c: In function 'py3_get_system_libname':
if_python3.c:879:16: warning: 'minor' may be used uninitialized [-Wmaybe-uninitialized]
  879 |             if (minor == PY_MINOR_VERSION)
      |                ^
if_python3.c:839:24: note: 'minor' was declared here
  839 |         long    major, minor;
      |                        ^~~~~
```

closes: #13368

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18 12:03:41 +02:00
2b126a6892 patch 9.0.2047: perl: warning about inconsistent dll linkage
Problem:  perl: warning about inconsistent dll linkage
Solution: suppress warning

Suppress warning C4273 (inconsistent DLL linkage).

Also adjust inconsistent use of const.

closes: #13369

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18 11:59:44 +02:00
436f39390f patch 9.0.2046: win32,python: warning that MS_WIN64 got re-defined
Problem:  win32,python: warning that MS_WIN64 got re-defined
Solution: Do not define MS_WIN64, as it is no longer used

Suppress the following warning:
```
In file included from C:/Python312-64/include/Python.h:12,
                 from if_python3.c:79:
C:/Python312-64/include/pyconfig.h:240: warning: "MS_WIN64" redefined
  240 | #define MS_WIN64
      |
<command-line>: note: this is the location of the previous definition
```

`MS_WIN64` is not defined in `Make_mvc.mak` either.
This should be able to be safely removed.

closes: #13370

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-18 11:53:30 +02:00
a0e1f06f04 patch 9.0.2045: tests: checking for swap files takes time
Problem:  tests: checking for swap files takes time
Solution: don't check for swap files  when test has been skipped

Check for swap files takes a considerable about of time, so don't do
that for skipped tests to avoid wasting time.

closes: #13371

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-18 11:50:37 +02:00
0672595fd5 patch 9.0.2044: Vim9: exceptions confuse defered functions
Problem:  Vim9: exceptions confuse defered functions
Solution: save and restore exception state when calling defered
          functions

closes: #13364
closes: #13372

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-18 11:47:37 +02:00
5036e69852 runtime(systemd): allow for overriding systemd ftplugin settings (#13373)
closes: #13357

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-18 11:38:19 +02:00
96952b2e98 patch 9.0.2043: Vim9: issue with funcref assignmentand varargs
Problem:  Vim9: issue with funcref assignmentand varargs
Solution: Fix funcref type checking

closes: #13351

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-17 18:15:01 +02:00
c290009e99 patch 9.0.2042: Test_cq_zero_exmode fails without channel feature
Problem:  Test_cq_zero_exmode fails without channel feature
Solution: Make the test check the channel feature

closes: #13365

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-17 18:10:13 +02:00
8079917447 patch 9.0.2041: trim(): hard to use default mask
Problem:  trim(): hard to use default mask (partly revert v9.0.2040)
Solution: use default mask when it is empty

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

Currently, an empty 'mask' will make 'trim()' call return 'text' value
that is passed in unmodified.  It is unlikely that someone is using it,
so the chances of scripts being broken by this change are low.

Also, this reverts commit 9.0.2040 (which uses v:none for the default
and requires to use an empty string instead).

closes: #13358

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-10-17 18:06:00 +02:00
5a33ce2a66 runtime(json5): include syntax script for json5 (#13356)
Merging syntax file from gutenye/json5.vim, modified to include proper
vim header.

See: https://github.com/vim/vim/issues/8499

Signed-off-by: Mazunki Hoksaas <rolferen@gmail.com>
Co-authored-by: Guten Ye <ywzhaifei@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-17 11:13:06 +02:00
6e6386716f patch 9.0.2040: trim(): hard to use default mask
Problem:  trim(): hard to use default mask
Solution: Use default 'mask' when it is v:none

The default 'mask' value is pretty complex, as it includes many
characters.  Yet, if one needs to specify the trimming direction, the
third argument, 'trim()' currently requires the 'mask' value to be
provided explicitly.

'v:none' is already used to mean "use the default argument value" in
user defined functions.  See |none-function_argument| in help.

closes: #13363

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-10-17 11:09:45 +02:00
2e3cd52fa0 patch 9.0.2039: completion shows current word after completion restart
Problem:  completion shows current word after completion restart
Solution: remove the word being completed after completion restart

The word being completed is shown in a completion list after completion
restart, because it isn't removed from the current buffer before
searching for matches.

Also adjust `Test_complete_add_onechar` to match the new behavior.

closes: #13349

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: nwounkn <nwounkn@gmail.com>
2023-10-17 11:05:38 +02:00
f3eac695bf patch 9.0.2038: Vim9: object method funcref not cleaned up after use
Problem:  Vim9: object method funcref not cleaned up after use
Solution: Clean up type stack after using object method funcref,
          remove now longer used ISN_DEFEROBJ instrunction

closes: #13360

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-17 11:00:45 +02:00
209ec90b9b patch 9.0.2037: A few remaining cmdline completion issues with C-E/Y
Problem:  A few remaining cmdline completion issues with C-E/Y
Solution: Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not
          used at the end

Fix cmdline completion fuzzy/Ctrl-E/Ctrl-Y/options when not used at the end

A few places in the cmdline completion code only works properly when the
user hits Tab (or 'wildchar') at the end of the cmdline, even though
it's supposed to work even in the middle of the line.

For fuzzy search, `:e ++ff`, and `:set hl=`, fix completion code to make
sure to use `xp_pattern_len` instead of assuming the entire `xp_pattern`
is the search pattern (since it contains texts after the cursor).

Fix Ctrl-E / Ctrl-Y to not jump to the end when canceling/accepting a
wildmenu completion. Also, make them work even when not using
`set wildoptions+=pum` as there is no drawback to doing so.
(Related issue where this was brought up: #13331)

closes: #13362

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-17 10:56:25 +02:00
396058acd0 patch 9.0.2036: if_python: rework python3.12 build dependency
Problem:  if_python: rework python3.12 build dependency
          (after 9.0.1996)
Solution: use PyTuple_Size instead of inlining the Py_SIZE
          into the Vim code base

Use a simpler fix for Python 3.12 build issues

Python 3.12 introduced link dependencies to their `Py_SIZE()` inline
function, which #13290 fixed by copying the inline function to Vim's
Python binding code. This works but it's fragile, as a future update may
change the implementation of `Py_SIZE` and there is no way for us to
know.

The reason we need `Py_SIZE` to begin with is that we use
`PyTuple_GET_SIZE()` which calls that. Just fix it by mapping that to
(confusingly similarly named) `PyTuple_Size()`, which we already do in
the stable ABI implementation. There's a minor performance cost in that
it's not inlined and it does error checking but that's fine as we only
call this function rarely (in an error handler).

related: #13290
closes: #13359

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-17 10:38:11 +02:00
8f4fb007e4 patch 9.0.2035: [security] use-after-free with wildmenu
Problem:  [security] use-after-free with wildmenu
Solution: properly clean up the wildmenu when exiting

Fix wildchar/wildmenu/pum memory corruption with special wildchar's

Currently, using `wildchar=<Esc>` or `wildchar=<C-\>` can lead to a
memory corruption if using wildmenu+pum, or wrong states if only using
wildmenu. This is due to the code only using one single place inside the
cmdline process loop to perform wild menu clean up (by checking
`end_wildmenu`) but there are other odd situations where the loop could
have exited and we need a post-loop clean up just to be sure. If the
clean up was not done you would have a stale popup menu referring to
invalid memory, or if not using popup menu, incorrect status line (if
`laststatus=0`).

For example, if you hit `<Esc>` two times when it's wildchar, there's a
hard-coded behavior to exit command-line as a failsafe for user, and if
you hit `<C-\><C-\><C-N>` it will also exit command-line, but the clean
up code would not have hit because of specialized `<C-\>` handling.

Fix Ctrl-E / Ctrl-Y to not cancel/accept wildmenu if they are also
used for 'wildchar'/'wildcharm'. Currently they don't behave properly,
and also have potentially memory unsafe behavior as the logic is
currently not accounting for this situation and try to do both.
(Previous patch that addressed this: #11677)

Also, correctly document Escape key behavior (double-hit it to escape)
in wildchar docs as it's previously undocumented.

In addition, block known invalid chars to be set in `wildchar` option,
such as Ctrl-C and `<CR>`. This is just to make it clear to the user
they shouldn't be set, and is not required for this bug fix.

closes: #13361

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-17 10:06:56 +02:00
5a679b2263 patch 9.0.2034: don't try to copy SMACK attribute, when none exist
Problem:  don't try to copy SMACK attribute, when none exist
Solution: return early if SMACK extended attributes do not exist or
          if they are not supported

closes: #1711
closes: #13348

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-16 10:17:13 +02:00
215c3261a2 patch 9.0.2033: gcc overflow-warning for f_resolve
Problem:  gcc overflow-warning for f_resolve
Solution: use pointer p instead of pointer q[-1]

Suppress the following warning:
```
filepath.c: In function ‘f_resolve’:
filepath.c:2162:27: warning: writing 1 byte into a region of size 0 [-Wstringop-overflow=]
 2162 |                     q[-1] = NUL;
```

Closes: #13352
closes: #13353

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-16 09:57:43 +02:00
dbf749bd5a runtime: Fix more typos (#13354)
* Fix more typos

* Fix typos in ignored runtime/ directory

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-16 09:53:37 +02:00
f5a94d5165 patch 9.0.2032: cannot get mouse click pos for tab or virt text
Problem:  Cannot accurately get mouse clicking position when clicking on
          a TAB or with virtual text.
Solution: Add a "coladd" field to getmousepos() result.

closes: #13335

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-15 10:03:30 +02:00
3c81f47a05 runtime(doc): correct <PageUp>/<PageDown> behavior in 'wildmenu' (#13336)
"but don't insert it" is wrong.
Also move them just below <Up> <Down> as they are more similar.
2023-10-15 10:02:08 +02:00
d7ae263af8 patch 9.0.2031: TextChangedI may be triggered by non-insert mode change
Problem:  `TextChangedI` can trigger on entering Insert mode if there
          was previously a change not in Insert mode.
Solution: Make it trigger only when text is actually changed in Insert
          mode.

closes: #13265
closes: #13338

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
2023-10-15 09:59:00 +02:00
47510f3d65 patch 9.0.2030: no max callback recursion limit
Problem:  no max callback recursion limit
Solution: bail out, if max call recursion for callback functions
          has been reached.

This checks the 'maxfuncdepth' setting and throws E169 when a callback
function recursively calls itself.

closes: #13337
closes: #13339

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-15 09:56:16 +02:00
1ace49fb98 patch 9.0.2029: Vim9: no support for partials using call()
Problem:  Vim9: no support for partials using call()
Solution: Add support

closes: #13341

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-15 09:53:41 +02:00
5d03525cde patch 9.0.2028: confusing build dependencies
Problem:  confusing build dependencies
Solution: clean them up, make them parallelizable

Separate vim binary and unittest dependencies, make them parallelizable

Clean up make dependencies so Vim and unit test binaries only depend on
the object files they need. This fixes an existing issue where after
running unit tests, the Vim binary would be invalidated, which results
in it having to be linked again when running script tests, even though
Vim was already previously built.

Make link.sh (script we use to link those binaries) generate namespaced
temporary files for each app to avoid them colliding with each other.
This allows `unittesttargets` to be built in parallel.

These fixes are useful when using link-time-optimization as the link
phase could now take minutes rather than a few seconds.

closes: #13344

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-15 09:50:53 +02:00
de3295dd0c patch 9.0.2027: Vim9: no support for bitwise operators in lambda funcs
Problem:  Vim9: no support for bitwise operators in lambda funcs
Solution: move "evaluate" assignment a bit up in order to decide
          to perform bitwise operations

closes: #13342
closes: #13345

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-15 09:44:50 +02:00
ae3cfa47d3 patch 9.0.2026: win32: python3 dll loading can be improved
Problem:  win32: python3 dll loading can be improved
Solution: Load DLL from registry path

Support loading python3.dll and/or python3xx.dll from the path written
in the registry.  To support Stable ABI's forwarder DLL (python3.dll),
use the `LOAD_LIBRARY_SEARCH_DLL_LOAD_DIR` flag for `LoadLibraryExW()`
because python3xx.dll is placed in the same directory of python3.dll.

If Stable ABI is used, search the latest version from the registry (both
from HKEY_CURRENT_USER and HKEY_LOCAL_MACHINE).  If Stable ABI is not
used, search only the matching version.

closes: #13315

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-14 11:49:09 +02:00
989426be6e patch 9.0.2025: no cmdline completion for ++opt args
Problem:  no cmdline completion for ++opt args
Solution: Add cmdline completion for :e ++opt=arg and :terminal
          [++options]

closes: #13319

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-14 11:46:51 +02:00
bd734c3bea patch 9.0.2024: no filetype detection for Debian sources
Problem:  no filetype detection for Debian sources
Solution: Add new deb822sources filetype

closes: #13320

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: James McCoy <jamessan@jamessan.com>
2023-10-14 11:41:34 +02:00
ba9aed4497 patch 9.0.2023: need more tests for :cq
Problem:  need more tests for :cq
Solution: Add more tests, including wraparound on linux

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:39:40 +02:00
b583eda703 patch 9.0.2022: getmousepos() returns wrong index for TAB char
Problem:  When clicking in the middle of a TAB, getmousepos() returns
          the column of the next char instead of the TAB.
Solution: Break out of the loop when the vcol to find is inside current
          char. Fix invalid memory access when calling virtcol2col() on
          an empty line.

closes: #13321

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-14 11:32:28 +02:00
cd6ee69358 patch 9.0.2021: Coverity complains about change in charset
Problem:  Coverity complains about change in charset (after v9.0.2017)
Solution: check pointer t at index 0

closes: #13322

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:29:28 +02:00
5ae6f9985e translation(sr): Update Serbian messages translation (#13324)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:28:05 +02:00
7687238e1b runtime(tcsh): Update ftplugin (#13327)
Fix b:browsefilter deletion error when calling b:undo_ftplugin.

Fixes #13167

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:27:27 +02:00
0f058d1320 patch 9.0.2020: Vim9: islocked() needs more work
Problem:  Vim9: islocked() needs more work
Solution: rework islocked() and remove sync_root
          from get_lval()

closes: #13329

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-14 11:25:04 +02:00
2bbd0d30ee runtime(doc): Improve command-line completion docs (#13331)
* Improve command-line completion docs

Add more details about 'ignorecase' and its effect on cmdline
completion.

Make sure keys used in wildmenu are properly documented and linked in the
keys' documentation entries, and in `:h index` for proper
cross-referencing, as wildmenu popup is slightly different from
insert-mode popup menu.

* Fix docs typos

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-14 11:23:45 +02:00
29bb67f1be patch 9.0.2019: Vim9: no support for funcrefs
Problem:  Vim9: no support for funcrefs
Solution: Add support for object/class funcref members

closes: #11981 #12417 #12960 #12324 #13333

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-14 11:18:50 +02:00
69fb5afb3b patch 9.0.2018: complete_info() returns wrong index
Problem:  complete_info() returns wrong index
Solution: Make order of 'info' in completion_info consistent

Start the iteration from the same point and follow the same direction as
done when assigning the completion numbers. This way we remove the
dependence on the completion direction and make the order of 'info'
consistent.

closes: #12230
closes: #12971

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: LemonBoy <thatlemon@gmail.com>
2023-10-11 21:55:56 +02:00
dd75fcfbdf patch 9.0.2017: linebreak applies for leading whitespace
Problem:  linebreak applies for leading whitespace
Solution: only apply linebreak, once we have found non-breakat chars in
          the line

closes: #13228
closes: #13243

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:53:52 +02:00
1ea428883f patch 9.0.2016: Vim9: assignment operators don't work for class vars
Problem:  Vim9: assignment operators don't work for class vars
Solution: implement it

closes: #13306

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-11 21:43:52 +02:00
4c8da025ef patch 9.0.2015: Vim9: does not handle islocked() from a method correctly
Problem:  Vim9: does not handle islocked() from a method correctly
Solution: Handle islocked() builtin from a method.

- Setup `lval_root` from `f_islocked()`.
- Add function `fill_exec_lval_root()` to get info about executing method.
- `sync_root` added in get_lval to handle method member access.
- Conservative approach to reference counting.

closes: #13309

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-11 21:38:24 +02:00
c97b3febc8 patch 9.0.2013: confusing ifdefs in if_<lang>.c
Problem:  confusing ifdefs in if_<lang>.c
Solution: refactor ifndefs to #ifdefs

if_x: Avoid using #ifndef - #else - #endif

Using #ifndef - #else - #endif is sometimes confusing.
Use #ifdef - #else - #endif instead.

closes: #13310

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-11 21:27:06 +02:00
a634b92b96 patch 9.0.2013: Unicode tables outdated
Problem: Unicode tables outdated
Solution: Update Unicode tables to v15.1 (released 23.09.2023)

closes: #13311

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:24:49 +02:00
f8da324619 patch 9.0.2012: Vim9: error message can be more accurate
Problem:  Vim9: error message can be more accurate
Solution: Fix the error messages

Fix message for some single use error messages.

closes: #13312

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-11 21:22:12 +02:00
4a82bdfaa8 patch 9.0.2011: INI files not detected
Problem:  INI files not detected
Solution: detect uppercase .INI as dosini files

It previo~1 only worked for lower-case .ini files, but upperc~1 .INI is
also somewhat common on account of DOS' old 8.3 upperc~2 only filena~1.

closes: #13316

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Martin Tournoij <martin@arp242.net>
2023-10-11 21:20:06 +02:00
41e6f7d6ba patch 9.0.2010: [security] use-after-free from buf_contents_changed()
Problem:  [security] use-after-free from buf_contents_changed()
Solution: block autocommands

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-11 21:09:53 +02:00
54844857fd patch 9.0.2009: cmdline-completion for comma-separated options wrong
Problem:  cmdline-completion for comma-separated options wrong
Solution: Fix command-line expansions for options with filenames with
          commas

Fix command-line expansions for options with filenames with commas

Cmdline expansion for option values that take a comma-separated list
of file names is currently not handling file names with commas as the
commas are not escaped. For such options, the commas in file names need
to be escaped (to differentiate from a comma that delimit the list
items). The escaped comma is unescaped in `copy_option_part()` during
option parsing.

Fix as follows:
- Cmdline completion for option values with comma-separated file/folder
  names will not start a new match when seeing `\\,` and will instead
  consider it as one value.
- File/folder regex matching will strip the `\\` when seeing `\\,` to
  make sure it can match the correct files/folders.
- The expanded value will escape `,` with `\\,`, similar to how spaces
  are escaped to make sure the option value is correct on the cmdline.

This fix also takes into account the fact that Win32 Vim handles file
name escaping differently. Typing '\,' for a file name results in it
being handled literally but in other platforms '\,' is interpreted as a
simple ',' and commas need to be escaped using '\\,' instead.

Also, make sure this new logic only applies to comma-separated options
like 'path'. Non-list options like 'set makeprg=<Tab>' and regular ex
commands like `:edit <Tab>` do not require escaping and will continue to
work.

Also fix up documentation to be clearer. The original docs are slightly
misleading in how it discusses triple slashes for 'tags'.

closes: #13303
related: #13301

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-09 18:12:31 +02:00
b07b9dc4da patch 9.0.2008: test: undofile left behind
Problem:  test: undofile left behind
Solution: cleanup undofile

fix: tmp file not deleted when running make test_undo

Temporary file `.Xtestfile.txt.un~` was left running `make test_undo`
and vim was configured with:
```
./configure --with-features=normal --enable-gui=no --enable-terminal
```

closes: #13304

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-10-09 18:09:20 +02:00
e467189022 patch 9.0.2007: Vim9: covariant parameter types allowed
Problem:  Vim9: covariant parameter types allowed when assigning
          functions
Solution: Enforce invariant type check for arguments and return value
          when assigning a funcref

closes: #13299
closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-09 18:01:06 +02:00
f4ee1cb74b patch 9.0.2006: Vim9: need more tests
Problem:  Vim9: need more tests
Solution: add additional disassembly tests

closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-09 17:57:27 +02:00
b56cef0be0 patch 9.0.2005: partially revert patch v9.0.1997
Problem:  partially revert patch v9.0.1997
Solution: add a comment, to make clear it's not used

related: #13288

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-09 17:55:02 +02:00
d4afbdd071 patch 9.0.2004: Missing test file
Problem:  Missing test file
Solution: git-add the file to the repo

closes: #13305

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-09 08:15:00 +02:00
7879bc5c13 patch 9.0.2003: xxd: compilation warning
Problem:  xxd: compilation warning
Solution: initialize variables

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-08 20:38:43 +02:00
1e33cd72b6 runtime: make command name for &iskeywordprg more unique (#13297)
See https://github.com/vim/vim/pull/13213/commits by @dkearns:
Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-08 19:14:07 +02:00
b852305dbf patch 9.0.2002: Vim9: need cleanup of class related interface code
Problem:  Vim9: need cleanup of class related interface code
Solution: Remove the unused class variable and class method related code
          for interfaces.

Remove unused class variable and class method related code for
interfaces.

Refactor the code.

Optimize the object/class member double lookup in compile_lhs().

Change unused global functions to static functions.

closes: #13302

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-08 19:07:39 +02:00
75b277d35c translation(it): updated translation of xxd manpage
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-08 19:05:02 +02:00
9771b2a67f patch 9.0.2001: Vim9: segfault with islocked()
Problem:  Vim9: segfault with islocked()
Solution: Check that the lval pointer is not null for objects and
          class variables

closes: #13295

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-07 22:10:26 +02:00
1087b8c29a patch 9.0.2000: Vim9: use-after-free in deep call stack
Problem:  Vim9: use-after-free in deep call stack
Solution: Get the objct pointer from execution stack

closes: #13296

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-07 22:03:18 +02:00
2a281ccca0 runtime(sh): Update ftplugin (#13213)
Rename 'keywordprg' user command to ShKeywordPrg as this is just a
leaking implementation detail.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-06 19:59:42 +02:00
e6c9aa5e6a patch 9.0.1999: Vim9: some error messages can be improved
Problem:  Vim9: some error messages can be improved
Solution: Mention the defining class for variable access error message

closes: #13272

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-06 19:55:52 +02:00
85f4521808 patch 9.0.1998: xxd: cannot reverse a bit dump
Problem:  xxd: cannot reverse a bit dump
Solution: implement reversing the bit dump using -b -r

closes: #13286

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: tristhaus <tristhaus@yahoo.de>
2023-10-06 19:51:13 +02:00
580c1fcb4a patch 9.0.1997: Some unused code in move.c and string.c
Problem:  Some unused code in move.c and string.c
Solution: Remove it

closes: #13288

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-10-06 19:41:14 +02:00
27e12c7669 runtime(doc): remove E1520 tag (#13289)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-06 19:34:04 +02:00
fa145f2009 patch 9.0.1996: Cannot build with python312
Problem:  Cannot build with python312
Solution: Define wrapper types and functions for python 3.12

Py_SIZE() uses PyLong_Type and PyBool_Type starting from Python 3.12.
We need to define our own Py_SIZE() to replace Py{Bool,Long}_Type with
py3_Py{Bool,Long}_Type.
We also need to redefine PyTuple_GET_SIZE() and PyList_GET_SIZE(), because
they use Py_SIZE().

closes: #13281
closes: #13290

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-06 19:27:13 +02:00
26e8f7b0ab runtime(doc): Update vim9class help (#13292)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-06 19:24:10 +02:00
a991ce9c08 patch 9.0.1995: Invalid memory access with empty 'foldexpr'
Problem:  Invalid memory access when 'foldexpr' returns empty string.
Solution: Check for NUL.

closes: #13293

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-06 19:18:12 +02:00
ac9c6d5c78 patch 9.0.1994: inconsistent feature description
Problem:  inconsistent feature description
Solution: delete old mentioned feature sets small and big

The may however still be mentioned for historical reasons. e.g. The
last Amiga built version is for Vim6.2 and is still a big version.

closes: #13273

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
2023-10-05 22:25:12 +02:00
9960ebcace patch 9.0.1993: warning about unused function definition
Problem:  warning about unused function definition
Solution: add ifdefs

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 22:17:09 +02:00
20d161ace3 patch 9.0.1992: [security] segfault in exmode
Problem:  segfault in exmode when redrawing
Solution: skip gui_scroll when exmode_active

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 22:10:10 +02:00
290b887e8c patch 9.0.1991: no cmdline completion for setting the font
Problem:  no cmdline completion for setting the font
Solution: enable it on Win32 and GTK builds

Add guifont cmdline completion (for Windows and GTK)

For Windows, auto-complete will only suggest monospace fonts as that's
the only types allowed. Will also suggest font options after the colon,
including suggesting the current font size for convenience, and misc
charset and quality options like `cANSI` and `qCLEARTYPE`.

For GTK, auto-complete will suggest only monospace fonts for `guifont`
but will include all fonts for `guifontwide`. The completion code
doesn't currently suggest the current font size, as the GTK guifont
format does not have a clear delimiter (':' for other platforms).

closes: #13264

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-05 20:54:21 +02:00
ea746f9e86 patch 9.0.1990: strange error number
Problem:  strange error number
Solution: change error number,
          add doc tag for E1507

closes: #13270

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-10-05 20:48:36 +02:00
0e95841004 runtime(netrw): diff (df) may open the wrong window (#13275)
closes: #11359

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 20:37:15 +02:00
f449825ae2 runtime(netrw): Update .netrwbook immediately on bookmark change (#13276)
closes: #9738

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 20:34:17 +02:00
9b259f520e translation(it): revert permission changes for xxd manpages again (#13277)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 20:30:08 +02:00
d615a3122a patch 9.0.1989: Vim9: double error message given
Problem:  Vim9: double error message given
Solution: Only give second error message, if ther
          wasn't one given before

closes: #13278

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-05 20:28:16 +02:00
d2f4800099 patch 9.0.1988: Vim9: potential use-after-free for class members
Problem:  Vim9: potential use-after-free for class members
Solution: Use the class-related grow array for storing the
          member type instead of using a temporary type
          list grow array

Use the type list grow array associated with the class than using a
temporary type list grow array to allocate the class member type.

For simple types, a predefined type is used. For complex types, the type
is dynamically allocated from a grow array. For class variables, the
type grow array in the class should be used. So that the lifetime of the
type is same as the lifetime of the class.

closes: #13279

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-05 20:24:18 +02:00
da5da654de patch 9.0.1987: win32: font-size calculation can be improved
Problem:  win32: font-size calculation can be improved
Solution: calculate font size before the window size

Support calculating the new size even if a bitmap font is used.
Calculate the new font size before actually change the Window size.

closes: #13280
related: #11812, #13252

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-05 20:20:58 +02:00
c661e11e9c translation(sr): Update Serbian messages translation (#13282)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 20:17:28 +02:00
b5a0719cb7 patch 9.0.1986: Vim9: accepting type-annotations
Problem:  Vim9: accepting type-annotations
Solution: Reject type annotations outside of declarations.

closes: #13267
closes: #13283

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-05 20:16:06 +02:00
b6d01f131c runtime(just): Correct filetype detection pattern and style (#13284)
See https://github.com/vim/vim/pull/13271#discussion_r1347279686 and
https://github.com/NoahTheDuke/vim-just/blob/main/ftdetect/just.vim.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-05 20:11:55 +02:00
9a00e7c7cf patch 9.0.1985: CI: codecov is intrusive
Problem:  CI: codecov is intrusive
Solution: disable codecov comments

The codecov report is incredibly intrusive, and getting a notification
for every PR to vim that codecov codecoved is annoying. If anyone is
interested in the report the information is readily available by
clicking on the job.

closes: #13285

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-10-05 20:07:11 +02:00
85ff0c1912 patch 9.0.1984: CI: Test_open_delay*() fails on FreeBSD 14
Problem:  CI: Test_open_delay*() fails on FreeBSD 14
Solution: Skip it on BSD

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-04 21:58:24 +02:00
8e5f26ec6a patch 9.0.1983: scrolling inactive window not possible with cursorbind
Problem:  Scrolling non-current window using mouse is inconsistent
          depending on 'scrollbind'/'scrolloff' and different from GUI
          vertical scrollbar when 'cursorbind' is set.
Solution: Don't move cursor in non-current windows for 'cursorbind' if
          cursor in the current window didn't move.

closes: #13219
closes: #13210

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-04 21:45:33 +02:00
4dbb2669e9 runtime(netrw): error when trying to :bd unloaded buffer
closes: #13215
closes: #13082

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-04 20:52:44 +02:00
64885645e7 patch 9.0.1982: vim9: clean up from v9.0.1955
Problem:  vim9: clean up from v9.0.1955
Solution: Fix a few remaining issues, improve error message

- Use `cl_exec`, the executing class, to check permissions in `get_lval()`.
- Handle lockvar of script variable from class.
- Add 'in class "Xxx"' to e_cannot_access_private_variable_str.

closes: #13222

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-10-04 20:16:22 +02:00
0583491277 patch 9.0.1981: not being able to scroll up in diff mode
Problem:  Cannot scroll up in diff mode with many filler lines and zero
          'scrolloff'.
Solution: Invalidate w_cline_row before calling comp_botline().

closes: #13256

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-04 20:12:37 +02:00
119fdd9293 patch 9.0.1980: win32: issues with stable python ABI
Problem:  win32: issues with stable python ABI
Solution: if_python3,win32: Fix Python3 stable ABI

There were some issues in current stable ABI implementation on Windows:
* Python DLL name should be `python3.dll` instead of `python311.dll` and
  so on. (See: https://docs.python.org/3/c-api/stable.html)
* Some non-stable API functions were used:
  - `_PyObject_NextNotImplemented`
  - `PyStdPrinter_Type`
* `reset_stdin()` and `hook_py_exit()` didn't work with `python3.dll`.
  `python3.dll` is a special type of DLL called forwarder DLL.
  It just forwards the functions to other DLL (e.g. `python311.dll`).
  There were two issues regarding these functions:
  - `python3.dll` doesn't have import tables. This caused a crash in
    `get_imported_func_info()`. Add a check whether the specified DLL
    has an import table.
  - `reset_stdin()` and `hook_py_exit()` should be applied to the
    forwarded DLL (e.g. `python311.dll`), not to `python3.dll`.
    Check the export directory of `python3.dll` to find the forwarded
    DLL and apply the functions to it.

closes: #13260

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-04 20:05:05 +02:00
317468aace patch 9.0.1979: Cirrus CI disabled
Problem:  Cirrus CI disabled
Solution: re-enable Cirrus CI

Ref patch 9.0.1912:

> Perhaps at the beginning of the next month we can revisit and enable
> just a build without testing it.  Hopefully this is won't take too
> many credits and we can at least verify that building works.

Actually enabling testing should be fine. In the last month there were
three Cirrus CI jobs and credits ran out on Sep 15, but now there is
only one Cirrus CI job, so credits shouldn't run out.

closes: #13261

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-04 19:57:35 +02:00
3d90f71b76 patch 9.0.1978: No filetype detection for just files
Problem:  No filetype detection for just files
Solution: Detect just files (*.just, justfile, etc)

closes: #13271

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-10-04 19:52:54 +02:00
fe7b20a1a3 patch 9.0.1977: Vim9: object members can change type
Problem:  Vim9: object members can change type
Solution: Check type during assignment to object/class var

closes: #13127
closes: #13262

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-04 19:47:52 +02:00
b9a974df9e translation(it): update translation of xxd manpage
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-04 18:30:25 +02:00
b74ebfc6bf runtime(doc): update xxd manpage and mention $NO_COLOR env
also regenerate the xxd.man document page.

fixes: #13257

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-03 16:58:55 +02:00
b043ff34c1 runtime(doc): fix two typos in vim9.txt and options.txt (#13258)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-03 16:39:53 +02:00
2dfc22908e runtime(doc): remove E1507 help tag, which is no longer used (#13254)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-03 08:12:56 +02:00
3f168ec8ae patch 9.0.1976: style: space before tab in optionstr.c
Problem:  style: space before tab in optionstr.c
Solution: remove the space

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-02 23:21:11 +02:00
993b17569b patch 9.0.1975: xattr: permission-denied errors on write
Problem:  xattr: permission-denied errors on write
Solution: ignore those errors

closes: #13246

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gene C <arch@sapience.com>
2023-10-02 22:44:12 +02:00
12a0d999b1 translation(ru): Update Russian message translation to Vim 9.0.1968 (#13239)
* Updated to Vim 9.0.1968. Several refinements and corrections
* typo fixed

Co-authored-by: RestorerZ <restorer@mail2k.ru>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-02 21:53:27 +02:00
cd39b69b02 runtime(doc): add missing error numbers in the help. (#13241)
closes: #13240

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-02 21:50:45 +02:00
20f48d5b2d runtime(doc): mention how to disable folding in diff mode (#13242)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-02 21:49:23 +02:00
ba77bbb5c7 runtime(doc): fix typos.
* Fix typo in document (Related: #12516)
* Fix E1363 duplication
* Fix one more typo.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-02 21:47:13 +02:00
b32064fedb patch 9.0.1974: vim9: using contra-variant type-checks
Problem:  vim9: using contra-variant type-checks (after v9.0.1959)
Solution: Use invariant type checking instead

closes: #13248

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-10-02 21:43:58 +02:00
6d11347260 patch 9.0.1973: Clean up cmdline option completion code
Problem:  Clean up cmdline option completion code
Solution: Fix various minor problems

- Fix manual array size calculations to just use `ARRAY_LENGTH()`.
- Fix unintentional typo in comments due to copy-paste error.
- Fix assert_equal() usages to pass the expected value to first
  parameter instead of 2nd one to avoid confusion.
- Fix signed vs unsigned warnings
- Correct misplaced comments about set_op_T and set_prefix_T
  and fix a typo in another comment

closes: #13249
closes: #13237

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-02 21:38:39 +02:00
4a1ad55564 patch 9.0.1972: win32: missing '**' expansion test
Problem:  win32: missing '**' expansion test (after v9.0.1947)
Solution: Add test for MS-Windows

win32: Add "**" test

Vim supports "**" on MS-Windows. However, it is not tested by
`Test_glob_extended_bash`.

Unlike Unix, it doesn't use 'shell' and doesn't support {,} expansion.
So, I added as a separate test.

related: #13205
closes: #13250

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-02 21:33:42 +02:00
f59cbefd0a patch 9.0.1971: macOS: FEAT_SOUND guard too restrictive
Problem:  macOS: FEAT_SOUND guard too restrictive
Solution: check for older macOS support properly

Fix macOS FEAT_SOUND guards to be less restrictive

This allows +sound to work on older macOS platforms again. The +sound
implementation uses APIs available in 10.6, but the code itself uses
generics with type parameters which was only added in Xcode 7 / clang 7,
which was released for macOS 10.11. This means as long as Vim is
compiled under 10.11+, and using a deployment target >= 10.6, the
feature will work.

closes: #13251

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-02 21:28:50 +02:00
7086b3e76a patch 9.0.1970: win32: high-dpi support can be improved
Problem:  win32: high-dpi support can be improved
Solution: implement WM_GETDPISCALEDSIZE

win32: Better support of Per-Monitor V2 High DPI

Implement WM_GETDPISCALEDSIZE.
It is not so easy to calculate the new size without actually changing
the size. So, this returns an approximate size.

This doesn't work well when a bitmap font (e.g. FixedSys) is selected,
but I think this is acceptable.

closes: #11812
closes: #13252

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-10-02 21:26:03 +02:00
3bd7fa12e1 patch 9.0.1969: [security] buffer-overflow in trunc_string()
Problem:  buffer-overflow in trunc_string()
Solution: Add NULL at end of buffer

Currently trunc_string() assumes that when the string is too long,
buf[e-1] will always be writeable. But that assumption may not always be
true. The condition currently looks like this

    else if (e + 3 < buflen)
    [...]
    else
    {
	// can't fit in the "...", just truncate it
	buf[e - 1] = NUL;
    }

but this means, we may run into the last else clause with e still being
larger than buflen. So a buffer overflow occurs.

So instead of using `buf[e - 1]`, let's just always
truncate at `buf[buflen - 1]` which should always be writable.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-10-02 20:59:47 +02:00
6ee7b521fa patch 9.0.1968: cmdline completion should consider key option
Problem:  cmdline completion should consider key option
Solution: Disable cmdline completion for key option, slightly
          refactor how P_NO_CMD_EXPAND is handled

Harden crypto 'key' option: turn off cmdline completion, disable set-=

"set-=" can be used maliciously with a crypto key, as it allows an
attacker (who either has access to the computer or a plugin author) to
guess a substring by observing the modified state. Simply turn off
set+=/-=/^= for this option as there is no good reason for them to be
used.

Update docs to make that clear as well.

Also, don't allow cmdline completion for 'key' as it just shows *****
which is not useful and confusing to the user what it means (if the user
accidentally hits enter they will have replaced their key with "*****"
instead).

Move logic to better location, don't use above 32-bit for flags

Move P_NO_CMD_EXPAND to use the unused 0x20 instead of going above
32-bits, as currently the flags parameter is only 32-bits on some
systems. Left a comment to warn that future additions will need to
change how the flags work either by making it 64-bit or split into two
member vars.

Also, move the logic for detecting P_NO_CMD_EXPAND earlier so it's not
up to each handler to decide, and you won't see the temporary "..." that
Vim shows while waiting for completion handler to complete.

closes: #13224

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-10-01 09:19:18 +02:00
7ece036d72 patch 9.0.1967: xattr errors not translated
Problem:  xattr errors not translated
Solution: mark for translation, consistently capitalize
          first letter.

closes: #13236

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-10-01 09:07:14 +02:00
e379e21ddc patch 9.0.1966: configure prints stray 6 when checking libruby
Problem:  configure prints stray 6 when checking libruby
Solution: redirect stdout to dev/null

configure: Do not print "6" when checking for libruby

`expr` will print the matched string length to the standard output.
Current `configure` output looks like this:

```
checking Ruby header files...  /usr/include/ruby-3.1.0
6
```

The script really only cares about `expr` exit code.

closes: #13234

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-09-30 22:59:27 +02:00
8c358e024f patch 9.0.1965: wrong auto/configure script
Problem:  wrong auto/configure script
Solution: regenerate with autoconf 2.71

configure: sys/xattr.hs: Regenerate with autoconf 2.71

It seems that `auto/configure` update in

  commit 6de4e58cf2 (tag: v9.0.1963)
  Author: zeertzjq <zeertzjq@outlook.com>
  Date:   Sat Sep 30 14:19:14 2023 +0200

      patch 9.0.1963: Configure script may not detect xattr

      Problem:  Configure script may not detect xattr correctly
      Solution: include sys/xattr instead of attr/xattr,
                make Test_write_with_xattr_support() test
                xattr feature correctly

      This also applies to the Smack security feature, so change the include
      and configure script for it as well.

      closes: #13229

      Signed-off-by: Christian Brabandt <cb@256bit.org>
      Co-authored-by: zeertzjq <zeertzjq@outlook.com>

was done manually, and missed an update to the generated variable name.

closes: #13235

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Illia Bobyr <illia.bobyr@gmail.com>
2023-09-30 22:57:19 +02:00
a4dfbfed89 patch 9.0.1964: xattr support fails to build on MacOS X
Problem:  xattr support fails to build on MacOS X
Solution: Disable xattr support for MacOS X

MacOS X uses the same headers and functions sys/xattr.h but the function
signatures for xattr support are much different, so building fails.

So let's for now disable xattr support there.

closes: #13230
closes: #13232

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-30 18:51:36 +02:00
6de4e58cf2 patch 9.0.1963: Configure script may not detect xattr
Problem:  Configure script may not detect xattr correctly
Solution: include sys/xattr instead of attr/xattr,
          make Test_write_with_xattr_support() test
          xattr feature correctly

This also applies to the Smack security feature, so change the include
and configure script for it as well.

closes: #13229

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-30 14:22:07 +02:00
e085dfda5d patch 9.0.1962: No support for writing extended attributes
Problem:  No support for writing extended attributes
Solution: Add extended attribute support for linux

It's been a long standing issue, that if you write a file with extended
attributes and backupcopy is set to no, the file will loose the extended
attributes.

So this patch adds support for retrieving the extended attributes and
copying it to the new file. It currently only works on linux, mainly
because I don't know the different APIs for other systems (BSD, MacOSX and
Solaris).  On linux, this should be supported since Kernel 2.4 or
something, so this should be pretty safe to use now.

Enable the extended attribute support with normal builds.

I also added it explicitly to the :version output as well as make it
able to check using `:echo has("xattr")`, to have users easily check
that this is available.

In contrast to the similar support for SELINUX and SMACK support (which
also internally uses extended attributes), I have made this a FEAT_XATTR
define, instead of the similar HAVE_XATTR.

Add a test and change CI to include relevant packages so that CI can
test that extended attributes are correctly written.

closes: #306
closes: #13203

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-30 12:49:18 +02:00
1f025b01e2 patch 9.0.1961: 'listchars' completion misses "multispace" and "leadmultispace"
Problem:  Cmdline completion for 'listchars' fields doesn't include
          "multispace" and "leadmultispace" (after 9.0.1958).
Solution: Include "multispace" and "leadmultispace" in lcstab.

closes: #13225

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-30 12:43:07 +02:00
f7f746b167 patch 9.0.1960: Make CI checks more strict
Problem:  Make CI checks more strict
Solution: Add -Wstrict-prototypes -Wmissing-prototypes to CI,
          fix uncovered problems

Add -Wstrict-prototypes -Wmissing-prototypes warnings check to CI

Add two new warnings to CI, silence some Perl related build-warnings:

- `strict-prototypes` helps prevent declaring a function with an empty
  argument list, e.g. `int func()`. In C++, that's equivalent to `int
  func(void)`, but in C, that means a function that can take any number
  of arguments which is rarely what we want.

- `missing-prototypes` makes sure we use `static` for file-only internal
  functions. Non-static functions should have been declared on a
  prototype file.

- Add `no-compound-token-split-by-macro` to the perl cflags, since it
  throws out a bunch of perl-related warnings that make the CI log
  unnecessary verbose and hard to read. This seems to happen only with
  clang 12 and above.

When applying those changes, it already uncovered a few warnings, so fix
up the code as well (fix prototypes, make the code static, remove
shadowed var declaration)

GTK header needs to have #pragma warning suppressiong because GTK2
headers will warn on `-Wstrict-prototypes`, and it's included by gui.h
and so we can't just turn off the warning in a couple files.

closes: #13223
closes: #13226

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-30 12:32:37 +02:00
f3b68d4759 patch 9.0.1959: Vim9: methods parameters and types are covariant
Problem:  Vim9: methods parameters and types are covariant
Solution: Support contra-variant type check for object method arguments
          (similar to Dart).

closes: #12965
closes: #13221

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-29 22:50:02 +02:00
900894b09a patch 9.0.1958: cannot complete option values
Problem:  cannot complete option values
Solution: Add completion functions for several options

Add cmdline tab-completion for setting string options

Add tab-completion for setting string options on the cmdline using
`:set=` (along with `:set+=` and `:set-=`).

The existing tab completion for setting options currently only works
when nothing is typed yet, and it only fills in with the existing value,
e.g. when the user does `:set diffopt=<Tab>` it will be completed to
`set diffopt=internal,filler,closeoff` and nothing else. This isn't too
useful as a user usually wants auto-complete to suggest all the possible
values, such as 'iblank', or 'algorithm:patience'.

For set= and set+=, this adds a new optional callback function for each
option that can be invoked when doing completion. This allows for each
option to have control over how completion works. For example, in
'diffopt', it will suggest the default enumeration, but if `algorithm:`
is selected, it will further suggest different algorithm types like
'meyers' and 'patience'. When using set=, the existing option value will
be filled in as the first choice to preserve the existing behavior. When
using set+= this won't happen as it doesn't make sense.

For flag list options (e.g. 'mouse' and 'guioptions'), completion will
take into account existing typed values (and in the case of set+=, the
existing option value) to make sure it doesn't suggest duplicates.

For set-=, there is a new `ExpandSettingSubtract` function which will
handle flag list and comma-separated options smartly, by only suggesting
values that currently exist in the option.

Note that Vim has some existing code that adds special handling for
'filetype', 'syntax', and misc dir options like 'backupdir'. This change
preserves them as they already work, instead of converting to the new
callback API for each option.

closes: #13182

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-29 20:42:32 +02:00
3695d0e41b patch 9.0.1957: termcap options should change when setting keyprotocol
Problem:  termcap options should change on keyprotocol setting
Solution: Apply termcap entries when 'keyprotocol' changes

When the 'keyprotocol' option was set after startup (including in a
user's .vimrc) the termcap entries associated with the matching protocol
were not applied. Thus, setting the option has no affect.

When 'keyprotocol' is changed it should also update the termcap entries.

closes: #13211

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Gregory Anders <greg@gpanders.com>
2023-09-29 20:17:20 +02:00
28a23602e8 patch 9.0.1956: Custom completion skips orig cmdline if it invokes glob()
Problem:  Custom cmdline completion skips original cmdline when pressing
          Ctrl-P at first match if completion function invokes glob().
Solution: Move orig_save into struct expand_T.

closes: #13216

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-29 19:58:35 +02:00
ee865f37ac patch 9.0.1955: Vim9: lockvar issues with objects/classes
Problem:  Vim9: lockvar issues with objects/classes
Solution: fix `get_lhs()` object/class access and avoid `SEGV`,
          make error messages more accurate.

- `get_lval()` detects/returns object/class access
- `compile_lock_unlock()` generate code for bare static and obj_arg access
- `do_lock_var()` check lval for `ll_object`/`ll_class` and fail if so.

Details:
- Add `ll_object`/`ll_class`/`ll_oi` to `lval_T`.
- Add `lockunlock_T` to `isn_T` for `is_arg` to specify handling of `lval_root` in `get_lval()`.
- In `get_lval()`, fill in `ll_object`/`ll_class`/`ll_oi` as needed; when no `[idx] or .key`, check lval_root on the way out.
- In `do_lock_var()` check for `ll_object`/`ll_class`; also bullet proof ll_dict case
  and give `Dictionay required` if problem. (not needed to avoid lockvar crash anymore)
- In `compile_lock_unlock()` compile for the class variable and func arg cases.

closes: #13174

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-09-29 19:53:55 +02:00
112431f217 patch 9.0.1954: CI: change netrw label in labeller bot
Problem:  CI: change netrw label in labeller bot
Solution: Rename it to 'plugin-netrw'

closes: #13217

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-09-29 19:48:09 +02:00
789b8854d2 patch 9.0.1953: Misplaced comment in errors.h
Problem:  Misplaced comment in errors.h
Solution: Move it up

closes: #13218

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-09-29 19:45:42 +02:00
5a05d374d3 patch 9.0.1952: Vim9: unused static field
Problem:  Vim9: unused static field
Solution: remove it and simplify code

closes: #13220

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-29 19:44:25 +02:00
02902b547b runtime(doc): text-objects: document how escaped delimiters are handled
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-29 00:10:04 +02:00
b90e3bc491 patch 9.0.1951: Vim9: hard to debug vim9_class errors from CI
Problem:  Vim9: hard to debug vim9_class errors from CI
Solution: Include the line number in assert_xxx() calls.  Include the
          entire error message in the tests.  Fix the indentation in the
          test file.  Add tags for new error codes.

closes: #13206

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-28 23:16:35 +02:00
413f83990f patch 9.0.1950: Vim9: error codes spread out
Problem:  Vim9: error codes spread out
Solution: group them together and reserve 100
          more for future use

Reserve 100 error codes for future enhancements to the Vim9 class
support

closes: #13207

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-28 22:46:37 +02:00
f057aca1cc patch 9.0.1949: Vim9: allows reserved keywords as members
Problem:  Vim9: allows reserved keywords as members
Solution: Disallow reserved keywords, disallow
          duplicate object and class variables

closes: #13209

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-28 22:28:15 +02:00
db38552dcd patch 9.0.1948: Vim9: object variable "this." should only be used in constructor
Problem:  Vim9: object variable "this." should only be used in
          constructor
Solution: Disallow to this in normal object methods (other than
          constructors)

closes: #13152
closes: #13212

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2023-09-28 22:18:19 +02:00
03ca4002c1 patch 9.0.1947: Bash Expansion test fails on Windows/MacOS
Problem:  Bash Expansion test fails on Windows/MacOS
Solution: Disable Test_glob_extended_bash for now

This test doesn't work on Windows even if bash can be executed, since
the globstar functionality has only been enabled in Unix builds of Vim
(Commit 9eb1ce5315, patch 9.0.1946).

closes: #13205

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-09-28 21:59:58 +02:00
e845b38dab runtime(doc): regenerate xxd manpage
Commit f6fc255e8d (v9.0.1834) updated xxd.1 but the xxd.man
page wasn't re-generated. So let's just regenerate it now.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-27 23:33:39 +02:00
9eb1ce5315 patch 9.0.1946: filename expansion using ** in bash may fail
Problem:  filename expansion using ** in bash may fail
Solution: Try to enable the globstar setting

Starting with bash 4.0 it supports extended globbing using the globstar
shell option. This makes matching recursively below a certain directory
using the ** pattern work as expected nowadays.  However, we need to
explicitly enable this using the 'shopt -s globstar' bash command.

So let's check the bash environment variable $BASH_VERSINFO (which is
supported since bash 3.0 and conditionally enable the globstar option,
if the major version is at least 4. For older bashs, this at least
shouldn't cause errors (unless one is using really ancient bash 2.X or
something).

closes: #13002
closes: #13144

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-27 19:08:25 +02:00
2dede3dbfa patch 9.0.1945: Vim9: missing support for ro-vars in interface
Problem:  Vim9: missing support for ro-vars in interface
Solution: Support only read-only object variables in an interface,
          add additional checks when parsing class definitions.

closes: #13183
cloess: #13184
cloess: #13185.
closes: #13188

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-27 19:02:01 +02:00
5277cfaf8a runtime(doc): mention mouse scrolling in scrollbind-quickadj (#13190)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-27 19:00:12 +02:00
54f70cf078 runtime(swayconfig): Update syntax file (#13192)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-27 18:58:15 +02:00
02774f99ce runtime(i3config): update i3config syntax (#13191)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-27 18:57:24 +02:00
3474594239 runtime(rmd) Update ftplugin and syntax files (#13193)
ftplugin/rmd.vim:

  - Set 'commentstring' dynamically according to code region.

syntax/rmd.vim:

  - Include syntax highlighting of fenced languages dynamically.
  - Add conceal char for line break.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-27 18:56:02 +02:00
a76fbe6e00 patch 9.0.1944: Vim9: function instruction pointer invalidated
Problem:  Vim9: function instruction pointer invalidated
Solution: Use the funcref index instead of the instruction pointer

closes: #13178
closes: #13196

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-27 18:53:10 +02:00
91adcbdcc1 translation(sr): Update Serbian messages translation
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-27 18:48:42 +02:00
f109bf93c9 patch 9.0.1943: CI not run with clang-17
Problem:  CI not run with clang-17
Solution: Update CI to use clang-17

closes: #12745

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-09-25 21:05:00 +02:00
c1946267f2 patch 9.0.1942: Vim9: execution stack invalidated with null object
Problem:  Vim9: execution stack invalidated with null object
Solution: Check for a null object before adjusting the execution stack

closes: #13186

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-25 21:00:46 +02:00
54e1f56cf2 runtime(sh): only invoke bash help in ftplugin if it has been detected to be bash (#13171)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-25 19:40:45 +01:00
3aa114463f patch 9.0.1941: Memory leak detected
Problem:  Memory leak detected (after 9.0.1928)
Solution: Free arg_objm in get_lambda_tv()

closes: #13181

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-25 12:13:17 +02:00
e1b95f5252 runtime(doc): Update help tags (#13180)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-25 08:19:48 +01:00
ec8deb092c patch 9.0.1940: wrong upstream version in libvterm README
Problem:  wrong upstream version in libvterm README
Solution: correct version to 839

related: #12746

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 23:43:38 +02:00
b80ae6cec3 patch 9.0.1939: still a problem when processing LSP RPC requests
Problem:  still a problem when processing LSP RPC requests
Solution: When processing async LSP RPC requests, compare sequence
          numbers only in response messages

A LSP request message can be sent to the language server either
synchronously (ch_evalexpr) or asynchronously (ch_sendexpr). In both
cases, when looking for response messages by using the sequence number,
LSP requests messages from the language server with the same sequence
number should not be used. Patch 9.0.1927 fixed this issue for
synchronous requests. This PR fixes the issue for asynchronous requests
and adds additional tests.

closes: #13158

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-24 23:38:46 +02:00
ceffca683b runtime(todo): Update Vim9 class items (#13148)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 23:36:56 +02:00
c3b315f496 runtime(doc): Vim9: Consistenly use class/object variable and class/object method in help (#13149)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 23:36:17 +02:00
abc808112e patch 9.0.1938: multispace wrong when scrolling horizontally
Problem:  multispace wrong when scrolling horizontally
Solution: Update position in "multispace" or "leadmultispace" also in
          skipped chars. Reorder conditions to be more consistent.

closes: #13145
closes: #13147

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-24 23:32:18 +02:00
46a0582ffa patch 9.0.1937: missing test for mouse click + 'virtedit'
Problem:  missing test for mouse click + 'virtedit'
Solution: Add test for clicking after eol with 'virtualedit' and wrapped
          line

closes: #13157

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-24 23:30:03 +02:00
e6fca0e822 patch 9.0.1936: test: using wrong expected message in test_crypt
Problem:  test: using wrong expected message in test_crypt
Solution: make use of single quotes

closes: #13151

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Isao Sato <svardew@gmail.com>
2023-09-24 23:27:25 +02:00
7fe8f43f49 patch 9.0.1935: Vim9: not consistent error messages
Problem:  Vim9: not consistent error messages
Solution: Make error messages more consistent. Use "variable" for
          (object/class) member

closes: #13155

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: RestorerZ <restorer@mail2k.ru>
2023-09-24 23:21:24 +02:00
46bdae036a patch 9.0.1934: :bwipe fails after switching window from aucmd_win.
Problem:  :bwipe fails after switching window from aucmd_win.
Solution: Decrement b_nwindows after switching back to aucmd_win.

closes: #13160

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-24 23:17:14 +02:00
edcba96c00 patch 9.0.1933: Can change the type of a v: variable using if_lua
Problem:  Can change the type of a v: variable using if_lua.
Solution: Add additional handling of v: variables like :let.

closes: #13161

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-24 23:13:51 +02:00
7398f367d5 patch 9.0.1932: Vim9: error when using null object constructor
Problem:  Vim9: error when using null object constructor
Solution: Check for a null object only when calling an object method

closes: #13154
closes: #13163

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-24 23:09:10 +02:00
960822a11f runtime(doc): grammar fixes in doc (#13164)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 23:07:39 +02:00
7c948644fb runtime(doc): Update the version9.txt with a template for version 9.1 enhancements (#13165)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 23:07:03 +02:00
790f9a890c runtime(doc): Add a missing '<' to the help of strutf16len() (#13168)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 23:05:47 +02:00
ca0ffc0d63 patch 9.0.1931: make test_compilers fails on ubuntu
Problem:  make test_compilers fails on ubuntu
Solution: set LC_ALL=C

fix: make test_compiler failed on xubuntu 22.04.3

Problem: 'make test_compiler' failed on Linux xubuntu 22.04.3 but
         succeeded on e.g. macOS. To reproduce:
```
$ ./configure --with-features=huge --enable-gui=no --enable-perlinterp=yes
$ make -j12
$ cd vim/src/testdir
$ make test_compiler
...snip...
Found errors in Test_compiler():
command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 24: command did not fail: clist
command line..script /home/dope/sb/vim/src/testdir/runtest.vim[601]..function RunTheTest[54]..Test_compiler line 30: Pattern '\\n \\d\\+ Xfoo.pl:3: Global symbol "$foo" requires explicit package name' does not match '\n19 Xfoo.pl:3: Global symbol "$foo" requires explicit package name (did you forget to declare "my $foo"?)'
make: *** [Makefile:70: test_compiler] Error 1
```
Solution: set `LC_ALL` to "C" in `Test_compiler()`

closes: #13173

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-09-24 22:57:41 +02:00
8ffcb47a43 runtime(tutor): fix typo in tutor.nl (#13175)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-24 22:54:30 +02:00
4927bc7d27 patch 9.0.1930: compiler warnings with clang-17
Problem:  compiler warnings with clang-17
Solution: Fix function prototypes and function pointer

fix: clang compilation warnings with -Wstrict-prototypes

Change fixes this kind of compilation warnings with clang:
```
proto/if_python3.pro:13:20: warning: a function declaration without a prototype is deprecated in all versions of C [-Wstrict-prototypes]
   13 | int python3_version();
      |                    ^
      |                     void
```

closes: #13166

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-09-24 16:16:06 +02:00
99c3849a92 patch 9.0.1929: runtime tests fail with tiny vim
Problem:  runtime tests fail with tiny vim
Solution: check for tiny vim, run runtime tests in CI
          even for tiny version

closes: #13169
closes: #13170

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Dominique Pellé <dominique.pelle@tomtom.com>
2023-09-24 16:09:31 +02:00
b895b0fabc patch 9.0.1928: Vim9: constructor type checking bug
Problem:  Vim9: constructor type checking bug
Solution: Fix class constructor regression

closes: #13102
closes: #13113

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: h-east <h.east.727@gmail.com>
2023-09-24 15:46:31 +02:00
ceee7a808c patch 9.0.1927: patch 1916 (fixed terminal size) not optimal
Problem:  patch 1916 (fixed terminal size) not optimal
Solution: Add defines to make it easier changeable later

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-21 16:57:42 +02:00
696270bcae patch 9.0.1926: Vim9: not enough info in error message
Problem:  Vim9: not enough info in error message
Solution: Add class name, change member to variable, quote names

closes: #13136

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-09-21 16:42:28 +02:00
02c51b1dd8 patch 9.0.1925: if_python: still undefined behaviour with function pointer
Problem:  if_python: still undefined behaviour with function pointer
Solution: fix remaining problems

Fix remaining issues in the if_python code in casting incompatible
function pointers leading to Clang 17 giving runtime errors during
UBSAN.

closes: #13140

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-21 16:40:12 +02:00
1926ae4184 patch 9.0.1924: LSP server message still wrongly handled (after 9.0.1922)
Problem:  LSP server message still wrongly handled (after 9.0.1922)
Solution: Handle 'method' messages properly, don't discard them, add
          tests.

closes: #13141

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-21 16:36:28 +02:00
db54e989b5 patch 9.0.1923: curswant wrong on click with 've' and 'wrap' set
Problem:  curswant wrong on click with 've' and 'wrap' set
Solution: Add w_leftcol to mouse click column.

closes: #13142

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-21 16:33:09 +02:00
a7aba6ca50 runtime(doc): format jumplist examples more consistently (#13137)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-21 07:22:57 +01:00
78c5a5abc6 patch 9.0.1922: LSP server request message is misinterpreted as a response message
Problem:  LSP server request message is misinterpreted as a response message
Solution: Check that the message does not have the "message" field

closes: #13133

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-20 20:32:55 +02:00
87018255e3 patch 9.0.1921: not possible to use the jumplist like a stack
Problem:  not possible to use the jumplist like a stack
Solution: Add the 'jumpoptions' setting to make the jumplist
          a stack.

Add an option for using jumplist like tag stack

related: #7738
closes: #13134

ported from NeoVim:

- https://neovim.io/doc/user/motion.html#jumplist-stack
- neovim/neovim@39094b3
- neovim/neovim#11530
- https://vi.stackexchange.com/questions/18344/how-to-change-jumplist-behavior

Based on the feedback in the previous PR, it looks like many people like
this option.

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
Co-authored-by: butwerenotthereyet <58348703+butwerenotthereyet@users.noreply.github.com>
2023-09-20 20:25:17 +02:00
98e68c07ce patch 9.0.1920: Vim9: cannot write public var in nested object
Problem:  Vim9: cannot write public var in nested object
Solution: Write variable in nested read-only object reference.
          Also test write fails.

closes: #13130
closes: #13131

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-09-20 20:13:06 +02:00
03cd697d63 patch 9.0.1919: Wrong curswant when clicking on empty line or with vsplits
Problem:  Wrong curswant when clicking on empty line or with vsplits.
Solution: Don't check for ScreenCols[] before the start of the window
          and handle empty line properly.

closes: #13132

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-20 20:08:40 +02:00
5790a54166 patch 9.0.1918: No filetype detection for Authzed filetypes
Problem:  No filetype detection for Authzed filetypes
Solution: Detect the *.zed file extension as authzed filetype

closes: #13129

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Matt Polzin <mpolzin@workwithopal.com>
2023-09-20 20:03:52 +02:00
d606fccf6f patch 9.0.1917: undefined behaviour with python function pointer
Problem:  undefined behaviour with python function pointer
Solution: correctly cast function pointers from void

Fix more undefined behaviors in if_python

Fix remaining UBSAN errors from Clang 17 in if_python in casting
function pointers.

Also fix a mistake where `PyMem_Free()` should be returning void, by the
dynamic build is mistakenly casting it as a function that returns an
int.

closes: #13128

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-20 19:59:47 +02:00
aa64ba1587 patch 9.0.1916: Crash when allocating large terminal screen
Problem:  Crash when allocating large terminal screen
Solution: Don't allow values > 1000 for terminal
          screen columns and rows

closes: #13126

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-19 21:16:52 +02:00
476733f3d0 patch 9.0.1915: r_CTRL-C works differently in visual mode
Problem:  r_CTRL-C works differently in visual mode
Solution: Make r_CTRL-C behave consistent in visual mode
          in terminal and Windows GUI

in visual mode, r CTRL-C behaves strange in Unix like environments. It
seems to end visual mode, but still is waiting for few more chars,
however it never seems to replace it by any characters and eventually
just returns back into normal mode.

In contrast in Windows GUI mode, r_CTRL-C replaces in the selected area
all characters by a literal CTRL-C.

Not sure why it behaves like this. It seems in the Windows GUI, got_int
is not set and therefore behaves as if any other normal character has
been pressed.

So remove the special casing of what happens when got_int is set and
make it always behave like in Windows GUI mode. Add a test to verify it
always behaves like replacing in the selected area each selected
character by a literal CTRL-C.

closes: #13091
closes: #13112

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-19 20:45:07 +02:00
1db1514365 patch 9.0.1914: Vim9: few issues when accessing object members
Problem:  Vim9: few issues when accessing object members
Solution: When calling an object method, check for null object.
          Accessing a Dict object member doesn't work.

closes: #13119
closes: #13123
closes: #13124

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-19 20:36:02 +02:00
2ce070c27a patch 9.0.1913: if_python: undefined behaviour for function pointers
Problem:  if_python: undefined behaviour for function pointers
Solution: Fix if_python undefined behavior for function pointer casts

Identified by clang 17 UBSAN (see #12745). Make sure to cast function
pointers with the same signature only.

closes: #13122

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-19 20:30:22 +02:00
6f00d17e8d patch 9.0.1912: Cirrus-CI running out of credits
Problem:  Cirrus-CI running out of credits
Solution: disable Cirrus-CI for now

We are running out of credits for Cirrus CI already at the middle of the
month and unfortunately this means our CI now consistently fails. This
all hapens because cirrus ci is not enforcing the free-tier limits (see also
https://cirrus-ci.org/blog/2023/07/17/limiting-free-usage-of-cirrus-ci/).

Perhaps at the beginning of the next month we can revisit and
enable just a build without testing it.  Hopefully this is won't take
too many credits and we can at least verify that building works.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-19 20:19:08 +02:00
3da696db6a patch 9.0.1911: Vim9: segfault with null object and instanceof()
Problem:  Vim9: segfault with null object and instanceof()
Solution: return early

closes: #13121

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-09-19 20:14:18 +02:00
346ac1429c runtime(doc): add help tag describing object-selection
closes: #13114

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-18 20:12:22 +02:00
063c562a37 patch 9.0.1910: Mac OS X: missing sound support on older versions
Problem:  Mac OS X: missing sound support on older versions
Solution: Check Macro MAC_OS_X_VERSION_MIN_REQUIRED

Extend guard for sound support on OS X

Fixes build on legacy versions where required coreaudio functionality
may not be available. NSSoundDelegate apparently was introduced in Snow
Leopard yet the build breaks on it. Guarding off enabling sound support
to El Capitan as that's the next version I had access to for testing (it
may work on earlier versions)
https://developer.apple.com/documentation/appkit/nssounddelegate Vim
builds on OS X Tiger 10.4 and newer with this change.

closes: #13115

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Sevan Janiyan <venture37@geeklan.co.uk>
2023-09-18 20:04:32 +02:00
00cd18222e patch 9.0.1909: Vim9: problem calling class method from other class
Problem:  Vim9: problem calling class method from other class
Solution: Fix this problem, fix readonly object access, update error
          messages.

Calling a class method from another method without the class name prefix
doesn't work properly.

A readonly object variable is modifiable outside the class using a
nested object assignment.

Remove the unused E1338 error message.

Update error messages.

closes: #13116

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-18 19:56:49 +02:00
d25021cf03 patch 9.0.1908: undefined behaviour upper/lower function ptrs
Problem:  undefined behaviour upper/lower function ptrs
Solution: Fix UBSAN error in regexp and simplify upper/lowercase
          modifier code

The implementation of \u / \U / \l / \L modifiers in the substitute
command relies on remembering the state by setting function pointers on
func_all/func_one in the code. The code signature of `fptr_T` is
supposed to return void* (due to C function signatures not being able to
return itself due to type recursion), and the definition of the
functions (e.g. to_Upper) didn't follow this rule, and so the code tries
to cast functions of different signatures, resulting in undefined
behavior error under UBSAN in Clang 17. See #12745.

We could just fix `do_Upper`/etc to just return void*, which would fix
the problem. However, these functions actually do not need to return
anything at all. It used to be the case that there was only one pointer
"func" to store the pointer, which is why the function needs to either
return itself or NULL to indicate whether it's a one time or ongoing
modification. However, c2c355df6f
(7.3.873) already made that obsolete by introducing `func_one` and
`func_all` to store one-time and ongoing operations separately, so these
functions don't actually need to return anything anymore because it's
implicit whether it's a one-time or ongoing operation. Simplify the code
to reflect that.

closes: #13117

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-18 19:51:56 +02:00
d8b86c937a runtime(netrw): fix filetype detection for remote editing files
closes: #12990
closes: #12992

this partially reverses commit 71badf9 by commenting out the line that
intentionally sets the filetype to an empty string.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-17 18:52:56 +02:00
e30d8e4ce0 runtime(kotlin): Add Kotlin runtime files (#13110)
Closes udalov/kotlin-vim#39

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-17 18:51:22 +02:00
6b5efcdd8e patch 9.0.1907: No support for liquidsoap filetypes
Problem:  No support for liquidsoap filetypes
Solution: Add liquidsoap filetype detection code

closes: #13111

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Romain Beauxis <toots@rastageeks.org>
2023-09-17 18:49:20 +02:00
92d9ee5f4c patch 9.0.1906: Vim9: Interfaces should not support class methods and variables
Problem:  Vim9: Interfaces should not support class methods and
          variables
Solution: Make sure interface follow the interface specification

Vim9 interface changes to follow the new interface specification:

1) An interface can have only read-only and read-write instance
   variables.
2) An interface can have only public instance methods.
3) An interface cannot have class variables and class methods.
4) An interface cannot have private instance variables and private
   instance methods.
5) A interface can extend another interface using "extends". The
   sub-interface gets all the variables and methods in the super
   interface.

That means:
- Interfaces should not support class methods and variables.
- Adjust error numbers and add additional tests.
- Interface methods can be defined in one of the super classes.
- Interface variables can be defined in one of the super classes.
  and instance variables can be repeated in sub interfaces.
- Check the class variable types with the type in interface.

closes: #13100

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-17 17:03:19 +02:00
0483e49f90 patch 9.0.1905: FEAT_FLOAT no longer defined
Problem:  FEAT_FLOAT no longer defined
Solution: Remove last existing FEAT_FLOAT ifdefs in
          message_test

Remove FEAT_FLOAT as that should always be true

FEAT_FLOAT has been removed in v9.0.0491 (73e28dcc61) but
unfortunately, it was forgotten to remove it from message_test.c. So
let's remove the last mentioned ifdefs which are now unused.

closes: #13106

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-09-17 16:58:22 +02:00
e6059c321b patch 9.0.1904: Cirrus-CI fails because we have used all credits
Problem:  Cirrus-CI fails because we have used all credits
Solution: Remove FreeBSD 13.1 and MacOS M1

Cirrus CI has started introducing monthly limits. Vim has exceeded the
monthly limit which means our CI unfortunately starts to fail. So let's
remove some CI tasks, so that in the future we won't run out of credits
so fast.

closes: #13108

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: dundargoc <gocdundar@gmail.com>
2023-09-17 16:53:18 +02:00
177437cc6f doc(INSTALLpc): mention additional packages for msys2
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-17 16:36:33 +02:00
a66feb5fb5 patch 9.0.1903: CI fails because snd-dummy modules missing
Problem:  Github Actions fails because snd-dummy modules missing
          in current runner images
Solution: ignore modprobe error

related: actions/runner-images#8295

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-16 18:29:42 +02:00
249a208803 runtime(man): Man plugin does not respect 'gdefault'
Fix the issue introduced by #12557. `:substitute` commands in plugins
need to take into account whether `gdefault` is set or not because
that depends on the user.

closes: #13097

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-16 18:12:14 +02:00
e2deb7e598 patch 9.0.1902: Vim9: Coverity complains about dead code
Problem:  Vim9: Coverity complains about dead code
Solution: Copy only object methods from the super class
          to a subclass when extending a class.  Fix
          Coverity warning.

closes: #13103

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-16 18:05:07 +02:00
ad29f6af0a patch 9.0.1901: win32: not correctly freeing environment
Problem:  win32: not correctly freeing environment
Solution: After we call GetEnvironmentStringsW, we should call
          FreeEnvironmentStringsW

closes: #13096
closes: #13094

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ken Takata <kentkt@csc.jp>
2023-09-16 13:56:02 +02:00
e7d79eb98a patch 9.0.1900: Configure script uses non-portable == comparison
Problem:  Configure script uses non-portable == comparison
Solution: Use the standard and portable "=" instead

closes: #13095
closes: #13099

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yee Cheng Chin <ychin.git@gmail.com>
2023-09-16 13:38:26 +02:00
ffb13674d1 patch 9.0.1899: potential buffer overflow in PBYTE macro
Problem:  potential buffer overflow in PBYTE macro
Solution: Check returned memline length

closes: #13083

the PBYTE macro is used to put byte c at a position lp of the returned
memline. However, in case of unexpected errors ml_get_buf() may return
either "???" or an empty line in which case it is quite likely that we
are causing a buffer overrun.

Therefore, switch the macro PBYTE (which is only used in ops.c anyhow)
to a function, that verifies that we will only try to access within the
given length of the buffer.

Also, since the macro is only used in ops.c, move the definition from
macros.h to ops.c

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-15 20:22:02 +02:00
c30a90d9b2 patch 9.0.1898: Vim9: restrict access to static vars
Problem:  Vim9: restrict access to static vars and methods
Solution: Class members are accesible only from the class where they are
          defined.

Based on the #13004 discussion, the following changes are made:

    1) Static variables and methods are accessible only using the class
       name and inside the class where they are defined.
    2) Static variables and methods can be used without the class name in
       the class where they are defined.
    3) Static variables of a super class are not copied to the sub class.
    4) A sub class can declare a class variable with the same name as the
       super class.
    5) When a method or member is found during compilation, use more
       specific error messages.

This aligns the Vim9 class variable/method implementation with the Dart
implementation.

Also while at it, ignore duplicate class and object methods.

The access level of an object method can however be changed in a
subclass.

For the tests, use the new CheckSourceFailure() function instead of the
CheckScriptFailure() function in the tests.

closes: #13086

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-15 20:14:55 +02:00
35928ee8f8 runtime(vim): Highlight all :loadkeymap abbreviations in vim syntax (#13092)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-15 20:12:50 +02:00
c1f8bb37c6 runtime(forth): Fix :unlet error in ftplugin (#13090)
Fixes #13089.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-15 15:47:06 +01:00
6ffcc58be3 runtime(help): Updated documentation on editorconfig
Add a small section about the distributed Editorconfig plugin at :h
usr_05.txt just below the matchit plugin.  While editing that help
document, also add a bit of more documentation about standard plugins
and local help file additions.

Regenerate $VIMRUNTIME/doc/tags file with all the new tags from the rust
runtime files.

While at it, update the Editorconfig help page (and re-generate the
helptags file).

closes: #13078

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-12 21:08:54 +02:00
8b2457a381 runtime(swayconfig): improve syntax highlighting (#13060)
* syntax(swayconfig): improved highlighting
* syntax(swayconfig): adapt to i3config structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-12 20:24:47 +02:00
fc93594d56 runtime(rust): sync rust runtime files with upstream (#13075)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-12 20:23:38 +02:00
f5356bf675 runtime(i3config): syntax structure cleanup (#13080)
* syntax(i3config): improved i3config highlighting
* syntax(i3config): refactor structure

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-12 20:20:25 +02:00
596ad66d1d runtime(doc): documentation updates
This is a collection of various improvements to the help pages

closes #12790

Co-authored-by: Houl <anwoku@yahoo.de>
Co-authored-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 20:23:11 +02:00
62145db91b syntax(i3config): improved i3config highlighting (#13054)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 20:12:48 +02:00
504543f98b patch 9.0.1897: Vim9: confusing error with .= in compiled functions
Problem:  Vim9: confusing error with .= in compiled functions
Solution: Check in error condition, if .= was attempted and in that case
          give a different error message.

closes: #12972
closes: #13066

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 20:08:50 +02:00
6b9c202549 patch 9.0.1896: "below" virtual text doesn't work with 'rightleft'
Problem:  "below" virtual text doesn't work with 'rightleft'.
Solution: Use column from right border with 'rightleft'.

closes: #13071

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2023-09-11 20:01:17 +02:00
4d00b835c4 patch 9.0.1895: Vim9: finding object method/member is inefficient
Problem:  Vim9: finding method/member is inefficient
Solution: Use lookups

closes: #13073

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
2023-09-11 19:57:52 +02:00
f787ee8451 runtime(doc): Add g:c_syntax_for_h to filetype-overrule docs
closes: #13074

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 19:50:09 +02:00
213c323184 CI: Bump actions/checkout from 3 to 4 (#13072)
Bumps [actions/checkout](https://github.com/actions/checkout) from 3 to 4.
- [Release notes](https://github.com/actions/checkout/releases)
- [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md)
- [Commits](https://github.com/actions/checkout/compare/v3...v4)

---
updated-dependencies:
- dependency-name: actions/checkout
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-11 19:43:33 +02:00
e5f7cd0a60 patch 9.0.1894: CI: trailing whitespace in tests
Problem:  CI: trailing white space in tests
Solution: clean up the trailing white space

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-10 19:26:47 +02:00
983d808674 patch 9.0.1893: CI: strptime test fails on BSD14
Problem:  CI: strptime test fails on BSD14
Solution: Skip the test

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-10 19:06:09 +02:00
24a95f42b8 patch 9.0.1892: CI: no FreeBSD 14 support
Problem:  CI: no FreeBSD 14 support
Solution: Drop support for FreeBSD 12, add FreeBSD 14

closes: #13059

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
2023-09-10 18:31:51 +02:00
e7833e7347 runtime(masm): add support for AVX-2 and AVX-512 (#13061)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-10 18:27:31 +02:00
0ce2c594d0 patch 9.0.1891: No runtime support for Mojo
Problem:  No runtime support for Mojo
Solution: Add basic filetype and syntax plugins

closes: #13062
closes: #13063

Signed-off-by: Christian Brabandt <cb@256bit.org>
Signed-off-by: Doug Kearns <dougkearns@gmail.com>
Co-authored-by: Mahmoud Abduljawad <mahmoud@masaar.com>
2023-09-10 18:23:04 +02:00
f36bbcd402 patch 9.0.1890: Vim9: lookup code for class/object repaeated
Problem:  Vim9: lookup code for class/object repaeated
Solution: Refactor and make use of lookup functions

closes: #13067

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-10 18:19:06 +02:00
0661033075 runtime(scala): Fix Scala highlighting string literal as type param (#13070)
Since https://docs.scala-lang.org/sips/42.type.html which is implemented
in Scala 2.13 and in Scala 3 it possible to use string literals as
singleton types. So code like
```
someFunc["abc"]
```
is valid. Currently this code is not hightlighted correctly and worse if
there is an unclosed `(` in the string it breaks the formating in the
rest of the file.

I also submitted this patch to the mentioned project for this runtime
file: https://github.com/derekwyatt/vim-scala/pull/173 But there are no
commits there over the last 2 years and no response in the week since I
created it. Also the last change to the Scala syntax file:
https://github.com/vim/vim/pull/9594 is yet to be backported to that
repo. Therefore I am opening this PR as well to get some feedback on how
to proceed to get this fixed.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-10 18:16:51 +02:00
0405405536 patch 9.0.1889: Vim9 static tests fail
Problem:  Vim9 static tests fail
Solution: Fix tests, make CI happy ;)

closes: #13064

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-10 18:12:56 +02:00
733bbcde77 runtime(nasm): updated syntax file
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-09 12:00:09 +02:00
342f4f626e patch 9.0.1888: Vim9: Problem trying to invoke class method
Problem:  Vim9: Problem trying to invoke class method
Solution: Lookup the class method insider other classes

closes: #13055

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-09 11:37:23 +02:00
23c92d93c1 patch 9.0.1887: Vim9: class members are accessible via object
Problem:  Vim9: class members are accessible via object
Solution: Disable class member variable access using an object

Class methods can be accessed only using the class name and cannot be
accessed using an object. To be consistent with this, do the same for
class member variables also. They can be accessed only using the class
name and not using an object.

closes: #13057

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-09 11:33:29 +02:00
ee17b6f70d patch 9.0.1886: Various Typos
Problem:  Various Typos
Solution: Fix Typos

This is a collection of typo related commits.

closes: #12753
closes: #13016

Co-authored-by: Adri Verhoef <a3@a3.xs4all.nl>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Viktor Szépe <viktor@szepe.net>
Co-authored-by: nuid64 <lvkuzvesov@proton.me>
Co-authored-by: Meng Xiangzhuo <aumo@foxmail.com>
Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-09 11:31:38 +02:00
7bcd25cad3 patch 9.0.1885: Vim9: no support for abstract methods
Problem:  Vim9: no support for abstract methods
Solution: Add support for defining abstract methods in an abstract class

closes: #13044
closes: #13046

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-08 19:29:31 +02:00
86cfb39030 runtime(tohtml): Update TOhtml to version 9.0v2 (#13050)
Modified behavior:
  - Change default value of g:html_use_input_for_pc from "fallback" to
    "none". This means with default settings, only the standards-based
    method to make special text unselectable is used. The old method
    relying on unspecified browser behavior for <input> tags is now only
    used if a user specifically enables it.
  - Officially deprecate g:use_xhtml option (in favor of
    g:html_use_xhtml) by issuing a warning message when used.

Bugfixes:
  - Fix issue #8547: LineNr and other special highlight groups did not
    get proper style rules defined when using "hi link".
  - Fix that diff filler was not properly added for deleted lines at the
    end of a buffer.

Other:
  - Refactored function definitions from long lists of strings to use
    :let-heredoc variable assignment instead.
  - Corrected deprecated "." string concatenation operator to ".."
    operator in more places.


Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-08 19:20:01 +02:00
1bd2cb1169 patch 9.0.1884: Wrong order of arguments for error messages
Problem:  Wrong order of arguments for error messages
Solution: Reverse order or arguments for e_aptypes_is_null_nr_str

closes: #13051

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Christ van Willegen <cvwillegen@gmail.com>
2023-09-08 19:18:58 +02:00
4e554d282c runtime(perl): Update ftplugin and indent files (#13052)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-08 19:16:03 +02:00
cc0bcf4c9f patch 9.0.1883: Vim9: Calling an interface method using a child object fails
Problem:  Vim9: Calling an interface method using a child object fails
Solution: Search methods of parent class

When a class implementing an interface is extended by another class and
a child class instance is passed to a function that accepts the
interface, calling an interface method doesn't work properly.

closes: #13053

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-08 19:12:03 +02:00
11d2aeeca4 runtime(doc): update help tags file
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-06 16:39:14 +02:00
da200c2f78 patch 9.0.1882: Trailing white space in tests
Problem:  Trailing white space in tests
Solution: Delete it

This causes test_codestyle to fail, so we need to remove it again.
Hopefully that makes the CI green again.

Note: I will start using annotated tags from now on.

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-06 21:12:24 +02:00
5856b07795 patch 9.0.1881: Test_crash fails on Mac
Problem:  Test_crash fails on Mac
Solution: Skip test on Mac

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-06 20:53:46 +02:00
cf138d4ea5 patch 9.0.1880: Vim9: Need more tests for inheritance
Problem:  Vim9: Need more tests for inheritance
Solution: Add access tests and fixes.

`inside_class` fix from yegappan. `object_index_from_itf_index` fix
access of member on class extending class implementing interface.

Based on tests from Vim9: Class/Object member variable access control #12979

closes: #13032
related: #12979

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Ernie Rael <errael@raelity.com>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-06 20:45:03 +02:00
f7ac0ef509 runtime: don't execute external commands when loading ftplugins
This is a followup to 816fbcc262 (patch
9.0.1833: [security] runtime file fixes)

It basically disables that external commands are run on loading of the
filetype plugin, **unless** the user has set the `g:plugin_exec = 1`
global variable in their configuration or for a specific filetype the
variable g:<filetype>_exec=1.

There are a few more plugins, that may execute system commands like
debchangelog, gitcommit, sh, racket, zsh, ps1 but those do at least
do not run those commands by default during loading of the filetype plugin
(there the command is mostly run as convenience for auto-completion or
to provide documentation lookup).

closes: #13034

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Tim Pope <vim@tpope.org>
2023-09-06 20:41:25 +02:00
1689e847ff patch 9.0.1879: Vim9: incorrect duplicate class member detection
Problem:  Vim9: incorrect duplicate class member detection
Solution: Incorrect duplicate class member detection when variable names
          have the same prefix.  Not able to access class member variables
          using an object. Fix coding style issues

closes: #13042

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-06 20:23:23 +02:00
1690ec64ff patch 9.0.1878: tests running sh have problems
Problem:  tests running sh have problems
Solution: Check that dash is installed

closes: #13040

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Philip H <47042125+pheiduck@users.noreply.github.com>
Co-authored-by: Christian Brabandt <cb@256bit.org>
2023-09-06 20:20:07 +02:00
18d2709aa1 patch 9.0.1877: missing test for patch 9.0.1873
Problem:  missing test for patch 9.0.1873
Solution: add a test trying to exchange windows

Add a test, making sure that switching windows is not allowed when
textlock is active, e.g. when running `:s/<pat>/\=func()/`

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-06 20:02:27 +02:00
67c951df4c runtime(ftplugin): allow to exec if curdir is in PATH
In case the current directory is present as valid $PATH entry, it is OK
to call the program from it, even if vim curdir is in that same
directory.

(Without that patch, for instance, you will not be able to open .zip
files while your current directory is /bin)

closes: #13027

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-05 21:04:44 +02:00
9b04c50319 Filelist: Add missing directory crash (#13036)
Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-05 20:55:47 +02:00
00cb247465 patch 9.0.1876: Vim9: parsing commands with newlines wrong
Problem:  Vim9: parsing commands with newlines wrong
Solution: Accept a '\n' for parsing lists and command arguments

closes: #13015
closes: #13020

Signed-off-by: Christian Brabandt <cb@256bit.org>
2023-09-05 20:53:46 +02:00
28a60f898d patch 9.0.1875: Vim9: improve test for disassemble + static
Problem:  Vim9: improve test for disassemble + static
Solution: Add a Vim9 script disassemble test for an interface with
          static members
closes: #13037

Signed-off-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2023-09-05 20:44:32 +02:00
4060 changed files with 318837 additions and 112146 deletions

View File

@ -29,7 +29,6 @@ environment:
# disabled
# - FEATURE: TINY
# - FEATURE: NORMAL
# - FEATURE: BIG
matrix:
fast_finish: true

View File

@ -5,12 +5,9 @@ env:
freebsd_task:
name: FreeBSD
matrix:
- name: FreeBSD 13.1
- name: FreeBSD 14.3
freebsd_instance:
image_family: freebsd-13-1
- name: FreeBSD 12.4
freebsd_instance:
image_family: freebsd-12-4
image_family: freebsd-14-3
timeout_in: 20m
install_script:
- pkg install -y gettext
@ -24,22 +21,11 @@ freebsd_task:
- pw useradd cirrus -m
- chown -R cirrus:cirrus .
- sudo -u cirrus make test
macos_task:
name: macOS m1
macos_instance:
image: ghcr.io/cirruslabs/macos-ventura-xcode:latest
env:
# only run with clang, gcc is not real, it is a link to clang
CC: clang
timeout_in: 20m
install_script:
- brew update
- brew install gettext libtool diffutils
build_script:
- NPROC=$(getconf _NPROCESSORS_ONLN)
- ./configure --with-features=${FEATURES}
- make -j${NPROC}
test_script:
- src/vim --version
- make test
on_failure:
test_artifacts:
name: "Cirrus-CI-freebsd-failed-tests"
path: |
runtime/indent/testdir/*.fail
runtime/syntax/testdir/failed/*
src/testdir/failed/*
type: application/octet-stream

254
.clang-format Normal file
View File

@ -0,0 +1,254 @@
---
Language: Cpp
AccessModifierOffset: -4
AlignAfterOpenBracket: Align
AlignArrayOfStructures: None
AlignConsecutiveAssignments:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveBitFields:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveDeclarations:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveMacros:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCompound: false
AlignFunctionPointers: false
PadOperators: false
AlignConsecutiveShortCaseStatements:
Enabled: false
AcrossEmptyLines: false
AcrossComments: false
AlignCaseColons: false
AlignEscapedNewlines: DontAlign
AlignOperands: Align
AlignTrailingComments:
Kind: Leave
OverEmptyLines: 0
AllowAllArgumentsOnNextLine: false
AllowAllParametersOfDeclarationOnNextLine: false
AllowBreakBeforeNoexceptSpecifier: Never
AllowShortBlocksOnASingleLine: Never
AllowShortCaseLabelsOnASingleLine: false
AllowShortCompoundRequirementOnASingleLine: true
AllowShortEnumsOnASingleLine: false
AllowShortFunctionsOnASingleLine: None
AllowShortIfStatementsOnASingleLine: Never
AllowShortLambdasOnASingleLine: None
AllowShortLoopsOnASingleLine: false
AlwaysBreakAfterDefinitionReturnType: All
AlwaysBreakAfterReturnType: AllDefinitions
AlwaysBreakBeforeMultilineStrings: false
AlwaysBreakTemplateDeclarations: MultiLine
BinPackArguments: true
BinPackParameters: false
BitFieldColonSpacing: Both
BraceWrapping:
AfterCaseLabel: true
AfterClass: true
AfterControlStatement: Always
AfterEnum: true
AfterExternBlock: true
AfterFunction: true
AfterNamespace: true
AfterObjCDeclaration: true
AfterStruct: true
AfterUnion: true
BeforeCatch: true
BeforeElse: true
BeforeLambdaBody: false
BeforeWhile: true
IndentBraces: false
SplitEmptyFunction: true
SplitEmptyRecord: true
SplitEmptyNamespace: true
BreakAdjacentStringLiterals: true
BreakAfterAttributes: Leave
BreakAfterJavaFieldAnnotations: false
BreakArrays: true
BreakBeforeBinaryOperators: None
BreakBeforeConceptDeclarations: Always
BreakBeforeBraces: Custom
BreakBeforeInlineASMColon: OnlyMultiline
BreakBeforeTernaryOperators: true
BreakConstructorInitializers: BeforeColon
BreakInheritanceList: BeforeColon
BreakStringLiterals: true
ColumnLimit: 80
CommentPragmas: '^ IWYU pragma:'
CompactNamespaces: false
ConstructorInitializerIndentWidth: 4
ContinuationIndentWidth: 4
Cpp11BracedListStyle: false
DerivePointerAlignment: false
DisableFormat: false
EmptyLineAfterAccessModifier: Never
EmptyLineBeforeAccessModifier: LogicalBlock
ExperimentalAutoDetectBinPacking: false
FixNamespaceComments: false
IfMacros:
- KJ_IF_MAYBE
IncludeBlocks: Preserve
IncludeCategories:
- Regex: '^"(llvm|llvm-c|clang|clang-c)/'
Priority: 2
SortPriority: 0
CaseSensitive: false
- Regex: '^(<|"(gtest|gmock|isl|json)/)'
Priority: 3
SortPriority: 0
CaseSensitive: false
- Regex: '.*'
Priority: 1
SortPriority: 0
CaseSensitive: false
IncludeIsMainRegex: '(Test)?$'
IncludeIsMainSourceRegex: ''
IndentAccessModifiers: false
IndentCaseBlocks: false
IndentCaseLabels: true
IndentExternBlock: AfterExternBlock
IndentGotoLabels: true
IndentPPDirectives: AfterHash
IndentRequiresClause: true
IndentWidth: 4
IndentWrappedFunctionNames: false
InsertBraces: false
InsertNewlineAtEOF: false
InsertTrailingCommas: None
IntegerLiteralSeparator:
Binary: 0
BinaryMinDigits: 0
Decimal: 0
DecimalMinDigits: 0
Hex: 0
HexMinDigits: 0
JavaScriptQuotes: Leave
JavaScriptWrapImports: true
KeepEmptyLinesAtTheStartOfBlocks: true
KeepEmptyLinesAtEOF: false
LambdaBodyIndentation: Signature
LineEnding: DeriveLF
MacroBlockBegin: ''
MacroBlockEnd: ''
MaxEmptyLinesToKeep: 1
NamespaceIndentation: None
ObjCBinPackProtocolList: Auto
ObjCBlockIndentWidth: 4
ObjCBreakBeforeNestedBlockParam: true
ObjCSpaceAfterProperty: false
ObjCSpaceBeforeProtocolList: true
PackConstructorInitializers: BinPack
PenaltyBreakAssignment: 4
PenaltyBreakBeforeFirstCallParameter: 19
PenaltyBreakComment: 1000000000
PenaltyBreakFirstLessLess: 120
PenaltyBreakOpenParenthesis: 0
PenaltyBreakScopeResolution: 500
PenaltyBreakString: 1000
PenaltyBreakTemplateDeclaration: 10
PenaltyExcessCharacter: 1000000
PenaltyIndentedWhitespace: 0
PenaltyReturnTypeOnItsOwnLine: 60
PointerAlignment: Right
PPIndentWidth: 1
QualifierAlignment: Leave
ReferenceAlignment: Pointer
ReflowComments: false
RemoveBracesLLVM: false
RemoveParentheses: Leave
RemoveSemicolon: false
RequiresClausePosition: OwnLine
RequiresExpressionIndentation: OuterScope
SeparateDefinitionBlocks: Leave
ShortNamespaceLines: 1
SkipMacroDefinitionBody: false
SortIncludes: CaseSensitive
SortJavaStaticImport: Before
SortUsingDeclarations: LexicographicNumeric
SpaceAfterCStyleCast: false
SpaceAfterLogicalNot: false
SpaceAfterTemplateKeyword: true
SpaceAroundPointerQualifiers: Default
SpaceBeforeAssignmentOperators: true
SpaceBeforeCaseColon: false
SpaceBeforeCpp11BracedList: false
SpaceBeforeCtorInitializerColon: true
SpaceBeforeInheritanceColon: true
SpaceBeforeJsonColon: false
SpaceBeforeParens: ControlStatementsExceptControlMacros
SpaceBeforeRangeBasedForLoopColon: true
SpaceBeforeSquareBrackets: false
SpaceInEmptyBlock: false
SpacesBeforeTrailingComments: 1
SpacesInAngles: Never
SpacesInContainerLiterals: true
SpacesInLineCommentPrefix:
Minimum: 1
Maximum: -1
SpacesInParens: Never
SpacesInParensOptions:
InCStyleCasts: false
InConditionalStatements: false
InEmptyParentheses: false
Other: false
SpacesInSquareBrackets: false
Standard: c++03
TabWidth: 8
UseTab: Never
VerilogBreakBetweenInstancePorts: true
WhitespaceSensitiveMacros:
- BOOST_PP_STRINGIZE
- CF_SWIFT_NAME
- NS_SWIFT_NAME
- PP_STRINGIZE
- STRINGIZE
# Taken from:
# git grep '^#define *FOR_*' src | cut -d':' -f2 | grep -o '[A-Z]*_.*(' \
# | tr -d '(' | LC_ALL=C sort -u
ForEachMacros:
- 'FOR_ALL_AUTOCMD_PATTERNS'
- 'FOR_ALL_BUFFERS'
- 'FOR_ALL_BUFS_FROM_LAST'
- 'FOR_ALL_BUF_WININFO'
- 'FOR_ALL_CHANNELS'
- 'FOR_ALL_CHILD_MENUS'
- 'FOR_ALL_DIFFBLOCKS_IN_TAB'
- 'FOR_ALL_FRAMES'
- 'FOR_ALL_HASHTAB_ITEMS'
- 'FOR_ALL_JOBS'
- 'FOR_ALL_LIST_ITEMS'
- 'FOR_ALL_MENUS'
- 'FOR_ALL_NODE_SIBLINGS'
- 'FOR_ALL_POPUPWINS'
- 'FOR_ALL_POPUPWINS_IN_TAB'
- 'FOR_ALL_QFL_ITEMS'
- 'FOR_ALL_SIGNS'
- 'FOR_ALL_SIGNS_IN_BUF'
- 'FOR_ALL_SPELL_LANGS'
- 'FOR_ALL_SYNSTATES'
- 'FOR_ALL_TABPAGES'
- 'FOR_ALL_TAB_WINDOWS'
- 'FOR_ALL_TERMS'
- 'FOR_ALL_TIMERS'
- 'FOR_ALL_WATCHERS'
- 'FOR_ALL_WINDOWS'
- 'FOR_ALL_WINDOWS_IN_TAB'
...

View File

@ -5,6 +5,8 @@ coverage:
default:
threshold: 0.05%
comment: false
# Files not run by tests
ignore:
- "src/dosinst.c"

37
.editorconfig Normal file
View File

@ -0,0 +1,37 @@
# https://spec.editorconfig.org/#supported-pairs
root = true
[*]
indent_style = tab
tab_width = 8
trim_trailing_whitespace = true
insert_final_newline = true
[*.{c,h,proto}]
indent_size = 4
[*.{md,yml,sh,bat}]
# This will become the default after we migrate the codebase
indent_style = space
indent_size = 2
[*.md]
# Markdown uses trailing whitespaces to do an hard line break
# https://spec.commonmark.org/0.31.2/#hard-line-breaks
trim_trailing_whitespace = false
[*.vim]
indent_style = space
indent_size = 2
[runtime/pack/dist/opt/{comment,nohlsearch}/**.vim]
indent_style = space
indent_size = 4
[runtime/doc/**.txt]
# It can mess up some documentation by trying to strip trailing whitespaces
trim_trailing_whitespace = false
[src/testdir/test*.vim]
# Some tests need trailing whitespaces, for example `set showbreak=>>\ `
trim_trailing_whitespace = false

27
.git-blame-ignore-revs Normal file
View File

@ -0,0 +1,27 @@
# When making commits that are strictly formatting/style changes, add the
# commit hash here, so git blame can ignore the change. See docs for more details:
#
# https://git-scm.com/docs/git-config#Documentation/git-config.txt-blameignoreRevsFile
#
# Run this command to always ignore formatting commits in git blame
# git config blame.ignoreRevsFile .git-blame-ignore-revs
# Patch v9.1.0829 expanded tabs to spaces in sound.c
8ce738de3fd7192fa6274730594305cde780074c
# Patch v9.1.0879 reformated sound.c and sign.c
3cf094edaff815141d9941b8dba52b9e77d8dfc1
# change indentation style of netrw plugin
c363ca1ecd1f8db03663ef98dcf41eeacc3c22c7
c673b805ad80d0aef07e745d412a2bf298ba1c07
# fix indentation style in insexpand.c v9.1.1352
355db99d12a89f05765948b33eecd6d9733e16bb
# fix indentation styles in various files v9.1.1363
c2a9000bc1b4a2cbcfeef55450c184b16906d910
# indentation style in various files v9.1.1364
562610cfa327c8ebff12a1700525e17a070d5e2c
# Patch v9.1.1371
19e1dd6b6aeb96d64122332a8c3d17b9d5ca007b
# Patch v9.1.1372
a4a00a7ad0cfa26685c057c11a09bec2c962346a
# Patch v9.1.1390
e89aef3f65388a8b627c77f250525f2a264716c5

5
.gitattributes vendored
View File

@ -1 +1,6 @@
src/testdir/test42.in diff
# ignore vim.pot creation date when diffing
# set this up using:
# git config diff.ignore_pot_date.textconv 'grep -v "^.POT-Creation-Date:.*"'
src/po/vim.pot diff=ignore_pot_date

539
.github/CODEOWNERS vendored
View File

@ -1,539 +0,0 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# You can use github users with @user or email addresses
# These owners will be the default owners for everything in the repo.
#* @brammool
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
runtime/autoload/freebasic.vim @dkearns
runtime/autoload/getscript.vim @cecamp
runtime/autoload/haskell.vim @alx741
runtime/autoload/javascript.vim @jsit
runtime/autoload/netrw.vim @cecamp
runtime/autoload/netrwFileHandlers.vim @cecamp
runtime/autoload/netrwSettings.vim @cecamp
runtime/autoload/php.vim @david-szabo97
runtime/autoload/rubycomplete.vim @segfault @dkearns
runtime/autoload/rust.vim @lilyball
runtime/autoload/tar.vim @cecamp
runtime/autoload/vimball.vim @cecamp
runtime/autoload/xmlformat.vim @chrisbra
runtime/autoload/zip.vim @cecamp
runtime/colors/blue.vim @habamax @romainl @neutaaaaan
runtime/colors/darkblue.vim @habamax @romainl @neutaaaaan
runtime/colors/default.vim @habamax @romainl @neutaaaaan
runtime/colors/delek.vim @habamax @romainl @neutaaaaan
runtime/colors/desert.vim @habamax @romainl @neutaaaaan
runtime/colors/elflord.vim @habamax @romainl @neutaaaaan
runtime/colors/evening.vim @habamax @romainl @neutaaaaan
runtime/colors/habamax.vim @habamax @romainl @neutaaaaan
runtime/colors/industry.vim @habamax @romainl @neutaaaaan
runtime/colors/koehler.vim @habamax @romainl @neutaaaaan
runtime/colors/lunaperche.vim @habamax @romainl @neutaaaaan
runtime/colors/morning.vim @habamax @romainl @neutaaaaan
runtime/colors/murphy.vim @habamax @romainl @neutaaaaan
runtime/colors/pablo.vim @habamax @romainl @neutaaaaan
runtime/colors/peachpuff.vim @habamax @romainl @neutaaaaan
runtime/colors/quiet.vim @habamax @romainl @neutaaaaan
runtime/colors/retrobox.vim @habamax @romainl @neutaaaaan
runtime/colors/ron.vim @habamax @romainl @neutaaaaan
runtime/colors/shine.vim @habamax @romainl @neutaaaaan
runtime/colors/slate.vim @habamax @romainl @neutaaaaan
runtime/colors/sorbet.vim @habamax @romainl @neutaaaaan
runtime/colors/tools @habamax @romainl @neutaaaaan
runtime/colors/torte.vim @habamax @romainl @neutaaaaan
runtime/colors/wildcharm.vim @habamax @romainl @neutaaaaan
runtime/colors/zaibatsu.vim @habamax @romainl @neutaaaaan
runtime/colors/zellner.vim @habamax @romainl @neutaaaaan
runtime/compiler/checkstyle.vim @dkearns
runtime/compiler/cm3.vim @dkearns
runtime/compiler/cucumber.vim @tpope
runtime/compiler/dart.vim @dkearns
runtime/compiler/dart2js.vim @dkearns
runtime/compiler/dart2native.vim @dkearns
runtime/compiler/dartanalyser.vim @dkearns
runtime/compiler/dartdevc.vim @dkearns
runtime/compiler/dartdoc.vim @dkearns
runtime/compiler/dartfmt.vim @dkearns
runtime/compiler/dotnet.vim @nickspoons
runtime/compiler/eruby.vim @dkearns
runtime/compiler/fbc.vim @dkearns
runtime/compiler/gawk.vim @dkearns
runtime/compiler/gjs.vim @dkearns
runtime/compiler/go.vim @dbarnett
runtime/compiler/haml.vim @tpope
runtime/compiler/hare.vim @rsaihe
runtime/compiler/icon.vim @dkearns
runtime/compiler/javac.vim @dkearns
runtime/compiler/jest.vim @dkearns
runtime/compiler/jjs.vim @dkearns
runtime/compiler/jshint.vim @dkearns
runtime/compiler/jsonlint.vim @dkearns
runtime/compiler/lazbuild.vim @dkearns
runtime/compiler/perl.vim @petdance @heptite
runtime/compiler/perlcritic.vim @petdance @dkearns
runtime/compiler/php.vim @dkearns
runtime/compiler/podchecker.vim @petdance @dkearns
runtime/compiler/powershell.vim @heaths
runtime/compiler/raco.vim @benknoble
runtime/compiler/racomake.vim @benknoble
runtime/compiler/racosetup.vim @benknoble
runtime/compiler/racotest.vim @benknoble
runtime/compiler/rake.vim @tpope @dkearns
runtime/compiler/rhino.vim @dkearns
runtime/compiler/rspec.vim @tpope @dkearns
runtime/compiler/rubocop.vim @dkearns
runtime/compiler/ruby.vim @tpope @dkearns
runtime/compiler/rubyunit.vim @dkearns
runtime/compiler/sass.vim @tpope
runtime/compiler/sdoc.vim @gpanders
runtime/compiler/se.vim @dkearns
runtime/compiler/shellcheck.vim @dkearns
runtime/compiler/sml.vim @dkearns
runtime/compiler/spectral.vim @romainl
runtime/compiler/stylelint.vim @dkearns
runtime/compiler/tcl.vim @dkearns
runtime/compiler/tidy.vim @dkearns
runtime/compiler/ts-node.vim @dkearns
runtime/compiler/tsc.vim @dkearns
runtime/compiler/typedoc.vim @dkearns
runtime/compiler/xmllint.vim @dkearns
runtime/compiler/xo.vim @dkearns
runtime/compiler/yamllint.vim @romainl
runtime/compiler/zsh.vim @dkearns
runtime/doc/pi_getscript.txt @cecamp
runtime/doc/pi_logipat.txt @cecamp
runtime/doc/pi_netrw.txt @cecamp
runtime/doc/pi_tar.txt @cecamp
runtime/doc/pi_vimball.txt @cecamp
runtime/doc/pi_zip.txt @cecamp
runtime/doc/ps1.txt @heaths
runtime/ftplugin/abaqus.vim @costerwi
runtime/ftplugin/apache.vim @dubgeiser
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/bst.vim @tpope
runtime/ftplugin/cfg.vim @chrisbra
runtime/ftplugin/chatito.vim @ObserverOfTime
runtime/ftplugin/clojure.vim @axvr
runtime/ftplugin/cs.vim @nickspoons
runtime/ftplugin/csh.vim @dkearns
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/desktop.vim @e-kwsm
runtime/ftplugin/dosbatch.vim @mrdubya
runtime/ftplugin/eiffel.vim @dkearns
runtime/ftplugin/elixir.vim @mhanberg
runtime/ftplugin/erlang.vim @hcs42
runtime/ftplugin/eruby.vim @tpope @dkearns
runtime/ftplugin/expect.vim @dkearns
runtime/ftplugin/fennel.vim @gpanders
runtime/ftplugin/fetchmail.vim @dkearns
runtime/ftplugin/forth.vim @jkotlinski
runtime/ftplugin/fpcmake.vim @dkearns
runtime/ftplugin/freebasic.vim @dkearns
runtime/ftplugin/fstab.vim @rid9
runtime/ftplugin/gdb.vim @xeyownt
runtime/ftplugin/gdscript.vim @habamax
runtime/ftplugin/gdshader.vim @habamax
runtime/ftplugin/git.vim @tpope
runtime/ftplugin/gitattributes.vim @ObserverOfTime
runtime/ftplugin/gitcommit.vim @tpope
runtime/ftplugin/gitconfig.vim @tpope
runtime/ftplugin/gitignore.vim @ObserverOfTime
runtime/ftplugin/gitrebase.vim @tpope
runtime/ftplugin/gitsendemail.vim @tpope
runtime/ftplugin/gyp.vim @ObserverOfTime
runtime/ftplugin/go.vim @dbarnett
runtime/ftplugin/gprof.vim @dpelle
runtime/ftplugin/haml.vim @tpope
runtime/ftplugin/hare.vim @rsaihe
runtime/ftplugin/heex.vim @cvincent
runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/hog.vim @wtfbbqhax
runtime/ftplugin/html.vim @dkearns
runtime/ftplugin/i3config.vim @hiqua
runtime/ftplugin/icon.vim @dkearns
runtime/ftplugin/indent.vim @dkearns
runtime/ftplugin/ishd.vim @dkearns
runtime/ftplugin/j.vim @glts
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
runtime/ftplugin/jsonc.vim @izhakjakov
runtime/ftplugin/julia.vim @carlobaldassi
runtime/ftplugin/kconfig.vim @chrisbra
runtime/ftplugin/less.vim @genoma
runtime/ftplugin/liquid.vim @tpope
runtime/ftplugin/lua.vim @dkearns
runtime/ftplugin/lynx.vim @dkearns
runtime/ftplugin/m3build.vim @dkearns
runtime/ftplugin/m3quake.vim @dkearns
runtime/ftplugin/markdown.vim @tpope
runtime/ftplugin/matlab.vim @cecamp
runtime/ftplugin/meson.vim @Liambeguin
runtime/ftplugin/modula3.vim @dkearns
runtime/ftplugin/nginx.vim @chr4
runtime/ftplugin/nroff.vim @a-vrma
runtime/ftplugin/nsis.vim @k-takata
runtime/ftplugin/octave.vim @dkearns
runtime/ftplugin/openvpn.vim @ObserverOfTime
runtime/ftplugin/pascal.vim @dkearns
runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/perl.vim @petdance @dkearns
runtime/ftplugin/php.vim @dkearns
runtime/ftplugin/pod.vim @petdance @dkearns
runtime/ftplugin/poefilter.vim @ObserverOfTime
runtime/ftplugin/postscr.vim @mrdubya
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/pymanifest.vim @ObserverOfTime
runtime/ftplugin/python.vim @tpict
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/qml.vim @ChaseKnowlden
runtime/ftplugin/r.vim @jalvesaq
runtime/ftplugin/racket.vim @benknoble
runtime/ftplugin/readline.vim @dkearns
runtime/ftplugin/rhelp.vim @jalvesaq
runtime/ftplugin/rmd.vim @jalvesaq
runtime/ftplugin/rnoweb.vim @jalvesaq
runtime/ftplugin/routeros.vim @zainin
runtime/ftplugin/rrst.vim @jalvesaq
runtime/ftplugin/rst.vim @marshallward
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/rust.vim @lilyball
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scala.vim @derekwyatt
runtime/ftplugin/scss.vim @tpope
runtime/ftplugin/sdoc.vim @gpanders
runtime/ftplugin/sed.vim @dkearns
runtime/ftplugin/sh.vim @dkearns
runtime/ftplugin/solidity.vim @cothi
runtime/ftplugin/solution.vim @dkearns
runtime/ftplugin/spec.vim @ignatenkobrain
runtime/ftplugin/ssa.vim @ObserverOfTime
runtime/ftplugin/swayconfig.vim @jamespeapen
runtime/ftplugin/systemverilog.vim @Kocha
runtime/ftplugin/tap.vim @petdance
runtime/ftplugin/tcsh.vim @dkearns
runtime/ftplugin/tidy.vim @dkearns
runtime/ftplugin/tmux.vim @ericpruitt
runtime/ftplugin/toml.vim @averms
runtime/ftplugin/tt2html.vim @petdance
runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
runtime/ftplugin/unison.vim @chuwy
runtime/ftplugin/vdf.vim @ObserverOfTime
runtime/ftplugin/wast.vim @rhysd
runtime/ftplugin/wget.vim @dkearns
runtime/ftplugin/wget2.vim @dkearns
runtime/ftplugin/xml.vim @chrisbra
runtime/ftplugin/xs.vim @petdance
runtime/ftplugin/zsh.vim @chrisbra
runtime/import/dist/vimhighlight.vim @lacygoill
runtime/indent/basic.vim @dkearns
runtime/indent/bst.vim @tpope
runtime/indent/cdl.vim @dkearns
runtime/indent/chatito.vim @ObserverOfTime
runtime/indent/clojure.vim @axvr
runtime/indent/config.vim @dkearns
runtime/indent/cs.vim @nickspoons
runtime/indent/css.vim @dkearns
runtime/indent/cucumber.vim @tpope
runtime/indent/d.vim @dkearns
runtime/indent/dosbatch.vim @k-takata
runtime/indent/dtd.vim @dkearns
runtime/indent/dylan.vim @dkearns
runtime/indent/eiffel.vim @jocelyn
runtime/indent/elm.vim @andys8
runtime/indent/erlang.vim @hcs42
runtime/indent/eruby.vim @tpope @dkearns
runtime/indent/eterm.vim @dkearns
runtime/indent/falcon.vim @steveno
runtime/indent/framescript.vim @dkearns
runtime/indent/freebasic.vim @dkearns
runtime/indent/gdscript.vim @habamax
runtime/indent/gitconfig.vim @tpope
runtime/indent/gitolite.vim @sitaramc
runtime/indent/go.vim @dbarnett
runtime/indent/gyp.vim @ObserverOfTime
runtime/indent/haml.vim @tpope
runtime/indent/hare.vim @rsaihe
runtime/indent/hog.vim @wtfbbqhax
runtime/indent/idlang.vim @dkearns
runtime/indent/j.vim @glts
runtime/indent/java.vim @xuhdev
runtime/indent/javascript.vim @bounceme
runtime/indent/json.vim @elzr
runtime/indent/jsonc.vim @izhakjakov
runtime/indent/julia.vim @carlobaldassi
runtime/indent/krl.vim @KnoP-01
runtime/indent/ld.vim @dkearns
runtime/indent/less.vim @genoma
runtime/indent/liquid.vim @tpope
runtime/indent/lua.vim @marcuscf
runtime/indent/make.vim @dkearns
runtime/indent/meson.vim @Liambeguin
runtime/indent/mma.vim @dkearns
runtime/indent/nginx.vim @chr4
runtime/indent/nsis.vim @k-takata
runtime/indent/occam.vim @dkearns
runtime/indent/perl.vim @petdance
runtime/indent/php.vim @2072
runtime/indent/postscr.vim @mrdubya
runtime/indent/prolog.vim @dkearns
runtime/indent/ps1.vim @heaths
runtime/indent/qb64.vim @dkearns
runtime/indent/qml.vim @ChaseKnowlden
runtime/indent/r.vim @jalvesaq
runtime/indent/racket.vim @benknoble
runtime/indent/rapid.vim @KnoP-01
runtime/indent/readline.vim @dkearns
runtime/indent/rhelp.vim @jalvesaq
runtime/indent/rmd.vim @jalvesaq
runtime/indent/rnoweb.vim @jalvesaq
runtime/indent/rrst.vim @jalvesaq
runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope
runtime/indent/scala.vim @derekwyatt
runtime/indent/scss.vim @tpope
runtime/indent/sh.vim @chrisbra
runtime/indent/solidity.vim @cothi
runtime/indent/systemverilog.vim @Kocha
runtime/indent/tcl.vim @dkearns
runtime/indent/tcsh.vim @dkearns
runtime/indent/teraterm.vim @k-takata
runtime/indent/typescript.vim @HerringtonDarkholme
runtime/indent/vroom.vim @dbarnett
runtime/indent/wast.vim @rhysd
runtime/indent/xml.vim @chrisbra
runtime/indent/zsh.vim @chrisbra
runtime/keymap/armenian-eastern_utf-8.vim @blinskey
runtime/keymap/armenian-western_utf-8.vim @blinskey
runtime/keymap/tamil_tscii.vim @yegappan
runtime/lang/menu_en_gb.latin1.vim @mrdubya
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim @yegappan
runtime/pack/dist/opt/matchit/ @chrisbra
runtime/plugin/getscriptPlugin.vim @cecamp
runtime/plugin/logiPat.vim @cecamp
runtime/plugin/netrwPlugin.vim @cecamp
runtime/plugin/tarPlugin.vim @cecamp
runtime/plugin/vimballPlugin.vim @cecamp
runtime/plugin/zipPlugin.vim @cecamp
runtime/plugin/manpager.vim @Konfekt
runtime/syntax/shared/hgcommitDiff.vim @vegerot
runtime/syntax/abaqus.vim @costerwi
runtime/syntax/aidl.vim @dpelle
runtime/syntax/amiga.vim @cecamp
runtime/syntax/arduino.vim @johshoff
runtime/syntax/asciidoc.vim @aerostitch
runtime/syntax/asm.vim @dkearns
runtime/syntax/asmh8300.vim @dkearns
runtime/syntax/asterisk.vim @jaunis
runtime/syntax/autohotkey.vim @mmikeww
runtime/syntax/awk.vim @dkearns
runtime/syntax/basic.vim @dkearns
runtime/syntax/bst.vim @tpope
runtime/syntax/bzl.vim @dbarnett
runtime/syntax/bzr.vim @hdima
runtime/syntax/cabal.vim @coot
runtime/syntax/cabalconfig.vim @coot
runtime/syntax/cabalproject.vim @coot
runtime/syntax/cf.vim @ernstvanderlinden
runtime/syntax/chatito.vim @ObserverOfTime
runtime/syntax/clojure.vim @axvr
runtime/syntax/cs.vim @nickspoons
runtime/syntax/csh.vim @cecamp
runtime/syntax/cucumber.vim @tpope
runtime/syntax/d.vim @JesseKPhillips
runtime/syntax/dart.vim @pr3d4t0r
runtime/syntax/datascript.vim @dpelle
runtime/syntax/dcl.vim @cecamp
runtime/syntax/desktop.vim @e-kwsm
runtime/syntax/dosbatch.vim @mrdubya
runtime/syntax/dosini.vim @xuhdev
runtime/syntax/dot.vim @mmottl
runtime/syntax/doxygen.vim @frogonwheels
runtime/syntax/dtd.vim @chrisbra
runtime/syntax/dts.vim @zonque
runtime/syntax/editorconfig.vim @gpanders
runtime/syntax/eiffel.vim @jocelyn
runtime/syntax/elmfilt.vim @cecamp
runtime/syntax/erlang.vim @hcs42
runtime/syntax/eruby.vim @tpope @dkearns
runtime/syntax/expect.vim @dkearns
runtime/syntax/exports.vim @cecamp
runtime/syntax/falcon.vim @steveno
runtime/syntax/fennel.vim @gpanders
runtime/syntax/fetchmail.vim @dkearns
runtime/syntax/forth.vim @jkotlinski
runtime/syntax/fpcmake.vim @dkearns
runtime/syntax/freebasic.vim @dkearns
runtime/syntax/fstab.vim @rid9
runtime/syntax/gdresource.vim @habamax
runtime/syntax/gdscript.vim @habamax
runtime/syntax/gdshader.vim @habamax
runtime/syntax/git.vim @tpope
runtime/syntax/gitattributes.vim @ObserverOfTime
runtime/syntax/gitcommit.vim @tpope
runtime/syntax/gitconfig.vim @tpope
runtime/syntax/gitignore.vim @ObserverOfTime
runtime/syntax/gitolite.vim @sitaramc
runtime/syntax/gitrebase.vim @tpope
runtime/syntax/go.vim @bhcleek
runtime/syntax/godoc.vim @dbarnett
runtime/syntax/gp.vim @KBelabas
runtime/syntax/gprof.vim @dpelle
runtime/syntax/groff.vim @jmarshall
runtime/syntax/gyp.vim @ObserverOfTime
runtime/syntax/haml.vim @tpope
runtime/syntax/hare.vim @rsaihe
runtime/syntax/haskell.vim @coot
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/hitest.vim @lacygoill
runtime/syntax/hog.vim @wtfbbqhax
runtime/syntax/hollywood.vim @sodero
runtime/syntax/html.vim @dkearns
runtime/syntax/i3config.vim @hiqua
runtime/syntax/icon.vim @dkearns
runtime/syntax/indent.vim @dkearns
runtime/syntax/j.vim @glts
runtime/syntax/jargon.vim @h3xx
runtime/syntax/java.vim @fleiner
runtime/syntax/javascript.vim @fleiner
runtime/syntax/jsonc.vim @izhakjakov
runtime/syntax/julia.vim @carlobaldassi
runtime/syntax/kconfig.vim @chrisbra
runtime/syntax/krl.vim @KnoP-01
runtime/syntax/less.vim @genoma
runtime/syntax/lex.vim @cecamp
runtime/syntax/liquid.vim @tpope
runtime/syntax/lisp.vim @cecamp
runtime/syntax/lua.vim @marcuscf
runtime/syntax/lyrics.vim @ObserverOfTime
runtime/syntax/lynx.vim @dkearns
runtime/syntax/m3build.vim @dkearns
runtime/syntax/m3quake.vim @dkearns
runtime/syntax/mailcap.vim @dkearns
runtime/syntax/make.vim @rohieb
runtime/syntax/mallard.vim @jhradilek
runtime/syntax/maple.vim @cecamp
runtime/syntax/markdown.vim @tpope
runtime/syntax/mason.vim @petdance
runtime/syntax/meson.vim @Liambeguin
runtime/syntax/modula3.vim @dkearns
runtime/syntax/n1ql.vim @pr3d4t0r
runtime/syntax/netrw.vim @cecamp
runtime/syntax/nginx.vim @chr4
runtime/syntax/ninja.vim @nico
runtime/syntax/nix.vim @equill
runtime/syntax/nroff.vim @jmarshall
runtime/syntax/nsis.vim @k-takata
runtime/syntax/openvpn.vim @ObserverOfTime
runtime/syntax/pascal.vim @dkearns
runtime/syntax/pbtxt.vim @lakshayg
runtime/syntax/pdf.vim @tpope
runtime/syntax/perl.vim @petdance
runtime/syntax/php.vim @TysonAndre
runtime/syntax/plsql.vim @lee-lindley
runtime/syntax/pod.vim @petdance
runtime/syntax/poefilter.vim @ObserverOfTime
runtime/syntax/postscr.vim @mrdubya
runtime/syntax/privoxy.vim @dkearns
runtime/syntax/prolog.vim @XVilka
runtime/syntax/ps1.vim @heaths
runtime/syntax/ps1xml.vim @heaths
runtime/syntax/psl.vim @danielkho
runtime/syntax/pymanifest.vim @ObserverOfTime
runtime/syntax/qb64.vim @dkearns
runtime/syntax/qml.vim @ChaseKnowlden
runtime/syntax/r.vim @jalvesaq
runtime/syntax/racket.vim @benknoble
runtime/syntax/raml.vim @in3d
runtime/syntax/rapid.vim @KnoP-01
runtime/syntax/ratpoison.vim @trapd00r
runtime/syntax/rc.vim @chrisbra
runtime/syntax/rcs.vim @hdima
runtime/syntax/rebol.vim @mrdubya
runtime/syntax/rego.vim @zenmatic
runtime/syntax/resolv.vim @rid9
runtime/syntax/rmd.vim @jalvesaq
runtime/syntax/rng.vim @jhradilek
runtime/syntax/routeros.vim @zainin
runtime/syntax/rpcgen.vim @cecamp
runtime/syntax/rrst.vim @jalvesaq
runtime/syntax/rst.vim @marshallward
runtime/syntax/ruby.vim @dkearns
runtime/syntax/sass.vim @tpope
runtime/syntax/scala.vim @derekwyatt
runtime/syntax/scss.vim @tpope
runtime/syntax/sdoc.vim @gpanders
runtime/syntax/sed.vim @dkearns
runtime/syntax/sh.vim @cecamp
runtime/syntax/sm.vim @cecamp
runtime/syntax/solidity.vim @cothi
runtime/syntax/spec.vim @ignatenkobrain
runtime/syntax/sqloracle.vim @chrisbra
runtime/syntax/squirrel.vim @zenmatic
runtime/syntax/srt.vim @ObserverOfTime
runtime/syntax/ssa.vim @ObserverOfTime
runtime/syntax/sshconfig.vim @Jakuje
runtime/syntax/sshdconfig.vim @Jakuje
runtime/syntax/sudoers.vim @e-kwsm
runtime/syntax/svn.vim @hdima
runtime/syntax/swayconfig.vim @jamespeapen
runtime/syntax/systemverilog.vim @Kocha
runtime/syntax/tags.vim @cecamp
runtime/syntax/tap.vim @petdance
runtime/syntax/tcsh.vim @dkearns
runtime/syntax/teraterm.vim @k-takata
runtime/syntax/tex.vim @cecamp
runtime/syntax/tidy.vim @dkearns
runtime/syntax/tmux.vim @ericpruitt
runtime/syntax/toml.vim @averms
runtime/syntax/tt2.vim @petdance
runtime/syntax/tt2html.vim @petdance
runtime/syntax/tt2js.vim @petdance
runtime/syntax/typescript.vim @HerringtonDarkholme
runtime/syntax/typescriptcommon.vim @HerringtonDarkholme
runtime/syntax/typescriptreact.vim @HerringtonDarkholme
runtime/syntax/unison.vim @chuwy
runtime/syntax/vdf.vim @ObserverOfTime
runtime/syntax/vim.vim @cecamp
runtime/syntax/vroom.vim @dbarnett
runtime/syntax/wast.vim @rhysd
runtime/syntax/wdl.vim @zenmatic
runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
runtime/syntax/xbl.vim @dkearns
runtime/syntax/xmath.vim @cecamp
runtime/syntax/xml.vim @chrisbra
runtime/syntax/xs.vim @petdance
runtime/syntax/xslt.vim @Boobies
runtime/syntax/xxd.vim @cecamp
runtime/syntax/yacc.vim @cecamp
runtime/syntax/zserio.vim @dpelle
runtime/syntax/zsh.vim @chrisbra
runtime/tutor/tutor.eo @dpelle
runtime/tutor/tutor.eo.utf-8 @dpelle
runtime/tutor/tutor.fr @dpelle
runtime/tutor/tutor.fr.utf-8 @dpelle
src/iscygpty.* @k-takata
src/libvterm/ @leonerd
src/po/ca.po @nfdisco
src/po/de.po @chrisbra
src/po/eo.po @dpelle
src/po/es.po @victorhck
src/po/fi.po @flammie
src/po/fr.po @dpelle
src/po/ga.po @kscanne
src/po/it.po @azc100
src/po/ja.po @k-takata
src/po/sr.po @eevan78
src/po/tr.po @bitigchi
src/po/uk.po @sakhnik
src/xxd/ @jnweiger

View File

@ -9,10 +9,10 @@ body:
value: |
Thanks for reporting issues of Vim!
If you want to report a security issue, instead of reporting it here
you can alternatively disclose it on
[huntr.dev](https://huntr.dev/bounties/disclose/?utm_campaign=vim%2Fvim&utm_medium=social&utm_source=github&target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim).
They have rewards in the form of money, swag and CVEs.
If you want to report a security issue, instead of reporting it here publicly,
please disclose it privately via mail to vim-security@googlegroups.com.
(It's a private list read only by the maintainers,
but anybody can post, after moderation.)
To make it easier for us to help you please enter detailed information below.
- type: textarea

688
.github/MAINTAINERS vendored Normal file
View File

@ -0,0 +1,688 @@
# Lines starting with '#' are comments.
# Each line is a file pattern followed by one or more owners.
# You can use github users with @user or email addresses
# These owners will be the default owners for everything in the repo.
#* @brammool
# Order is important. The last matching pattern has the most precedence.
# So if a pull request only touches javascript files, only these owners
# will be requested to review.
nsis/lang/russian.nsi @RestorerZ
runtime/autoload/freebasic.vim @dkearns
runtime/autoload/hare.vim @selenebun
runtime/autoload/hcl.vim @gpanders
runtime/autoload/modula2.vim @dkearns
runtime/autoload/rubycomplete.vim @segfault @dkearns
runtime/autoload/rust.vim @lilyball
runtime/autoload/typst.vim @saccarosium
runtime/autoload/xmlformat.vim @chrisbra
runtime/autoload/dist/json.vim @habamax
runtime/colors/blue.vim @habamax @romainl @neutaaaaan
runtime/colors/darkblue.vim @habamax @romainl @neutaaaaan
runtime/colors/default.vim @habamax @romainl @neutaaaaan
runtime/colors/delek.vim @habamax @romainl @neutaaaaan
runtime/colors/desert.vim @habamax @romainl @neutaaaaan
runtime/colors/elflord.vim @habamax @romainl @neutaaaaan
runtime/colors/evening.vim @habamax @romainl @neutaaaaan
runtime/colors/habamax.vim @habamax @romainl @neutaaaaan
runtime/colors/industry.vim @habamax @romainl @neutaaaaan
runtime/colors/koehler.vim @habamax @romainl @neutaaaaan
runtime/colors/lunaperche.vim @habamax @romainl @neutaaaaan
runtime/colors/morning.vim @habamax @romainl @neutaaaaan
runtime/colors/murphy.vim @habamax @romainl @neutaaaaan
runtime/colors/pablo.vim @habamax @romainl @neutaaaaan
runtime/colors/peachpuff.vim @habamax @romainl @neutaaaaan
runtime/colors/quiet.vim @habamax @romainl @neutaaaaan
runtime/colors/retrobox.vim @habamax @romainl @neutaaaaan
runtime/colors/ron.vim @habamax @romainl @neutaaaaan
runtime/colors/shine.vim @habamax @romainl @neutaaaaan
runtime/colors/slate.vim @habamax @romainl @neutaaaaan
runtime/colors/sorbet.vim @habamax @romainl @neutaaaaan
runtime/colors/tools @habamax @romainl @neutaaaaan
runtime/colors/torte.vim @habamax @romainl @neutaaaaan
runtime/colors/wildcharm.vim @habamax @romainl @neutaaaaan
runtime/colors/zaibatsu.vim @habamax @romainl @neutaaaaan
runtime/colors/zellner.vim @habamax @romainl @neutaaaaan
runtime/compiler/checkstyle.vim @dkearns
runtime/compiler/cm3.vim @dkearns
runtime/compiler/cucumber.vim @tpope
runtime/compiler/dart.vim @dkearns
runtime/compiler/dart2js.vim @dkearns
runtime/compiler/dart2native.vim @dkearns
runtime/compiler/dartanalyser.vim @dkearns
runtime/compiler/dartdevc.vim @dkearns
runtime/compiler/dartdoc.vim @dkearns
runtime/compiler/dartfmt.vim @dkearns
runtime/compiler/dotnet.vim @nickspoons
runtime/compiler/eruby.vim @dkearns
runtime/compiler/fbc.vim @dkearns
runtime/compiler/gawk.vim @dkearns
runtime/compiler/gjs.vim @dkearns
runtime/compiler/gm2.vim @dkearns
runtime/compiler/go.vim @dbarnett
runtime/compiler/groff.vim @Konfekt
runtime/compiler/haml.vim @tpope
runtime/compiler/hare.vim @selenebun
runtime/compiler/icon.vim @dkearns
runtime/compiler/javac.vim @dkearns
runtime/compiler/jest.vim @dkearns
runtime/compiler/jjs.vim @dkearns
runtime/compiler/jshint.vim @dkearns
runtime/compiler/jsonlint.vim @dkearns
runtime/compiler/jq.vim @vito-c
runtime/compiler/pandoc.vim @Konfekt
runtime/compiler/perl.vim @petdance @heptite
runtime/compiler/perlcritic.vim @petdance @dkearns
runtime/compiler/php.vim @dkearns
runtime/compiler/podchecker.vim @petdance @dkearns
runtime/compiler/powershell.vim @heaths
runtime/compiler/raco.vim @benknoble
runtime/compiler/racomake.vim @benknoble
runtime/compiler/racosetup.vim @benknoble
runtime/compiler/racotest.vim @benknoble
runtime/compiler/rake.vim @tpope @dkearns
runtime/compiler/rhino.vim @dkearns
runtime/compiler/rspec.vim @tpope @dkearns
runtime/compiler/rubocop.vim @dkearns
runtime/compiler/ruby.vim @tpope @dkearns
runtime/compiler/rubyunit.vim @dkearns
runtime/compiler/sass.vim @tpope
runtime/compiler/se.vim @dkearns
runtime/compiler/shellcheck.vim @dkearns
runtime/compiler/sml.vim @dkearns
runtime/compiler/spectral.vim @romainl
runtime/compiler/svelte-check.vim @Konfekt
runtime/compiler/stylelint.vim @dkearns
runtime/compiler/tcl.vim @dkearns
runtime/compiler/tidy.vim @dkearns
runtime/compiler/ts-node.vim @dkearns
runtime/compiler/tsc.vim @dkearns
runtime/compiler/typedoc.vim @dkearns
runtime/compiler/typst.vim @saccarosium
runtime/compiler/xmllint.vim @dkearns
runtime/compiler/xo.vim @dkearns
runtime/compiler/yamllint.vim @romainl
runtime/compiler/zsh.vim @dkearns
runtime/doc/ft_hare.txt @selenebun
runtime/doc/evim-ru.1 @RestorerZ
runtime/doc/evim-ru.UTF-8.1 @RestorerZ
runtime/doc/vim-ru.1 @RestorerZ
runtime/doc/vim-ru.UTF-8.1 @RestorerZ
runtime/doc/vimdiff-ru.1 @RestorerZ
runtime/doc/vimdiff-ru.UTF-8.1 @RestorerZ
runtime/doc/vimtutor-ru.1 @RestorerZ
runtime/doc/vimtutor-ru.UTF-8.1 @RestorerZ
runtime/doc/xxd-ru.1 @RestorerZ
runtime/doc/xxd-ru.UTF-8.1 @RestorerZ
runtime/ftplugin/abaqus.vim @costerwi
runtime/ftplugin/abnf.vim @A4-Tacks
runtime/ftplugin/antlr4.vim @jiangyinzuo
runtime/ftplugin/apache.vim @dubgeiser
runtime/ftplugin/arduino.vim @k-takata
runtime/ftplugin/asciidoc.vim @saccarosium
runtime/ftplugin/astro.vim @romainl
runtime/ftplugin/asy.vim @avidseeker
runtime/ftplugin/autohotkey.vim @telemachus
runtime/ftplugin/awk.vim @dkearns
runtime/ftplugin/basic.vim @dkearns
runtime/ftplugin/brighterscript.vim @ribru17
runtime/ftplugin/brightscript.vim @ribru17
runtime/ftplugin/bst.vim @tpope
runtime/ftplugin/c3.vim @ttytm
runtime/ftplugin/cabal.vim @ribru17
runtime/ftplugin/cedar.vim @ribru17
runtime/ftplugin/cfg.vim @chrisbra
runtime/ftplugin/chatito.vim @ObserverOfTime
runtime/ftplugin/chicken.vim @evhan
runtime/ftplugin/clojure.vim @axvr
runtime/ftplugin/cmakecache.vim @ribru17
runtime/ftplugin/cook.vim @ribru17
runtime/ftplugin/cs.vim @nickspoons
runtime/ftplugin/csh.vim @dkearns
runtime/ftplugin/css.vim @dkearns
runtime/ftplugin/csv.vim @habamax
runtime/ftplugin/cucumber.vim @tpope
runtime/ftplugin/cuda.vim @ribru17
runtime/ftplugin/dart.vim @ribru17
runtime/ftplugin/dax.vim @anarion80
runtime/ftplugin/deb822sources.vim @jamessan
runtime/ftplugin/debchangelog.vim @jamessan
runtime/ftplugin/debcontrol.vim @jamessan
runtime/ftplugin/debsources.vim @jamessan
runtime/ftplugin/desktop.vim @e-kwsm
runtime/ftplugin/dnsmasq.vim @dringsim
runtime/ftplugin/dosbatch.vim @mrdubya
runtime/ftplugin/editorconfig.vim @ribru17
runtime/ftplugin/eiffel.vim @dkearns
runtime/ftplugin/elixir.vim @mhanberg
runtime/ftplugin/erlang.vim @hcs42
runtime/ftplugin/eruby.vim @tpope @dkearns
runtime/ftplugin/expect.vim @dkearns
runtime/ftplugin/exports.vim @mperry2
runtime/ftplugin/fennel.vim @gpanders
runtime/ftplugin/fetchmail.vim @dkearns
runtime/ftplugin/fga.vim @ribru17
runtime/ftplugin/forth.vim @jkotlinski
runtime/ftplugin/fpcmake.vim @dkearns
runtime/ftplugin/freebasic.vim @dkearns
runtime/ftplugin/fstab.vim @rid9
runtime/ftplugin/gdb.vim @xeyownt
runtime/ftplugin/gdscript.vim @habamax
runtime/ftplugin/gdshader.vim @habamax
runtime/ftplugin/git.vim @tpope
runtime/ftplugin/gitattributes.vim @ObserverOfTime
runtime/ftplugin/gitcommit.vim @tpope
runtime/ftplugin/gitconfig.vim @tpope
runtime/ftplugin/gitignore.vim @ObserverOfTime
runtime/ftplugin/gitrebase.vim @tpope
runtime/ftplugin/gitsendemail.vim @tpope
runtime/ftplugin/gleam.vim @kirillmorozov
runtime/ftplugin/go.vim @dbarnett
runtime/ftplugin/goaccess.vim @meonkeys
runtime/ftplugin/gomod.vim @yu-yk
runtime/ftplugin/gprof.vim @dpelle
runtime/ftplugin/graphql.vim @jparise
runtime/ftplugin/groff.vim @e-kwsm
runtime/ftplugin/gyp.vim @ObserverOfTime
runtime/ftplugin/haml.vim @tpope
runtime/ftplugin/hare.vim @selenebun
runtime/ftplugin/haredoc.vim @selenebun
runtime/ftplugin/heex.vim @cvincent
runtime/ftplugin/hcl.vim @gpanders
runtime/ftplugin/hgcommit.vim @k-takata
runtime/ftplugin/hlsplaylist.vim @avidseeker
runtime/ftplugin/hog.vim @wtfbbqhax
runtime/ftplugin/html.vim @dkearns
runtime/ftplugin/http.vim @ribru17
runtime/ftplugin/hyprlang.vim @ribru17
runtime/ftplugin/i3config.vim @hiqua
runtime/ftplugin/icon.vim @dkearns
runtime/ftplugin/indent.vim @dkearns
runtime/ftplugin/ishd.vim @dkearns
runtime/ftplugin/j.vim @glts
runtime/ftplugin/java.vim @zzzyxwvut
runtime/ftplugin/javacc.vim @ribru17
runtime/ftplugin/javascript.vim @dkearns
runtime/ftplugin/javascriptreact.vim @dkearns
runtime/ftplugin/jjdescription.vim @gpanders
runtime/ftplugin/json.vim @dbarnett
runtime/ftplugin/json5.vim @dkearns
runtime/ftplugin/jsonc.vim @izhakjakov
runtime/ftplugin/julia.vim @carlobaldassi
runtime/ftplugin/just.vim @pbnj
runtime/ftplugin/jq.vim @vito-c
runtime/ftplugin/kconfig.vim @chrisbra
runtime/ftplugin/kdl.vim @imsnif @jiangyinzuo
runtime/ftplugin/kivy.vim @ribru17
runtime/ftplugin/kotlin.vim @udalov
runtime/ftplugin/ldapconf.vim @ribru17
runtime/ftplugin/leo.vim @ribru17
runtime/ftplugin/less.vim @genoma
runtime/ftplugin/lex.vim @ribru17
runtime/ftplugin/lf.vim @andis-sprinkis
runtime/ftplugin/liquid.vim @tpope
runtime/ftplugin/lua.vim @dkearns
runtime/ftplugin/lc.vim @ribru17
runtime/ftplugin/lynx.vim @dkearns
runtime/ftplugin/m17ndb.vim @dseomn
runtime/ftplugin/m3build.vim @dkearns
runtime/ftplugin/m3quake.vim @dkearns
runtime/ftplugin/markdown.vim @tpope
runtime/ftplugin/mbsync.vim @fymyte
runtime/ftplugin/mediawiki.vim @avidseeker
runtime/ftplugin/meson.vim @Liambeguin
runtime/ftplugin/modula2.vim @dkearns
runtime/ftplugin/modula3.vim @dkearns
runtime/ftplugin/mojo.vim @ribru17
runtime/ftplugin/mss.vim @Freed-Wu
runtime/ftplugin/nginx.vim @chr4
runtime/ftplugin/nim.vim @ribru17
runtime/ftplugin/nroff.vim @averms
runtime/ftplugin/nsis.vim @k-takata
runtime/ftplugin/nu.vim @mrcjkb
runtime/ftplugin/octave.vim @dkearns
runtime/ftplugin/ondir.vim @jparise
runtime/ftplugin/opencl.vim @Freed-Wu
runtime/ftplugin/openvpn.vim @ObserverOfTime
runtime/ftplugin/org.vim @saccarosium
runtime/ftplugin/pascal.vim @dkearns
runtime/ftplugin/pbtxt.vim @lakshayg
runtime/ftplugin/pdf.vim @tpope
runtime/ftplugin/perl.vim @petdance @dkearns
runtime/ftplugin/php.vim @dkearns
runtime/ftplugin/pkl.vim @ribru17
runtime/ftplugin/plsql.vim @lee-lindley
runtime/ftplugin/pod.vim @petdance @dkearns
runtime/ftplugin/poefilter.vim @ObserverOfTime
runtime/ftplugin/postscr.vim @mrdubya
runtime/ftplugin/pq.vim @anarion80
runtime/ftplugin/prisma.vim @ribru17
runtime/ftplugin/proto.vim @Limero
runtime/ftplugin/ps1.vim @heaths
runtime/ftplugin/ps1xml.vim @heaths
runtime/ftplugin/ptx.vim @jiangyinzuo
runtime/ftplugin/purescript.vim @ribru17
runtime/ftplugin/pymanifest.vim @ObserverOfTime
runtime/ftplugin/python.vim @tpict
runtime/ftplugin/qb64.vim @dkearns
runtime/ftplugin/qml.vim @ChaseKnowlden
runtime/ftplugin/racket.vim @benknoble
runtime/ftplugin/rasi.vim @fymyte
runtime/ftplugin/readline.vim @dkearns
runtime/ftplugin/remind.vim @joereynolds
runtime/ftplugin/rescript.vim @ribru17
runtime/ftplugin/routeros.vim @zainin
runtime/ftplugin/rst.vim @marshallward
runtime/ftplugin/ruby.vim @tpope @dkearns
runtime/ftplugin/rust.vim @lilyball
runtime/ftplugin/samba.vim @mperry2
runtime/ftplugin/sass.vim @tpope
runtime/ftplugin/scala.vim @derekwyatt
runtime/ftplugin/scheme.vim @evhan
runtime/ftplugin/scss.vim @tpope
runtime/ftplugin/sed.vim @dkearns
runtime/ftplugin/sh.vim @dkearns
runtime/ftplugin/shaderslang.vim @mTvare6
runtime/ftplugin/slint.vim @ribru17
runtime/ftplugin/snakemake.vim @ribru17
runtime/ftplugin/solidity.vim @coti-z
runtime/ftplugin/solution.vim @dkearns
runtime/ftplugin/spajson.vim @dseomn
runtime/ftplugin/spec.vim @ignatenkobrain
runtime/ftplugin/squirrel.vim @ribru17
runtime/ftplugin/ssa.vim @ObserverOfTime
runtime/ftplugin/sshdconfig.vim @jiangyinzuo
runtime/ftplugin/svelte.vim @igorlfs
runtime/ftplugin/sway.vim @ribru17
runtime/ftplugin/swayconfig.vim @jamespeapen
runtime/ftplugin/systemverilog.vim @Kocha
runtime/ftplugin/swig.vim @jmarrec
runtime/ftplugin/tap.vim @petdance
runtime/ftplugin/tcsh.vim @dkearns
runtime/ftplugin/tera.vim @MuntasirSZN
runtime/ftplugin/terraform.vim @JannoTjarks
runtime/ftplugin/tf.vim @ribru17
runtime/ftplugin/thrift.vim @jiangyinzuo
runtime/ftplugin/tiasm.vim @Freed-Wu
runtime/ftplugin/tidy.vim @dkearns
runtime/ftplugin/tmux.vim @ericpruitt
runtime/ftplugin/toml.vim @averms
runtime/ftplugin/tt2html.vim @petdance
runtime/ftplugin/twig.vim @ribru17
runtime/ftplugin/typescript.vim @dkearns
runtime/ftplugin/typescriptreact.vim @dkearns
runtime/ftplugin/typst.vim @saccarosium
runtime/ftplugin/unison.vim @chuwy
runtime/ftplugin/v.vim @ribru17
runtime/ftplugin/vdf.vim @ObserverOfTime
runtime/ftplugin/vim.vim @dkearns
runtime/ftplugin/wget.vim @dkearns
runtime/ftplugin/wget2.vim @dkearns
runtime/ftplugin/xcompose.vim @ObserverOfTime
runtime/ftplugin/xml.vim @chrisbra
runtime/ftplugin/xs.vim @petdance
runtime/ftplugin/yacc.vim @ribru17
runtime/ftplugin/zsh.vim @chrisbra
runtime/import/dist/vimhighlight.vim @lacygoill
runtime/indent/arduino.vim @k-takata
runtime/indent/astro.vim @wuelnerdotexe
runtime/indent/basic.vim @dkearns
runtime/indent/bst.vim @tpope
runtime/indent/cdl.vim @dkearns
runtime/indent/chatito.vim @ObserverOfTime
runtime/indent/clojure.vim @axvr
runtime/indent/config.vim @dkearns
runtime/indent/cs.vim @nickspoons
runtime/indent/css.vim @dkearns
runtime/indent/cucumber.vim @tpope
runtime/indent/d.vim @dkearns
runtime/indent/dosbatch.vim @k-takata
runtime/indent/dtd.vim @dkearns
runtime/indent/dylan.vim @dkearns
runtime/indent/eiffel.vim @jocelyn
runtime/indent/elm.vim @andys8
runtime/indent/erlang.vim @hcs42
runtime/indent/eruby.vim @tpope @dkearns
runtime/indent/eterm.vim @dkearns
runtime/indent/falcon.vim @steveno
runtime/indent/framescript.vim @dkearns
runtime/indent/freebasic.vim @dkearns
runtime/indent/gdscript.vim @habamax
runtime/indent/gitconfig.vim @tpope
runtime/indent/gitolite.vim @sitaramc
runtime/indent/glsl.vim @gpanders
runtime/indent/go.vim @dbarnett
runtime/indent/graphql.vim @jparise
runtime/indent/gyp.vim @ObserverOfTime
runtime/indent/haml.vim @tpope
runtime/indent/hare.vim @selenebun
runtime/indent/hcl.vim @gpanders
runtime/indent/hog.vim @wtfbbqhax
runtime/indent/idlang.vim @dkearns
runtime/indent/j.vim @glts
runtime/indent/java.vim @xuhdev
runtime/indent/javascript.vim @bounceme
runtime/indent/json.vim @elzr
runtime/indent/jsonc.vim @izhakjakov
runtime/indent/julia.vim @carlobaldassi
runtime/indent/just.vim @pbnj
runtime/indent/kdl.vim @imsnif @jiangyinzuo
runtime/indent/kotlin.vim @udalov
runtime/indent/krl.vim @KnoP-01
runtime/indent/ld.vim @dkearns
runtime/indent/less.vim @genoma
runtime/indent/liquid.vim @tpope
runtime/indent/lua.vim @marcuscf
runtime/indent/m17ndb.vim @dseomn
runtime/indent/make.vim @dkearns
runtime/indent/meson.vim @Liambeguin
runtime/indent/mma.vim @dkearns
runtime/indent/mojo.vim @ribru17
runtime/indent/nginx.vim @chr4
runtime/indent/nsis.vim @k-takata
runtime/indent/occam.vim @dkearns
runtime/indent/perl.vim @petdance
runtime/indent/php.vim @2072
runtime/indent/postscr.vim @mrdubya
runtime/indent/prolog.vim @dkearns
runtime/indent/proto.vim @Limero
runtime/indent/ps1.vim @heaths
runtime/indent/qb64.vim @dkearns
runtime/indent/qml.vim @ChaseKnowlden
runtime/indent/racket.vim @benknoble
runtime/indent/rapid.vim @KnoP-01
runtime/indent/readline.vim @dkearns
runtime/indent/ruby.vim @AndrewRadev @dkearns
runtime/indent/sass.vim @tpope
runtime/indent/scala.vim @derekwyatt
runtime/indent/scheme.vim @evhan
runtime/indent/scss.vim @tpope
runtime/indent/sh.vim @chrisbra
runtime/indent/solidity.vim @coti-z
runtime/indent/spajson.vim @dseomn
runtime/indent/systemverilog.vim @Kocha
runtime/indent/tcl.vim @dkearns
runtime/indent/tcsh.vim @dkearns
runtime/indent/teraterm.vim @k-takata
runtime/indent/terraform.vim @gpanders
runtime/indent/thrift.vim @jiangyinzuo
runtime/indent/typescript.vim @HerringtonDarkholme
runtime/indent/typst.vim @saccarosium
runtime/indent/vroom.vim @dbarnett
runtime/indent/xml.vim @chrisbra
runtime/indent/zsh.vim @chrisbra
runtime/keymap/armenian-eastern_utf-8.vim @blinskey
runtime/keymap/armenian-western_utf-8.vim @blinskey
runtime/keymap/brazilian_portuguese-abnt.vim @LuMarquesIlva
runtime/keymap/brazilian_portuguese-compact.vim @LuMarquesIlva
runtime/keymap/russian-typograph.vim @RestorerZ
runtime/keymap/tamil_tscii.vim @yegappan
runtime/keymap/ukrainian-enhanced.vim @Dolfost
runtime/lang/menu_en_gb.latin1.vim @mrdubya
runtime/lang/menu_ru_ru.cp1251.vim @RestorerZ
runtime/lang/menu_ru_ru.koi8-r.vim @RestorerZ
runtime/lang/menu_ru_ru.utf-8.vim @RestorerZ
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim @yegappan
runtime/pack/dist/opt/comment/ @habamax
runtime/pack/dist/opt/helptoc/ @kennypete
runtime/pack/dist/opt/matchit/ @chrisbra
runtime/pack/dist/opt/nohlsearch/ @habamax
runtime/plugin/manpager.vim @Konfekt
runtime/syntax/shared/hgcommitDiff.vim @vegerot
runtime/syntax/abaqus.vim @costerwi
runtime/syntax/abnf.vim @A4-Tacks
runtime/syntax/aidl.vim @dpelle
runtime/syntax/ant.vim @dkearns
runtime/syntax/antlr4.vim @jiangyinzuo
runtime/syntax/arduino.vim @johshoff
runtime/syntax/asciidoc.vim @aerostitch
runtime/syntax/asm.vim @dkearns
runtime/syntax/asmh8300.vim @dkearns
runtime/syntax/asterisk.vim @jaunis
runtime/syntax/astro.vim @wuelnerdotexe
runtime/syntax/asy.vim @avidseeker
runtime/syntax/autohotkey.vim @mmikeww
runtime/syntax/awk.vim @dkearns
runtime/syntax/basic.vim @dkearns
runtime/syntax/bst.vim @tpope
runtime/syntax/bzl.vim @dbarnett
runtime/syntax/bzr.vim @hdima
runtime/syntax/cabal.vim @coot
runtime/syntax/cabalconfig.vim @coot
runtime/syntax/cabalproject.vim @coot
runtime/syntax/cf.vim @ernstvanderlinden
runtime/syntax/chatito.vim @ObserverOfTime
runtime/syntax/chicken.vim @evhan
runtime/syntax/chuck.vim @andreacfromtheapp
runtime/syntax/clojure.vim @axvr
runtime/syntax/cs.vim @nickspoons
runtime/syntax/csv.vim @habamax
runtime/syntax/cucumber.vim @tpope
runtime/syntax/d.vim @JesseKPhillips
runtime/syntax/dart.vim @pr3d4t0r
runtime/syntax/datascript.vim @dpelle
runtime/syntax/dax.vim @anarion80
runtime/syntax/deb822sources.vim @jamessan
runtime/syntax/debchangelog.vim @jamessan
runtime/syntax/debcontrol.vim @jamessan
runtime/syntax/debcopyright.vim @jamessan
runtime/syntax/debsources.vim @jamessan
runtime/syntax/dep3patch.vim @jamessan
runtime/syntax/desktop.vim @e-kwsm
runtime/syntax/dosbatch.vim @mrdubya
runtime/syntax/dosini.vim @xuhdev
runtime/syntax/dot.vim @mmottl
runtime/syntax/doxygen.vim @frogonwheels
runtime/syntax/dtd.vim @chrisbra
runtime/syntax/dts.vim @zonque
runtime/syntax/editorconfig.vim @gpanders
runtime/syntax/eiffel.vim @jocelyn
runtime/syntax/erlang.vim @hcs42
runtime/syntax/eruby.vim @tpope @dkearns
runtime/syntax/expect.vim @dkearns
runtime/syntax/falcon.vim @steveno
runtime/syntax/fetchmail.vim @dkearns
runtime/syntax/forth.vim @jkotlinski
runtime/syntax/fpcmake.vim @dkearns
runtime/syntax/freebasic.vim @dkearns
runtime/syntax/fstab.vim @rid9
runtime/syntax/gdresource.vim @habamax
runtime/syntax/gdscript.vim @habamax
runtime/syntax/gdshader.vim @habamax
runtime/syntax/git.vim @tpope
runtime/syntax/gitattributes.vim @ObserverOfTime
runtime/syntax/gitcommit.vim @tpope
runtime/syntax/gitconfig.vim @tpope
runtime/syntax/gitignore.vim @ObserverOfTime
runtime/syntax/gitolite.vim @sitaramc
runtime/syntax/gitrebase.vim @tpope
runtime/syntax/gleam.vim @kirillmorozov
runtime/syntax/glsl.vim @gpanders
runtime/syntax/go.vim @bhcleek
runtime/syntax/goaccess.vim @meonkeys
runtime/syntax/godoc.vim @dbarnett
runtime/syntax/gp.vim @KBelabas
runtime/syntax/gprof.vim @dpelle
runtime/syntax/graphql.vim @jparise
runtime/syntax/groff.vim @jmarshall
runtime/syntax/gyp.vim @ObserverOfTime
runtime/syntax/haml.vim @tpope
runtime/syntax/hare.vim @selenebun
runtime/syntax/haredoc.vim @selenebun
runtime/syntax/haskell.vim @coot
runtime/syntax/hcl.vim @gpanders
runtime/syntax/help.vim @dkearns
runtime/syntax/help_ru.vim @RestorerZ
runtime/syntax/hgcommit.vim @k-takata
runtime/syntax/hitest.vim @lacygoill
runtime/syntax/hog.vim @wtfbbqhax
runtime/syntax/hollywood.vim @sodero
runtime/syntax/html.vim @dkearns
runtime/syntax/htmlangular.vim @dlvandenberg
runtime/syntax/hyprlang.vim @saccarosium
runtime/syntax/i3config.vim @hiqua
runtime/syntax/icon.vim @dkearns
runtime/syntax/indent.vim @dkearns
runtime/syntax/j.vim @glts
runtime/syntax/jargon.vim @h3xx
runtime/syntax/java.vim @zzzyxwvut
runtime/syntax/javascript.vim @fleiner
runtime/syntax/jinja.vim @gpanders
runtime/syntax/jjdescription.vim @gpanders
runtime/syntax/json.vim @vito-c
runtime/syntax/jsonc.vim @izhakjakov
runtime/syntax/julia.vim @carlobaldassi
runtime/syntax/just.vim @pbnj
runtime/syntax/jq.vim @vito-c
runtime/syntax/karel.vim @kirillmorozov
runtime/syntax/kconfig.vim @chrisbra
runtime/syntax/kivy.vim @prophittcorey
runtime/syntax/kotlin.vim @udalov
runtime/syntax/kdl.vim @imsnif @jiangyinzuo
runtime/syntax/krl.vim @KnoP-01
runtime/syntax/less.vim @genoma
runtime/syntax/lf.vim @andis-sprinkis
runtime/syntax/liquid.vim @tpope
runtime/syntax/lua.vim @marcuscf
runtime/syntax/lyrics.vim @ObserverOfTime
runtime/syntax/lynx.vim @dkearns
runtime/syntax/m17ndb.vim @dseomn
runtime/syntax/m3build.vim @dkearns
runtime/syntax/m3quake.vim @dkearns
runtime/syntax/mailcap.vim @dkearns
runtime/syntax/make.vim @rohieb
runtime/syntax/mallard.vim @jhradilek
runtime/syntax/markdown.vim @tpope
runtime/syntax/mbsync.vim @fymyte
runtime/syntax/mason.vim @petdance
runtime/syntax/mediawiki.vim @avidseeker
runtime/syntax/meson.vim @Liambeguin
runtime/syntax/modula2.vim @dkearns
runtime/syntax/modula2/opt/iso.vim @trijezdci
runtime/syntax/modula2/opt/pim.vim @trijezdci
runtime/syntax/modula2/opt/r10.vim @trijezdci
runtime/syntax/modula3.vim @dkearns
runtime/syntax/mss.vim @Freed-Wu
runtime/syntax/n1ql.vim @pr3d4t0r
runtime/syntax/nginx.vim @chr4
runtime/syntax/ninja.vim @nico
runtime/syntax/nix.vim @equill
runtime/syntax/nroff.vim @jmarshall
runtime/syntax/nsis.vim @k-takata
runtime/syntax/odin.vim @habamax
runtime/syntax/omnimark.vim @kennypete
runtime/syntax/ondir.vim @jparise
runtime/syntax/opencl.vim @Freed-Wu
runtime/syntax/openvpn.vim @ObserverOfTime
runtime/syntax/org.vim @saccarosium
runtime/syntax/pacmanlog.vim @rpigott
runtime/syntax/pascal.vim @dkearns
runtime/syntax/pbtxt.vim @lakshayg
runtime/syntax/pdf.vim @tpope
runtime/syntax/perl.vim @petdance
runtime/syntax/php.vim @TysonAndre
runtime/syntax/plsql.vim @lee-lindley
runtime/syntax/pod.vim @petdance
runtime/syntax/poefilter.vim @ObserverOfTime
runtime/syntax/postscr.vim @mrdubya
runtime/syntax/pq.vim @anarion80
runtime/syntax/privoxy.vim @dkearns
runtime/syntax/progress.vim @rdnlsmith
runtime/syntax/prolog.vim @XVilka
runtime/syntax/prql.vim @vanillajonathan
runtime/syntax/ps1.vim @heaths
runtime/syntax/ps1xml.vim @heaths
runtime/syntax/psl.vim @danielkho
runtime/syntax/ptx.vim @jiangyinzuo
runtime/syntax/pymanifest.vim @ObserverOfTime
runtime/syntax/qb64.vim @dkearns
runtime/syntax/qml.vim @ChaseKnowlden
runtime/syntax/racket.vim @benknoble
runtime/syntax/raml.vim @in3d
runtime/syntax/rapid.vim @KnoP-01
runtime/syntax/ratpoison.vim @trapd00r
runtime/syntax/rasi.vim @fymyte
runtime/syntax/rc.vim @chrisbra
runtime/syntax/rcs.vim @hdima
runtime/syntax/rebol.vim @mrdubya
runtime/syntax/rego.vim @zenmatic
runtime/syntax/resolv.vim @rid9
runtime/syntax/rng.vim @jhradilek
runtime/syntax/routeros.vim @zainin
runtime/syntax/rst.vim @marshallward
runtime/syntax/ruby.vim @dkearns
runtime/syntax/salt.vim @gpanders
runtime/syntax/sass.vim @tpope
runtime/syntax/scala.vim @derekwyatt
runtime/syntax/scheme.vim @evhan
runtime/syntax/scss.vim @tpope
runtime/syntax/sed.vim @dkearns
runtime/syntax/shared/debversions.vim @jamessan
runtime/syntax/shaderslang.vim @mTvare6
runtime/syntax/solidity.vim @coti-z
runtime/syntax/spajson.vim @dseomn
runtime/syntax/spec.vim @ignatenkobrain
runtime/syntax/sqloracle.vim @chrisbra
runtime/syntax/squirrel.vim @zenmatic
runtime/syntax/srt.vim @ObserverOfTime
runtime/syntax/ssa.vim @ObserverOfTime
runtime/syntax/sshconfig.vim @Jakuje
runtime/syntax/sshdconfig.vim @Jakuje
runtime/syntax/sudoers.vim @e-kwsm
runtime/syntax/svn.vim @hdima
runtime/syntax/swayconfig.vim @jamespeapen
runtime/syntax/swig.vim @jmarrec
runtime/syntax/systemverilog.vim @Kocha
runtime/syntax/tap.vim @petdance
runtime/syntax/tcsh.vim @dkearns
runtime/syntax/tera.vim @MuntasirSZN
runtime/syntax/teraterm.vim @k-takata
runtime/syntax/terraform.vim @gpanders
runtime/syntax/thrift.vim @jiangyinzuo
runtime/syntax/tiasm.vim @Freed-Wu
runtime/syntax/tidy.vim @dkearns
runtime/syntax/tmux.vim @ericpruitt
runtime/syntax/toml.vim @averms
runtime/syntax/tt2.vim @petdance
runtime/syntax/tt2html.vim @petdance
runtime/syntax/tt2js.vim @petdance
runtime/syntax/typescript.vim @HerringtonDarkholme @rhysd
runtime/syntax/typescriptreact.vim @HerringtonDarkholme @rhysd
runtime/syntax/typst.vim @gpanders
runtime/syntax/shared/typescriptcommon.vim @HerringtonDarkholme @rhysd
runtime/syntax/unison.vim @chuwy
runtime/syntax/vdf.vim @ObserverOfTime
runtime/syntax/vroom.vim @dbarnett
runtime/syntax/wdl.vim @zenmatic
runtime/syntax/wget.vim @dkearns
runtime/syntax/wget2.vim @dkearns
runtime/syntax/xbl.vim @dkearns
runtime/syntax/xcompose.vim @ObserverOfTime
runtime/syntax/xml.vim @chrisbra
runtime/syntax/xs.vim @petdance
runtime/syntax/xslt.vim @Boobies
runtime/syntax/zserio.vim @dpelle
runtime/syntax/zsh.vim @chrisbra
runtime/tutor/tutor1.eo @dpelle
runtime/tutor/tutor1.fr @dpelle
runtime/tutor/tutor1.ru @RestorerZ
runtime/tutor/tutor2.fr @dlejay
src/iscygpty.* @k-takata
src/libvterm/ @leonerd
src/po/ca.po @nfdisco
src/po/de.po @chrisbra
src/po/eo.po @dpelle
src/po/es.po @victorhck
src/po/fi.po @flammie
src/po/fr.po @dpelle
src/po/ga.po @kscanne
src/po/hy.po @gagikh
src/po/it.po @azc100
src/po/ja.po @k-takata
src/po/ru.po @RestorerZ
src/po/sr.po @eevan78
src/po/tr.po @bitigchi
src/po/uk.po @sakhnik
src/xxd/ @jnweiger

View File

@ -0,0 +1,27 @@
name: 'test_artifacts'
description: "Upload failed test artifacts"
runs:
using: "composite"
steps:
- name: Upload failed tests
uses: actions/upload-artifact@v4
with:
# Name of the artifact to upload.
name: ${{ github.workflow }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-tests
# A file, directory or wildcard pattern that describes what
# to upload.
path: |
${{ github.workspace }}/runtime/indent/testdir/*.fail
${{ github.workspace }}/runtime/syntax/testdir/failed/*
${{ github.workspace }}/src/testdir/failed/*
# The desired behavior if no files are found using the
# provided path.
if-no-files-found: ignore
# Duration after which artifact will expire in days. 0 means
# using repository settings.
retention-days: 0
# If true, an artifact with a matching name will be deleted
overwrite: true

View File

@ -4,3 +4,5 @@ updates:
directory: "/"
schedule:
interval: "weekly"
commit-message:
prefix: "CI"

173
.github/labeler.yml vendored
View File

@ -1,60 +1,155 @@
# list of labels and minimatch globs to match to apply the label.
CI:
- any: ['.cirrus.yml']
- any: ['.github/dependabot.yml']
- any: ['.github/labeler.yml']
- any: ['.github/workflows/*']
- any: ['.appveyor.yml']
- any: ['.codecov.yml']
- all:
- changed-files:
- any-glob-to-any-file:
- '.cirrus.yml'
- '.github/dependabot.yml'
- '.github/labeler.yml'
- '.github/workflows/*'
- '.appveyor.yml'
- '.codecov.yml'
documentation:
- all:
- changed-files:
- any-glob-to-all-files:
- '*/doc/*'
translation:
- any: ['src/po/*.po']
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/po/*.po'
if_lua:
- any: ['src/if_lua.c']
- any: ['src/proto/if_lua.pro']
- any: ['runtime/doc/if_lua.txt']
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/if_lua.c'
- 'src/proto/if_lua.pro'
- 'runtime/doc/if_lua.txt'
if_mzscheme:
- any: ['src/if_mzsch.c']
- any: ['src/if_mzsch.h']
- any: ['src/proto/if_mzsch.pro']
- any: ['runtime/doc/if_mzsch.txt']
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/if_mzsch.c'
- 'src/if_mzsch.h'
- 'src/proto/if_mzsch.pro'
- 'runtime/doc/if_mzsch.txt'
if_perl:
- any: ['src/if_perl.xs']
- any: ['src/if_perlsfio.c']
- any: ['src/proto/if_perl.pro']
- any: ['src/proto/if_perlsfio.pro']
- any: ['runtime/doc/if_perl.txt']
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/if_perl.xs'
- 'src/if_perlsfio.c'
- 'src/proto/if_perl.pro'
- 'src/proto/if_perlsfio.pro'
- 'runtime/doc/if_perl.txt'
if_python:
- any: ['src/if_py_both.h']
- any: ['runtime/doc/if_pyth.txt']
- any: ['src/if_python.c']
- any: ['src/if_python3.c']
- any: ['src/proto/if_python.pro']
- any: ['src/proto/if_python3.pro']
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/if_py_both.h'
- 'runtime/doc/if_pyth.txt'
- 'src/if_python.c'
- 'src/if_python3.c'
- 'src/proto/if_python.pro'
- 'src/proto/if_python3.pro'
if_ruby:
- any: ['src/if_ruby.c']
- any: ['src/proto/if_ruby.pro']
- any: ['runtime/doc/if_ruby.txt']
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/if_ruby.c'
- 'src/proto/if_ruby.pro'
- 'runtime/doc/if_ruby.txt'
if_tcl:
- any: ['src/if_tcl.c']
- any: ['src/proto/if_tcl.pro']
- any: ['runtime/doc/if_tcl.txt']
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/if_tcl.c'
- 'src/proto/if_tcl.pro'
- 'runtime/doc/if_tcl.txt'
installer:
- all:
- changed-files:
- any-glob-to-any-file:
- 'nsis/**'
- 'src/dosinst.*'
- 'src/uninstall.c'
platform-mac:
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/INSTALLmac.txt'
- 'src/os_mac*'
- 'src/proto/os_mac*'
platform-windows:
- all:
- changed-files:
- any-glob-to-any-file:
- 'nsis/**'
- 'src/*.bat'
- 'src/*.bmp'
- 'src/*.ico'
- 'src/GvimExt/*'
- 'src/INSTALLpc.txt'
- 'src/Make_cyg*.mak'
- 'src/Make_ming.mak'
- 'src/Make_mvc.mak'
- 'src/dosinst.*'
- 'src/gui_dwrite.*'
- 'src/gui_w32*'
- 'src/if_ole.*'
- 'src/iid_ole.c'
- 'src/os_mswin*'
- 'src/os_w32*'
- 'src/os_win32.*'
- 'src/proto/gui_w32.pro'
- 'src/proto/os_mswin.pro'
- 'src/proto/os_win32.pro'
- 'src/proto/winclip.pro'
- 'src/uninstall.c'
- 'src/vim.manifest'
- 'src/vim.rc'
- 'src/vimrun.c'
- 'src/winclip.c'
- 'src/xpm/**'
- 'src/xpm_w32.*'
runtime:
- any: ['runtime/ftplugin']
- any: ['runtime/syntax']
- any: ['runtime/indent']
- any: ['runtime/pack/dist/opt/termdebug/plugin/termdebug.vim']
- all:
- changed-files:
- any-glob-to-any-file:
- 'runtime/ftplugin'
- 'runtime/syntax'
- 'runtime/indent'
- 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim'
termdebug: runtime/pack/dist/opt/termdebug/plugin/termdebug.vim
termdebug:
- all:
- changed-files:
- any-glob-to-any-file:
- 'runtime/pack/dist/opt/termdebug/plugin/termdebug.vim'
netrw:
- any: ['runtime/plugin/netrwPlugin.vim']
- any: ['runtime/autoload/netrw*']
plugin-netrw:
- all:
- changed-files:
- any-glob-to-any-file:
- 'runtime/plugin/netrwPlugin.vim'
- 'runtime/autoload/netrw*'
xxd:
- all:
- changed-files:
- any-glob-to-any-file:
- 'src/xxd/*'

View File

@ -17,12 +17,12 @@ permissions:
jobs:
linux:
runs-on: ubuntu-22.04
runs-on: ${{ matrix.architecture == 'arm64' && 'ubuntu-24.04-arm' || 'ubuntu-24.04' }}
env:
CC: ${{ matrix.compiler }}
GCC_VER: 13
CLANG_VER: 16
GCC_VER: 14
CLANG_VER: 20
TEST: test
SRCDIR: ./src
LEAK_CFLAGS: -DEXITFREE
@ -48,6 +48,10 @@ jobs:
- features: tiny
compiler: gcc
extra: [nogui]
- features: tiny
compiler: gcc
extra: [nogui]
architecture: arm64
- features: normal
shadow: ./src/shadow
compiler: gcc
@ -73,27 +77,86 @@ jobs:
compiler: gcc
coverage: true
extra: [unittests]
- features: huge
compiler: gcc
coverage: true
extra: [unittests]
architecture: arm64
- features: normal
compiler: gcc
extra: [vimtags]
steps:
- name: Checkout repository from github
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Check Filelist (for packaging)
run: |
# If any files in the repository are not listed in Filelist this will
# exit with an error code and list the missing entries.
make -f ci/unlisted.make
- name: Check hlgroups (are any new hlgroups added, but not handled in highlight.c)
run: |
# If any highlight groups have been documented, but not handled in
# highlight.c, nor listed as 'intentionally left out' in hlgroups.ignore,
# exit with an error code and list the missing entries.
make -C ci -f hlgroups.make
- run: sudo dpkg --add-architecture i386
if: matrix.architecture == 'i386'
- name: Uninstall snap
run: |
sudo bash ci/remove_snap.sh
- name: Enable debug packages
run: |
# Some of the ASAN suppressions are in libraries linked with dlopen
# and symbolization of them requires these debug packages.
sudo apt install ubuntu-dbgsym-keyring
sudo cp ci/ddebs.list /etc/apt/sources.list.d/ddebs.list
sudo cp ci/pinned-pkgs /etc/apt/preferences.d/pinned-pkgs
- name: Install packages
run: |
# This is added by default, and it is often broken, but we don't need anything from it
sudo rm -f /etc/apt/sources.list.d/microsoft-prod.list
PKGS=( \
gettext \
libgtk2.0-dev:${{ matrix.architecture }} \
x11-utils \
labwc \
wl-clipboard \
wayland-utils \
libgtk-3-dev:${{ matrix.architecture }} \
libgtk-3-bin:${{ matrix.architecture }} \
desktop-file-utils \
libc6-dbgsym:${{ matrix.architecture }} \
libtool-bin \
libncurses-dev:${{ matrix.architecture }} \
libxt-dev:${{ matrix.architecture }} \
libegl-mesa0:${{ matrix.architecture }} \
libegl1:${{ matrix.architecture }} \
libegl1-mesa-dev:${{ matrix.architecture }} \
libepoxy-dev:${{ matrix.architecture }} \
libwayland-egl1:${{ matrix.architecture }} \
libwayland-client0:${{ matrix.architecture }} \
libwayland-cursor0:${{ matrix.architecture }} \
locales-all \
software-properties-common \
)
if ${{ contains(matrix.extra, 'asan') }} && ${{ contains(matrix.architecture, 'native') }}; then
PKGS+=( \
libepoxy0-dbgsym:${{ matrix.architecture }} \
libxdamage1-dbgsym:${{ matrix.architecture }} \
libxcb1-dbgsym:${{ matrix.architecture }} \
libgtk-3-bin-dbgsym:${{ matrix.architecture }} \
libgtk-3-0t64-dbgsym:${{ matrix.architecture }} \
libglib2.0-0t64-dbgsym:${{ matrix.architecture }} \
libglib2.0-bin-dbgsym:${{ matrix.architecture }} \
libglib2.0-dev-bin-dbgsym:${{ matrix.architecture }} \
)
fi
if ${{ matrix.features == 'huge' }}; then
LUA_VER=${{ matrix.lua_ver || '5.4' }}
PKGS+=( \
@ -102,7 +165,6 @@ jobs:
lcov \
libcanberra-dev \
libperl-dev \
python2-dev \
python3-dev \
liblua${LUA_VER}-dev \
lua${LUA_VER} \
@ -110,13 +172,19 @@ jobs:
tcl-dev \
cscope \
libsodium-dev \
attr \
libattr1-dev
)
fi
sudo apt-get update && sudo apt-get install -y "${PKGS[@]}"
sudo apt-get update && sudo apt-get upgrade -y --allow-downgrades && sudo apt-get install -y --allow-downgrades "${PKGS[@]}"
- name: Install gcc-${{ env.GCC_VER }}
if: matrix.compiler == 'gcc'
run: |
# ubuntu-toolchain-r/test PPA for gcc-13 compiler
# disabled because the installation failed, causing test failures
# sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
sudo apt-get update -y
sudo apt-get install -y gcc-${{ env.GCC_VER }}:${{ matrix.architecture }}
sudo update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-${{ env.GCC_VER }} 100
sudo update-alternatives --set gcc /usr/bin/gcc-${{ env.GCC_VER }}
@ -124,9 +192,14 @@ jobs:
- name: Install clang-${{ env.CLANG_VER }}
if: matrix.compiler == 'clang'
run: |
wget -O - https://apt.llvm.org/llvm-snapshot.gpg.key | sudo apt-key add -
. /etc/lsb-release
sudo add-apt-repository -y "deb http://apt.llvm.org/${DISTRIB_CODENAME}/ llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }} main"
curl -fsSL https://apt.llvm.org/llvm-snapshot.gpg.key | gpg --dearmor | sudo tee /usr/share/keyrings/llvm-archive-keyring.gpg > /dev/null
echo "Types: deb
URIs: https://apt.llvm.org/${DISTRIB_CODENAME}/
Suites: llvm-toolchain-${DISTRIB_CODENAME}-${{ env.CLANG_VER }}
Components: main
Signed-By: /usr/share/keyrings/llvm-archive-keyring.gpg" | sudo tee /etc/apt/sources.list.d/llvm-toolchain.sources > /dev/null
sudo apt-get update -y
sudo apt-get install -y clang-${{ env.CLANG_VER }} llvm-${{ env.CLANG_VER }}
sudo update-alternatives --install /usr/bin/clang clang /usr/bin/clang-${{ env.CLANG_VER }} 100
sudo update-alternatives --set clang /usr/bin/clang-${{ env.CLANG_VER }}
@ -141,7 +214,7 @@ jobs:
(
echo "LINUX_VERSION=$(uname -r)"
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
echo "TMPDIR=${{ runner.temp }}"
echo "TMPDIR=$(mktemp -d -p /tmp)"
case "${{ matrix.features }}" in
tiny)
@ -153,12 +226,13 @@ jobs:
normal)
;;
huge)
echo "TEST=scripttests test_libvterm"
echo "TEST=scripttests test_libvterm indenttest syntaxtest"
INTERFACE=${{ matrix.interface || 'yes' }}
if ${{ matrix.python3 == 'stable-abi' }}; then
PYTHON3_CONFOPT="--with-python3-stable-abi=3.8"
fi
echo "CONFOPT=--enable-perlinterp=${INTERFACE} --enable-pythoninterp=${INTERFACE} --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
# The ubuntu-24.04 CI runner does not provide a python2 package.
echo "CONFOPT=--enable-perlinterp=${INTERFACE} --enable-pythoninterp=no --enable-python3interp=${INTERFACE} --enable-rubyinterp=${INTERFACE} --enable-luainterp=${INTERFACE} --enable-tclinterp=${INTERFACE} ${PYTHON3_CONFOPT}"
;;
esac
@ -176,15 +250,17 @@ jobs:
echo "TEST=unittests"
fi
if ${{ contains(matrix.extra, 'asan') }}; then
echo "SANITIZER_CFLAGS=-g -O1 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
echo "ASAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/asan"
echo "UBSAN_OPTIONS=print_stacktrace=1 log_path=${LOG_DIR}/ubsan"
echo "SANITIZER_CFLAGS=-g -O0 -DABORT_ON_INTERNAL_ERROR -DEXITFREE -fsanitize-recover=all -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
echo "ASAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/asan"
echo "UBSAN_OPTIONS=print_stacktrace=1:log_path=${LOG_DIR}/ubsan"
echo "LSAN_OPTIONS=suppressions=${GITHUB_WORKSPACE}/src/testdir/lsan-suppress.txt"
fi
if ${{ contains(matrix.extra, 'vimtags') }}; then
echo "TEST=-C runtime/doc vimtags VIMEXE=../../${SRCDIR}/vim"
fi
echo "CFLAGS=${CFLAGS}"
# Disables GTK attempt to integrate with the accessibility service that does run in CI.
echo "NO_AT_BRIDGE=1"
) >> $GITHUB_ENV
- name: Set up system
@ -197,21 +273,6 @@ jobs:
sudo usermod -a -G audio "${USER}"
sudo bash ci/setup-xvfb.sh
- name: Set up snd-dummy
if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
env:
DEST_DIR: ${{ env.TMPDIR }}/linux-modules-extra-${{ env.LINUX_VERSION }}
uses: tecolicom/actions-use-apt-tools@main
with:
tools: linux-modules-extra-${{ env.LINUX_VERSION }}
path: "${DEST_DIR}"
- name: modprobe snd-dummy
if: (!(contains(matrix.extra, 'unittests') || contains(matrix.extra, 'vimtags')))
run: |
sudo depmod --verbose
sudo modprobe --verbose snd-dummy
- name: Check autoconf
if: contains(matrix.extra, 'unittests')
run: |
@ -246,18 +307,39 @@ jobs:
"${SRCDIR}"/vim --version
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
if ${{ matrix.features == 'huge' }}; then
# Also check that optional and dynamic features are configured and working
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 \
-c "let g:required=['gettext', 'sodium', 'sound', 'perl', 'python3', 'lua', 'ruby', 'tcl']" \
-S ci/if_feat_check.vim -c quit
fi
- name: Test
timeout-minutes: 25
run: |
do_test() { sg audio "sg $(id -gn) '$*'"; }
do_test make ${SHADOWOPT} ${TEST}
make ${SHADOWOPT} ${TEST}
# Enable to debug failing tests live and ssh into the CI runners
# - name: Setup tmate session
# if: ${{ failure() }}
# uses: mxschmitt/action-tmate@v3
# with:
# limit-access-to-actor: true
- if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
- name: Vim tags
if: contains(matrix.extra, 'vimtags')
run: |
# This will exit with an error code if the generated vim tags differs from source.
git diff --exit-code -- runtime/doc/tags
(
cd runtime/doc
git diff --exit-code -- tags
make html; rm *.html tags.ref;
test -f errors.log && exit 3;
true
)
- name: Generate gcov files
if: matrix.coverage
@ -268,20 +350,22 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ matrix.extra }}
flags: linux,${{ matrix.features }}-${{ matrix.compiler }}-${{ join(matrix.extra, '-') }}
token: ${{ secrets.CODECOV_TOKEN }}
- name: ASan logs
if: contains(matrix.extra, 'asan') && !cancelled()
run: |
for f in $(grep -lR '#[[:digit:]]* *0x[[:xdigit:]]*' "${LOG_DIR}"); do
echo "$f"
asan_symbolize -l "$f"
false # in order to fail a job
done
macos:
runs-on: macos-latest
runs-on: ${{ matrix.runner }}
env:
CC: clang
@ -294,16 +378,23 @@ jobs:
fail-fast: false
matrix:
features: [tiny, normal, huge]
runner: [macos-13, macos-15]
steps:
- name: Checkout repository from github
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install packages
if: matrix.features == 'huge'
run: |
brew install lua
echo "LUA_PREFIX=/usr/local" >> $GITHUB_ENV
brew install lua libtool
echo "LUA_PREFIX=$(brew --prefix)" >> $GITHUB_ENV
- name: Set up Xcode
if: matrix.runner == 'macos-15'
run: |
# Xcode 16 has compiler bugs which are fixed in 16.2+
sudo xcode-select -s /Applications/Xcode_16.4.app/Contents/Developer
- name: Set up environment
run: |
@ -346,12 +437,26 @@ jobs:
"${SRCDIR}"/vim --version
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
if ${{ matrix.features == 'huge' }}; then
# Also check that optional and dynamic features are configured and working
"${SRCDIR}"/vim -u NONE -i NONE --not-a-term -esNX -V1 \
-c "let g:required=['sound', 'perl', 'python3', 'lua', 'ruby', 'tcl']" \
-S ci/if_feat_check.vim -c quit
fi
- name: Install packages for testing
run: |
# Apple diff is broken. Use GNU diff instead. See #14032.
brew install diffutils
- name: Test
timeout-minutes: 20
timeout-minutes: 25
run: |
make ${TEST}
- if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
windows:
runs-on: windows-2022
@ -371,17 +476,22 @@ jobs:
PYTHON_VER_DOT: '2.7'
PYTHON_DIR: 'C:\Python27'
# Python 3
PYTHON3_VER: 311
PYTHON3_VER_DOT: '3.11'
PYTHON3_VER: 313
PYTHON3_VER_DOT: '3.13'
# Other dependencies
# winpty
WINPTY_URL: https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
# libsodium
SODIUM_VER: '1.0.18'
SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip
SODIUM_VER: '1.0.20'
# SODIUM_MSVC_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-msvc.zip
SODIUM_MSVC_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-msvc.zip
SODIUM_MSVC_VER: v143
SODIUM_MINGW_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-mingw.tar.gz
SODIUM_MINGW_VER: 23
# SODIUM_MINGW_URL: https://download.libsodium.org/libsodium/releases/libsodium-%SODIUM_VER%-stable-mingw.tar.gz
SODIUM_MINGW_URL: https://github.com/jedisct1/libsodium/releases/download/%SODIUM_VER%-RELEASE/libsodium-%SODIUM_VER%-mingw.tar.gz
SODIUM_MINGW_VER: 26
# Gettext-tools, iconv and libraries
GETTEXT32_URL: https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-32.zip
GETTEXT64_URL: https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-64.zip
# Escape sequences
COL_RED: "\x1b[31m"
COL_GREEN: "\x1b[32m"
@ -443,9 +553,13 @@ jobs:
echo "SODIUM_LIB=${SODIUM_DIR}\\${{ matrix.arch == 'x64' && 'x64' || 'Win32' }}\\Release\\${SODIUM_MSVC_VER}\\dynamic" >> $GITHUB_ENV
else
SODIUM_DIR=D:\\libsodium-win${{ matrix.arch == 'x64' && '64' || '32' }}
# do not want \L to end up in pathdef.c and compiler complaining about unknown escape sequences \l
SODIUM_DIR_SLASH=D:/libsodium-win${{ matrix.arch == 'x64' && '64' || '32' }}
echo "SODIUM_LIB=${SODIUM_DIR}\\bin" >> $GITHUB_ENV
echo "SODIUM_DIR_SLASH=${SODIUM_DIR_SLASH}" >> $GITHUB_ENV
fi
echo "SODIUM_DIR=${SODIUM_DIR}" >> $GITHUB_ENV
echo "GETTEXT_PATH=D:\gettext${{ matrix.arch == 'x64' && '64' || '32' }}" >> $GITHUB_ENV
- uses: msys2/setup-msys2@v2
if: matrix.toolchain == 'mingw'
@ -458,7 +572,7 @@ jobs:
release: false
- name: Checkout repository from github
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Create a list of download URLs
shell: cmd
@ -467,9 +581,11 @@ jobs:
echo %LUA_RELEASE%>> urls.txt
echo %WINPTY_URL%>> urls.txt
echo %SODIUM_VER%>> urls.txt
echo %GETTEXT32_URL%>> urls.txt
echo %GETTEXT64_URL%>> urls.txt
- name: Cache downloaded files
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: downloads
key: ${{ runner.os }}-${{ matrix.arch }}-${{ hashFiles('urls.txt') }}
@ -500,6 +616,12 @@ jobs:
mklink %SODIUM_LIB%\libsodium.dll %SODIUM_LIB%\libsodium-%SODIUM_MINGW_VER%.dll
)
echo %COL_GREEN%Download Gettext%COL_RESET%
call :downloadfile %GETTEXT${{ env.BITS }}_URL% downloads\gettext${{ env.BITS }}.zip
7z e -y downloads\gettext${{ env.BITS }}.zip -oD:\gettext${{ env.BITS }} > nul || exit 1
copy /y D:\gettext${{ env.BITS }}\libintl-8.dll src\ || exit 1
copy /y D:\gettext${{ env.BITS }}\libiconv-2.dll src\ || exit 1
goto :eof
:downloadfile
@ -537,11 +659,13 @@ jobs:
DYNAMIC_PYTHON=yes PYTHON=%PYTHON_DIR% ^
DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
DYNAMIC_PYTHON3_STABLE_ABI=%PYTHON3_STABLE% ^
DYNAMIC_SODIUM=yes SODIUM=%SODIUM_DIR%
DYNAMIC_SODIUM=yes SODIUM=%SODIUM_DIR% ^
CI_FLAGS=/we4267
) else (
nmake -nologo -f Make_mvc.mak ^
FEATURES=${{ matrix.features }} ^
GUI=%GUI% IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }}
GUI=%GUI% IME=yes ICONV=yes VIMDLL=${{ matrix.VIMDLL }} ^
CI_FLAGS=/we4267
)
- name: Build (MinGW)
@ -567,7 +691,7 @@ jobs:
DYNAMIC_PYTHON=yes PYTHON=${PYTHON_DIR} \
DYNAMIC_PYTHON3=yes PYTHON3=${PYTHON3_DIR} \
DYNAMIC_PYTHON3_STABLE_ABI=${PYTHON3_STABLE} \
DYNAMIC_SODIUM=yes SODIUM=${SODIUM_DIR} \
DYNAMIC_SODIUM=yes SODIUM=${SODIUM_DIR_SLASH} \
STATIC_STDCPLUS=yes COVERAGE=${{ matrix.coverage }}
else
mingw32-make -f Make_ming.mak -j2 \
@ -592,6 +716,11 @@ jobs:
src\vim --version || exit 1
src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-1.vim -c quit
src\vim -u NONE -i NONE --not-a-term -esNX -V1 -S ci/if_ver-2.vim -c quit
if "${{ matrix.features }}"=="HUGE" (
src\vim -u NONE -i NONE --not-a-term -esNX -V1 ^
-c "let g:required=['gettext', 'sodium', 'sound', 'python3', 'lua']" ^
-S ci/if_feat_check.vim -c quit
)
)
#- name: Prepare Artifact
@ -607,6 +736,18 @@ jobs:
# name: vim${{ matrix.bits }}-${{ matrix.toolchain }}
# path: ./artifacts
# disabled because of https://github.com/tunisiano187/Chocolatey-packages/issues/3916
#- name: Install packages for testing
# shell: bash
# run: |
# if ${{ matrix.features != 'TINY' }}; then
# if ${{ matrix.arch == 'x64' }}; then
# choco install netbeans --no-progress
# else
# exit 0
# fi
# fi
- name: Test and show the result of testing gVim
if: matrix.GUI == 'yes' || matrix.VIMDLL == 'yes'
shell: cmd
@ -642,6 +783,9 @@ jobs:
nmake -nologo -f Make_mvc.mak tiny VIMPROG=..\vim || exit 1
)
- if: ${{ !cancelled() }}
uses: ./.github/actions/test_artifacts
- name: Generate gcov files
if: matrix.coverage
shell: msys2 {0}
@ -652,7 +796,8 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v5
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}
token: ${{ secrets.CODECOV_TOKEN }}

View File

@ -44,11 +44,11 @@ jobs:
steps:
- name: Checkout repository from github
uses: actions/checkout@v3
uses: actions/checkout@v4
# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
@ -59,7 +59,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3
# Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
@ -73,4 +73,4 @@ jobs:
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3

View File

@ -9,7 +9,7 @@ permissions:
jobs:
scan:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
CC: gcc
@ -19,7 +19,7 @@ jobs:
steps:
- name: Checkout repository from github
if: env.TOKEN
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Download Coverity
if: env.TOKEN
@ -36,7 +36,6 @@ jobs:
gettext \
libcanberra-dev \
libperl-dev \
python2-dev \
python3-dev \
liblua5.4-dev \
lua5.4 \
@ -53,7 +52,7 @@ jobs:
echo "$(pwd)/cov-scan/bin" >> $GITHUB_PATH
(
echo "NPROC=$(getconf _NPROCESSORS_ONLN)"
echo "CONFOPT=--enable-perlinterp --enable-pythoninterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
echo "CONFOPT=--enable-perlinterp --enable-python3interp --enable-rubyinterp --enable-luainterp --enable-tclinterp"
) >> $GITHUB_ENV
- name: Configure
@ -63,6 +62,9 @@ jobs:
# Append various warning flags to CFLAGS.
sed -i -f ci/config.mk.sed src/auto/config.mk
sed -i -f ci/config.mk.${CC}.sed src/auto/config.mk
# -O2 gives false warning and turns it into an error:
# warning: function may return address of local variable [-Wreturn-local-addr]
sed -i 's/-O2 \?//' src/auto/config.mk
- name: Build/scan vim
if: env.TOKEN

View File

@ -17,8 +17,6 @@ jobs:
pull-requests: write
steps:
- uses: actions/labeler@v4
- uses: actions/labeler@v5
with:
repo-token: "${{ secrets.GITHUB_TOKEN }}"
configuration-path: .github/labeler.yml
sync-labels: ''

18
.gitignore vendored
View File

@ -8,6 +8,8 @@ src/auto/gui_gtk_gresources.h
src/auto/os_haiku.rdef
src/objects/.dirstamp
src/objects
src/po/big5corr
src/po/sjiscorr
src/types.vim
# We do need src/auto/configure.
@ -20,6 +22,8 @@ src/auto/osdef.h
src/auto/link.log
src/auto/link.sed
src/auto/pathdef.c
src/auto/wayland/*.c
src/auto/wayland/*.h
# Windows
*.exe
@ -62,7 +66,6 @@ src/xxd/xxd.dSYM
*~
*.pyc
*.log
src/po/vim.pot
src/tags
/tags
/GPATH
@ -94,8 +97,19 @@ src/json_test
src/message_test
src/kword_test
runtime/syntax/testdir/done/
runtime/syntax/testdir/messages
runtime/syntax/testdir/testdeps.mk
runtime/syntax/testdir/vimcmd
# Generated by "make install"
runtime/doc/doctags
runtime/doc/tags-*
# Temporarily generated by "runtime/syntax/generator/make"
runtime/syntax/generator/generator.err
runtime/syntax/generator/sanity_check.err
runtime/syntax/generator/vim.vim.rc
# Generated by "make shadow". The directory names could be anything but we
# restrict them to shadow (the default) or shadow-*
@ -103,6 +117,8 @@ src/shadow
src/shadow-*
src/runtime
src/pixmaps
src/LICENSE
src/README.txt
# other files possibly created by tools
src/cscope.out

View File

@ -10,6 +10,8 @@ src/auto/gui_gtk_gresources.h
src/auto/os_haiku.rdef
src/objects/.dirstamp
src/objects
src/po/big5corr
src/po/sjiscorr
src/types.vim
# We do need src/auto/configure.
@ -22,6 +24,8 @@ src/auto/osdef.h
src/auto/link.log
src/auto/link.sed
src/auto/pathdef.c
src/auto/wayland/*.c
src/auto/wayland/*.h
# Windows
*.exe
@ -64,7 +68,6 @@ src/xxd/xxd.dSYM
*~
*.pyc
*.log
src/po/vim.pot
src/tags
/tags
/GPATH
@ -96,8 +99,19 @@ src/json_test
src/message_test
src/kword_test
runtime/syntax/testdir/done/
runtime/syntax/testdir/messages
runtime/syntax/testdir/testdeps.mk
runtime/syntax/testdir/vimcmd
# Generated by "make install"
runtime/doc/doctags
runtime/doc/tags-*
# Temporarily generated by "runtime/syntax/generator/make"
runtime/syntax/generator/generator.err
runtime/syntax/generator/sanity_check.err
runtime/syntax/generator/vim.vim.rc
# Generated by "make shadow". The directory names could be anything but we
# restrict them to shadow (the default) or shadow-*
@ -105,11 +119,13 @@ src/shadow
src/shadow-*
src/runtime
src/pixmaps
src/LICENSE
src/README.txt
# other files possibly created by tools
src/cscope.out
# Linter/language server files
/.cache/clangd/
/.ccls-cache/
/compile_commands.json
.cache/clangd/
.ccls-cache/
compile_commands.json

View File

@ -1,84 +1,146 @@
# Contributing to Vim
Patches are welcome in whatever form.
Discussions about patches happen on the vim-dev maillist.
Discussions about patches happen on the [vim-dev][0] mailing list.
If you create a pull request on GitHub it will be
forwarded to the vim-dev maillist. You can also send your patch there
directly. In that case an attachment with a unified diff format is preferred.
Information about the maillist can be found [on the Vim website].
[on the Vim website]: http://www.vim.org/maillist.php#vim-dev
forwarded to the vim-dev mailing list. You can also send your patch there
directly (but please note, the initial posting is subject to moderation).
In that case an attachment with a unified diff format is preferred.
Information about the mailing list can be found [on the Vim website][0]
A pull request has the advantage that it will trigger the Continuous
Integration tests, you will be warned of problems (you can ignore the coverage
warning, it's noisy).
Please consider adding a test. All new functionality should be tested and bug
Please consider adding a test. All new functionality should be tested and bug
fixes should be tested for regressions: the test should fail before the fix and
pass after the fix. Look through recent patches for examples and find help
with ":help testing". The tests are located under "src/testdir".
pass after the fix. Look through recent patches for examples and find help
with ":help testing". The tests are located under "src/testdir".
Contributions will be distributed with Vim under the Vim license. Providing a
Contributions will be distributed with Vim under the Vim license. Providing a
change to be included implies that you agree with this and your contribution
does not cause us trouble with trademarks or patents. There is no CLA to sign.
does not cause us trouble with trademarks or patents. There is no CLA to sign.
## Signing-off commits
While not required, it's recommended to use **Signed-off commits** to ensure
transparency, accountability, and compliance with open-source best practices.
Signed-off commits follow the [Developer Certificate of Origin (DCO)][15],
which confirms that contributors have the right to submit their changes under
the project's license. This process adds a `Signed-off-by` line to commit
messages, verifying that the contributor agrees to the project's licensing
terms. To sign off a commit, simply use the -s flag when committing:
```sh
git commit -s
```
This ensures that every contribution is properly documented and traceable,
aligning with industry standards used in projects like the Linux Kernel or
the git project. By making Signed-off commits a standard practice, we help
maintain a legally compliant and well-governed codebase while fostering trust
within our contributor community.
When merging PRs into Vim, the current maintainer @chrisbra usually adds missing
`Signed-off-by` trailers for the author user name and email address as well for
anybody that explicitly *ACK*s a pull request as a statement that those
approvers are happy with that particular change.
# Reporting issues
We use GitHub issues, but that is not a requirement. Writing to the Vim
maillist is also fine.
We use GitHub issues, but that is not a requirement. Writing to the Vim
mailing list is also fine.
Please use the GitHub issues only for actual issues. If you are not 100% sure
that your problem is a Vim issue, please first discuss this on the Vim user
maillist. Try reproducing the problem without any of your plugins or settings:
mailing list. Try reproducing the problem without any of your plugins or settings:
vim --clean
If you report an issue, please describe exactly how to reproduce it.
For example, don't say "insert some text" but say what you did exactly:
"ahere is some text&lt;Esc&gt;".
`ahere is some text<Esc>`.
Ideally, the steps you list can be used to write a test to verify the problem
is fixed.
Feel free to report even the smallest problem, also typos in the documentation.
You can find known issues in the todo file: ":help todo".
Or open [the todo file] on GitHub to see the latest version.
[the todo file]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
You can find known issues in the todo file: `:help todo`.
Or open [the todo file][todo list] on GitHub to see the latest version.
# Syntax, indent and other runtime files
The latest version of these files can be obtained from the repository.
They are usually not updated with numbered patches.
They are usually not updated with numbered patches. However, they may
or may not work with older Vim releases (since they may contain new features).
If you find a problem with one of these files or have a suggestion for
improvement, please first try to contact the maintainer directly.
Look in the header of the file for the name and email address.
Look in the header of the file for the name, email address, github handle and/or
upstream repository. You may also check the [MAINTAINERS][11] file.
The maintainer will take care of issues and send updates to Bram for
The maintainer will take care of issues and send updates to the Vim project for
distribution with Vim.
If the maintainer does not respond, contact the vim-dev maillist.
If the maintainer does not respond, contact the [vim-dev][0] mailing list.
## Contributing new runtime files
If you want to contribute new runtime files for Vim or Neovim, please create a
PR with your changes against this repository here. For new filetypes, do not forget:
- to add a new [filetype test][12] (keep it similar to the other filetype tests).
- all configuration switches should be documented
(check [filetype.txt][13] and/or [syntax.txt][14] for filetype and syntax plugins)
- add yourself as Maintainer to the top of file (again, keep the header similar to
other runtime files)
- add yourself to the [MAINTAINERS][11] file.
# Translations
Translating messages and runtime files is very much appreciated! These things
Translating messages and runtime files is very much appreciated! These things
can be translated:
* Messages in Vim, see [src/po/README.txt][1]
Also used for the desktop icons.
* Menus, see [runtime/lang/README.txt][2]
* Vim tutor, see [runtime/tutor/README.txt][3]
* Manual pages, see [runtime/doc/\*.1][4] for examples
* Installer, see [nsis/lang/\*.nsi][5] for examples
- Messages in Vim, see [src/po/README.txt][1]
Also used for the desktop icons.
- Menus, see [runtime/lang/README.txt][2]
- Vim tutor, see [runtime/tutor/README.txt][3]
- Manual pages, see [runtime/doc/\*.1][4] for examples
- Installer, see [nsis/lang/README.txt][5]
The help files can be translated and made available separately.
See https://www.vim.org/translations.php for examples.
# How do I contribute to the project?
Please have a look at the following [discussion][6], which should give you some
ideas. Please also check the [develop.txt][7] helpfile for the recommended
coding style. Often it's also beneficial to check the surrounding code for the style
being used.
For the recommended documentation style, please check [helphelp.txt][16].
# I have a question
If you have some question on the style guide, please contact the [vim-dev][0]
mailing list. For other questions please use the [Vi Stack Exchange][8] website, the
[vim-use][9] mailing list or make use of the [discussion][10] feature here at github.
[todo list]: https://github.com/vim/vim/blob/master/runtime/doc/todo.txt
[0]: http://www.vim.org/maillist.php#vim-dev
[1]: https://github.com/vim/vim/blob/master/src/po/README.txt
[2]: https://github.com/vim/vim/blob/master/runtime/lang/README.txt
[3]: https://github.com/vim/vim/blob/master/runtime/tutor/README.txt
[4]: https://github.com/vim/vim/blob/master/runtime/doc/vim.1
[5]: https://github.com/vim/vim/blob/master/nsis/lang/english.nsi
[5]: https://github.com/vim/vim/blob/master/nsis/lang/README.txt
[6]: https://github.com/vim/vim/discussions/13087
[7]: https://github.com/vim/vim/blob/master/runtime/doc/develop.txt
[8]: https://vi.stackexchange.com
[9]: http://www.vim.org/maillist.php#vim-use
[10]: https://github.com/vim/vim/discussions
[11]: https://github.com/vim/vim/blob/master/.github/MAINTAINERS
[12]: https://github.com/vim/vim/blob/master/src/testdir/test_filetype.vim
[13]: https://github.com/vim/vim/blob/master/runtime/doc/filetype.txt
[14]: https://github.com/vim/vim/blob/master/runtime/doc/syntax.txt
[15]: https://en.wikipedia.org/wiki/Developer_Certificate_of_Origin
[16]: https://github.com/vim/vim/blob/master/runtime/doc/helphelp.txt

301
Filelist
View File

@ -1,26 +1,34 @@
# List of distributed Vim files.
# Used by Makefile.
# source files for all source archives
# Source files for all source archives.
SRC_ALL = \
.cirrus.yml \
.coveralls.yml \
.gitattributes \
.github/CODEOWNERS \
.git-blame-ignore-revs \
.github/MAINTAINERS \
.github/ISSUE_TEMPLATE/bug_report.yml \
.github/ISSUE_TEMPLATE/feature_request.md \
.github/workflows/ci.yml \
.github/workflows/codeql-analysis.yml \
.github/workflows/coverity.yml \
.github/actions/test_artifacts/action.yml \
.github/dependabot.yml \
.gitignore \
.hgignore \
.appveyor.yml \
.clang-format \
.codecov.yml \
.editorconfig \
ci/appveyor.bat \
ci/config.mk*.sed \
ci/if_ver*.vim \
ci/if_feat_check.vim \
ci/setup-xvfb.sh \
ci/setup-sway.sh \
ci/remove_snap.sh \
ci/ddebs.list \
ci/pinned-pkgs \
src/Make_all.mak \
src/README.md \
src/alloc.c \
@ -48,6 +56,7 @@ SRC_ALL = \
src/debugger.c \
src/dict.c \
src/diff.c \
src/linematch.c \
src/digraph.c \
src/drawline.c \
src/drawscreen.c \
@ -72,6 +81,7 @@ SRC_ALL = \
src/float.c \
src/fold.c \
src/getchar.c \
src/gc.c \
src/globals.h \
src/gui.c \
src/gui.h \
@ -141,6 +151,7 @@ SRC_ALL = \
src/strings.c \
src/structs.h \
src/syntax.c \
src/tabpanel.c \
src/tag.c \
src/term.c \
src/terminal.c \
@ -151,6 +162,7 @@ SRC_ALL = \
src/textobject.c \
src/textprop.c \
src/time.c \
src/tuple.c \
src/typval.c \
src/ui.c \
src/undo.c \
@ -172,51 +184,67 @@ SRC_ALL = \
src/winclip.c \
src/window.c \
src/xxd/xxd.c \
src/testdir/gen_opt_test.vim \
src/testdir/README.txt \
src/testdir/Make_all.mak \
src/testdir/*.in \
src/testdir/*.py \
src/testdir/keycode_check.vim \
src/testdir/Make_all.mak \
src/testdir/README.txt \
src/testdir/commondumps.vim \
src/testdir/crash/* \
src/testdir/dumps/*.dump \
src/testdir/dumps/*.vim \
src/testdir/keycode_check.json \
src/testdir/keycode_check.vim \
src/testdir/lsan-suppress.txt \
src/testdir/sautest/autoload/*.vim \
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
src/testdir/check.vim \
src/testdir/gui_init.vim \
src/testdir/gui_preinit.vim \
src/testdir/mouse.vim \
src/testdir/runtest.vim \
src/testdir/screendump.vim \
src/testdir/setup.vim \
src/testdir/setup_gui.vim \
src/testdir/shared.vim \
src/testdir/vim9.vim \
src/testdir/script_util.vim \
src/testdir/summarize.vim \
src/testdir/term_util.vim \
src/testdir/view_util.vim \
src/testdir/test[0-9]*.ok \
src/testdir/test77a.ok \
src/testdir/test77a.com \
src/testdir/test_*.vim \
src/testdir/python2/*.py \
src/testdir/python3/*.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/testdir/pythonx/*.py \
src/testdir/pythonx/topmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/__init__.py \
src/testdir/pythonx/topmodule/submodule/subsubmodule/subsubsubmodule.py \
src/testdir/python_after/*.py \
src/testdir/python_before/*.py \
src/testdir/pyxfile/*.py \
src/testdir/dumps/*.dump \
src/testdir/dumps/*.vim \
src/testdir/ru_RU/LC_MESSAGES/Makefile \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.po \
src/testdir/runtest.vim \
src/testdir/samples/*.html \
src/testdir/samples/*.txt \
src/testdir/samples/*.vim \
src/testdir/samples/evil.zip \
src/testdir/samples/evil.tar \
src/testdir/samples/poc.zip \
src/testdir/samples/sample.tar \
src/testdir/samples/test.zip \
src/testdir/samples/test000 \
src/testdir/color_ramp.vim \
src/testdir/samples/test_undo.txt.undo \
src/testdir/samples/testa.zip \
src/testdir/sautest/autoload/*.vim \
src/testdir/silent.wav \
src/testdir/popupbounce.vim \
src/testdir/test77a.com \
src/testdir/test77a.ok \
src/testdir/test[0-9]*.ok \
src/testdir/test_*.vim \
src/testdir/testluaplugin/lua/testluaplugin/*.lua \
src/testdir/util/check.vim \
src/testdir/util/color_ramp.vim \
src/testdir/util/gen_opt_test.vim \
src/testdir/util/gui_init.vim \
src/testdir/util/gui_preinit.vim \
src/testdir/util/mouse.vim \
src/testdir/util/popupbounce.vim \
src/testdir/util/screendump.vim \
src/testdir/util/script_util.vim \
src/testdir/util/setup.vim \
src/testdir/util/setup_gui.vim \
src/testdir/util/shared.vim \
src/testdir/util/summarize.vim \
src/testdir/util/term_util.vim \
src/testdir/util/view_util.vim \
src/testdir/util/vim9.vim \
src/testdir/util/window_manager.vim \
src/testdir/viewdumps.vim \
src/proto.h \
src/protodef.h \
src/proto/alloc.pro \
@ -261,6 +289,7 @@ SRC_ALL = \
src/proto/float.pro \
src/proto/fold.pro \
src/proto/getchar.pro \
src/proto/gc.pro \
src/proto/gui.pro \
src/proto/gui_beval.pro \
src/proto/hardcopy.pro \
@ -271,6 +300,7 @@ SRC_ALL = \
src/proto/insexpand.pro \
src/proto/job.pro \
src/proto/json.pro \
src/proto/linematch.pro \
src/proto/list.pro \
src/proto/locale.pro \
src/proto/logfile.pro \
@ -310,6 +340,7 @@ SRC_ALL = \
src/proto/spellsuggest.pro \
src/proto/strings.pro \
src/proto/syntax.pro \
src/proto/tabpanel.pro \
src/proto/tag.pro \
src/proto/term.pro \
src/proto/terminal.pro \
@ -319,6 +350,7 @@ SRC_ALL = \
src/proto/textobject.pro \
src/proto/textprop.pro \
src/proto/time.pro \
src/proto/tuple.pro \
src/proto/typval.pro \
src/proto/ui.pro \
src/proto/undo.pro \
@ -428,7 +460,7 @@ SRC_ALL = \
src/xdiff/xutils.h \
# source files for Unix only
# Source files for Unix-like only.
SRC_UNIX = \
Makefile \
Filelist \
@ -462,6 +494,12 @@ SRC_UNIX = \
src/gui_xmebwp.h \
src/gui_x11.c \
src/gui_x11_pm.h \
src/auto/wayland/README.txt \
src/auto/wayland/Makefile \
src/auto/wayland/protocols/ext-data-control-v1.xml \
src/auto/wayland/protocols/wlr-data-control-unstable-v1.xml \
src/auto/wayland/protocols/xdg-shell.xml \
src/auto/wayland/protocols/primary-selection-unstable-v1.xml \
src/if_xcmdsrv.c \
src/link.sh \
src/installman.sh \
@ -480,21 +518,24 @@ SRC_UNIX = \
src/proto/gui_motif.pro \
src/proto/gui_xmdlg.pro \
src/proto/gui_x11.pro \
src/proto/wayland.pro \
src/proto/if_xcmdsrv.pro \
src/proto/os_unix.pro \
src/proto/pty.pro \
src/pty.c \
src/testdir/Makefile \
src/testdir/unix.vim \
src/testdir/util/unix.vim \
src/toolcheck \
src/vim_icon.xbm \
src/vim_mask.xbm \
src/vimtutor \
src/gvimtutor \
src/wayland.c \
src/which.sh \
src/gen-wayland-protocols.sh \
src/xxd/Makefile \
# source files for both DOS and Unix
# Source files for both MS Windows and Unix-like.
SRC_DOS_UNIX = \
src/gui_xim.c \
src/if_cscope.c \
@ -520,7 +561,7 @@ SRC_DOS_UNIX = \
src/proto/if_tcl.pro \
src/typemap \
# source files for MS-Windows (also in the extra archive)
# Source files for MS Windows (also in the extra archive).
SRC_DOS = \
src/GvimExt/*.mak \
src/GvimExt/GvimExt.reg \
@ -577,7 +618,7 @@ SRC_DOS = \
src/testdir/Make_dos.mak \
src/testdir/Make_mvc.mak \
src/testdir/Make_ming.mak \
src/testdir/dos.vim \
src/testdir/util/dos.vim \
src/uninstall.c \
src/vim.rc \
src/vim.manifest \
@ -592,11 +633,14 @@ SRC_DOS = \
src/xxd/Make_mvc.mak \
nsis/gvim.nsi \
nsis/gvim_version.nsh \
nsis/Makefile \
nsis/Make_mvc.mak \
nsis/README.txt \
nsis/lang/*.nsi \
nsis/lang/README.txt \
uninstall.txt \
# source files for DOS without CR/LF translation (also in the extra archive)
# Source files for MS Windows without CR/LF translation (also in the extra archive).
SRC_DOS_BIN = \
src/tearoff.bmp \
src/tools.bmp \
@ -613,10 +657,10 @@ SRC_DOS_BIN = \
runtime/bitmaps/vim.ico \
nsis/icons.zip \
# source files for Amiga, DOS, etc. (also in the extra archive)
# Source files for Amiga, DOS, etc. (also in the extra archive).
SRC_AMI_DOS = \
# source files for Amiga (also in the extra archive)
# Source files for Amiga (also in the extra archive).
SRC_AMI = \
README_amisrc.txt \
README_amisrc.txt.info \
@ -627,10 +671,10 @@ SRC_AMI = \
src/os_amiga.h \
src/proto/os_amiga.pro \
src/testdir/Make_amiga.mak \
src/testdir/amiga.vim \
src/testdir/util/amiga.vim \
src/xxd/Make_amiga.mak \
# source files for Haiku (also in the extra archive)
# Source files for Haiku (also in the extra archive).
SRC_HAIKU = \
README_haiku.txt \
src/os_haiku.h \
@ -639,7 +683,7 @@ SRC_HAIKU = \
src/gui_haiku.h \
src/proto/gui_haiku.pro \
# source files for the Mac (also in the extra archive)
# Source files for the Mac (also in the extra archive).
SRC_MAC = \
src/INSTALLmac.txt \
src/os_mac.h \
@ -648,7 +692,7 @@ SRC_MAC = \
src/proto/os_mac_conv.pro \
src/proto/os_macosx.pro \
# source files for VMS (in the extra archive)
# Source files for VMS (in the extra archive).
SRC_VMS = \
src/INSTALLvms.txt \
src/Make_vms.mms \
@ -658,11 +702,11 @@ SRC_VMS = \
src/os_vms_mms.c \
src/proto/os_vms.pro \
src/testdir/Make_vms.mms \
src/testdir/vms.vim \
src/testdir/util/vms.vim \
src/xxd/Make_vms.mms \
vimtutor.com \
# source files for QNX (in the extra archive)
# Source files for QNX (in the extra archive).
SRC_QNX = \
src/os_qnx.c \
src/os_qnx.h \
@ -670,7 +714,7 @@ SRC_QNX = \
src/proto/gui_photon.pro \
src/proto/os_qnx.pro \
# source files for the extra archive (all sources that are not for Unix)
# Source files for the extra archive (all sources that are not for Unix).
SRC_EXTRA = \
$(SRC_AMI) \
$(SRC_AMI_DOS) \
@ -685,7 +729,7 @@ SRC_EXTRA = \
src/os_vms_fix.com \
src/toolbar.phi \
# runtime files for all distributions
# Runtime files for all distributions.
RT_ALL = \
README.txt \
README.md \
@ -697,6 +741,7 @@ RT_ALL = \
runtime/doc/*.pl \
runtime/doc/*.txt \
runtime/doc/Makefile \
runtime/doc/Make_all.mak \
runtime/doc/doctags.c \
runtime/doc/doctags.vim \
runtime/doc/test_urls.vim \
@ -747,29 +792,67 @@ RT_ALL = \
runtime/tools/README.txt \
runtime/tools/[a-z]*[a-z0-9] \
runtime/tutor/README.txt \
runtime/tutor/tutor \
runtime/tutor/tutor1 \
runtime/tutor/en/vim-01-beginner.tutor \
runtime/tutor/en/vim-01-beginner.tutor.json \
runtime/tutor/en/vim-02-beginner.tutor \
runtime/tutor/en/vim-02-beginner.tutor.json \
runtime/tutor/tutor.tutor \
runtime/tutor/tutor.tutor.json \
runtime/tutor/tutor.vim \
runtime/tutor/tutor2 \
runtime/vimrc_example.vim \
runtime/pack/dist/opt/cfilter/plugin/cfilter.vim \
runtime/pack/dist/opt/comment/plugin/comment.vim \
runtime/pack/dist/opt/comment/doc/comment.txt \
runtime/pack/dist/opt/comment/doc/tags \
runtime/pack/dist/opt/comment/autoload/comment.vim \
runtime/pack/dist/opt/dvorak/plugin/dvorak.vim \
runtime/pack/dist/opt/dvorak/dvorak/enable.vim \
runtime/pack/dist/opt/dvorak/dvorak/disable.vim \
runtime/pack/dist/opt/editexisting/plugin/editexisting.vim \
runtime/pack/dist/opt/editorconfig/.editorconfig \
runtime/pack/dist/opt/editorconfig/CONTRIBUTORS \
runtime/pack/dist/opt/editorconfig/LICENSE* \
runtime/pack/dist/opt/editorconfig/mkzip.sh \
runtime/pack/dist/opt/editorconfig/README.md \
runtime/pack/dist/opt/editorconfig/autoload/*.vim \
runtime/pack/dist/opt/editorconfig/autoload/editorconfig_core/*.vim \
runtime/pack/dist/opt/editorconfig/doc/tags \
runtime/pack/dist/opt/editorconfig/doc/editorconfig.txt \
runtime/pack/dist/opt/editorconfig/ftdetect/editorconfig.vim \
runtime/pack/dist/opt/editorconfig/plugin/editorconfig.vim \
runtime/pack/dist/opt/helptoc/autoload/helptoc.vim \
runtime/pack/dist/opt/helptoc/doc/helptoc.txt \
runtime/pack/dist/opt/helptoc/doc/tags \
runtime/pack/dist/opt/helptoc/plugin/helptoc.vim \
runtime/pack/dist/opt/hlyank/plugin/hlyank.vim \
runtime/pack/dist/opt/justify/plugin/justify.vim \
runtime/pack/dist/opt/matchit/plugin/matchit.vim \
runtime/pack/dist/opt/matchit/doc/matchit.txt \
runtime/pack/dist/opt/matchit/doc/tags \
runtime/pack/dist/opt/matchit/autoload/*.vim \
runtime/pack/dist/opt/nohlsearch/plugin/nohlsearch.vim \
runtime/pack/dist/opt/shellmenu/plugin/shellmenu.vim \
runtime/pack/dist/opt/swapmouse/plugin/swapmouse.vim \
runtime/pack/dist/opt/termdebug/plugin/termdebug.vim \
runtime/pack/dist/opt/netrw/LICENSE.txt \
runtime/pack/dist/opt/netrw/README.md \
runtime/pack/dist/opt/netrw/autoload/netrw.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/fs.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/os.vim \
runtime/pack/dist/opt/netrw/autoload/netrw/msg.vim \
runtime/pack/dist/opt/netrw/autoload/netrw_gitignore.vim \
runtime/pack/dist/opt/netrw/doc/netrw.txt \
runtime/pack/dist/opt/netrw/plugin/netrwPlugin.vim \
runtime/pack/dist/opt/netrw/syntax/netrw.vim
# runtime files for all distributions without CR-NL translation
# Runtime files for all distributions without CR/LF translation.
RT_ALL_BIN = \
runtime/doc/tags \
runtime/print/*.ps \
# runtime script files
# Runtime script files.
RT_SCRIPTS = \
runtime/filetype.vim \
runtime/scripts.vim \
@ -780,9 +863,10 @@ RT_SCRIPTS = \
runtime/makemenu.vim \
runtime/autoload/*.vim \
runtime/autoload/README.txt \
runtime/autoload/cargo/*.vim \
runtime/autoload/dist/*.vim \
runtime/autoload/rust/*.vim \
runtime/autoload/xml/*.vim \
runtime/autoload/zig/*.vim \
runtime/colors/*.vim \
runtime/colors/README.txt \
runtime/colors/lists/*.vim \
@ -796,6 +880,7 @@ RT_SCRIPTS = \
runtime/indent/testdir/*.vim \
runtime/indent/testdir/*.in \
runtime/indent/testdir/*.ok \
runtime/indent/testdir/tools/* \
runtime/ftplugin/*.vim \
runtime/ftplugin/logtalk.dict \
runtime/ftplugin/README.txt \
@ -803,15 +888,27 @@ RT_SCRIPTS = \
runtime/plugin/README.txt \
runtime/syntax/*.vim \
runtime/syntax/README.txt \
runtime/syntax/modula2/opt/*.vim \
runtime/syntax/shared/*.vim \
runtime/syntax/shared/README.txt \
runtime/syntax/Makefile \
runtime/syntax/testdir/README.txt \
runtime/syntax/testdir/runtest.vim \
runtime/syntax/testdir/viewdumps.vim \
runtime/syntax/testdir/ftplugin/*.* \
runtime/syntax/testdir/input/*.* \
runtime/syntax/testdir/input/selftestdir/* \
runtime/syntax/testdir/input/setup/*.* \
runtime/syntax/testdir/dumps/*.dump \
runtime/syntax/testdir/dumps/*.vim \
runtime/syntax/testdir/tools/* \
runtime/syntax/generator/Makefile \
runtime/syntax/generator/README.md \
runtime/syntax/generator/gen_syntax_vim.vim \
runtime/syntax/generator/update_date.vim \
runtime/syntax/generator/vim.vim.base \
# Unix runtime
# Unix-like runtime.
RT_UNIX = \
README_unix.txt \
runtime/hi16-action-make.png \
@ -819,7 +916,7 @@ RT_UNIX = \
runtime/gvim.desktop \
runtime/vim.desktop \
# Unix and DOS runtime without CR-LF translation
# Unix-like and MS Windows runtime without CR/LF translation.
RT_UNIX_DOS_BIN = \
runtime/vim16x16.gif \
runtime/vim16x16.png \
@ -831,10 +928,10 @@ RT_UNIX_DOS_BIN = \
runtime/vim48x48.png \
runtime/vim48x48.xpm \
# runtime not for unix or extra
# Runtime not for Unix-like or extra.
RT_NO_UNIX = \
# runtime for Amiga (also in the extra archive)
# Runtime for Amiga (also in the extra archive).
RT_AMI_DOS = \
runtime/doc/evim.man \
runtime/doc/vim.man \
@ -842,17 +939,21 @@ RT_AMI_DOS = \
runtime/doc/vimtutor.man \
runtime/doc/xxd.man \
# DOS runtime (also in the extra archive)
# MS Windows runtime (also in the extra archive).
RT_DOS = \
README_dos.txt \
runtime/doc/Make_mvc.mak \
runtime/indent/Make_mvc.mak \
runtime/lang/Make_mvc.mak \
vimtutor.bat \
# DOS runtime without CR-LF translation (also in the extra archive)
# MS Windows runtime without CR/LF translation (also in the extra archive).
RT_DOS_BIN = \
runtime/vimlogo.cdr \
runtime/vimlogo.eps \
runtime/vimlogo.gif \
runtime/vimlogo.pdf \
runtime/vimlogo.svg \
# Amiga runtime (also in the extra archive)
RT_AMI = \
@ -874,7 +975,7 @@ RT_AMI = \
runtime/tutor.info \
runtime/tutor/*.info \
# runtime files in extra archive
# Runtime files in extra archive.
RT_EXTRA = \
$(RT_AMI) \
$(RT_AMI_DOS) \
@ -882,46 +983,46 @@ RT_EXTRA = \
$(RT_DOS_BIN) \
README_mac.txt \
# included in all Amiga archives
# Included in all Amiga archives.
ROOT_AMI = \
Contents \
Contents.info \
runtime.info \
vimdir.info \
# root files for the extra archive
# Root files for the extra archive.
ROOT_EXTRA = \
$(ROOT_AMI) \
# files for Amiga small binary (also in extra archive)
# Files for Amiga small binary (also in extra archive).
BIN_AMI = \
README_amibin.txt \
README_amibin.txt.info \
Vim.info \
Xxd.info \
# files for DOS binary (also in extra archive)
# Files for MS Windows binary (also in extra archive).
BIN_DOS = \
README_bindos.txt \
uninstall.txt \
# files for Win32 OLE binary (also in extra archive)
# Files for Win32 OLE binary (also in extra archive).
BIN_OLE = \
README_ole.txt \
# files for Win32s binary (also in extra archive)
# Files for Win32s binary (also in extra archive).
BIN_W32S = \
README_w32s.txt \
# files for VMS binary (also in extra archive)
# Files for VMS binary (also in extra archive).
BIN_VMS = \
README_vms.txt \
# files for OS/2 binary (also in extra archive)
# Files for OS/2 binary (also in extra archive).
BIN_OS2 = \
README_os2.txt \
# binary files for extra archive
# Binary files for extra archive.
BIN_EXTRA = \
$(BIN_AMI) \
$(BIN_DOS) \
@ -930,7 +1031,7 @@ BIN_EXTRA = \
$(BIN_VMS) \
$(BIN_OS2) \
# all files for extra archive
# All files for extra archive.
EXTRA = \
$(BIN_EXTRA) \
$(ROOT_EXTRA) \
@ -939,7 +1040,7 @@ EXTRA = \
README_extra.txt \
runtime/vimlogo.xpm \
# files in READMEdir that are included from the top dir
# Files in READMEdir that are included from the top dir.
IN_README_DIR = \
README.txt.info \
README_ami.txt \
@ -951,6 +1052,7 @@ IN_README_DIR = \
README_bindos.txt \
README_dos.txt \
README_extra.txt \
README_haiku.txt \
README_mac.txt \
README_ole.txt \
README_os2.txt \
@ -958,6 +1060,7 @@ IN_README_DIR = \
README_src.txt \
README_srcdos.txt \
README_unix.txt \
README_vimlogo.txt \
README_vms.txt \
README_w32s.txt \
Contents \
@ -968,8 +1071,10 @@ IN_README_DIR = \
src.info \
vimdir.info \
# generic language files
# Generic language files.
LANG_GEN = \
lang/README.*.txt \
lang/LICENSE.*.txt \
runtime/doc/*-da.1 \
runtime/doc/*-da.UTF-8.1 \
runtime/doc/*-de.1 \
@ -987,24 +1092,25 @@ LANG_GEN = \
runtime/doc/*-tr.UTF-8.1 \
runtime/lang/README.txt \
runtime/lang/Makefile \
runtime/lang/Make_all.mak \
runtime/lang/menu_*.vim \
runtime/keymap/README.txt \
runtime/keymap/*.vim \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
runtime/tutor/tutor.utf-8 \
runtime/tutor/tutor.?? \
runtime/tutor/tutor.??.utf-8 \
runtime/tutor/tutor.??.euc \
runtime/tutor/tutor.??.sjis \
runtime/tutor/tutor.??.iso9 \
runtime/tutor/tutor.??.big5 \
runtime/tutor/tutor.??.cp1250 \
runtime/tutor/tutor.??.cp1251 \
runtime/tutor/tutor.??.cp737 \
runtime/tutor/tutor.??_??.utf-8 \
runtime/tutor/tutor.bar \
runtime/tutor/tutor.bar.utf-8 \
runtime/tutor/it/vim-01-beginner.tutor \
runtime/tutor/it/vim-01-beginner.tutor.json \
runtime/tutor/ru/vim-01-beginner.tutor \
runtime/tutor/ru/vim-01-beginner.tutor.json \
runtime/tutor/ru/vim-02-beginner.tutor \
runtime/tutor/ru/vim-02-beginner.tutor.json \
runtime/tutor/sr/vim-01-beginner.tutor \
runtime/tutor/sr/vim-01-beginner.tutor.json \
runtime/tutor/sr/vim-02-beginner.tutor \
runtime/tutor/sr/vim-02-beginner.tutor.json \
runtime/tutor/tutor1.?? \
runtime/tutor/tutor1.??_?? \
runtime/tutor/tutor1.bar \
runtime/tutor/tutor2.?? \
runtime/spell/README.txt \
runtime/spell/??/*.diff \
runtime/spell/??/main.aap \
@ -1019,7 +1125,7 @@ LANG_GEN = \
runtime/spell/main.aap \
runtime/spell/*.vim \
# generic language files, binary
# Generic language files, binary.
LANG_GEN_BIN = \
runtime/spell/README_en.txt \
runtime/spell/en.ascii.spl \
@ -1029,7 +1135,7 @@ LANG_GEN_BIN = \
runtime/spell/en.latin1.sug \
runtime/spell/en.utf-8.sug \
# all files for lang archive
# All files for lang archive.
LANG_SRC = \
src/po/README.txt \
src/po/README_mingw.txt \
@ -1046,10 +1152,27 @@ LANG_SRC = \
src/po/vim.desktop.in \
src/po/gvim.desktop.in \
src/po/sjiscorr.c \
src/po/big5corr.c \
src/po/*.po \
src/po/vim.pot \
# the language files for the Win32 lang archive
# The language files for the Win32 lang archive.
LANG_DOS = \
src/po/*.mo \
# Files in the repository that are deliberately not listed above, and will thus
# be excluded from distribution tarballs and the like.
# This excludes them from the CI check for unlisted files.
IGNORE = \
.appveyor.yml \
.github/FUNDING.yml \
.github/labeler.yml \
.github/workflows/label.yml \
SECURITY.md \
ci/unlisted.make \
ci/hlgroups.make \
ci/hlgroups.ignore \
src/libvterm/CODE-MAP \
runtime/syntax/testdir/input/html_html \
# vim: set ft=make:

View File

@ -40,7 +40,7 @@ all install uninstall tools config configure reconfig proto depend lint tags typ
@echo "If there are problems, cd to the src directory and run make there"
cd src && $(MAKE) $@
@# When the target is "test" also run the indent and syntax tests.
@if test "$@" = "test"; then \
@if test "$@" = "test" -o "$@" = "testtiny"; then \
$(MAKE) indenttest; \
$(MAKE) syntaxtest; \
fi
@ -56,11 +56,15 @@ VIM_FOR_INDENTTEST = ../../src/vim
indenttest:
cd runtime/indent && \
$(MAKE) clean && \
$(MAKE) test VIM="$(VIM_FOR_INDENTTEST)"
$(MAKE) test VIMPROG="$(VIM_FOR_INDENTTEST)"
# Executable used for running the syntax tests.
VIM_FOR_SYNTAXTEST = ../../src/vim
# (For local testing only with GNU Make.)
VIM_SYNTAX_TEST_FILTER =
VIM_SYNTAX_TEST_WAIT_TIME =
syntaxtest:
cd runtime/syntax && \
$(MAKE) clean && \
@ -94,7 +98,7 @@ syntaxtest:
# Before creating an archive first delete all backup files, *.orig, etc.
MAJOR = 9
MINOR = 0
MINOR = 1
# CHECKLIST for creating a new version:
#
@ -111,6 +115,7 @@ MINOR = 0
# - With these features: "make depend" (works best with gcc).
# - If you have a lint program: "make lint" and check the output (ignore GTK
# warnings).
# - compile release versions using -DNDEBUG to disable assert()s
# - If you have valgrind, enable it in src/testdir/Makefile and run "make
# test". Enable EXITFREE, disable GUI, scheme and tcl to avoid false alarms.
# Check the valgrind output.
@ -153,17 +158,17 @@ MINOR = 0
# - > make dossrc
# > make dosrt
# Unpack dist/vim##rt.zip and dist/vim##src.zip on an MS-Windows PC.
# This creates the directory vim/vim90 and puts all files in there.
# This creates the directory vim/vim91 and puts all files in there.
# Win32 console version build:
# - See src/INSTALLpc.txt for installing the compiler and SDK.
# - Set environment for Visual C++ 2015:
# > cd src
# > msvc2015.bat
# > msvc-latest.bat
# - Build the console binary:
# > nmake -f Make_mvc.mak
# > nmake.exe -f Make_mvc.mak
# - Run the tests and check the output:
# > nmake -f Make_mvc.mak testclean
# > nmake -f Make_mvc.mak test
# > nmake.exe -f Make_mvc.mak testclean
# > nmake.exe -f Make_mvc.mak test
# - Rename (using ../tools/rename.bat):
# vim.exe to vimw32.exe
# tee/tee.exe to teew32.exe
@ -173,10 +178,10 @@ MINOR = 0
# uninstall.exe to uninstallw32.exe
# Win32 GUI version build:
# - > cd src
# > nmake -f Make_mvc.mak GUI=yes
# > nmake.exe -f Make_mvc.mak "GUI=yes"
# - Run the tests and check the output:
# > nmake -f Make_mvc.mak testclean
# > nmake -f Make_mvc.mak testgvim
# > nmake.exe -f Make_mvc.mak testclean
# > nmake.exe -f Make_mvc.mak testgvim
# - move "gvim.exe" to here (otherwise the OLE version will overwrite it).
# - Move gvim.pdb to here.
# - Copy "GvimExt/gvimext.dll" to here.
@ -188,8 +193,8 @@ MINOR = 0
# > cd src
# > bigvim.bat
# - Run the tests:
# > nmake -f Make_mvc.mak testclean
# > nmake -f Make_mvc.mak testgvim
# > nmake.exe -f Make_mvc.mak testclean
# > nmake.exe -f Make_mvc.mak testgvim
# - check the output.
# - Rename "gvim.exe" to "gvim_ole.exe".
# - Rename gvim.pdb to "gvim_ole.pdb".
@ -209,13 +214,13 @@ MINOR = 0
# gvimext64.dll in src/GvimExt
# gvimext64.dll can be obtained from:
# https://github.com/vim/vim-win32-installer/releases
# It is part of gvim_9.0.*_x64.zip as vim/vim90/GvimExt/gvimext64.dll.
# It is part of gvim_9.1.*_x64.zip as vim/vim91/GvimExt/gvimext64.dll.
# - Make sure there is a diff.exe two levels up (get it from a previous Vim
# version). Also put winpty32.dll and winpty-agent.exe there.
# - go to ../nsis and do:
# > unzip icons.zip
# > makensis gvim.nsi (takes a few minutes).
# ignore warning for libwinpthread-1.dll
# > nmake.exe -f Make_mvc.mak all
# (takes a few minutes).
# See nsis/README.txt for details.
# - Copy gvim##.exe to the dist directory.
#
# 64 bit builds (these are not in the normal distribution, the 32 bit build
@ -223,9 +228,9 @@ MINOR = 0
# Like the console and GUI version, but first run vcvars64.bat or
# "..\VC\vcvarsall.bat x86_amd64".
# - Build the console version:
# > nmake -f Make_mvc.mak
# > nmake.exe -f Make_mvc.mak
# - Build the GUI version:
# > nmake -f Make_mvc.mak GUI=yes
# > nmake.exe -f Make_mvc.mak "GUI=yes"
# - Build the OLE version with interfaces:
# > bigvim64.bat
#
@ -249,9 +254,6 @@ VERSION = $(MAJOR)$(MINOR)
VDOT = $(MAJOR).$(MINOR)
VIMRTDIR = vim$(VERSION)
# Vim used for conversion from "unix" to "dos"
VIM = vim
# How to include Filelist depends on the version of "make" you have.
# If the current choice doesn't work, try the other one.
@ -266,8 +268,8 @@ dist:
# Clean up some files to avoid they are included.
# Copy README files to the top directory.
prepare:
if test -f runtime/doc/uganda.nsis.txt; then \
rm runtime/doc/uganda.nsis.txt; fi
if test -f lang/LICENSE.nsis.txt; then \
rm -f lang/LICENSE*.nsis.txt; fi
for name in $(IN_README_DIR); do \
cp READMEdir/"$$name" .; \
done
@ -288,10 +290,10 @@ dist/$(COMMENT_RT): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) runtime files for MS-DOS and MS-Windows" > dist/$(COMMENT_RT)
dist/$(COMMENT_W32): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows NT/95" > dist/$(COMMENT_W32)
echo "Vim - Vi IMproved - v$(VDOT) binaries for MS-Windows" > dist/$(COMMENT_W32)
dist/$(COMMENT_GVIM): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows NT/95" > dist/$(COMMENT_GVIM)
echo "Vim - Vi IMproved - v$(VDOT) GUI binaries for MS-Windows" > dist/$(COMMENT_GVIM)
dist/$(COMMENT_OLE): dist/comment
echo "Vim - Vi IMproved - v$(VDOT) MS-Windows GUI binaries with OLE support" > dist/$(COMMENT_OLE)
@ -407,13 +409,8 @@ amisrc: dist prepare
gzip -9 dist/vim$(VERSION)src.tar
mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
no_title.vim: Makefile
echo "set notitle noicon nocp nomodeline viminfo=" >no_title.vim
# MS-DOS sources
dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
runtime/doc/uganda.nsis.txt \
nsis/gvim_version.nsh
dossrc: dist dist/$(COMMENT_SRC) license nsis/gvim_version.nsh
-rm -rf dist/vim$(VERSION)src.zip
-rm -rf dist/vim
mkdir dist/vim
@ -424,25 +421,19 @@ dossrc: dist no_title.vim dist/$(COMMENT_SRC) \
$(SRC_DOS_BIN) \
$(SRC_AMI_DOS) \
$(SRC_DOS_UNIX) \
runtime/doc/uganda.nsis.txt \
lang/LICENSE.*.txt \
lang/README.*.txt \
nsis/gvim_version.nsh \
| (cd dist/vim/$(VIMRTDIR); tar xf -)
mv dist/vim/$(VIMRTDIR)/runtime/* dist/vim/$(VIMRTDIR)
rmdir dist/vim/$(VIMRTDIR)/runtime
# This file needs to be in dos fileformat for NSIS.
$(VIM) -e -X -u no_title.vim -c ":set tx|wq" dist/vim/$(VIMRTDIR)/doc/uganda.nsis.txt
cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.txt
cd runtime/doc && $(MAKE) uganda.nsis.txt
license:
cd nsis && $(MAKE) -f Makefile $@
nsis/gvim_version.nsh: Makefile
echo "# Generated from Makefile: define the version numbers" > $@
echo "!ifndef __GVIM_VER__NSH__" >> $@
echo "!define __GVIM_VER__NSH__" >> $@
echo "!define VER_MAJOR $(MAJOR)" >> $@
echo "!define VER_MINOR $(MINOR)" >> $@
echo "!endif" >> $@
cd nsis && $(MAKE) -f Makefile $(@F)
dosrt: dist dist/$(COMMENT_RT) dosrt_files
-rm -rf dist/vim$(VERSION)rt.zip
@ -450,7 +441,7 @@ dosrt: dist dist/$(COMMENT_RT) dosrt_files
# Split in two parts to avoid an "argument list too long" error.
# We no longer convert the files from unix to dos fileformat.
dosrt_files: dist prepare no_title.vim
dosrt_files: dist prepare
-rm -rf dist/vim
mkdir dist/vim
mkdir dist/vim/$(VIMRTDIR)
@ -506,7 +497,7 @@ dosbin: prepare dosbin_gvim dosbin_w32 dosbin_ole $(DOSBIN_S)
-rm $(IN_README_DIR)
# make Win32 gvim
dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
dosbin_gvim: dist dist/$(COMMENT_GVIM)
-rm -rf dist/gvim$(VERSION).zip
-rm -rf dist/vim
mkdir dist/vim
@ -528,7 +519,7 @@ dosbin_gvim: dist no_title.vim dist/$(COMMENT_GVIM)
cp gvim.pdb dist/gvim$(VERSION).pdb
# make Win32 console
dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
dosbin_w32: dist dist/$(COMMENT_W32)
-rm -rf dist/vim$(VERSION)w32.zip
-rm -rf dist/vim
mkdir dist/vim
@ -545,7 +536,7 @@ dosbin_w32: dist no_title.vim dist/$(COMMENT_W32)
cp vimw32.pdb dist/vim$(VERSION)w32.pdb
# make Win32 gvim with OLE
dosbin_ole: dist no_title.vim dist/$(COMMENT_OLE)
dosbin_ole: dist dist/$(COMMENT_OLE)
-rm -rf dist/gvim$(VERSION)ole.zip
-rm -rf dist/vim
mkdir dist/vim

View File

@ -18,7 +18,7 @@ or one of the [Maillists](https://www.vim.org/community.php).
## What is Vim?
Vim is a greatly improved version of the good old UNIX editor
[Vi](https://en.wikipedia.org/wiki/Vi). Many new
[Vi](https://en.wikipedia.org/wiki/Vi_(text_editor)). Many new
features have been added: multi-level undo, syntax highlighting, command line
history, on-line help, spell checking, filename completion, block operations,
script language, etc. There is also a Graphical User Interface (GUI)
@ -32,6 +32,10 @@ All commands are given with normal keyboard characters, so those who can type
with ten fingers can work very fast. Additionally, function keys can be
mapped to commands by the user, and the mouse can be used.
Vim also aims to provide a (mostly) POSIX-compatible vi implementation, when
compiled with a minimal feature set (typically called vim.tiny), which is used
by many Linux distributions as the default vi editor.
Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all
flavours of UNIX. Porting to other systems should not be very difficult.
Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,
@ -55,7 +59,7 @@ an overview of currently available distributions.
Some popular places to get the latest Vim:
* Check out the git repository from [GitHub](https://github.com/vim/vim).
* Get the source code as an [archive](https://github.com/vim/vim/releases).
* Get the source code as an [archive](https://github.com/vim/vim/tags).
* Get a Windows executable from the
[vim-win32-installer](https://github.com/vim/vim-win32-installer/releases) repository.
@ -109,12 +113,12 @@ distribute it.
## Sponsoring
Fixing bugs and adding new features takes a lot of time and effort. To show
your appreciation for the work and motivate Bram and others to continue
working on Vim please send a donation.
your appreciation for the work and motivate developers to continue working on
Vim please send a donation.
Since Bram is back to a paid job the money will now be used to help children
in Uganda. See [`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But
at the same time donations increase Bram's motivation to keep working on Vim!
The money you donated will be mainly used to help children in Uganda. See
[`runtime/doc/uganda.txt`](./runtime/doc/uganda.txt). But at the same time
donations increase the development team motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
https://www.vim.org/sponsor/
@ -126,7 +130,7 @@ If you would like to help make Vim better, see the
## Information
If you are on macOS, you can use [Macvim](https://macvim-dev.github.io/macvim/).
If you are on macOS, you can use [MacVim](https://macvim.org).
The latest news about Vim can be found on the Vim home page:
https://www.vim.org/
@ -150,4 +154,4 @@ Most of Vim was created by Bram Moolenaar `<Bram@vim.org>`
Send any other comments, patches, flowers and suggestions to the vim-dev mailing list:
`<vim-dev@vim.org>`
This is `README.md` for version 9.0 of Vim: Vi IMproved.
This is `README.md` for version 9.1 of Vim: Vi IMproved.

View File

@ -1,4 +1,4 @@
README.txt for version 9.0 of Vim: Vi IMproved.
README.txt for version 9.1 of Vim: Vi IMproved.
WHAT IS VIM?
@ -6,16 +6,19 @@ WHAT IS VIM?
Vim is a greatly improved version of the good old UNIX editor Vi. Many new
features have been added: multi-level undo, syntax highlighting, command line
history, on-line help, spell checking, filename completion, block operations,
script language, etc. There is also a Graphical User Interface (GUI)
available. Still, Vi compatibility is maintained, those who have Vi "in the
fingers" will feel at home. See "runtime/doc/vi_diff.txt" for differences with
Vi.
script language, etc. There is also a Graphical User Interface (GUI) available.
Still, Vi compatibility is maintained, those who have Vi "in the fingers" will
feel at home. See "runtime/doc/vi_diff.txt" for differences with Vi.
This editor is very useful for editing programs and other plain text files.
All commands are given with normal keyboard characters, so those who can type
with ten fingers can work very fast. Additionally, function keys can be
mapped to commands by the user, and the mouse can be used.
Vim also aims to provide a (mostly) POSIX-compatible vi implementation, when
compiled with a minimal feature set (typically called vim.tiny), which is used
by many Linux distributions as the default vi editor.
Vim runs under MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS and almost all
flavours of UNIX. Porting to other systems should not be very difficult.
Older versions of Vim run on MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,
@ -38,7 +41,7 @@ an overview of currently available distributions.
Some popular places to get the latest Vim:
* Check out the git repository from github: https://github.com/vim/vim.
* Get the source code as an archive: https://github.com/vim/vim/releases.
* Get the source code as an archive: https://github.com/vim/vim/tags.
* Get a Windows executable from the vim-win32-installer repository:
https://github.com/vim/vim-win32-installer/releases.
@ -60,9 +63,10 @@ README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS and MS-Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
There are more README_*.txt files, depending on the distribution you used.
There are other README_*.txt files, depending on the distribution you used.
DOCUMENTATION
@ -71,9 +75,9 @@ The Vim tutor is a one hour training course for beginners. Often it can be
started as "vimtutor". See ":help tutor" for more information.
The best is to use ":help" in Vim. If you don't have an executable yet, read
"runtime/doc/help.txt". It contains pointers to the other documentation
files. The User Manual reads like a book and is recommended to learn to use
Vim. See ":help user-manual".
"runtime/doc/help.txt". It contains pointers to the other documentation files.
The User Manual reads like a book and is recommended to learn to use Vim. See
":help user-manual".
COPYING
@ -92,15 +96,14 @@ distribute it.
SPONSORING
Fixing bugs and adding new features takes a lot of time and effort. To show
your appreciation for the work and motivate Bram and others to continue
working on Vim please send a donation.
your appreciation for the work and motivate developers to continue working on
Vim please send a donation.
Since Bram is back to a paid job the money will now be used to help children
in Uganda. See runtime/doc/uganda.txt. But at the same time donations
increase Bram's motivation to keep working on Vim!
The money you donated will be mainly used to help children in Uganda. See
"runtime/doc/uganda.txt". But at the same time donations increase the
development team motivation to keep working on Vim!
For the most recent information about sponsoring look on the Vim web site:
https://www.vim.org/sponsor/
@ -111,6 +114,8 @@ If you would like to help make Vim better, see the CONTRIBUTING.md file.
INFORMATION
If you are on macOS, you can use MacVim: https://macvim.org
The latest news about Vim can be found on the Vim home page:
https://www.vim.org/
@ -118,8 +123,8 @@ If you have problems, have a look at the Vim documentation or tips:
https://www.vim.org/docs.php
https://vim.fandom.com/wiki/Vim_Tips_Wiki
If you still have problems or any other questions, use one of the mailing
lists to discuss them with Vim users and developers:
If you still have problems or any other questions, use one of the mailing lists
to discuss them with Vim users and developers:
https://www.vim.org/maillist.php
If nothing else works, report bugs directly to the vim-dev mailing list:
@ -128,8 +133,7 @@ If nothing else works, report bugs directly to the vim-dev mailing list:
MAIN AUTHOR
Most of Vim was created by Bram Moolenaar <Bram@vim.org> |Bram-Moolenaar|
Most of Vim was created by Bram Moolenaar <Bram@vim.org>, ":help Bram-Moolenaar"
Send any other comments, patches, flowers and suggestions to the vim-dev mailing list:
<vim-dev@vim.org>
Send any other comments, patches, flowers and suggestions to the vim-dev
mailing list: <vim-dev@vim.org>

View File

@ -9,15 +9,15 @@ Vim Vi IMproved. A clone of the UNIX text editor Vi. Very useful
messages, shows current file name in window title, on-line
help, rectangular cut/paste, etc., etc., etc...
Version 9.0. Also runs under UNIX, MS-Windows, Mac, etc.
vim90rt.tgz contains the documentation and syntax files.
vim90bin.tgz contains the binaries.
vim90src.tgz contains the sources.
Version 9.1. Also runs under UNIX, MS-Windows, Mac, etc.
vim91rt.tgz contains the documentation and syntax files.
vim91bin.tgz contains the binaries.
vim91src.tgz contains the sources.
Author: Bram Moolenaar et al.
Xxd Hex dumper and reader. Can be used to view files as hex, edit
them and write them back. Can also be used to patch files.
Version 2022 Jan 14
Version 2023 Oct 25
Author: Juergen Weigert

View File

@ -1,4 +1,4 @@
README_ami.txt for version 9.0 of Vim: Vi IMproved.
README_ami.txt for version 9.1 of Vim: Vi IMproved.
This file explains the installation of Vim on Amiga systems.
See README.txt for general information about Vim.
@ -16,8 +16,8 @@ easily upgrade to a new version. For example:
You would then unpack the archives like this:
cd dh0:editors
tar xf t:vim90bin.tar
tar xf t:vim90rt.tar
tar xf t:vim91bin.tar
tar xf t:vim91rt.tar
Set the $VIM environment variable to point to the top directory of your Vim
files. For the above example:

View File

@ -1,8 +1,8 @@
README_amibin.txt for version 9.0 of Vim: Vi IMproved.
README_amibin.txt for version 9.1 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
These files are in the runtime archive (vim90rt.tgz).
These files are in the runtime archive (vim91rt.tgz).
The Amiga "bin" archive contains the Vim executable for the Amiga. It was

View File

@ -1,8 +1,8 @@
README_amisrc.txt for version 9.0 of Vim: Vi IMproved.
README_amisrc.txt for version 9.1 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_ami.txt" for installation instructions for the Amiga.
These files are in the runtime archive (vim90rt.tgz).
These files are in the runtime archive (vim91rt.tgz).
The Amiga source archive contains the files needed to compile Vim on the

View File

@ -1,16 +1,16 @@
README_bindos.txt for version 9.0 of Vim: Vi IMproved.
README_bindos.txt for version 9.1 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-DOS and MS-Windows.
These files are in the runtime archive (vim90rt.zip).
These files are in the runtime archive (vim91rt.zip).
There are several binary distributions of Vim for the PC. You would normally
pick only one of them, but it's also possible to install several.
These ones are available (the version number may differ):
vim90w32.zip Windows 95/98/NT/etc. console version
gvim90.zip Windows 95/98/NT/etc. GUI version
gvim90ole.zip Windows 95/98/NT/etc. GUI version with OLE
vim91w32.zip Windows console version
gvim91.zip Windows GUI version
gvim91ole.zip Windows GUI version with OLE
You MUST also get the runtime archive (vim90rt.zip).
The sources are also available (vim90src.zip).
You MUST also get the runtime archive (vim91rt.zip).
The sources are also available (vim91src.zip).

View File

@ -1,4 +1,4 @@
README_dos.txt for version 9.0 of Vim: Vi IMproved.
README_dos.txt for version 9.1 of Vim: Vi IMproved.
This file explains the installation of Vim on MS-Windows systems.
See "README.txt" for general information about Vim.
@ -41,19 +41,19 @@ These are the normal steps to install Vim from the .zip archives:
located. Check the $VIM setting to see where it points to:
set VIM
For example, if you have
C:\vim\vim90
C:\vim\vim91
do
cd C:\
Binary and runtime Vim archives are normally unpacked in the same location,
on top of each other.
2. Unpack the zip archives. This will create a new directory "vim\vim90",
2. Unpack the zip archives. This will create a new directory "vim\vim91",
in which all the distributed Vim files are placed. Since the directory
name includes the version number, it is unlikely that you overwrite
existing files.
Examples:
pkunzip -d gvim90.zip
unzip vim90w32.zip
pkunzip -d gvim91.zip
unzip vim91w32.zip
You need to unpack the runtime archive and at least one of the binary
archives. When using more than one binary version, be careful not to
@ -65,7 +65,7 @@ These are the normal steps to install Vim from the .zip archives:
won't move or copy the runtime files.
3. Change to the new directory:
cd vim\vim90
cd vim\vim91
Run the "install.exe" program. It will ask you a number of questions about
how you would like to have your Vim setup. Among these are:
- You can tell it to write a "_vimrc" file with your preferences in the
@ -76,8 +76,8 @@ These are the normal steps to install Vim from the .zip archives:
console or in a shell. You can select one of the directories in your
$PATH. If you skip this, you can add Vim to the search path manually:
The simplest is to add a line to your autoexec.bat. Examples:
set path=%path%;C:\vim\vim90
set path=%path%;D:\editors\vim\vim90
set path=%path%;C:\vim\vim91
set path=%path%;D:\editors\vim\vim91
- Create entries for Vim on the desktop and in the Start menu.
That's it!
@ -89,8 +89,8 @@ Remarks:
won't show a menubar. Then you need to set the $VIM environment variable to
point to the top directory of your Vim files. Example:
set VIM=C:\editors\vim
Vim version 9.0 will look for your vimrc file in $VIM, and for the runtime
files in $VIM/vim90. See ":help $VIM" for more information.
Vim version 9.1 will look for your vimrc file in $VIM, and for the runtime
files in $VIM/vim91. See ":help $VIM" for more information.
- To avoid confusion between distributed files of different versions and your
own modified vim scripts, it is recommended to use this directory layout:
@ -101,14 +101,14 @@ Remarks:
C:\vim\vimfiles\ftplugin\*.vim Filetype plugins
C:\vim\... Other files you made.
Distributed files:
C:\vim\vim90\vim.exe The Vim version 9.0 executable.
C:\vim\vim90\doc\*.txt The version 9.0 documentation files.
C:\vim\vim90\bugreport.vim A Vim version 9.0 script.
C:\vim\vim90\... Other version 9.0 distributed files.
C:\vim\vim91\vim.exe The Vim version 9.1 executable.
C:\vim\vim91\doc\*.txt The version 9.1 documentation files.
C:\vim\vim91\bugreport.vim A Vim version 9.1 script.
C:\vim\vim91\... Other version 9.1 distributed files.
In this case the $VIM environment variable would be set like this:
set VIM=C:\vim
Then $VIMRUNTIME will automatically be set to "$VIM\vim90". Don't add
"vim90" to $VIM, that won't work.
Then $VIMRUNTIME will automatically be set to "$VIM\vim91". Don't add
"vim91" to $VIM, that won't work.
- You can put your Vim executable anywhere else. If the executable is not
with the other Vim files, you should set $VIM. The simplest is to add a line
@ -120,30 +120,6 @@ Remarks:
entry, you can remove it by running the "uninstall.exe". See
":help win32-popup-menu".
- In Windows 95/98/NT you can create a shortcut to Vim. This works for all
DOS and Win32 console versions. For the console version this gives you the
opportunity to set defaults for the Console where Vim runs in.
1. On the desktop, click right to get a menu. Select New/Shortcut.
2. In the dialog, enter Command line: "C:\command.com". Click "Next".
3. Enter any name. Click "Finish".
The new shortcut will appear on the desktop.
4. With the mouse pointer on the new shortcut, click right to get a menu.
Select Properties.
5. In the Program tab, change the "Cmdline" to add "/c" and the name of the
Vim executable. Examples:
C:\command.com /c C:\vim\vim90\vim.exe
C:\command.com /c D:\editors\vim\vim90\vim.exe
6. Select the font, window size, etc. that you like. If this isn't
possible, select "Advanced" in the Program tab, and deselect "MS-DOS
mode".
7. Click OK.
For gvim, you can use a normal shortcut on the desktop, and set the size of
the Window in your $VIM/_gvimrc:
set lines=30 columns=90
For further information, type one of these inside Vim:
:help dos
:help win32

View File

@ -1,4 +1,4 @@
README_extra.txt for version 9.0 of Vim: Vi IMproved.
README_extra.txt for version 9.1 of Vim: Vi IMproved.
These extra files of Vim are for special purposes. This README explains what
the files are for. For general information about Vim, see the "README.txt"
@ -27,7 +27,7 @@ src/gui_w32.* Files for the Win32 GUI.
src/gui_w48.* Files for the Win32 and Win16 GUI.
src/Make_mvc.mak MS Visual C++ makefile for the Win32 GUI.
src/if_ole.* OLE automation interface, for MS Windows 95 and NT.
src/if_ole.* OLE automation interface, for MS Windows.
src/GvimExt/* DLL for the "Edit with Vim" context menu entry

View File

@ -1,4 +1,4 @@
README_haiku.txt for version 9.0 of Vim: Vi IMproved.
README_haiku.txt for version 9.1 of Vim: Vi IMproved.
This file explains the installation of Vim on Haiku operating system.
See "README.txt" for general information about Vim.

View File

@ -1,4 +1,4 @@
README_mac.txt for version 9.0 of Vim: Vi IMproved.
README_mac.txt for version 9.1 of Vim: Vi IMproved.
This file explains the installation of Vim on MacOS systems.
See "README.txt" for general information about Vim.

View File

@ -1,9 +1,9 @@
README_ole.txt for version 9.0 of Vim: Vi IMproved.
README_ole.txt for version 9.1 of Vim: Vi IMproved.
This archive contains gvim.exe with OLE interface.
This version of gvim.exe can also load a number of interface dynamically (you
can optionally install the .dll files for each interface).
It is only for MS-Windows 95/98/ME/NT/2000/XP.
It is only for MS-Windows.
Also see the README_bindos.txt, README_dos.txt and README.txt files.

View File

@ -1,4 +1,4 @@
README_os2.txt for version 9.0 of Vim: Vi IMproved.
README_os2.txt for version 9.1 of Vim: Vi IMproved.
This file used to explain the installation of Vim on OS/2 systems.
However, support for OS/2 has been removed in patch 7.4.1008.

View File

@ -1,4 +1,4 @@
README_os390.txt for version 9.0 of Vim: Vi IMproved.
README_os390.txt for version 9.1 of Vim: Vi IMproved.
This readme explains how to build Vim on z/OS. Formerly called OS/390.
See "README.txt" for general information about Vim.
@ -46,7 +46,7 @@ Change to the vim directory and do:
$ export CC=cc
$ export _CC_CCMODE=1
$./configure --with-features=big --without-x --enable-gui=no
$./configure --with-features=normal --without-x --enable-gui=no
$ cd src
$ make

View File

@ -1,8 +1,8 @@
README_src.txt for version 9.0 of Vim: Vi IMproved.
README_src.txt for version 9.1 of Vim: Vi IMproved.
The source archive contains the files needed to compile Vim on Unix systems.
It is packed for Unix systems (NL line separator).
For more information, see the README.txt file that comes with the runtime
archive (vim-9.0-rt.tar.gz). To be able to run Vim you MUST get the runtime
archive (vim-9.1-rt.tar.gz). To be able to run Vim you MUST get the runtime
archive too!

View File

@ -1,8 +1,8 @@
README_srcdos.txt for version 9.0 of Vim: Vi IMproved.
README_srcdos.txt for version 9.1 of Vim: Vi IMproved.
See "README.txt" for general information about Vim.
See "README_dos.txt" for installation instructions for MS-Windows.
These files are in the runtime archive (vim90rt.zip).
These files are in the runtime archive (vim91rt.zip).
The DOS source archive contains the files needed to compile Vim on MS-Windows.

View File

@ -1,4 +1,4 @@
README_unix.txt for version 9.0 of Vim: Vi IMproved.
README_unix.txt for version 9.1 of Vim: Vi IMproved.
This file explains the installation of Vim on Unix systems.
See "README.txt" for general information about Vim.

View File

@ -0,0 +1,11 @@
The Python project that creates `vimlogo.svg` can be found at
`https://github.com/ShayHill/vimlogo`. The Vim license applies.
`vimlogo.svg` is an effort to remove errors and inadvertent inconsistencies
from the original vim logo while maintaining the original design. `vimlogo.svg`
is based on the `vimlogo.svg` file (previously?) found at
`https://www.vim.org/logos.php`
As of 2024 Jan 30, `vimlogo.svg` is a separate project from `vimlogo.cdr`,
`vimlogo.eps`, `vimlogo.gif`, `vimlogo.pdf`, and `vimlogo.xpm`, all of which
are slightly different from each other.

View File

@ -1,4 +1,4 @@
README_vms.txt for version 9.0 of Vim: Vi IMproved.
README_vms.txt for version 9.1 of Vim: Vi IMproved.
This file explains the installation of Vim on VMS systems.
See "README.txt" in the runtime archive for information about Vim.
@ -19,14 +19,16 @@ src/INSTALLvms.txt.
To use the binary version, you need one of these archives:
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
vim-XX-exe-ia64-term.zip IA64 console executables
vim-XX-exe-x86-gui.zip X86_64 GUI/Motif executables
vim-XX-exe-x86-term.zip X86_64 console executables
vim-XX-exe-ia64-gui.zip IA64 GUI/Motif executables
vim-XX-exe-ia64-gtk.zip IA64 GUI/GTK executables
vim-XX-exe-ia64-term.zip IA64 console executables
vim-XX-exe-axp-gui.zip Alpha GUI/Motif executables
vim-XX-exe-axp-gtk.zip Alpha GUI/GTK executables
vim-XX-exe-axp-term.zip Alpha console executables
vim-XX-exe-axp-term.zip Alpha console executables
vim-XX-exe-vax-gui.zip VAX GUI executables
vim-XX-exe-vax-term.zip VAX console executables
vim-XX-exe-vax-term.zip VAX console executables
and of course
vim-XX-runtime.zip runtime files
@ -34,6 +36,8 @@ and of course
The binary archives contain: vim.exe, ctags.exe, xxd.exe files,
but there are also prepared "deploy ready" archives:
vim-XX-x86.zip GUI and console executables with runtime and
help files for X86_64 systems
vim-XX-ia64.zip GUI and console executables with runtime and
help files for IA64 systems
vim-XX-axp.zip GUI and console executables with runtime and

View File

@ -1,4 +1,4 @@
README_w32s.txt for version 9.0 of Vim: Vi IMproved.
README_w32s.txt for version 9.1 of Vim: Vi IMproved.
This file used to explain the installation of Vim on MS-Windows 3.1 and 3.11
systems. However, support for MS-Windows 3.1 and 3.11 has been removed in

View File

@ -2,7 +2,9 @@
## Reporting a vulnerability
If you want to report a security issue, please use [huntr.dev](https://huntr.dev/bounties/disclose?target=https%3A%2F%2Fgithub.com%2Fvim%2Fvim) to privately disclose the issue to us.
They also have rewards in the form of money, swag and CVEs.
If you want to report a security issue, please privately disclose the issue to the vim-security mailing list
vim-security@googlegroups.com
This is a private list, read only by the maintainers, but anybody can post, after moderation.
**Please don't publicly disclose the issue until it has been addressed by us.**

View File

@ -1,15 +1,20 @@
@echo off
:: Batch file for building/testing Vim on AppVeyor
set target=%1
set "GETTEXT_PATH=c:\gettext64\bin"
setlocal ENABLEDELAYEDEXPANSION
cd %APPVEYOR_BUILD_FOLDER%
:: Python3
set PYTHON3_VER=311
set PYTHON3_RELEASE=3.11.1
set PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe
set PYTHON3_DIR=C:\python%PYTHON3_VER%-x64
set "PYTHON3_VER=311"
set "PYTHON3_RELEASE=3.11.1"
set "PYTHON3_URL=https://www.python.org/ftp/python/%PYTHON3_RELEASE%/python-%PYTHON3_RELEASE%-amd64.exe"
set "PYTHON3_DIR=C:\python%PYTHON3_VER%-x64"
:: Gettext-tools, iconv and libraries
set "GETTEXT64_URL=https://github.com/mlocati/gettext-iconv-windows/releases/download/v0.21-v1.16/gettext0.21-iconv1.16-shared-64.zip"
set "GETTEXT64_DIR=c:\gettext64"
set "VSWHERE=%ProgramFiles(x86)%\Microsoft Visual Studio\Installer\vswhere.exe"
@ -43,6 +48,18 @@ if not exist %PYTHON3_DIR% (
AssociateFiles=0 Shortcuts=0 Include_doc=0 Include_launcher=0 ^
InstallLauncherAllUsers=0
)
:: GETTEXT
if not exist %GETTEXT64_DIR% (
mkdir %GETTEXT64_DIR%
call :downloadfile %GETTEXT64_URL% downloads\gettext64.zip
cmd /c powershell.exe -NoLogo -NoProfile -Command ^
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'; ^
[System.IO.Compression.ZipFile]::ExtractToDirectory^('downloads\gettext64.zip', ^
'%GETTEXT64_DIR%'^)
copy /y %GETTEXT64_DIR%\bin\libintl-8.dll C:\projects\vim\src\ || exit 1
copy /y %GETTEXT64_DIR%\bin\libiconv-2.dll C:\projects\vim\src\ || exit 1
)
@echo off
goto :eof
@ -54,7 +71,7 @@ cd src
echo "Building MSVC 64bit console Version"
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=no IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
if not exist vim.exe (
echo Build failure.
exit 1
@ -68,11 +85,11 @@ if "%FEATURE%" == "HUGE" (
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no POSTSCRIPT=yes ^
PYTHON_VER=27 DYNAMIC_PYTHON=yes PYTHON=C:\Python27-x64 ^
PYTHON3_VER=%PYTHON3_VER% DYNAMIC_PYTHON3=yes PYTHON3=%PYTHON3_DIR% ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
) ELSE (
nmake -f Make_mvc.mak CPU=AMD64 ^
OLE=no GUI=yes IME=yes ICONV=yes DEBUG=no ^
FEATURES=%FEATURE%
FEATURES=%FEATURE% CI_CFLAGS=/we4267
)
if not exist gvim.exe (
echo Build failure.
@ -92,7 +109,7 @@ goto :eof
@echo on
cd src/testdir
:: Testing with MSVC gvim
path %PYTHON3_DIR%;%PATH%
path %PYTHON3_DIR%;%GETTEXT_PATH%;%PATH%
nmake -f Make_mvc.mak VIMPROG=..\gvim
nmake -f Make_mvc.mak clean
:: Testing with MSVC console version

View File

@ -1,3 +1,3 @@
# Clang 12 (or Apple clang 13) and later makes a warning '-Wcompound-token-split-by-macro' enable by default.
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro -Wno-compound-token-split-by-macro/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=compound-token-split-by-macro/

View File

@ -1,3 +1,3 @@
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Werror -Wno-deprecated-declarations/
/^CFLAGS[[:blank:]]*=/s/$/ -Wall -Wextra -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Werror -Wno-deprecated-declarations/
/^PERL_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-function -Wno-shadow/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter/
/^RUBY_CFLAGS_EXTRA[[:blank:]]*=/s/$/ -Wno-error=unused-parameter -Wno-strict-prototypes/

3
ci/ddebs.list Normal file
View File

@ -0,0 +1,3 @@
deb http://ddebs.ubuntu.com noble main restricted universe multiverse
deb http://ddebs.ubuntu.com noble-updates main restricted universe multiverse
deb http://ddebs.ubuntu.com noble-proposed main restricted universe multiverse

66
ci/hlgroups.ignore Normal file
View File

@ -0,0 +1,66 @@
ColorColumn
ComplMatchIns
Conceal
Cursor
CursorColumn
CursorIM
CursorLine
CursorLineNr
debugBreakpoint
debugPC
DiffAdd
DiffChange
DiffDelete
DiffText
Directory
ErrorMsg
FoldColumn
Folded
Ignore
IncSearch
lCursor
LineNr
LineNrAbove
LineNrBelow
MatchParen
Menu
ModeMsg
MoreMsg
MsgArea
NonText
Normal
Pmenu
PmenuSbar
PmenuSel
PmenuThumb
Question
Scrollbar
Search
SignColumn
SpecialKey
SpellBad
SpellCap
SpellLocal
SpellRare
StatusLine
StatusLineNC
StatusLineTerm
StatusLineTermNC
TabLine
TabLineFill
TabLineSel
Terminal
Title
TOhtmlProgress
TOhtml-progress-color
ToolbarButton
ToolbarLine
Tooltip
User1
User1..9
User9
VertSplit
Visual
VisualNOS
WarningMsg
WildMenu

18
ci/hlgroups.make Normal file
View File

@ -0,0 +1,18 @@
# vim: ft=make
SHELL = /bin/bash
# Default target to actually run the comparison:
.PHONY: check
.INTERMEDIATE: hlgroups deflinks hlgroups.stripped
check: hlgroups.stripped deflinks
diff hlgroups.stripped deflinks
hlgroups:
grep '\*hl-' ../runtime/doc/*txt | sed -E -e 's/.*:<?\s*//' -e 's/hl-//g' -e 's/\*//g' -e 's/ /\n/g' | sort > hlgroups
deflinks: ../src/highlight.c
grep '"default link' $< | sed 's/.*default link\s*\(.*\)\s.*/\1/' | sort > deflinks
hlgroups.stripped: hlgroups.ignore hlgroups
grep -v -x -F -f hlgroups.ignore hlgroups > hlgroups.stripped

15
ci/if_feat_check.vim Normal file
View File

@ -0,0 +1,15 @@
if 1 " This prevents it from being run in tiny versions
" Check for required features
if exists("g:required")
for feature in g:required
if !has(feature)
echo "Error: Feature '" .. feature .. "' not found"
echo ''
cquit
endif
endfor
echo "\nChecked features: " .. string(g:required)
echo ''
endif
endif
" vim: sts=2 sw=2 et

View File

@ -1,6 +1,6 @@
" Print all interface versions for Ubuntu. Part 1.
" Print all interface versions. Part 1.
if 1
if 1 " This prevents it from being run in tiny versions
execute 'source' expand('<sfile>:h') .. '/if_ver-cmd.vim'
echo "*** Interface versions ***\n"

View File

@ -1,6 +1,8 @@
" Print py3 interface versions for Ubuntu. Part 2.
" Print py3 interface versions. Part 2.
" This is done separately from part 1 because Vim cannot concurrently load
" Python 2 and 3 together.
if 1
if 1 " This prevents it from being run in tiny versions
execute 'source' expand('<sfile>:h') .. '/if_ver-cmd.vim'
echo 'Python 3:'

69
ci/pinned-pkgs Normal file
View File

@ -0,0 +1,69 @@
# Unfortunately ubtunu does not keep the debug packages strictly up-to-date
# with the main packages. So this file needs to pin the main packages back to
# the version for which debug packages are available.
Package: libwayland-client0
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-client0
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-cursor0
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-cursor0
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-egl1
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-egl1
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-dev
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-dev
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-server0
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-server0
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
Package: libwayland-bin
Pin: version 1.20.0-1
Pin-Priority: 1000
Package: libwayland-bin
Pin: version 1.20.0-1ubuntu0.1
Pin-Priority: 100
# As of 2025-04-27 the base library package libgtk-3-0t64 is still at 3.24.41-4ubuntu1.2
Package: libgtk-3-0t64-dbgsym
Pin: version 3.24.41-4ubuntu1.2
Pin-Priority: 1000
Package: libgtk-3-0t64-dbgsym
Pin: version 3.24.41-4ubuntu1.3
Pin-Priority: 100
# As of 2025-04-27 the base binary package libgtk-3-bin is still at 3.24.41-4ubuntu1.2
Package: libgtk-3-bin-dbgsym
Pin: version 3.24.41-4ubuntu1.2
Pin-Priority: 1000
Package: libgtk-3-bin-dbgsym
Pin: version 3.24.41-4ubuntu1.3
Pin-Priority: 100

13
ci/remove_snap.sh Normal file
View File

@ -0,0 +1,13 @@
#!/usr/bin/env sh
pushd /etc/apt/preferences.d/
cat > nosnap.pref <<EOF
# To prevent repository packages from triggering the installation of snap,
# this file forbids snapd from being installed by APT.
Package: snapd
Pin: release a=*
Pin-Priority: -10
EOF
popd
snap remove --purge $(snap list | awk '!/^Name|^core/ {print $1}')
apt-get purge -y snapd

49
ci/unlisted.make Normal file
View File

@ -0,0 +1,49 @@
# vim: ft=make
SHELL = /bin/bash
# List all files that are tracked in git but not listed in Filelist.
# Exit code is 2 ("Make encountered an error") if any such files exist.
# Filelist is a Makefile that defines many variables, so we use Make itself to
# query which variables it defines, then expand them all by wrapping each name
# in $(...), importing Filelist and using $(eval).
include Filelist
$(eval all_patterns := $(shell \
make -f Filelist --question --print-data-base --no-builtin-rules \
--no-builtin-variables 2>/dev/null \
| sed -nre \
'/^# makefile .from \x27Filelist\x27,/ { \
n; \
s/ = .*//; \
T; \
s/.*/$$(\0)/; \
p; \
}'))
# In Makefile's `prepare` target, all the IN_README_DIR files are moved from
# READMEdir to the root, so add those files in their Git-tracked location:
all_patterns := $(all_patterns) \
$(foreach readme, $(IN_README_DIR), READMEdir/$(readme))
# The result 'all_patterns' is a list of patterns (globs), which we expand with
# wildcard to get actual filenames. Note this means Filelist can list a file
# that does not exist, and it will be omitted at this step.
listed_files := $(wildcard $(all_patterns))
# Default target to actually run the comparison:
.PHONY: check
check:
@# There are too many files to list on the command line, so we write
@# that to a temporary file, one per line.
$(file > Filelist-listed-files)
$(foreach filename, $(listed_files),\
$(file >> Filelist-listed-files,$(filename)))
@# Compare the sorted lists. Delete that temporary file on both
@# success and failure, but exit with diff's exit code.
diff -u0 --label files-in-git <(git ls-files | sort) \
--label Filelist <(sort --unique Filelist-listed-files); \
RV=$$?; \
rm Filelist-listed-files; \
(($$RV != 0)) && echo "Add files to the right variable in Filelist."; \
exit $$RV

99
lang/LICENSE.it.txt Normal file
View File

@ -0,0 +1,99 @@
LICENZA VIM
Nota: Agli effetti legali ha valore non la seguente traduzione italiana, ma
l'originale inglese su cui è basata. È alla versione inglese che si fa
riferimento qui sotto quando si parla di "questa licenza" (NdT).
I) Non ci sono restrizioni alla distribuzione di copie non modificate di Vim,
alla condizione che esse includano il testo di questa licenza. Si possono
anche distribuire parti non modificate di Vim, sempre senza restrizioni,
alla condizione che esse includano il testo di questa licenza. È anche
consentito includere programmi eseguibili da voi preparati a partire dai
file sorgenti Vim non modificati, più i vostri esempi di utilizzo e i
vostri script Vim.
II) È consentito distribuire una versione modificata (o estesa) di Vim,
contenente programmi eseguibile e/o codice sorgente, quando siano
rispettare le seguenti quattro condizioni:
1) Il testo di questa licenza deve essere incluso senza modifiche.
2) La versione modificata di Vim dev'essere distribuita in una della
seguenti cinque maniere:
a) Se voi personalmente modificate a Vim, dovete descrivere
chiaramente nella distribuzione come è possibile mettersi in
contatto con voi. Quando il manutentore vi chiede (in qualsiasi
forma) una copia della versione modificata di Vim da voi
distribuita, dovete rendere disponibili le vostre modifiche,
compreso il codice sorgente, al manutentore, senza alcuna spesa.
Il manutentore si riserva il diritto di includere le vostre
modifiche nella versione ufficiale di Vim. Quel che il manutentore
potrà fare con le vostre modifiche e sotto quale licenza esse
verranno distribuite può essere oggetto di negoziazione. Se non c'è
stata alcuna negoziazione, questa licenza, o una versione successiva
della stessa è anche applicabile alle vostre modifiche.
I manutentori correnti sono elencati qui:
https://github.com/orgs/vim/people.
Se dovessero cambiare, ne sarò dato annuncio nei luoghi appropriati
(verosimilmente vim.sf.net, www.vim.org e/o comp.editors). Quando
sia completamente impossibile contattare il manutentore, l'obbligo
di spedirgli le vostre modifiche viene meno. Una volta che il
manutentore abbia confermato di aver ricevuto le vostre modifiche,
non sarà necessario spedirle ulteriormente.
b) Se avete ricevuto un Vim modificato che era stato distribuito come
descritto al punto a) potete ulteriormente distribuirlo senza
modificarlo, come menzionato al punto I). Se fate ulteriori
modifiche, il testo al punto a) si applica a queste modifiche.
c) Includete tutte le modifiche, compreso il codice sorgente, con ogni
copia del Vim modificato da voi distribuito. Questo può essere
fatto sotto forma dell'output di un comando "diff", che contenga
anche il contesto [ossia anche le linee non modificate di sorgente
che vengono prima o dopo le modifiche - NdT]. Potete scegliere
quale licenza volete utilizzare per il nuovo codice sorgente che voi
aggiungere. Le modifiche e la relativa licenza non devono impedire
a terze parti di apportare le loro proprie modifiche a Vim.
d) Quando avete un Vim modificato che comprende modifiche quali quelle
menzionate al punto c), potete distribuirlo senza il codice sorgente
che descrive le modifiche, se le seguenti tre condizioni sono
soddisfatte:
- La licenza applicabile alle modifiche vi consente di distribuire
le modifiche al manutentore Vim senza alcun costo o restrizione, e
permette al manutentore Vim di includere le modifiche nella
versione ufficiale di Vim senza alcun costo o restrizione.
- Le modifiche da voi fatte sono conservate per almeno tre anni,
dopo che avrete distribuito per l'ultima volta il Vim modificato
corrispondente alle modifiche stesse. Quando il manutentore o
qualcuno a cui voi avete distribuito il Vim modificato vi chiede
(in qualsiasi forma) le modifiche, entro il periodo qui indicato,
dovete fargliele avere.
- Dovete descrivere chiaramente nella distribuzione come è possibile
mettersi in contatto con voi. Questa informazione di contatto
deve rimanere valida per almeno tre anni dopo l'ultima data di
distribuzione della corrispondente modifica di Vim, oppure il più
a lungo possibile.
e) Quando al GNU General Public License (GPL) si applica alle
modifiche, potete distribuire il Vim modificato sotto la versione 2
della licenza GNU GPL versione 2 o una qualsiasi versione successiva
della stessa licenza.
3) Un messaggio deve essere aggiunto, almeno all'output del comando
":version" e nella schermata introduttiva, in modo che l'utilizzatore
del Vim modificato sia in grado di comprendere cosa è stato modificato.
Quando si distribuisca come menzionato al punto 2)e) l'aggiunta del
messaggio è richiesta solo se ciò non conduca a conflitti con la
licenza usata per le modifiche.
4) L'informazione di contatto, richiesta ai punto 2)a) e 2)d) non deve
essere rimossa o modificata, tranne che per il fatto che la persona
stessa può apportare delle correzioni.
III) Se distribuite una versione modificata di Vim, siete incoraggiati a
utilizzare la licenza Vim per le vostre modifiche, e a mettere le
modifiche a disposizione del manutentore, compreso il codice sorgente.
Il modo preferito in cui fare questo è tramite e-mail o caricando
i file su un server ed inviandone l'indirizzo (URL) tramite e-mail.
Se il numero di modifiche è piccolo (per esempio, una modifica a un
Makefile) inviare tramite email l'output del comando diff con contesto
può essere sufficiente. L'indirizzo e-mail da utilizzare è
<maintainer@vim.org>
IV) Non è consentito rimuovere questa licenza dalla distribuzione dei codici
sorgente Vim, anche in parte, o da una versione di Vim modificata.
Potete usare questa licenza per precedenti versioni di Vim, invece della
licenza con cui esse sono state distribuite, a vostra scelta.

81
lang/LICENSE.pt_br.txt Normal file
View File

@ -0,0 +1,81 @@
LICENÇA DO VIM
I) Não há restrições para distribuir cópias não modificadas do Vim, exceto
que elas devem incluir este texto de licença. Você também pode distribuir
partes não modificadas do Vim, igualmente irrestritas, exceto que elas
devem incluir este texto de licença. Você também tem permissão para incluir
executáveis que você fez a partir das fontes não modificadas do Vim, além
de seus próprios exemplos de uso e scripts do Vim.
II) É permitido distribuir uma versão modificada (ou estendida) do Vim,
incluindo executáveis e/ou código-fonte, quando as quatro
condições a seguir forem atendidas:
1) Este texto de licença deve ser incluído sem modificações.
2) O Vim modificado deve ser distribuído de uma das cinco formas a seguir:
a) Se você fizer alterações no Vim, deverá descrever claramente na
distribuição como entrar em contato com você. Quando o mantenedor
solicitar a você (de qualquer forma) uma cópia do Vim modificado que
você distribuiu, você deverá disponibilizar suas alterações,
incluindo o código-fonte, ao mantenedor sem taxa. O mantenedor
reserva o direito de incluir suas alterações na versão oficial
do Vim. O que o mantenedor fará com suas alterações e sob qual
licença elas serão distribuídas é negociável. Se não houve negociação
então esta licença, ou uma versão posterior, também se aplica às suas
alterações. Os mantenedores atuais estão listados aqui:
https://github.com/orgs/vim/people. Se isso mudar, será anunciado em
lugares apropriados (provavelmente vim.sf.net, www.vim.org e/ou
comp.editors). Quando for completamente impossível contatar o
mantenedor, a obrigação de enviar a ele suas alterações cessa.
Uma vez que o mantenedor tenha confirmado que ele recebeu suas
alterações, elas não precisarão ser enviadas novamente.
b) Se você recebeu um Vim modificado que foi distribuído como
mencionado em a), você tem permissão para distribuí-lo sem
modificações, como mencionado em I). Se você fizer alterações
adicionais, o texto em a) se aplica a essas alterações.
c) Forneça todas as alterações, incluindo o código-fonte, com cada cópia
do Vim modificado que você distribuir. Isso pode ser feito na forma
de um diff de contexto. Você pode escolher qual licença usar para o
novo código que você adicionar. As alterações e sua licença não devem
restringir outros de fazer suas próprias alterações na versão oficial
do Vim.
d) Quando você tem um Vim modificado que inclui alterações conforme
mencionado em c), você pode distribuí-lo sem o código-fonte para as
alterações se as três condições a seguir forem atendidas:
- A licença que se aplica às alterações permite que você distribua
as alterações para o mantenedor do Vim sem taxa ou restrição, e
permite que o mantenedor do Vim inclua as alterações na
versão oficial do Vim sem taxa ou restrição.
- Você mantém as alterações por pelo menos três anos após a última
distribuição do Vim modificado correspondente. Quando o mantenedor
ou alguém para quem você distribuiu o Vim modificado solicitar a
você (de qualquer forma) as alterações dentro deste período, você
deve disponibilizá-las a ele.
- Você descreve claramente na distribuição como entrar em contato
com você. Estas informações de contato devem permanecer válidas por
pelo menos três anos após a última distribuição do Vim modificado
correspondente, ou pelo maior tempo possível.
e) Quando a Licença Pública Geral GNU (GPL) se aplica às alterações,
você pode distribuir o Vim modificado sob a GNU GPL versão 2 ou
qualquer versão posterior.
3) Uma mensagem deve ser adicionada, no mínimo na saída do comando
":version" e na tela de introdução, de modo que o usuário do Vim
modificado seja capaz de ver que ele foi modificado. Ao distribuir
conforme mencionado em 2)e), só é necessário adicionar a mensagem
na medida em que isso não entre em conflito com a licença usada para
as alterações.
4) As informações de contato conforme exigido em 2)a) e 2)d) não devem ser
removidas ou alteradas, exceto que a própria pessoa pode fazer
correções.
III) Se você distribuir uma versão modificada do Vim, encorajamos que use
a licença do Vim para suas alterações e disponibilizá-las ao
mantenedor, incluindo o código-fonte. A maneira preferida de fazer isso é
por e-mail ou enviando os arquivos para um servidor e enviando a URL por
e-mail. Se o número de alterações for pequeno (por exemplo, um Makefile
modificado), enviar um diff de contexto por e-mail será suficiente.
O endereço de e-mail a ser usado é <maintainer@vim.org>
IV) Não é permitido remover esta licença da distribuição das fontes do Vim,
partes dela ou de uma versão modificada. Você pode usar esta licença
para versões anteriores do Vim em vez da licença com a qual elas vieram,
a seu critério.

109
lang/LICENSE.ru.txt Normal file
View File

@ -0,0 +1,109 @@
ЛИЦЕНЗИЯ VIM
I) Неизменённые копии программы Vim могут распространяться без ограничения
при условии включения данного текста лицензии. Распространение
неизменённых копий отдельных частей программы Vim также возможно
при соблюдении условия о включении данного текста лицензии. Подобным
образом разрешается добавлять исполняемые файлы, скомпилированные
из неизменённого исходного кода программы Vim, а также собственные
примеры использования и командные файлы редактора Vim.
II) Изменённую (или дополненную) версию программы Vim, включающую
исполняемые файлы и/или исходный код, допускается распространять
при соблюдении следующих четырёх условий:
1) Текст настоящей лицензии должен включаться в состав распространяемой
версии программы Vim без изменений.
2) Изменённая версия программы Vim должна распространяться одним
из следующих пяти способов:
a) При внесении изменений в программу Vim, в дистрибутиве должны
быть явно указаны контактные данные лица, внёсшего эти изменения.
Ответственному разработчику по его запросу (в любой форме) должна
быть безвозмездно предоставлена копия распространяемой изменённой
версии программы Vim, включая её исходный код. Ответственный
разработчик оставляет за собой право включать сделанные изменения
в официальную версию программы Vim. Конкретные действия
ответственного разработчика, относительно переданных изменений,
а также лицензионные условия, на основании которых будет
осуществляться их распространение, могут быть дополнительно
согласованы. Если согласование не проводилось, сделанные изменения
будут распространяться на условиях настоящей лицензии или более
поздней её версии. Лица, в данное время являющиеся ответственными
за разработку, указаны в перечне, размещённом по адресу:
https://github.com/orgs/vim/people. В случае изменения этой
информации, актуальные данные будут опубликованы на
соответствующих ресурсах (вероятнее всего по интернет‐адресам
vim.sf.net, www.vim.org и/или comp.editors). В случае полной
невозможности установить контакт с ответственным разработчиком,
обязательства по отправке изменений утрачивают силу. После
передачи подтверждения о получении изменений от ответственного
разработчика, необходимость в повторной отправке копии изменённой
программы Vim неприменима.
b) Если лицом получена изменённая версия программа Vim,
распространяющаяся на условиях, указанных в ч. II) п. 2) пп. а)
допускается дальнейшее её распространение этим лицом без внесения
изменений и согласно ч. I) настоящей лицензии. В случае внесения
дополнительных изменений, на эти изменения будут распространяться
условия, указанные в ч. II) п. 2) пп. a).
c) Каждая копия распространяемой изменённой версии программы Vim
должна включать информацию обо всех произведённых изменениях,
включая исходный код. Эта информация может быть представлена
в виде построчного сравнения файлов. Выбор лицензии, по условиям
которой будет распространяться добавленный код, остаётся
за автором этих изменений. Изменения и лицензия на эти изменения
не должны запрещать другим лицам внесение своих собственных
изменений в официальную версию программы Vim.
d) Изменённая версия программы Vim, содержащая изменения в
соответствии с ч. II) п. 2 пп. c), может распространяться без
исходного кода для этих изменений, при соблюдении следующих трёх
условий:
- Лицензия, применяемая к внесённым изменениям, предоставляет
ответственному разработчику программы Vim возможность
безвозмездного и неограниченного распространения этих изменений,
а также право на безвозмездное и неограниченное включение этих
изменений в официальную версию программы Vim.
- Изменения должны сохраняться не менее трёх лет со времени
распространения соответствующей изменённой версии программы Vim.
В течение этого периода по запросу ответственного разработчика
или другого пользователя изменённой версии программы Vim
(в любой форме) необходимо предоставить исходный код данных
изменений.
- В дистрибутиве изменённой версии программы Vim должны быть явно
указаны контактные данные лица, внёсшего эти изменения.
Контактные данные должны сохранять актуальность в течение
не менее трёх лет со времени последнего распространения
соответствующей изменённой версии программы Vim или как можно
дольше.
e) Если к изменениям, внесённым в программу Vim, применимы условия
лицензии GNU General Public License (GNU GPL), допускается
распространение изменённой версия программы Vim на условиях
лицензии GNU GPL версии 2 или любой более поздней версии этой
лицензии.
3) Необходимо добавить соответствующую информацию, которая должна быть
выведена в результате выполнения команды ":version" в программе Vim,
а также на экране приветствия программы Vim, чтобы пользователь
изменённой версии программы Vim имел возможность определить,
что он пользуется изменённой версией. При распространении
на условиях, указанных в ч. II) п. 2) пп. e) такую информацию
требуется добавлять только в том случае, когда она не противоречит
лицензии, распространяющейся на эти изменения.
4) Контактная информация, которая указывается по требованию ч. II) п. 2)
пп. a) и ч. II) п. 2) пп. d) не должна удаляться или изменяться никем
другим, кроме лица, указавшего данную контактную информацию.
III) При распространении изменённой версии программы Vim рекомендуется
пользоваться лицензией Vim для произведённых изменений и обеспечить
доступ к этим изменениям ответственного разработчика, включая исходный
код изменений. Предпочтительным способом предоставления доступа
к произведённым изменениям является отправка этих изменений через
электронную почту или размещение файлов на сервер с отправкой
URL-адреса по электронной почте. Если количество изменений
незначительно (например, изменения в файле Makefile), достаточно будет
отправить через электронную почту файл построчного сравнения. Изменения
или URL-адреса должны быть направлены на адрес электронной почты
maintainer@vim.org
IV) Не допускается удаление настоящей лицензия из дистрибутива исходного
кода программы Vim, его отдельных частей или изменённой версии.
Допускается использование настоящей лицензию для предыдущих
изменённых выпусков программы Vim, взамен тех лицензий, с которыми
они распространялись.

167
lang/README.it.txt Normal file
View File

@ -0,0 +1,167 @@
README.txt per la versione 9.1 di Vim: VI Migliorato.
COS'È VIM?
Vim è una versione migliorata del classico programma di videoscrittura UNIX
Vi. Molte nuove funzionalità sono state aggiunte: la possibilità di avere
multipli annullamenti di comando, l'evidenziazione sintattica, una storia dei
comandi immessi, file di aiuto facilmente consultabili, controlli ortografici,
completamento di nomi di file, operazioni su blocchi di dati, un linguaggio di
script, etc. È anche disponibile una versione grafica (GUI). Tuttavia è
possibile lavorare come se si stesse usando il Vi "classico". Chi avesse Vi
"sulle dita" si troverà a suo agio. Vedere il file "runtime/doc/vi_diff.txt"
[in inglese] per dettagli sulle differenze di Vim rispetto a Vi.
Questo editor è molto utile per modificare programmi e altri file di testo.
Tutti i comandi sono immessi usando i tasti presenti sulla tastiera, in modo
che chi è in grado di digitare usando tutte e dieci le dita può lavorare molto
velocemente. Inoltre, i tasti funzione possono essere mappati per inserire
comandi dell'utente, ed è possibile usare il mouse.
Vim è disponibile in ambiente MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS e
in quasi tutte le varianti di Unix. L'adattamento a nuovi sistemi operativi
non dovrebbe essere molto difficile.
Precedenti versioni di Vim funzionano in ambiente MS-DOS, MS-Windows
95/98/Me/NT/2000/XP/Vista, Amiga DOS, Atari MiNT, BeOS, RISC OS e OS/2.
Tali versioni non sono più supportate.
DISTRIBUZIONE
Spesso è possibile usare il vostro Gestore applicazioni preferito per
installare Vim. Negli ambienti Mac e Linux una versione base di Vim è inclusa
nel sistema operativo, ma può ancora essere necessario installare Vim se si
desiderano funzionalità ulteriori.
Ci sono distribuzioni separate di Vim per gli ambienti Unix, PC, Amiga e per
qualche altro sistema operativo. Questo file README.txt è contenuto nelle
directory che contengono i file usati da Vim in fase di esecuzione. Nelle
stesse directory sono presente la documentazione, i file usati per
l'evidenziazione sintattica e altri file usati da Vim in fase di esecuzione.
Per installare Vim occorre ottenere un archivio che contiene solo i file
eseguibili, o un archivio che permette di compilare Vim a partire dai file
sorgente. Quale alternativa preferire dipende dal sistema su cui si vuole
usare Vim, e dal preferire (o meno) di compilarlo direttamente a partire dai
file sorgente. Consultate "https://www.vim.org/download.php" per una
panoramica delle distribuzioni correntemente disponibili.
Alcuni siti da cui ottenere l'ultima versione di Vim:
* Consultare la repository git in github: https://github.com/vim/vim.
* Procurarsi il codice sorgente come archivio https://github.com/vim/vim/tags.
* Ottenere un file per installare Vim in ambiente Windows dalla repository
vim-win32-installer:
https://github.com/vim/vim-win32-installer/releases.
COMPILARE VIM
Se si è ottenuta una distribuzione di file eseguibili di Vim non è necessario
compilarlo. Se si è ottenuta una distribuzione di file sorgente, tutto ciò
che serve per compilare Vim è nella directory "src". Vedere src/INSTALL per
come procedere.
INSTALLAZIONE
Vedere uno dei file elencati più sotto per istruzioni riguardo a uno specifico
sistema operativo. Tali file sono (nella repository git) nella directory
READMEdir oppure nella directory principale se si scompatta un archivio:
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS e MS-Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
Esistono altri file README_*.txt, a seconda della distribuzione in uso.
DOCUMENTAZIONE
Esiste un corso di introduzione a Vim per principianti, della durata di circa
un'ora. Normalmente si può accedervi tramite il comando "vimtutor". Vedere
":help tutor" per ulteriori informazioni.
Ma la cosa migliore è usare la documentazione disponibile in una sessione di
Vim, tramite il comando ":help". Se ancora non si ha a disposizione Vim, si
può leggere il file "runtime/doc/help.txt". Questo file contiene puntatori
agli altri file che costituiscono la documentazione.
All'interno della documentazione esiste anche uno User Manual (manuale utente)
che si legge come un libro ed è raccomandato per imparare a usare Vim.
Vedere ":help user-manual". Il manuale utente è stato interamente tradotto in
italiano, ed è disponibile, vedere:
https://www.vim.org/translations.php
COPIE
Vim è un Charityware (ossia eventuali offerte per il suo utilizzo vanno a
un'attività caritativa). Vim può essere usato e copiato liberamente, senza
limitazioni, ma è incoraggiata un'offerta a favore di orfani ugandesi. Si
prega di leggere il file "runtime/doc/uganda.txt" per dettagli su come fare
(il file si può visualizzare digitando ":help uganda" all'interno di Vim).
Sommario della licenza: Non ci sono restrizioni nell'uso e nella distribuzione
di una copia non modificata di Vim. Parti di Vim possono anche essere
distribuite, ma il testo della licenza va sempre incluso. Per versioni
modificate di Vim, valgono alcune limitazioni. La licenza di Vim è
compatibile con la licenza GPL, è possibile compilare Vim utilizzando librerie
con licenza GPL e distribuirlo.
SPONSORIZZAZIONI
Correggere errori e aggiungere nuove funzionalità richiede tempo e fatica.
Per mostrare la vostra stima per quest'attività e per fornire motivazioni
agli sviluppatori perché continuino a lavorare su Vim, siete invitati a
fare una donazione.
Le somme donate saranno usate principalmente per aiutare dei bambini in
Uganda. Vedere "runtime/doc/uganda.txt". Allo stesso tempo, le donazioni
aumentano la motivazione del gruppo di sviluppo a continuare a lavorare su
Vim!
Informazioni più aggiornate sulla sponsorizzazione, possono essere trovate
sul sito Internet di Vim:
https://www.vim.org/sponsor/
CONTRIBUIRE
Chi vuole contribuire a rendere Vim ancora migliore, può consultare
il file CONTRIBUTING.md (in inglese).
INFORMAZIONE
Se il vostro sistema operativo è macOS, potete usare MacVim:
https://macvim.org
Le ultime notizie riguardo a Vim si possono trovare sulla pagina Internet di
Vim:
https://www.vim.org/
Se avete problemi, è possibile consultare la documentazione Vim e i
suggerimenti su come utilizzarlo:
https://www.vim.org/docs.php
https://vim.fandom.com/wiki/Vim_Tips_Wiki
Se avete ancora problemi o qualsiasi altra richiesta, è possibile usare una
delle mailing list per discuterne con utenti e sviluppatori di Vim:
https://www.vim.org/maillist.php
Se nient'altro funziona, potete riferire direttamente i problemi incontrati
alla mailing list degli sviluppatori, vim-dev:
<vim-dev@vim.org>
AUTORE PRINCIPALE
La maggior parte di Vim è stata creata da Bram Moolenaar <Bram@vim.org>,
vedere ":help Bram-Moolenaar"
Spedire tutti gli altri commenti, modifiche al codice sorgente, fiori e
suggerimenti alla mailing list vim-dev:
<vim-dev@vim.org>

131
lang/README.pt_br.txt Normal file
View File

@ -0,0 +1,131 @@
README.txt para a versão 9.1 do Vim: Vi IMproved.
O QUE É VIM?
Vim é uma versão muito melhorada do bom e velho editor UNIX Vi. Muitos novos
recursos foram adicionados: desfazer multinível, destaque de sintaxe, histórico
de linha de comando, ajuda on-line, verificação ortográfica, completar
nome de arquivo, operações de bloco, linguagem de script, etc. Há também uma
interface gráfica (GUI) disponível. Ainda assim, a compatibilidade com Vi é
mantida, aqueles que têm Vi "nos dedos" se sentirão em casa.
Veja "runtime/doc/vi_diff.txt" para diferenças com Vi.
Este editor é muito útil para editar programas e outros arquivos de texto
simples. Todos os comandos são fornecidos com caracteres normais do teclado,
então aqueles que podem digitar com dez dedos podem trabalhar muito rápido.
Além disso, as teclas de função podem ser mapeadas para comandos pelo usuário,
e o mouse pode ser usado.
O Vim funciona em MS-Windows (7, 8, 10, 11), macOS, Haiku, VMS e quase todos
os sabores do UNIX. A portabilidade para outros sistemas não deve ser difícil.
Versões mais antigas do Vim rodam em MS-DOS, MS-Windows 95/98/Me/NT/2000/XP/Vista,
Amiga DOS, Atari MiNT, BeOS, RISC OS e OS/2. Eles não são mais mantidos.
DISTRIBUIÇÃO
Você pode frequentemente usar seu gerenciador de pacotes favorito para
instalar o Vim. No Mac e Linux, uma pequena versão do Vim é pré-instalada,
você ainda precisa instalar o Vim se quiser mais recursos.
Existem distribuições separadas para Unix, PC, Amiga e alguns outros sistemas.
Este arquivo README.txt vem com o arquivo de tempo de execução. Ele inclui a
documentação, arquivos de sintaxe e outros arquivos que são usados em
tempo de execução. Para executar o Vim, você deve obter um dos arquivos
binários ou um arquivo fonte. Qual deles você precisa depende do sistema em
que deseja executá-lo e se você deseja ou deve compilá-lo você mesmo.
Verifique "https://www.vim.org/download.php" para uma visão geral das
distribuições disponíveis atualmente.
Alguns lugares populares para obter o Vim mais recente:
* Confira o repositório git do github: https://github.com/vim/vim.
* Obtenha o código-fonte como um arquivo: https://github.com/vim/vim/tags.
* Obtenha um executável do Windows do repositório vim-win32-installer:
https://github.com/vim/vim-win32-installer/releases.
COMPILAR
Se você obteve uma distribuição binária, não precisa compilar o Vim. Se você
obteve uma distribuição de origem, todo o material para compilar o Vim está no
diretório "src". Veja src/INSTALL para instruções.
INSTALAÇÃO
Veja um desses arquivos para instruções específicas do sistema. No diretório
READMEdir (no repositório) ou no diretório superior (se você descompactar um
arquivo):
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS e MS-Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
Existem outros arquivos README_*.txt, dependendo da distribuição que você usou.
DOCUMENTAÇÃO
O tutor do Vim é um curso de treinamento de uma hora para iniciantes.
Frequentemente, ele pode ser iniciado como "vimtutor". Veja ":help tutor"
para mais informações.
O melhor é usar ":help" no Vim. Se você ainda não tem um executável, leia
"runtime/doc/help.txt". Ele contém direcionamentos para os outros arquivos
de documentação. O Manual do Usuário é lido como um livro e é recomendado
para aprender a usar o Vim. Veja ":help user-manual".
CÓPIA
O Vim é um Charityware. Você pode usá-lo e copiá-lo o quanto quiser, mas
encorajamos que faça uma doação para ajudar órfãos em Uganda. Leia o arquivo
"runtime/doc/uganda.txt" para detalhes (execute ":help uganda" dentro do Vim).
Resumo da licença: Não há restrições quanto ao uso ou distribuição de uma
cópia não modificada do Vim. Partes do Vim também podem ser distribuídas, mas
o texto da licença deve sempre ser incluído. Para versões modificadas, algumas
restrições se aplicam. A licença é compatível com GPL, você pode compilar o Vim
com bibliotecas GPL e distribuí-lo.
PATROCÍNIO
Corrigir bugs e adicionar novos recursos exige muito tempo e esforço.
Para mostrar seu apreço pelo trabalho e motivar os desenvolvedores a continuar
trabalhando no Vim, envie uma doação.
O dinheiro que você doou será usado principalmente para ajudar crianças em
Uganda. Veja "runtime/doc/uganda.txt". Mas, ao mesmo tempo, as doações aumentam
a motivação da equipe de desenvolvimento para continuar trabalhando no Vim!
Para as informações mais recentes sobre patrocínio, consulte o site do Vim:
https://www.vim.org/sponsor/
CONTRIBUIÇÕES
Se você gostaria de ajudar a tornar o Vim melhor, veja o arquivo CONTRIBUTING.md.
INFORMAÇÕES
Se você estiver no macOS, pode usar o MacVim: https://macvim.org
As últimas notícias sobre o Vim podem ser encontradas na página inicial do Vim:
https://www.vim.org/
Se você tiver problemas, dê uma olhada na documentação ou dicas do Vim:
https://www.vim.org/docs.php
https://vim.fandom.com/wiki/Vim_Tips_Wiki
Se você ainda tiver problemas ou quaisquer outras perguntas, use uma das listas
de discussão para discuti-las com usuários e desenvolvedores do Vim:
https://www.vim.org/maillist.php
Se nada mais funcionar, relate os bugs diretamente para a lista de discussão
vim-dev:
<vim-dev@vim.org>
AUTOR PRINCIPAL
A maior parte do Vim foi criada por Bram Moolenaar <Bram@vim.org>,
":help Bram-Moolenaar"
Envie quaisquer outros comentários, patches, flores e sugestões para
a lista de discussão vim-dev: <vim-dev@vim.org>

166
lang/README.ru.txt Normal file
View File

@ -0,0 +1,166 @@
README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
ЧТО ТАКОЕ РЕДАКТОР VIM?
Программа Vim — это значительно улучшенная версия старого доброго редактора Vi
из системы UNIX. При разработке этого редактора было добавлено множество новых
возможностей: многоуровневая отмена изменений, подсветка синтаксиса, журнал
командной строки, интерактивная справка, проверка орфографии, подстановка
наименований файлов и команд, операции с произвольными блоками текста,
встроенный язык программирования и т. д. Также доступен графический интерфейс
пользователя (GUI). И при этом сохраняется совместимость с редактором Vi,
и те, у кого Vi «в крови», будут чувствовать себя как дома. Подробности о
различиях с редактором Vi см. в файле "runtime/doc/vi_diff.txt".
Этот редактор очень удобен для работы с исходным кодом программ, а также
разного рода других текстовых файлов. Все команды вводятся набором обычных
символов клавиатуры, поэтому те, кто освоил десятипальцевый метод печати, могут
работать очень быстро. Кроме того, пользователи могут назначить на
функциональные клавиши клавиатуры необходимые команды, и использовать
манипулятор «мышь».
В редакторе Vim также обеспечивается (насколько это возможно) совместимость
с POSIX-реализацией редактора vi, если он скомпилирован с минимальным набором
функционала (обычно называемый vim.tiny). Данная сборка чаще всего используется
во многих дистрибутивах Linux в качестве предустановленного редактора vi.
Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS и
практически во всех UNIX-подобных системах. А перенос на другие платформы не
должен представлять особой сложности.
Предыдущие версии редактора Vim работают в операционных системах OS/2, MS-DOS,
MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS.
Но поддержка этих версий больше не осуществляется.
ПРЕДОСТАВЛЕНИЕ РЕДАКТОРА Vim
Для установки редактора Vim можно воспользоваться привычным диспетчером пакетов.
В системах Mac и Linux уже предустановленна начальная версия программы Vim,
но вам все равно нужно установить редактор Vim, если вы хотите получить больше
возможностей.
Существуют отдельные версии для Unix, PC, Amiga и некоторых других систем.
Данный файл README.ru.txt поставляется вместе с архивом рабочих файлов
программы. Этот архив включает в себя документацию, файлы подсветки синтаксиса
и другие файлы, которые используются редактором во время работы. Чтобы
запустить программу Vim, вы должны получить либо архив с исполняемыми файлами,
либо архив с исходным кодом. Какой из них вам нужен, зависит от того, на какой
системе вы хотите запустить редактор Vim, и есть ли для этой системы
исполняемые файлы или вы должны компилировать программу самостоятельно.
Чтобы узнать о доступных в настоящее время пакетах программы, посмотрите на
веб‐странице https://www.vim.org/download.php.
Несколько полезных мест, где можно получить последнюю версию редактора Vim:
* Посмотрите в git-хранилище на GitHub: https://github.com/vim/vim.
* Получить исходный код в виде архива: https://github.com/vim/vim/tags.
* Получить исполняемый файл для ОС Windows из хранилища vim-win32-installer:
https://github.com/vim/vim-win32-installer/releases.
КОМПИЛЯЦИЯ РЕДАКТОРА Vim
Если для вашей системы уже есть готовые исполняемые файлы, вам не нужно самому
компилировать редактор Vim. Если вы скачали архив с исходным кодом, то всё
необходимое для компиляции программы Vim находится в каталоге "src".
Инструкции смотрите в файле src/INSTALL.
УСТАНОВКА ПРОГРАММЫ Vim
Инструкции для конкретной системы смотрите в одном из нижеуказанных файлов.
Или в каталоге READMEdir (на https://github.com/vim/vim), или в основном
каталоге (если вы распаковываете архив):
README_ami.txt Amiga
README_unix.txt Unix
README_dos.txt MS-DOS и MS Windows
README_mac.txt Macintosh
README_haiku.txt Haiku
README_vms.txt VMS
Существует ещё несколько файлов README_*.txt, в зависимости от предоставляемого
пакета.
ДОКУМЕНТАЦИЯ ПО РЕДАКТОРУ Vim
Учебник Vim — это часовой практический курс для начинающих. Как правило, для
работы с ним нужно набрать команду "vimtutor". Чтобы получить дополнительную
информацию, смотрите раздел документации ":help tutor".
Лучше всего воспользоваться командой ":help" в редакторе Vim. Если у вас ещё
нет исполняемого файла программы, прочитайте файл "runtime/doc/help.txt".
В нём содержатся отсылки на другие полезные файлы документации. Руководство
пользователя можно читать как книгу, и оно рекомендуется для обучения работе
с редактором Vim. Смотрите ":help user-manual".
ЛИЦЕНЗИОННЫЕ ПРАВА
Редактор Vim является благотворительным программным обеспечением.
Использование и копирование программы Vim не ограничено, однако рекомендуется
сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать
подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.txt" (введите
команду ":help uganda" в редакторе Vim).
Краткое описание лицензии.
Нет никаких ограничений на использование или распространение немодифицированной
копии программы Vim. Части программы Vim также могут предоставляться отдельно,
но текст лицензии Vim всегда должен быть включён в поставку.
Для модифицированных версий программы действует несколько ограничений.
Лицензия Vim совместима с лицензией GNU GPL, вы можете компилировать
и распространять программу Vim с библиотеками, лицензированными под GNU GPL.
ФИНАНСОВАЯ ПОДДЕРЖКА ДЛЯ РАЗРАБОТКИ РЕДАКТОРА Vim
Устранение ошибок и добавление новых функциональных возможностей требует
вложения немалого количества времени и сил. Выразить признательность за труд
и подкрепить заинтересованность разработчиков программы в дальнейшей работе
над редактором Vim можно с помощью оказания финансовой поддержки.
Пожертвованные вами деньги будут в основном направлены на оказание помощи детям
Уганды, см. "runtime/doc/uganda.txt". Однако в любом случае финансирование
будет способствовать повышению заинтересованности команды разработчиков
в продолжении работы над редактором Vim!
Самая свежая информация об оказании финансовой поддержки публикуется на
веб-сайте программы Vim:
https://www.vim.org/sponsor/
ПОМОЩЬ В РАЗРАБОТКЕ РЕДАКТОРА Vim
Если вы хотите помочь сделать редактор Vim лучше, смотрите файл CONTRIBUTING.md.
ДОПОЛНИТЕЛЬНАЯ ИНФОРМАЦИЯ
Для системе macOS вы може использовать MacVim: https://macvim.org
Последние новости о редакторе Vim можно найти на его домашней странице:
https://www.vim.org/
Если у вас возникли вопросы, посмотрите полезные советы или документацию по
редактору Vim:
https://www.vim.org/docs.php
https://vim.fandom.com/wiki/Vim_Tips_Wiki
Если у вас все ещё остались вопросы или есть сложности, воспользуйтесь одним
из списков рассылки, чтобы обсудить их с пользователями и разработчиками:
https://www.vim.org/maillist.php
Если ничего не помогает, сообщайте об ошибках непосредственно в список рассылки
vim-dev:
<vim-dev@vim.org>
ОСНОВНОЙ АВТОР ПРОГРАММЫ
Большая часть редактора Vim была создана Брамом Моленаром <Bram@vim.org>,
см. ":help Bram-Moolenaar"
Присылайте все прочие комментарии, исправления, цветы и предложения в список
рассылки vim-dev:
<vim-dev@vim.org>

138
nsis/Make_mvc.mak Normal file
View File

@ -0,0 +1,138 @@
#
# Makefile for MS Windows for create self-installing exe of Vim.
# 05/04/2024, Restorer restorer@mail2k.ru
#
#!INCLUDE .\Make_all.mak
.SUFFIXES :
!IFDEF PROGRAMW6432
ProgFiles=%%PROGRAMFILES(x86)%%
!ELSE
ProgFiles=$(PROGRAMFILES)
!ENDIF
!IFDEF VIMSRC
MKNSISFLAGS = /D"VIMSRC=$(VIMSRC)"
!ENDIF
!IFDEF VIMRT
MKNSISFLAGS = $(MKNSISFLAGS) /D"VIMRT=$(VIMRT)"
!ENDIF
!IFDEF VIMTOOLS
MKNSISFLAGS = $(MKNSISFLAGS) /D"VIMTOOLS=$(VIMTOOLS)"
!ENDIF
!IFDEF GETTEXT
MKNSISFLAGS = $(MKNSISFLAGS) /D"GETTEXT=$(GETTEXT)"
!ENDIF
!IFDEF HAVE_UPX
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_UPX=$(HAVE_UPX)
!ENDIF
!IFDEF HAVE_NLS
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_NLS=$(HAVE_NLS)
!ENDIF
!IFDEF HAVE_MULTI_LANG
MKNSISFLAGS = $(MKNSISFLAGS) /DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
!ENDIF
!IFDEF WIN64
MKNSISFLAGS = $(MKNSISFLAGS) /DWIN64=$(WIN64)
!ENDIF
!IFDEF ARM64
MKNSISFLAGS = $(MKNSISFLAGS) /DARM64=$(ARM64)
!ENDIF
!IFDEF INCLUDE_LIBGCC
MKNSISFLAGS = $(MKNSISFLAGS) /DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
!ENDIF
!IFDEF X
XX = /X"$(X:;=" /X")"
!ENDIF
# If necessary, correct the full path of the NSIS compiler in the next line.
# Please do not enclose the path in quotation marks.
MKNSIS = $(ProgFiles)\NSIS
PS = powershell.exe
RM = del /f /q
RD = rmdir /s /q
MKNSISFLAGS = /INPUTCHARSET UTF8 $(MKNSISFLAGS)
PSFLAGS = -NoLogo -NoProfile -Command
# Read MAJOR and MINOR from version.h.
!IF ![for /F "tokens=2,3" %G in ( \
'findstr /rc:"VIM_VERSION_MINOR[ ^]*[0-9^]" \
/rc:"VIM_VERSION_MAJOR[ ^]*[0-9^]" ..\src\version.h') do \
@if "VIM_VERSION_MAJOR"=="%G" (echo MAJOR=%H>>_ver.tmp) \
else echo MINOR=%H>>_ver.tmp]
! INCLUDE .\_ver.tmp
! IF [$(RM) .\_ver.tmp]
! ENDIF
!ENDIF
# Read PATCHLEVEL from version.c
!IF ![for /F %G in ( \
'findstr /nblc:"static int included_patches[^]" ..\src\version.c \
^| (set /p "_t=" ^& set /a _t+=2 ^)') do \
@cmd /q /c "for /F "skip=%G delims=, " %H in (..\src\version.c) do \
(echo PATCH=%H>_patchlvl.tmp & exit /b)"]
! INCLUDE .\_patchlvl.tmp
! IF [$(RM) .\_patchlvl.tmp]
! ENDIF
!ENDIF
!IF $(PATCH) < 10
PATCH = 000$(PATCH)
!ELSEIF $(PATCH) < 100
PATCH = 00$(PATCH)
!ELSEIF $(PATCH) < 1000
PATCH = 0$(PATCH)
!ENDIF
all : makeinst
makeinst : prepare
^"$(MKNSIS)\makensis.exe" $(MKNSISFLAGS) gvim.nsi $(XX)
prepare : unzipicons gvim_version.nsh license rename
unzipicons : icons.zip
@ if exist %|fF\nul $(RD) %|fF
@ $(PS) $(PSFLAGS) \
Add-Type -AssemblyName 'System.IO.Compression.FileSystem'; \
[System.IO.Compression.ZipFile]::ExtractToDirectory(\"$**\", \".\")
gvim_version.nsh : Make_mvc.mak
@ 1> $@ echo:^# Generated from Makefile: define the version numbers
@ 1>> $@ echo:^!ifndef __GVIM_VER__NSH__
@ 1>> $@ echo:^!define __GVIM_VER__NSH__
@ 1>> $@ echo:^!define VER_MAJOR $(MAJOR)
@ 1>> $@ echo:^!define VER_MINOR $(MINOR)
@ 1>> $@ echo:^!define PATCHLEVEL $(PATCH)
@ 1>> $@ echo:^!endif
license : ..\lang\LICENSE.*.txt ..\LICENSE
!@ $(PS) $(PSFLAGS) \
Get-Content -Path '$**' -Encoding UTF8 ^| \
Set-Content -Path '..\lang\$(**B).nsis.txt' -Enc Unicode -Force
rename :
@ ..\tools\rename.bat "$(SRC)" "$(DST)" 1> nul
clean :
@ if exist .\gvim_version.nsh $(RM) .\gvim_version.nsh
@ if exist ..\lang\LICENSE*.nsis.txt $(RM) ..\lang\LICENSE*.nsis.txt
@ if exist .\icons\nul $(RD) .\icons
@ if exist .\gvim??.exe $(RM) .\gvim??.exe
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:

99
nsis/Makefile Normal file
View File

@ -0,0 +1,99 @@
#
# Makefile for UNIX-like for create self-installing exe of Vim.
# 15/12/2024, Restorer restorer@mail2k.ru
#
.SUFFIXES:
.PHONY: all makeinst prepare rename clean
ifdef VIMSRC
MKNSISFLAGS := -D"VIMSRC=$(VIMSRC)"
endif
ifdef VIMRT
MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMRT=$(VIMRT)"
endif
ifdef VIMTOOLS
MKNSISFLAGS := $(MKNSISFLAGS) -D"VIMTOOLS=$(VIMTOOLS)"
endif
ifdef GETTEXT
MKNSISFLAGS := $(MKNSISFLAGS) -D"GETTEXT=$(GETTEXT)"
endif
ifdef HAVE_UPX
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_UPX=$(HAVE_UPX)
endif
ifdef HAVE_NLS
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_NLS=$(HAVE_NLS)
endif
ifdef HAVE_MULTI_LANG
MKNSISFLAGS := $(MKNSISFLAGS) -DHAVE_MULTI_LANG=$(HAVE_MULTI_LANG)
endif
ifdef WIN64
MKNSISFLAGS := $(MKNSISFLAGS) -DWIN64=$(WIN64)
endif
ifdef ARM64
MKNSISFLAGS := $(MKNSISFLAGS) -DARM64=$(ARM64)
endif
ifdef INCLUDE_LIBGCC
MKNSISFLAGS := $(MKNSISFLAGS) -DINCLUDE_LIBGCC=$(INCLUDE_LIBGCC)
endif
ifdef X
XX := -X"$(X:;=" -X")"
endif
MAJOR != grep -E 'VIM_VERSION_MAJOR\s{2,}' ../src/version.h | \
awk '{ printf "%d",$$3 }'
MINOR != grep -E 'VIM_VERSION_MINOR\s{2,}' ../src/version.h | \
awk '{ printf "%d",$$3 }'
PATCH != awk '/number below this line/,/,/' ../src/version.c | \
awk 'NR == 3 { printf "%04d",$$1 }' | sed -e 's/[ ,]//g'
MKNSISFLAGS := -INPUTCHARSET UTF8 $(MKNSISFLAGS)
all: makeinst
makeinst: prepare
makensis $(MKNSISFLAGS) gvim.nsi $(XX)
prepare: unzipicons gvim_version.nsh license rename
unzipicons: icons.zip
if test -d `basename $? .zip` ; then rm -rf `basename $? .zip` ; fi
unzip $?
gvim_version.nsh: Makefile
echo "# Generated from Makefile: define the version numbers" > $@
echo "!ifndef __GVIM_VER__NSH__" >> $@
echo "!define __GVIM_VER__NSH__" >> $@
echo "!define VER_MAJOR $(MAJOR)" >> $@
echo "!define VER_MINOR $(MINOR)" >> $@
echo "!define PATCHLEVEL $(PATCH)" >> $@
echo "!endif" >> $@
license: ../lang/LICENSE.*.txt ../LICENSE
for lic in $? ; do \
bn=`basename $$lic .txt` ; \
awk 'sub("$$", "\r")' < $$lic | \
iconv -f UTF-8 -t UTF-16 > ../lang/$$bn.nsis.txt ; \
done
rename:
../tools/rename.bat "$(SRC)" "$(DST)"
clean:
if test -f gvim_version.nsh ; then rm -f gvim_version.nsh ; fi
rm -f ../lang/LICENSE*.nsis.txt
if test -d icons ; then rm -rf icons ; fi
if test -f gvim??.exe ; then rm -f gvim??.exe ; fi
# vim: set noet sw=8 ts=8 sts=0 wm=0 tw=0 ft=make:

View File

@ -1,25 +1,17 @@
This builds a one-click install for Vim for Win32 using the Nullsoft
This builds a one-click install for Vim for MS Windows using the Nullsoft
Installation System (NSIS), available at http://nsis.sourceforge.net/
To build the installable .exe:
To build the installable .exe file:
1. Unpack three archives:
PC sources
PC runtime
PC language files
You can generate these from the Unix sources and runtime plus the extra
archive (see the Makefile in the top directory).
Preparatory stage
2. Go to the src directory and build:
gvim.exe (the OLE version),
vimrun.exe,
install.exe,
uninstall.exe,
tee/tee.exe,
xxd/xxd.exe,
1. Clone using the git tool the Vim repository or download its zip file
available at:
https://github.com/vim/vim
Then execute tools/rename.bat to rename the executables. (mv command is
required.)
2. Go to the "/src" directory and build the Vim editor, making sure to use the
following variable values: "GUI=yes"; "OLE=yes"; "VIMDLL=yes". See
INSTALLpc.txt and Make_mvc.mak for details.
3. Go to the GvimExt directory and build gvimext.dll (or get it from a binary
archive). Both 64- and 32-bit versions are needed and should be placed
@ -28,17 +20,30 @@ To build the installable .exe:
32-bit: src/GvimExt/gvimext.dll
4. Get a "diff.exe" program. If you skip this the built-in diff will always
be used (which is fine for most users). If you do have your own
"diff.exe" put it in the "../.." directory (above the "vim90" directory,
it's the same for all Vim versions).
be used (which is fine for most users).
You can find one in previous Vim versions or in this archive:
http://www.mossbayeng.com/~ron/vim/diffutils.tar.gz
https://www.mediafire.com/file/9edk4g3xvfgzby0/diff4Vim.zip/file
When will you have "diff.exe" put it in the "../.." directory (above the
"vim91" directory, it's the same for all Vim versions). However, you can
specify a different directory by specifying the appropriate makefile value.
How to do this is described below.
5 Also put winpty32.dll and winpty-agent.exe in "../.." (above the "vim90"
directory). This is required for the terminal window.
5. For the terminal window to work in Vim, the library winpty is required.
You can get it at the following url:
https://github.com/rprichard/winpty/releases/download/0.4.3/winpty-0.4.3-msvc2015.zip
For the 32-bit version, rename "winpty.dll" from ia32/bin to "winpty32.dll",
and for the 64-bit version — "winpty.dll" from x64/bin to "winpty64.dll".
Put the renamed file and "winpty-agent.exe" in "../.." (above the "vim91"
directory). However, you can specify a different directory by specifying
the appropriate makefile value. How to do this is described below.
6. Do "make uganda.nsis.txt" in runtime/doc. This requires sed, you may have
to do this on Unix. Make sure the file is in DOS file format!
6. To use stronger encryption, add the Sodium library. You can get it here:
https://github.com/jedisct1/libsodium/releases/download/1.0.19-RELEASE/libsodium-1.0.19-msvc.zip
Unpack the archive. Put the "libsodium.dll" from
path/to/libsodium/Win32/Release/v143/dynamic for the 32bit version or
path/to/libsodium/X64/Release/v143/dynamic for the 64bit version in the
"../.." directory (above the "vim91" directory, where "diff.exe" and
"winpty{32|64}.dll").
7. Get gettext and iconv DLLs from the following site:
https://github.com/mlocati/gettext-iconv-windows/releases
@ -53,25 +58,53 @@ To build the installable .exe:
| libiconv-2.dll
| libgcc_s_sjlj-1.dll
|
` gettext64/
+ gettext64/
libintl-8.dll
libiconv-2.dll
The default <GETTEXT directory> is "..", however, you can change it by
passing /DGETTEXT=... option to the makensis command.
The default <GETTEXT directory> is "../..". However, you can specify a
different directory by specifying the appropriate makefile value. How to do
this is described below.
8. Install NSIS if you didn't do that already.
Download Unicode version the ShellExecAsUser plug-in for NSIS from:
https://nsis.sourceforge.io/ShellExecAsUser_plug-in
and put "ShellExecAsUser.dll" to path\to\NSIS\Plugins\x86-unicode
Install NSIS if you didn't do that already.
Also install UPX, if you want a compressed file.
Download and include the ShellExecAsUser.dll Unicode version which can be
sourced from: https://nsis.sourceforge.io/ShellExecAsUser_plug-in
Installer assembly stage
On MS Windows, open the Developer Command Prompt for VS and go to the
"/nsis" directory and type the command
nmake.exe -lf Make_mvc.mak [variables] all
Unpack the images:
cd nsis
unzip icons.zip
After the installer is created and you copy it to the desired location, run
the following command in the "/nsis" directory
nmake.exe -lf Make_mvc.mak clean
On UNIX-like systems, go to the "/nsis" directory and type the command
make -f Makefile [variables] all
Then build gvim.exe:
After the installer is created and you copy it to the desired location, run
the following command in the "/nsis" directory
make -f Makefile clean
cd nsis
makensis gvim.nsi
Variables and their values available for building the installer (not mandatory):
"VIMSRC=<dir>" — directory where location of gvim_ole.exe, vimw32.exe,
GvimExt/*, etc.
"VIMRT=<dir>" — directory where location of runtime files.
"VIMTOOLS=<dir>" — directory where location of extra tools: diff.exe,
winpty{32|64}.dll, winpty-agent.exe, libsodium.dll.
"GETTEXT=<dir>" — directory where location of gettext libraries.
"HAVE_UPX=1" — additional compression of the installer. UPX program
must be installed.
"HAVE_NLS=0" — do not add native language support.
"HAVE_MULTI_LANG=0" — to create an English-only the installer.
"WIN64=1" — to create a 64-bit the installer.
"ARM64=1" — to create the installer for ARM64. The WIN64 variable
must be set to 1.
"X=<scriptcmd>" — executes scriptcmd in script. If multiple scriptcmd
are specified, they are separated by a semicolon.
Example "X=OutFile MyVim.exe;XPMode on"
"MKNSIS=<dir>" — the directory where the "makensis.exe" program is
located.

View File

@ -1,6 +1,6 @@
# NSIS file to create a self-installing exe for Vim.
# It requires NSIS version 3.0 or later.
# Last Change: 2014 Nov 5
# Last Change: 2025 Feb 24
Unicode true
@ -14,58 +14,124 @@ Unicode true
# Location of runtime files
!ifndef VIMRT
!define VIMRT ".."
!define VIMRT "..\runtime"
!endif
# Location of extra tools: diff.exe
# Location of extra tools: diff.exe, winpty{32|64}.dll, winpty-agent.exe, etc.
!ifndef VIMTOOLS
!define VIMTOOLS ..\..
!define VIMTOOLS "..\.."
!endif
# Location of gettext.
# It must contain two directories: gettext32 and gettext64.
# See README.txt for detail.
!ifndef GETTEXT
!define GETTEXT ${VIMRT}
!define GETTEXT ${VIMTOOLS}
!endif
# Comment the next line if you don't have UPX.
# Get it at https://upx.github.io/
!define HAVE_UPX
# If you have UPX, use the switch /DHAVE_UPX=1 on the command line makensis.exe.
# This property will be set to 1. Get it at https://upx.github.io/
!ifndef HAVE_UPX
!define HAVE_UPX 0
!endif
# Comment the next line if you do not want to add Native Language Support
!define HAVE_NLS
# If you do not want to add Native Language Support, use the switch /DHAVE_NLS=0
# in the command line makensis.exe. This property will be set to 0.
!ifndef HAVE_NLS
!define HAVE_NLS 1
!endif
# Comment the following line to create an English-only installer:
!define HAVE_MULTI_LANG
# To create an English-only the installer, use the switch /DHAVE_MULTI_LANG=0 on
# the command line makensis.exe. This property will be set to 0.
!ifndef HAVE_MULTI_LANG
!define HAVE_MULTI_LANG 1
!endif
# Uncomment the next line if you want to create a 64-bit installer.
#!define WIN64
# if you want to create a 64-bit the installer, use the switch /DWIN64=1 on
# the command line makensis.exe. This property will be set to 1.
!ifndef WIN64
!define WIN64 0
!endif
# if you want to create the installer for ARM64, use the /DARM64=1 on
# the command line makensis.exe. This property will be set to 1.
!ifndef ARM64
!define ARM64 0
!else
!if ${ARM64} > 0
!if ${WIN64} < 1
!define /redef WIN64 1
!endif
!endif
!endif
# if you don't want to include libgcc_s_sjlj-1.dll in the package, use the
# switch /DINCLUDE_LIBGCC=0 on the command line makensis.exe.
!ifndef INCLUDE_LIBGCC
!define INCLUDE_LIBGCC 1
!endif
!include gvim_version.nsh # for version number
# Definition of Patch for Vim
# Definition of Patch for Vim.
!ifndef PATCHLEVEL
!define PATCHLEVEL 0
!endif
# ----------- No configurable settings below this line -----------
!include "Library.nsh" # For DLL install
!include "Library.nsh" # for DLL install
!include "LogicLib.nsh"
!include "MUI2.nsh"
!include "nsDialogs.nsh"
!include "Sections.nsh"
!include "x64.nsh"
!include "StrFunc.nsh"
${StrRep}
# See https://nsis.sourceforge.io/LogicLib
;FileExists is already part of LogicLib, but returns true for directories
;as well as files
!macro _FileExists2 _a _b _t _f
!insertmacro _LOGICLIB_TEMP
StrCpy $_LOGICLIB_TEMP "0"
;if path is not blank, continue to next check
StrCmp `${_b}` `` +4 0
;if path exists, continue to next check (IfFileExists returns true if this
;is a directory)
IfFileExists `${_b}` `0` +3
;if path is not a directory, continue to confirm exists
IfFileExists `${_b}\*.*` +2 0
StrCpy $_LOGICLIB_TEMP "1" ;file exists
;now we have a definitive value - the file exists or it does not
StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}`
!macroend
!undef FileExists
!define FileExists `"" FileExists2`
!macro _DirExists _a _b _t _f
!insertmacro _LOGICLIB_TEMP
StrCpy $_LOGICLIB_TEMP "0"
;if path is not blank, continue to next check
StrCmp `${_b}` `` +3 0
;if directory exists, continue to confirm exists
IfFileExists `${_b}\*.*` 0 +2
StrCpy $_LOGICLIB_TEMP "1"
StrCmp $_LOGICLIB_TEMP "1" `${_t}` `${_f}`
!macroend
!define DirExists `"" DirExists`
!define PRODUCT "Vim ${VER_MAJOR}.${VER_MINOR}"
!define UNINST_REG_KEY "Software\Microsoft\Windows\CurrentVersion\Uninstall"
!define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}"
!ifdef WIN64
Name "${PRODUCT} (x64)"
!if ${WIN64}
!if ${ARM64}
Name "${PRODUCT} (ARM64)"
!else
Name "${PRODUCT} (x64)"
!endif
!else
Name "${PRODUCT}"
Name "${PRODUCT}"
!endif
OutFile gvim${VER_MAJOR}${VER_MINOR}.exe
CRCCheck force
@ -75,11 +141,11 @@ ManifestDPIAware true
SetDatablockOptimize on
RequestExecutionLevel highest
!ifdef HAVE_UPX
!if ${HAVE_UPX}
!packhdr temp.dat "upx --best --compress-icons=1 temp.dat"
!endif
!ifdef WIN64
!if ${WIN64}
!define BIT 64
!else
!define BIT 32
@ -96,6 +162,8 @@ RequestExecutionLevel highest
# Show all languages, despite user's codepage:
!define MUI_LANGDLL_ALLLANGUAGES
# Always show dialog choice language
#!define MUI_LANGDLL_ALWAYSSHOW
!define MUI_LANGDLL_REGISTRY_ROOT "HKCU"
!define MUI_LANGDLL_REGISTRY_KEY "Software\Vim"
!define MUI_LANGDLL_REGISTRY_VALUENAME "Installer Language"
@ -113,13 +181,13 @@ RequestExecutionLevel highest
!define MUI_COMPONENTSPAGE_SMALLDESC
!define MUI_LICENSEPAGE_CHECKBOX
!define MUI_FINISHPAGE_RUN
!define MUI_FINISHPAGE_RUN_FUNCTION LaunchApplication
!define MUI_FINISHPAGE_RUN_TEXT $(str_show_readme)
!define MUI_FINISHPAGE_SHOWREADME
!define MUI_FINISHPAGE_SHOWREADME_TEXT $(str_show_readme)
!define MUI_FINISHPAGE_SHOWREADME_FUNCTION LaunchApplication
# This adds '\Vim' to the user choice automagically. The actual value is
# obtained below with CheckOldVim.
!ifdef WIN64
!if ${WIN64}
!define DEFAULT_INSTDIR "$PROGRAMFILES64\Vim"
!else
!define DEFAULT_INSTDIR "$PROGRAMFILES\Vim"
@ -139,7 +207,7 @@ SilentInstall normal
# Installer pages
!insertmacro MUI_PAGE_WELCOME
!insertmacro MUI_PAGE_LICENSE "${VIMRT}\doc\uganda.nsis.txt"
!insertmacro MUI_PAGE_LICENSE $(page_lic_file)
!insertmacro MUI_PAGE_COMPONENTS
Page custom SetCustom ValidateCustom
#!define MUI_PAGE_CUSTOMFUNCTION_LEAVE VimFinalCheck
@ -163,13 +231,16 @@ Page custom SetCustom ValidateCustom
!include "lang\english.nsi"
# Include support for other languages:
!ifdef HAVE_MULTI_LANG
!if ${HAVE_MULTI_LANG}
!include "lang\portuguesebr.nsi"
!include "lang\danish.nsi"
!include "lang\dutch.nsi"
!include "lang\german.nsi"
!include "lang\greek.nsi"
!include "lang\italian.nsi"
!include "lang\japanese.nsi"
!include "lang\russian.nsi"
!include "lang\serbian.nsi"
!include "lang\simpchinese.nsi"
!include "lang\tradchinese.nsi"
!include "lang\turkish.nsi"
@ -179,7 +250,7 @@ Page custom SetCustom ValidateCustom
# Version resources
VIAddVersionKey /LANG=${LANG_ENGLISH} "ProductName" "Vim"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "Vim Developers"
VIAddVersionKey /LANG=${LANG_ENGLISH} "CompanyName" "The Vim Project"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalTrademarks" "Vim"
VIAddVersionKey /LANG=${LANG_ENGLISH} "LegalCopyright" "Copyright (C) 1996"
VIAddVersionKey /LANG=${LANG_ENGLISH} "FileDescription" "Vi Improved - A Text Editor"
@ -194,6 +265,9 @@ Var vim_nsd_mouse
Var vim_compat_stat
Var vim_keymap_stat
Var vim_mouse_stat
!if ${HAVE_NLS}
Var lng_usr
!endif
# Reserve files
@ -319,7 +393,7 @@ FunctionEnd
Function LaunchApplication
SetOutPath $0
ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\README.txt"'
ShellExecAsUser::ShellExecAsUser "" "$0\gvim.exe" '-R "$0\$(vim_readme_file)"'
FunctionEnd
##########################################################
@ -363,9 +437,6 @@ Section "$(str_section_exe)" id_section_exe
File /oname=gvim.exe ${VIMSRC}\gvim_ole.exe
!if /FileExists "${VIMSRC}\vim${BIT}.dll"
File ${VIMSRC}\vim${BIT}.dll
!endif
!if /FileExists "${VIMRT}\libsodium.dll"
File ${VIMRT}\libsodium.dll
!endif
File /oname=install.exe ${VIMSRC}\installw32.exe
File /oname=uninstall.exe ${VIMSRC}\uninstallw32.exe
@ -374,12 +445,22 @@ Section "$(str_section_exe)" id_section_exe
File /oname=xxd.exe ${VIMSRC}\xxdw32.exe
File ..\vimtutor.bat
File ..\README.txt
File /oname=LICENSE.txt ..\LICENSE
File ..\uninstall.txt
File ${VIMRT}\*.vim
!if /FileExists "${VIMTOOLS}\diff.exe"
File ${VIMTOOLS}\diff.exe
!endif
!if /FileExists "${VIMTOOLS}\winpty${BIT}.dll"
File ${VIMTOOLS}\winpty${BIT}.dll
!endif
!if /FileExists "${VIMTOOLS}\winpty-agent.exe"
File ${VIMTOOLS}\winpty-agent.exe
!endif
!if /FileExists "${VIMTOOLS}\libsodium.dll"
File ${VIMTOOLS}\libsodium.dll
!endif
SetOutPath $0\colors
File /r ${VIMRT}\colors\*.*
@ -388,17 +469,22 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\compiler\*.*
SetOutPath $0\doc
File ${VIMRT}\doc\*.txt
File /x uganda.nsis.txt ${VIMRT}\doc\*.txt
File ${VIMRT}\doc\tags
SetOutPath $0\ftplugin
File ${VIMRT}\ftplugin\*.*
SetOutPath $0\indent
File ${VIMRT}\indent\*.*
File ${VIMRT}\indent\README.txt
File ${VIMRT}\indent\*.vim
SetOutPath $0\keymap
File ${VIMRT}\keymap\README.txt
File ${VIMRT}\keymap\*.vim
SetOutPath $0\macros
File /r ${VIMRT}\macros\*.*
File /r /x *.info ${VIMRT}\macros\*.*
SetOutPath $0\pack
File /r ${VIMRT}\pack\*.*
@ -416,7 +502,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMSRC}\vim.ico
SetOutPath $0\syntax
File /r ${VIMRT}\syntax\*.*
File /r /x testdir /x generator /x Makefile ${VIMRT}\syntax\*.*
SetOutPath $0\spell
File ${VIMRT}\spell\*.txt
@ -428,7 +514,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\tools\*.*
SetOutPath $0\tutor
File ${VIMRT}\tutor\*.*
File /r /x *.info ${VIMRT}\tutor\*.*
SectionEnd
##########################################################
@ -554,15 +640,29 @@ SectionGroup $(str_group_plugin) id_group_plugin
SectionGroupEnd
##########################################################
!ifdef HAVE_NLS
!if ${HAVE_NLS}
Section "$(str_section_nls)" id_section_nls
SectionIn 1 3
SetOutPath $INSTDIR
!if /FileExists "..\lang\README.*.txt"
File ..\lang\README.*.txt
CopyFiles /SILENT /FILESONLY $INSTDIR\README.$lng_usr.txt \
$INSTDIR\vim${VER_MAJOR}${VER_MINOR}\README.$lng_usr.txt
Delete $INSTDIR\README.*.txt
!endif
!if /FileExists "..\lang\LICENSE.??.txt"
File ..\lang\LICENSE.??.txt
!if /FileExists "..\lang\LICENSE.??_??.txt"
File ..\lang\LICENSE.??_??.txt
!endif
CopyFiles /SILENT /FILESONLY $INSTDIR\LICENSE.$lng_usr.txt \
$INSTDIR\vim${VER_MAJOR}${VER_MINOR}\LICENSE.$lng_usr.txt
Delete $INSTDIR\LICENSE.*.txt
!endif
SetOutPath $0\lang
File /r ${VIMRT}\lang\*.*
SetOutPath $0\keymap
File ${VIMRT}\keymap\README.txt
File ${VIMRT}\keymap\*.vim
File /r /x Makefile ${VIMRT}\lang\*.*
SetOutPath $0
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext${BIT}\libintl-8.dll" \
@ -570,12 +670,14 @@ Section "$(str_section_nls)" id_section_nls
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext${BIT}\libiconv-2.dll" \
"$0\libiconv-2.dll" "$0"
!if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
!if ${INCLUDE_LIBGCC}
!if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
# Install libgcc_s_sjlj-1.dll only if it is needed.
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \
"$0\libgcc_s_sjlj-1.dll" "$0"
!endif
!endif
!endif
${If} ${SectionIsSelected} ${id_section_editwith}
${If} ${RunningX64}
@ -601,12 +703,14 @@ Section "$(str_section_nls)" id_section_nls
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libiconv-2.dll" \
"$0\GvimExt32\libiconv-2.dll" "$0\GvimExt32"
!if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
!if ${INCLUDE_LIBGCC}
!if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
# Install libgcc_s_sjlj-1.dll only if it is needed.
!insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
"${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
"$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
!endif
!endif
!endif
${EndIf}
SectionEnd
!endif
@ -647,7 +751,7 @@ Section -post
SectionGetSize ${id_section_editwith} $4
IntOp $3 $3 + $4
${EndIf}
!ifdef HAVE_NLS
!if ${HAVE_NLS}
${If} ${SectionIsSelected} ${id_section_nls}
SectionGetSize ${id_section_nls} $4
IntOp $3 $3 + $4
@ -677,7 +781,7 @@ Section -post
!insertmacro SaveSectionSelection ${id_section_vimrc} "select_vimrc"
!insertmacro SaveSectionSelection ${id_section_pluginhome} "select_pluginhome"
!insertmacro SaveSectionSelection ${id_section_pluginvim} "select_pluginvim"
!ifdef HAVE_NLS
!if ${HAVE_NLS}
!insertmacro SaveSectionSelection ${id_section_nls} "select_nls"
!endif
${If} ${RunningX64}
@ -710,11 +814,26 @@ SectionEnd
!macroend
Function .onInit
!ifdef HAVE_MULTI_LANG
!if ${HAVE_MULTI_LANG}
# Select a language (or read from the registry).
!insertmacro MUI_LANGDLL_DISPLAY
!endif
!if ${HAVE_NLS}
ClearErrors
System::Call 'kernel32::GetUserDefaultLocaleName(t.r19, *i${NSIS_MAX_STRLEN})'
StrCmp $R9 "zh-cn" coincide 0
StrCmp $R9 "zh-tw" coincide 0
StrCmp $R9 "pt-br" 0 part
coincide:
System::Call 'User32::CharLower(t r19 r19)*i${NSIS_MAX_STRLEN}'
${StrRep} $lng_usr "$R9" "-" "_"
Goto done
part:
StrCpy $lng_usr $R9 2
done:
!endif
${If} $INSTDIR == ${DEFAULT_INSTDIR}
# Check $VIM
ReadEnvStr $3 "VIM"
@ -748,7 +867,7 @@ Function .onInit
!insertmacro LoadSectionSelection ${id_section_vimrc} "select_vimrc"
!insertmacro LoadSectionSelection ${id_section_pluginhome} "select_pluginhome"
!insertmacro LoadSectionSelection ${id_section_pluginvim} "select_pluginvim"
!ifdef HAVE_NLS
!if ${HAVE_NLS}
!insertmacro LoadSectionSelection ${id_section_nls} "select_nls"
!endif
# Load the default _vimrc settings from the registry (if any).
@ -806,12 +925,12 @@ Function SetCustom
# 1st group - Compatibility
${NSD_CreateGroupBox} 0 0 100% 32% $(str_msg_compat_title)
${NSD_CreateGroupBox} 0u 0u 296u 44u $(str_msg_compat_title)
Pop $3
${NSD_CreateLabel} 5% 10% 35% 8% $(str_msg_compat_desc)
${NSD_CreateLabel} 16u 14u 269u 10u $(str_msg_compat_desc)
Pop $3
${NSD_CreateDropList} 18% 19% 75% 8% ""
${NSD_CreateDropList} 42u 26u 237u 13u ""
Pop $vim_nsd_compat
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vi)
${NSD_CB_AddString} $vim_nsd_compat $(str_msg_compat_vim)
@ -831,12 +950,12 @@ Function SetCustom
# 2nd group - Key remapping
${NSD_CreateGroupBox} 0 35% 100% 31% $(str_msg_keymap_title)
${NSD_CreateGroupBox} 0u 48u 296u 44u $(str_msg_keymap_title)
Pop $3
${NSD_CreateLabel} 5% 45% 90% 8% $(str_msg_keymap_desc)
${NSD_CreateLabel} 16u 62u 269u 10u $(str_msg_keymap_desc)
Pop $3
${NSD_CreateDropList} 38% 54% 55% 8% ""
${NSD_CreateDropList} 42u 74u 236u 13u ""
Pop $vim_nsd_keymap
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_default)
${NSD_CB_AddString} $vim_nsd_keymap $(str_msg_keymap_windows)
@ -850,12 +969,12 @@ Function SetCustom
# 3rd group - Mouse behavior
${NSD_CreateGroupBox} 0 69% 100% 31% $(str_msg_mouse_title)
${NSD_CreateGroupBox} 0u 95u 296u 44u $(str_msg_mouse_title)
Pop $3
${NSD_CreateLabel} 5% 79% 90% 8% $(str_msg_mouse_desc)
${NSD_CreateLabel} 16u 108u 269u 10u $(str_msg_mouse_desc)
Pop $3
${NSD_CreateDropList} 23% 87% 70% 8% ""
${NSD_CreateDropList} 42u 121u 237u 13u ""
Pop $vim_nsd_mouse
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_default)
${NSD_CB_AddString} $vim_nsd_mouse $(str_msg_mouse_windows)
@ -922,7 +1041,7 @@ FunctionEnd
!insertmacro MUI_DESCRIPTION_TEXT ${id_group_plugin} $(str_desc_plugin)
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginhome} $(str_desc_plugin_home)
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_pluginvim} $(str_desc_plugin_vim)
!ifdef HAVE_NLS
!if ${HAVE_NLS}
!insertmacro MUI_DESCRIPTION_TEXT ${id_section_nls} $(str_desc_nls)
!endif
!insertmacro MUI_FUNCTION_DESCRIPTION_END
@ -932,7 +1051,7 @@ FunctionEnd
# Uninstaller Functions and Sections
Function un.onInit
!ifdef HAVE_MULTI_LANG
!if ${HAVE_MULTI_LANG}
# Get the language from the registry.
!insertmacro MUI_UNGETLANGUAGE
!endif
@ -942,7 +1061,7 @@ Section "un.$(str_unsection_register)" id_unsection_register
SectionIn RO
# Apparently $INSTDIR is set to the directory where the uninstaller is
# created. Thus the "vim61" directory is included in it.
# created. Thus the "vim91" directory is included in it.
StrCpy $0 "$INSTDIR"
# delete the context menu entry and batch files
@ -1039,6 +1158,7 @@ Section "un.$(str_unsection_exe)" id_unsection_exe
RMDir /r $0\tutor
RMDir /r $0\lang
RMDir /r $0\keymap
RMDir /r $0\bitmaps
Delete $0\*.exe
Delete $0\*.bat
Delete $0\*.vim
@ -1048,14 +1168,17 @@ Section "un.$(str_unsection_exe)" id_unsection_exe
MessageBox MB_OK|MB_ICONEXCLAMATION $(str_msg_rm_exe_fail) /SD IDOK
${EndIf}
# No error message if the "vim62" directory can't be removed, the
# No error message if the "vim91" directory can't be removed, the
# gvimext.dll may still be there.
RMDir $0
SectionEnd
# Remove "vimfiles" directory under the specified directory.
!macro RemoveVimfiles dir
${If} ${FileExists} ${dir}\vimfiles
${If} ${FileExists} ${dir}\_viminfo
Delete ${dir}\_viminfo
${EndIf}
${If} ${DirExists} ${dir}\vimfiles
RMDir ${dir}\vimfiles\colors
RMDir ${dir}\vimfiles\compiler
RMDir ${dir}\vimfiles\doc
@ -1065,6 +1188,9 @@ SectionEnd
RMDir ${dir}\vimfiles\keymap
RMDir ${dir}\vimfiles\plugin
RMDir ${dir}\vimfiles\syntax
${If} ${FileExists} ${dir}\vimfiles\.netrwhist*
Delete ${dir}\vimfiles\.netrwhist*
${EndIf}
RMDir ${dir}\vimfiles
${EndIf}
!macroend

View File

@ -2,5 +2,6 @@
!ifndef __GVIM_VER__NSH__
!define __GVIM_VER__NSH__
!define VER_MAJOR 9
!define VER_MINOR 0
!define VER_MINOR 1
!define PATCHLEVEL 0
!endif

63
nsis/lang/README.txt Normal file
View File

@ -0,0 +1,63 @@
This directory contains a file with text strings for gVim installer.
It also contains files with translations of the text strings for gVim installer
into different languages.
For translators.
If you want to prepare a translation for the gVim installer, use the file
"english.nsi" as a master file. See the other translation files in this
directory.
Note that in the definition of the MUI_LANGUAGE macro, the name of the language
to be translated must be the English name of the language.
The name of the file with the translation must match the name of the target
language.
Also, when translating strings, pay attention to some restrictions on the
allowable length of strings. For example:
component description field - 117 characters;
description above the drop-down lists on the .vimrc page - 53 characters;
drop-down lists on the .vimrc page - 55 characters.
Characters in this case mean characters of the English alphabet.
Once the message translation file is ready, it must be included in the
"gvim.nsi" file.
Find the line "# Include support for other languages:" in the file "gvim.nsi"
and specify the name of the file with your translation below the line
!if ${HAVE_MULTI_LANG}, similar to the entries already there. File names are
specified in alphabetical order.
If you do not yet have a translated "LICENSE" file and/or a main "README.txt"
file, set the following values:
for the license file
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
for the readme.txt file
LangString vim_readme_file 0 "README.txt"
Once you have the translations of these files, then set the values for these
variables similarly to what is done in the other translation files.
Translation files should be located in the "lang" subdirectory of the root
directory. The name of the files is as follows: "README.xx.txt", where xx is the
language code according to ISO639.
There are two ways to test the installer in different languages:
1. Find and uncomment the "!define MUI_LANGDLL_ALWAYSSHOW" line in the
"gvim.nsi" file and rebuild the installer.
Now every time you run it, you will see a dialog box with the possibility to
select the language of the installer.
2. If the Vim editor is already installed in your system, delete the
"Installer Language" parameter in the Windows registry under
"HKEY_CURRENT_USER\Software\Vim".
Or you can create a file "NoLangInstallerVim.reg" with the following content:
Windows Registry Editor Version 5.00
[HKEY_CURRENT_USER\Software\Vim]
"Installer Language"=-
and apply it by double-clicking on it.
After these steps, when you start the installer, a window with the installer
language selection will also be displayed.

View File

@ -3,6 +3,7 @@
# danish.nsi: Danish language strings for gvim NSIS installer.
#
# Locale ID : 1030
# Locale Name : da
# fileencoding : UTF-8
# Author : scootergrisen
@ -14,6 +15,20 @@
LangString ^SetupCaption ${LANG_DANISH} "$(^Name) Setup"
LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_DANISH} "..\lang\LICENSE.da.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_DANISH} "README.da.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

View File

@ -17,6 +17,20 @@ LangString ^SetupCaption ${LANG_DUTCH} \
LangString ^UninstallCaption ${LANG_DUTCH} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_DUTCH} "..\lang\LICENSE.nl.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_DUTCH} "README.nl.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

View File

@ -3,6 +3,7 @@
# english.nsi: English language strings for gvim NSIS installer.
#
# Locale ID : 1033
# Locale Name : en
# fileencoding : UTF-8
# Author : Guopeng Wen, Ken Takata
@ -16,6 +17,18 @@ LangString ^SetupCaption ${LANG_ENGLISH} \
LangString ^UninstallCaption ${LANG_ENGLISH} \
"$(^Name) Uninstall"
##############################################################################
# License file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_ENGLISH} "..\lang\LICENSE.nsis.txt"
##############################################################################
# README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file ${LANG_ENGLISH} "README.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

View File

@ -3,6 +3,7 @@
# german.nsi : German language strings for gvim NSIS installer.
#
# Locale ID : 1031
# Locale Name : de
# fileencoding : UTF-8
# Author : Christian Brabandt, tux
@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_GERMAN} \
LangString ^UninstallCaption ${LANG_GERMAN} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_GERMAN} "..\lang\LICENSE.de.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_GERMAN} "README.de.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

291
nsis/lang/greek.nsi Normal file
View File

@ -0,0 +1,291 @@
# vi:set ts=8 sts=4 sw=4 et fdm=marker:
#
# greek.nsi: Greek language strings for gvim NSIS installer.
#
# Locale ID : 1032
# Locale Name : el
# fileencoding : UTF-8
# Author : Christos Longros
!insertmacro MUI_LANGUAGE "Greek"
# Overwrite the default translation.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_GREEK} \
"$(^Name) Setup"
LangString ^UninstallCaption ${LANG_GREEK} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_GREEK} "..\lang\LICENSE.el.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_GREEK} "README.el.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
#LangString str_dest_folder ${LANG_GREEK} \
# "Φάκελος προορισμός (Πρέπει να τελειώνει σε $\"vim$\")"
LangString str_show_readme ${LANG_GREEK} \
"Εμφάνιση README μετά την ολοκλήρωση της εγκατάστασης"
# Install types:
LangString str_type_typical ${LANG_GREEK} \
"Typical"
LangString str_type_minimal ${LANG_GREEK} \
"Minimal"
LangString str_type_full ${LANG_GREEK} \
"Full"
##############################################################################
# Section Titles & Description {{{1
##############################################################################
LangString str_section_old_ver ${LANG_GREEK} \
"Απεγκατάσταση υπάρχουσων εκδόσεων"
LangString str_desc_old_ver ${LANG_GREEK} \
"Απεγκατάσταση υπάρχουσων εκδόσεων Vim από το σύστημά σας."
LangString str_section_exe ${LANG_GREEK} \
"Vim GUI and runtime files"
LangString str_desc_exe ${LANG_GREEK} \
"Vim GUI executables and runtime files. This component is required."
LangString str_section_console ${LANG_GREEK} \
"Vim console program"
LangString str_desc_console ${LANG_GREEK} \
"Console version of Vim (vim.exe)."
LangString str_section_batch ${LANG_GREEK} \
"Δημιουργία αρχείων .bat"
LangString str_desc_batch ${LANG_GREEK} \
"Δημιουργία αρχείων .bat από παράγωγα Vim στον κατάλογο των Windows για \
χρήση γραμμής εντολών."
LangString str_group_icons ${LANG_GREEK} \
"Δημιουργία εικονιδίων Vim"
LangString str_desc_icons ${LANG_GREEK} \
"Δημιουργία εικονιδίων για τον Vim σε διάφορες τοποθεσίες για την διευκόλυνση της προσβασιμότητας."
LangString str_section_desktop ${LANG_GREEK} \
"Στην επιφάνεια εργασίας"
LangString str_desc_desktop ${LANG_GREEK} \
"Δημιουργία εικονιδίων για gVim εκτελέσιμα στην επιφάνεια εργασίας."
LangString str_section_start_menu ${LANG_GREEK} \
"In the Start Menu Programs Folder"
LangString str_desc_start_menu ${LANG_GREEK} \
"Προσθήκη του Vim στον φάκελο προγραμμάτων του μενού εκκίνησης."
#LangString str_section_quick_launch ${LANG_GREEK} \
# "In the Quick Launch Bar"
#LangString str_desc_quick_launch ${LANG_GREEK} \
# "Add Vim shortcut in the quick launch bar."
LangString str_section_edit_with ${LANG_GREEK} \
"Add Vim Context Menu"
LangString str_desc_edit_with ${LANG_GREEK} \
"Add Vim to the $\"Open With...$\" context menu list."
#LangString str_section_edit_with32 ${LANG_GREEK} \
# "32-bit Version"
#LangString str_desc_edit_with32 ${LANG_GREEK} \
# "Add Vim to the $\"Open With...$\" context menu list \
# for 32-bit applications."
#LangString str_section_edit_with64 ${LANG_GREEK} \
# "64-bit Version"
#LangString str_desc_edit_with64 ${LANG_GREEK} \
# "Add Vim to the $\"Open With...$\" context menu list \
# for 64-bit applications."
LangString str_section_vim_rc ${LANG_GREEK} \
"Δημιουργία προεπιλεγμένων ρυθμίσεων"
LangString str_desc_vim_rc ${LANG_GREEK} \
"Δημιουργία προεπιλεγμένου αρχείου ρυθμίσεων (_vimrc) αν δεν υπάρχει ήδη."
LangString str_group_plugin ${LANG_GREEK} \
"Δημιουργία καταλόγων Plugin"
LangString str_desc_plugin ${LANG_GREEK} \
"Δημιουργία καταλόγων plugin. Οι κατάλογοι Plugin επιτρέπουν την επέκταση του Vim \
με την μεταφορά ενός αρχείου σε έναν κατάλογο."
LangString str_section_plugin_home ${LANG_GREEK} \
"Private"
LangString str_desc_plugin_home ${LANG_GREEK} \
"Δημιουργία καταλόγων plugin στον κατάλογο HOME."
LangString str_section_plugin_vim ${LANG_GREEK} \
"Shared"
LangString str_desc_plugin_vim ${LANG_GREEK} \
"Δημιουργία καταλόγων plugin στον κατάλογο εγκατάστασης του Vim, χρησιμοποιείται από \
όλους στο σύστημα."
LangString str_section_nls ${LANG_GREEK} \
"Native Language Support"
LangString str_desc_nls ${LANG_GREEK} \
"Install files for native language support."
LangString str_unsection_register ${LANG_GREEK} \
"Unregister Vim"
LangString str_desc_unregister ${LANG_GREEK} \
"Unregister Vim from the system."
LangString str_unsection_exe ${LANG_GREEK} \
"Remove Vim Executables/Runtime Files"
LangString str_desc_rm_exe ${LANG_GREEK} \
"Remove all Vim executables and runtime files."
LangString str_ungroup_plugin ${LANG_GREEK} \
"Remove plugin directories"
LangString str_desc_rm_plugin ${LANG_GREEK} \
"Remove the plugin directories if they are empty."
LangString str_unsection_plugin_home ${LANG_GREEK} \
"Private"
LangString str_desc_rm_plugin_home ${LANG_GREEK} \
"Remove the plugin directories from HOME directory."
LangString str_unsection_plugin_vim ${LANG_GREEK} \
"Shared"
LangString str_desc_rm_plugin_vim ${LANG_GREEK} \
"Remove the plugin directories from Vim install directory."
LangString str_unsection_rootdir ${LANG_GREEK} \
"Remove the Vim root directory"
LangString str_desc_rm_rootdir ${LANG_GREEK} \
"Remove the Vim root directory. It contains your Vim configuration files!"
##############################################################################
# Messages {{{1
##############################################################################
#LangString str_msg_too_many_ver ${LANG_GREEK} \
# "Found $vim_old_ver_count Vim versions on your system.$\r$\n\
# This installer can only handle ${VIM_MAX_OLD_VER} versions \
# at most.$\r$\n\
# Please remove some versions and start again."
#LangString str_msg_invalid_root ${LANG_GREEK} \
# "Invalid install path: $vim_install_root!$\r$\n\
# It should end with $\"vim$\"."
#LangString str_msg_bin_mismatch ${LANG_GREEK} \
# "Binary path mismatch!$\r$\n$\r$\n\
# Expect the binary path to be $\"$vim_bin_path$\",$\r$\n\
# but system indicates the binary path is $\"$INSTDIR$\"."
#LangString str_msg_vim_running ${LANG_GREEK} \
# "Vim is still running on your system.$\r$\n\
# Please close all instances of Vim before you continue."
#LangString str_msg_register_ole ${LANG_GREEK} \
# "Attempting to register Vim with OLE. \
# There is no message indicates whether this works or not."
#LangString str_msg_unreg_ole ${LANG_GREEK} \
# "Attempting to unregister Vim with OLE. \
# There is no message indicates whether this works or not."
#LangString str_msg_rm_start ${LANG_GREEK} \
# "Uninstalling the following version:"
#LangString str_msg_rm_fail ${LANG_GREEK} \
# "Fail to uninstall the following version:"
#LangString str_msg_no_rm_key ${LANG_GREEK} \
# "Cannot find uninstaller registry key."
#LangString str_msg_no_rm_reg ${LANG_GREEK} \
# "Cannot find uninstaller from registry."
#LangString str_msg_no_rm_exe ${LANG_GREEK} \
# "Cannot access uninstaller."
#LangString str_msg_rm_copy_fail ${LANG_GREEK} \
# "Fail to copy uninstaller to temporary directory."
#LangString str_msg_rm_run_fail ${LANG_GREEK} \
# "Αποτυχία εκτέλεσης της λειτουργίας απεγκατάστασης."
#LangString str_msg_abort_install ${LANG_GREEK} \
# "Installer will abort."
LangString str_msg_install_fail ${LANG_GREEK} \
"Η εγκατάσταση απέτυχε. Better luck next time."
LangString str_msg_rm_exe_fail ${LANG_GREEK} \
"Μερικά αρχεία στο $0 δεν έχουν διαγραφεί!$\r$\n\
Πρέπει να το κάνετε χειροκίνητα."
#LangString str_msg_rm_root_fail ${LANG_GREEK} \
# "ΠΡΟΕΙΔΟΠΟΙΗΣΗ: Αδύνατη η αφαίρεση $\"$vim_install_root$\", δεν είναι κενό!"
LangString str_msg_uninstalling ${LANG_GREEK} \
"Απεγκατάσταση παλιάς έκδοσης the old version..."
LangString str_msg_registering ${LANG_GREEK} \
"Καταχώρηση..."
LangString str_msg_unregistering ${LANG_GREEK} \
"Unregistering..."
##############################################################################
# Dialog Box {{{1
##############################################################################
LangString str_vimrc_page_title ${LANG_GREEK} \
"Επιλογή ρυθμίσεων _vimrc"
LangString str_vimrc_page_subtitle ${LANG_GREEK} \
"Choose the settings for enhancement, keyboard and mouse."
LangString str_msg_compat_title ${LANG_GREEK} \
" Συμπεριφορά Vi / Vim "
LangString str_msg_compat_desc ${LANG_GREEK} \
"&Compatibility and enhancements"
LangString str_msg_compat_vi ${LANG_GREEK} \
"Vi compatible"
LangString str_msg_compat_vim ${LANG_GREEK} \
"Vim original"
LangString str_msg_compat_defaults ${LANG_GREEK} \
"Vim with some enhancements (load defaults.vim)"
LangString str_msg_compat_all ${LANG_GREEK} \
"Vim with all enhancements (load vimrc_example.vim) (Default)"
LangString str_msg_keymap_title ${LANG_GREEK} \
" Mappings "
LangString str_msg_keymap_desc ${LANG_GREEK} \
"&Remap a few keys for Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
LangString str_msg_keymap_default ${LANG_GREEK} \
"Do not remap keys (Default)"
LangString str_msg_keymap_windows ${LANG_GREEK} \
"Remap a few keys"
LangString str_msg_mouse_title ${LANG_GREEK} \
" Ποντίκι "
LangString str_msg_mouse_desc ${LANG_GREEK} \
"&Behavior of right and left buttons"
LangString str_msg_mouse_default ${LANG_GREEK} \
"Right: popup menu, Left: visual mode (Default)"
LangString str_msg_mouse_windows ${LANG_GREEK} \
"Right: popup menu, Left: select mode (Windows)"
LangString str_msg_mouse_unix ${LANG_GREEK} \
"Right: extends selection, Left: visual mode (Unix)"

View File

@ -3,6 +3,7 @@
# italian.nsi : Italian language strings for gvim NSIS installer.
#
# Locale ID : 1040
# Locale Name : it
# fileencoding : UTF-8
# Author : Antonio Colombo, bovirus - revision: 12.05.2023
@ -16,6 +17,18 @@ LangString ^SetupCaption ${LANG_ITALIAN} \
LangString ^UninstallCaption ${LANG_ITALIAN} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_ITALIAN} "..\lang\LICENSE.it.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file ${LANG_ITALIAN} "README.it.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

View File

@ -3,6 +3,7 @@
# japanese.nsi: Japanese language strings for gvim NSIS installer.
#
# Locale ID : 1041
# Locale Name : ja
# fileencoding : UTF-8
# Author : Ken Takata
@ -26,6 +27,20 @@ LangString ^SpaceRequired ${LANG_JAPANESE} \
LangString ^InstallBtn ${LANG_JAPANESE} \
"インストール(&I)"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_JAPANESE} "..\lang\LICENSE.ja.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_JAPANESE} "README.ja.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

291
nsis/lang/portuguesebr.nsi Normal file
View File

@ -0,0 +1,291 @@
# vi:set ts=8 sts=4 sw=4 et fdm=marker:
#
# portuguesebr.nsi: Brazilian Portuguese strings for gvim NSIS installer.
#
# Locale ID : 1046
# Locale Name : pt-BR
# fileencoding : UTF-8
# Author : Rafael Fontenelle
!insertmacro MUI_LANGUAGE "PortugueseBR"
# Overwrite the default translation.
# These strings should be always English. Otherwise dosinst.c fails.
LangString ^SetupCaption ${LANG_PORTUGUESEBR} \
"Configuração do $(^Name)"
LangString ^UninstallCaption ${LANG_PORTUGUESEBR} \
"Desinstalação do $(^Name)"
##############################################################################
# License file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_PORTUGUESEBR} "..\lang\LICENSE.pt_br.nsis.txt"
##############################################################################
# README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file ${LANG_PORTUGUESEBR} "README.pt_br.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
#LangString str_dest_folder ${LANG_PORTUGUESEBR} \
# "Pasta de destino (Deve terminar com $\"vim$\")"
LangString str_show_readme ${LANG_PORTUGUESEBR} \
"Mostrar o README ao concluir a instalação"
# Install types:
LangString str_type_typical ${LANG_PORTUGUESEBR} \
"Típica"
LangString str_type_minimal ${LANG_PORTUGUESEBR} \
"Mínima"
LangString str_type_full ${LANG_PORTUGUESEBR} \
"Completa"
##############################################################################
# Section Titles & Description {{{1
##############################################################################
LangString str_section_old_ver ${LANG_PORTUGUESEBR} \
"Desinstalar versões existentes"
LangString str_desc_old_ver ${LANG_PORTUGUESEBR} \
"Desinstala versões do Vim existentes no seu sistema."
LangString str_section_exe ${LANG_PORTUGUESEBR} \
"Vim GUI e arquivos de runtime"
LangString str_desc_exe ${LANG_PORTUGUESEBR} \
"Executáveis e arquivos de runtime do Vim GUI. Este componente \
é obrigatório."
LangString str_section_console ${LANG_PORTUGUESEBR} \
"Programa de console do Vim"
LangString str_desc_console ${LANG_PORTUGUESEBR} \
"Versão de console do Vim (vim.exe)."
LangString str_section_batch ${LANG_PORTUGUESEBR} \
"Criar arquivos .bat"
LangString str_desc_batch ${LANG_PORTUGUESEBR} \
"Cria arquivos .bat para variantes do Vim no diretório Windows para \
usar na linha de comando."
LangString str_group_icons ${LANG_PORTUGUESEBR} \
"Criar ícones para o Vim"
LangString str_desc_icons ${LANG_PORTUGUESEBR} \
"Cria ícones para Vim em vários locais para facilitar o acesso rápido."
LangString str_section_desktop ${LANG_PORTUGUESEBR} \
"Na área de trabalho"
LangString str_desc_desktop ${LANG_PORTUGUESEBR} \
"Cria ícones para executáveis do gVim na área de trabalho."
LangString str_section_start_menu ${LANG_PORTUGUESEBR} \
"Na pasta Programas do Menu Iniciar"
LangString str_desc_start_menu ${LANG_PORTUGUESEBR} \
"Adiciona Vim na pasta de programas do menu iniciar."
#LangString str_section_quick_launch ${LANG_PORTUGUESEBR} \
# "Na barra de Inicialização Rápida"
#LangString str_desc_quick_launch ${LANG_PORTUGUESEBR} \
# "Adiciona um atalho para o Vim na barra de inicialização rápida."
LangString str_section_edit_with ${LANG_PORTUGUESEBR} \
"Adicionar menu de contexto do Vim"
LangString str_desc_edit_with ${LANG_PORTUGUESEBR} \
"Adiciona o Vim à lista $\"Abrir com...$\" do menu de contexto."
#LangString str_section_edit_with32 ${LANG_PORTUGUESEBR} \
# "Versão 32 bits"
#LangString str_desc_edit_with32 ${LANG_PORTUGUESEBR} \
# "Adiciona o Vim à lista $\"Abrir com...$\" do menu de contexto \
# para aplicativos 32 bits."
#LangString str_section_edit_with64 ${LANG_PORTUGUESEBR} \
# "Versão 64 bits"
#LangString str_desc_edit_with64 ${LANG_PORTUGUESEBR} \
# "Adiciona o Vim à lista $\"Abrir com...$\" do menu de contexto \
# para aplicativos 64 bits."
LangString str_section_vim_rc ${LANG_PORTUGUESEBR} \
"Criar configuração padrão"
LangString str_desc_vim_rc ${LANG_PORTUGUESEBR} \
"Cria um arquivo de configuração padrão (_vimrc) se não já existir."
LangString str_group_plugin ${LANG_PORTUGUESEBR} \
"Criar diretórios de plugins"
LangString str_desc_plugin ${LANG_PORTUGUESEBR} \
"Cria diretórios de plugins. Diretórios de plugins permitem estender \
o Vim adicionando um arquivo a um direótrio."
LangString str_section_plugin_home ${LANG_PORTUGUESEBR} \
"Privados"
LangString str_desc_plugin_home ${LANG_PORTUGUESEBR} \
"Cria diretórios de plugins no diretório HOME."
LangString str_section_plugin_vim ${LANG_PORTUGUESEBR} \
"Compartilhados"
LangString str_desc_plugin_vim ${LANG_PORTUGUESEBR} \
"Cria diretórios de plugins no diretório de instalação do Vim, \
o qual é usado por todos os usuários do sistema."
LangString str_section_nls ${LANG_PORTUGUESEBR} \
"Suporte ao idioma nativo"
LangString str_desc_nls ${LANG_PORTUGUESEBR} \
"Instala arquivos para suporte ao idioma nativo."
LangString str_unsection_register ${LANG_PORTUGUESEBR} \
"Desregistrar Vim"
LangString str_desc_unregister ${LANG_PORTUGUESEBR} \
"Remove os registras do Vim do sistema."
LangString str_unsection_exe ${LANG_PORTUGUESEBR} \
"Remover arquivos executáveis/runtime do Vim"
LangString str_desc_rm_exe ${LANG_PORTUGUESEBR} \
"Remove todos os arquivos executáveis e de runtime do Vim."
LangString str_ungroup_plugin ${LANG_PORTUGUESEBR} \
"Remover diretórios de plugins"
LangString str_desc_rm_plugin ${LANG_PORTUGUESEBR} \
"Remove os diretórios de plugins se eles estiverem vazios."
LangString str_unsection_plugin_home ${LANG_PORTUGUESEBR} \
"Privados"
LangString str_desc_rm_plugin_home ${LANG_PORTUGUESEBR} \
"Remove os diretórios de plugins do diretório HOME."
LangString str_unsection_plugin_vim ${LANG_PORTUGUESEBR} \
"Compartilhados"
LangString str_desc_rm_plugin_vim ${LANG_PORTUGUESEBR} \
"Remove os diretórios de plugins do diretório de instalação do Vim."
LangString str_unsection_rootdir ${LANG_PORTUGUESEBR} \
"Remover diretório raiz do Vim"
LangString str_desc_rm_rootdir ${LANG_PORTUGUESEBR} \
"Remove o diretório raiz do Vim. Ele contém seus \
arquivos de configuração do Vim!"
##############################################################################
# Messages {{{1
##############################################################################
#LangString str_msg_too_many_ver ${LANG_PORTUGUESEBR} \
# "Encontradas $vim_old_ver_count versões do Vim em seu sistema.$\r$\n\
# Este instalador só consegue lidar com ${VIM_MAX_OLD_VER} versões\
# no máximo.$\r$\n\
# Por favor, remova algumas versões e comece novamente."
#LangString str_msg_invalid_root ${LANG_PORTUGUESEBR} \
# "Caminho de instalação inválido: $vim_install_root!$\r$\n\
# Ele deve terminar com $\"vim$\"."
#LangString str_msg_bin_mismatch ${LANG_PORTUGUESEBR} \
# "Incompatibilidade de caminho de binários!$\r$\n$\r$\n\
# Esperava que o caminho de binários fosse $\"$vim_bin_path$\",$\r$\n\
# mas o sistema indica que o caminho de binários é $\"$INSTDIR$\"."
#LangString str_msg_vim_running ${LANG_PORTUGUESEBR} \
# "Vim ainda está em execução em seu sistema.$\r$\n\
# Por favor, feche todas as instâncias do Vim para poder continuar."
#LangString str_msg_register_ole ${LANG_PORTUGUESEBR} \
# "Tentativa de registrar o Vim com OLE. \
# Não há mensagem que indique se isso funciona ou não."
#LangString str_msg_unreg_ole ${LANG_PORTUGUESEBR} \
# "Tentando desregistrar o Vim com OLE. \
# Não há mensagem que indique se isso funciona ou não."
#LangString str_msg_rm_start ${LANG_PORTUGUESEBR} \
# "Desinstalando a seguinte versão:"
#LangString str_msg_rm_fail ${LANG_PORTUGUESEBR} \
# "Falha ao desinstalar a seguinte versão:"
#LangString str_msg_no_rm_key ${LANG_PORTUGUESEBR} \
# "Não foi possível encontrar a chave de registro do desinstalador."
#LangString str_msg_no_rm_reg ${LANG_PORTUGUESEBR} \
# "Não foi possível encontrar o desinstalador a partir do registro."
#LangString str_msg_no_rm_exe ${LANG_PORTUGUESEBR} \
# "Não foi possível acessar o desinstalador."
#LangString str_msg_rm_copy_fail ${LANG_PORTUGUESEBR} \
# "Falha ao copiar o desinstalador para um diretório temporário."
#LangString str_msg_rm_run_fail ${LANG_PORTUGUESEBR} \
# "Falha ao executar o desinstalador."
#LangString str_msg_abort_install ${LANG_PORTUGUESEBR} \
# "Instalador será interrompido."
LangString str_msg_install_fail ${LANG_PORTUGUESEBR} \
"A instalação falhou. Mais sorte na próxima vez."
LangString str_msg_rm_exe_fail ${LANG_PORTUGUESEBR} \
"Alguns arquivos em $0 não foram excluídos!$\r$\n\
Você deve fazê-lo manualmente."
#LangString str_msg_rm_root_fail ${LANG_PORTUGUESEBR} \
# "AVISO: Não foi possível remover $\"$vim_install_root$\", \
# pois não está vazio!"
LangString str_msg_uninstalling ${LANG_PORTUGUESEBR} \
"Desinstalando a versão antiga..."
LangString str_msg_registering ${LANG_PORTUGUESEBR} \
"Registrando..."
LangString str_msg_unregistering ${LANG_PORTUGUESEBR} \
"Desregistrando..."
##############################################################################
# Dialog Box {{{1
##############################################################################
LangString str_vimrc_page_title ${LANG_PORTUGUESEBR} \
"Escolher configurações do _vimrc"
LangString str_vimrc_page_subtitle ${LANG_PORTUGUESEBR} \
"Escolha as configurações para melhorias, teclado e mouse."
LangString str_msg_compat_title ${LANG_PORTUGUESEBR} \
" Comportamento Vi / Vim "
LangString str_msg_compat_desc ${LANG_PORTUGUESEBR} \
"&Compatibilidade e melhorias"
LangString str_msg_compat_vi ${LANG_PORTUGUESEBR} \
"Compatível com Vi"
LangString str_msg_compat_vim ${LANG_PORTUGUESEBR} \
"Vim original"
LangString str_msg_compat_defaults ${LANG_PORTUGUESEBR} \
"Vim com algumas melhorias (carrega defaults.vim)"
LangString str_msg_compat_all ${LANG_PORTUGUESEBR} \
"Vim com todas as melhorias (carrega vimrc_example.vim) (Padrão)"
LangString str_msg_keymap_title ${LANG_PORTUGUESEBR} \
" Mapeamentos "
LangString str_msg_keymap_desc ${LANG_PORTUGUESEBR} \
"&Remapear algumas teclas para o Windows (Ctrl-V, Ctrl-C, Ctrl-A, Ctrl-S, Ctrl-F, etc)"
LangString str_msg_keymap_default ${LANG_PORTUGUESEBR} \
"Não remapear teclas (Padrão)"
LangString str_msg_keymap_windows ${LANG_PORTUGUESEBR} \
"Remapear algumas teclas"
LangString str_msg_mouse_title ${LANG_PORTUGUESEBR} \
" Mouse "
LangString str_msg_mouse_desc ${LANG_PORTUGUESEBR} \
"&Comportamento de botões direito e esquerdo"
LangString str_msg_mouse_default ${LANG_PORTUGUESEBR} \
"Direito: menu popup, Esquerdo: modo visual (Padrão)"
LangString str_msg_mouse_windows ${LANG_PORTUGUESEBR} \
"Direito: menu popup, Esquerdo: modo de seleção (Windows)"
LangString str_msg_mouse_unix ${LANG_PORTUGUESEBR} \
"Direito: estende seleção, Esquerdo: modo visual (Unix)"

View File

@ -3,7 +3,7 @@
# russian.nsi: Russian language strings for gvim NSIS installer.
#
# Locale ID : 1049
# Locale name : ru-RU
# Locale name : ru
# fileencoding : UTF-8
# Author : Restorer
@ -17,25 +17,37 @@ LangString ^SetupCaption ${LANG_RUSSIAN} \
LangString ^UninstallCaption ${LANG_RUSSIAN} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_RUSSIAN} "..\lang\LICENSE.ru.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file ${LANG_RUSSIAN} "README.ru.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################
#LangString str_dest_folder ${LANG_RUSSIAN} \
# "Маршрут к каталогу установки (должен оканчиваться каталогом $\"vim$\")"
# "Маршрут установки программы (должен завершаться каталогом $\"vim$\")"
LangString str_show_readme ${LANG_RUSSIAN} \
"После окончания установки ознакомиться с кратким описанием"
" Ознакомиться с кратким описанием программы"
# Install types:
LangString str_type_typical ${LANG_RUSSIAN} \
"Стандартная"
"Стандартный"
LangString str_type_minimal ${LANG_RUSSIAN} \
"Минимальная"
"Минимальный"
LangString str_type_full ${LANG_RUSSIAN} \
"Полная"
"Полный"
##############################################################################
@ -50,59 +62,61 @@ LangString str_desc_old_ver ${LANG_RUSSIAN} \
LangString str_section_exe ${LANG_RUSSIAN} \
"Графический интерфейс и вспомогательные файлы"
LangString str_desc_exe ${LANG_RUSSIAN} \
"Графический интерфейс программы Vim и все необходимые для этого файлы. \
"Исполняемые файлы и все необходимые для работы программы файлы. \
Это обязательный компонент"
LangString str_section_console ${LANG_RUSSIAN} \
"Консольная программа Vim"
LangString str_desc_console ${LANG_RUSSIAN} \
"Вариант редактора Vim (vim.exe), используемый в командной оболочке"
"Вариант редактора Vim (vim.exe), используемый для работы в командной \
оболочке"
LangString str_section_batch ${LANG_RUSSIAN} \
"Создать командные файлы"
LangString str_desc_batch ${LANG_RUSSIAN} \
"Создание командных bat-файлов позволяющих работать с редактором \
Vim из командной строки Windows"
"Создание командных bat-файлов в каталоге Windows для работы с редактором \
Vim из командной строки"
LangString str_group_icons ${LANG_RUSSIAN} \
"Создать ярлыки для редактора Vim"
LangString str_desc_icons ${LANG_RUSSIAN} \
"Создание ярлыков редактора Vim для облегчения запуска программы"
"Создание ярлыков программы для удобного и быстрого запуска редактора Vim"
LangString str_section_desktop ${LANG_RUSSIAN} \
"На Рабочем столе"
LangString str_desc_desktop ${LANG_RUSSIAN} \
"Создание ярлыков программы Gvim на Рабочем столе"
"Создание ярлыков редактора Vim на Рабочем столе"
LangString str_section_start_menu ${LANG_RUSSIAN} \
"В меню кнопки Пуск"
LangString str_desc_start_menu ${LANG_RUSSIAN} \
"Создание ярлыков программы Gvim в меню кнопки Пуск"
"Создание ярлыков редактора Vim в меню кнопки Пуск"
#LangString str_section_quick_launch ${LANG_RUSSIAN} \
# "На панели быстрого запуска"
#LangString str_desc_quick_launch ${LANG_RUSSIAN} \
# "Создание ярлыков программы GVim на панели быстрого запуска"
# "Создание ярлыков редактора Vim на панели быстрого запуска"
LangString str_section_edit_with ${LANG_RUSSIAN} \
"В контекстном меню"
"Запуск редактора Vim из контекстного меню"
LangString str_desc_edit_with ${LANG_RUSSIAN} \
"Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню"
"Добавление необходимой строки в пункт контекстного меню \
«Открыть с помощью...»"
#LangString str_section_edit_with32 ${LANG_RUSSIAN} \
# "32-разрядная версия программы"
# "Для 32-разрядной версии программы"
#LangString str_desc_edit_with32 ${LANG_RUSSIAN} \
# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \
# для 32-разрядных приложений"
# "Добавление в пункт контекстного меню \
# «Открыть с помощью...» 32-разрядных приложений"
#LangString str_section_edit_with64 ${LANG_RUSSIAN} \
# "64-разрядная версия программы"
# "Для 64-разрядной версии программы"
#LangString str_desc_edit_with64 ${LANG_RUSSIAN} \
# "Добавление вызова программы Gvim в пункт $\"Открыть с помощью...$\" контекстного меню \
# для 64-разрядных приложений"
# "Добавление в пункт контекстного меню \
# «Открыть с помощью...» 64-разрядных приложений"
LangString str_section_vim_rc ${LANG_RUSSIAN} \
"Настройки программы по умолчанию"
"Начальная настройка программы"
LangString str_desc_vim_rc ${LANG_RUSSIAN} \
"Создание файла _vimrc с предустановленными настройками, если нет других \
файлов настроек"
@ -110,25 +124,31 @@ LangString str_desc_vim_rc ${LANG_RUSSIAN} \
LangString str_group_plugin ${LANG_RUSSIAN} \
"Создать каталог для подключаемых модулей"
LangString str_desc_plugin ${LANG_RUSSIAN} \
"Создание каталога для размещения подключаемых модулей, которые расширяют \
возможности редактора Vim"
"Создание каталога для подключаемых модулей, которые расширяют возможности \
редактора Vim"
LangString str_section_plugin_home ${LANG_RUSSIAN} \
"Личный каталог"
LangString str_desc_plugin_home ${LANG_RUSSIAN} \
"Создание каталога для подключаемых модулей в домашнем каталоге пользователя"
"В домашнем каталоге пользователя. Модули в этом каталоге доступны только \
этому пользователю"
LangString str_section_plugin_vim ${LANG_RUSSIAN} \
"Общий каталог"
LangString str_desc_plugin_vim ${LANG_RUSSIAN} \
"Создание каталога для подключаемых модулей в каталоге установки редактора Vim. \
Модули в этом каталоге будут доступны для любого пользователя \
зарегистрировавшегося в системе"
"В каталоге установки редактора Vim. Модули в этом каталоге доступны для \
всех пользователей"
#LangString str_section_vis_vim ${LANG_RUSSIAN} \
# "Подключаемый модуль VisVim"
#LangString str_desc_vis_vim ${LANG_RUSSIAN} \
# "Подключаемый модуль VisVim используется для интеграции с \
# Microsoft Visual Studio"
LangString str_section_nls ${LANG_RUSSIAN} \
"Поддержка региональных языков"
LangString str_desc_nls ${LANG_RUSSIAN} \
"Установка файлов для поддержки региональных языков операционной системы"
"Установка файлов для работы программе на различных региональных языках"
LangString str_unsection_register ${LANG_RUSSIAN} \
"Отменить регистрацию компонентов программы Vim"
@ -158,8 +178,8 @@ LangString str_desc_rm_plugin_vim ${LANG_RUSSIAN} \
LangString str_unsection_rootdir ${LANG_RUSSIAN} \
"Удалить основной каталог программы Vim"
LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \
"Удаление основного каталога программы Vim. В этом каталоге находятся файлы \
настроек!"
"Удаление основного каталога программы Vim. В этом каталоге находятся \
файлы настроек!"
##############################################################################
@ -199,10 +219,11 @@ LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \
# "Произошёл сбой при выполнении удаления следующих версий программы:"
#LangString str_msg_no_rm_key ${LANG_RUSSIAN} \
# "Не удалось найти раздел реестра, содержащий информацию об удалении программы"
# "Не удалось найти раздел реестра, содержащий информацию об удалении \
# программы"
#LangString str_msg_no_rm_reg ${LANG_RUSSIAN} \
# "Не удалось найти программу выполняющую удаление, указанную в разделе реестра"
# "Не удалось найти указанную в реестре программу, которая выполняет удаление"
#LangString str_msg_no_rm_exe ${LANG_RUSSIAN} \
# "Отсутствуют права на доступ к программе, выполняющей удаление"
@ -219,14 +240,15 @@ LangString str_desc_rm_rootdir ${LANG_RUSSIAN} \
LangString str_msg_install_fail ${LANG_RUSSIAN} \
"Произошла ошибка при установке программы. Попробуйте повторить установку \
немного попозже"
# когда луна будет в другой фазе и ветер должен дуть с юго‐запада
# когда Луна будет в другой фазе и ветер должен дуть с юго‐запада
LangString str_msg_rm_exe_fail ${LANG_RUSSIAN} \
"Некоторые файлы не были удалены из каталога $0 $\r$\n\
Необходимо выполнить их удаление самостоятельно"
#LangString str_msg_rm_root_fail ${LANG_RUSSIAN} \
# "Внимание! В каталоге $\"$vim_install_root$\" содержатся файлы. Удаление каталога не выполнено"
# "Внимание! В каталоге $\"$vim_install_root$\" содержатся файлы. Удаление \
# каталога не выполнено"
LangString str_msg_uninstalling ${LANG_RUSSIAN} \
"Удаление предыдущих версий программ..."
@ -245,7 +267,8 @@ LangString str_msg_unregistering ${LANG_RUSSIAN} \
LangString str_vimrc_page_title ${LANG_RUSSIAN} \
"Установка параметров программы"
LangString str_vimrc_page_subtitle ${LANG_RUSSIAN} \
"Параметры, используемые для клавиатуры, «мыши» и функциональности программы"
"Параметры, используемые для клавиатуры, манипулятора «мышь» и \
функциональности программы"
LangString str_msg_compat_title ${LANG_RUSSIAN} \
" Варианты использования программы "
@ -256,27 +279,26 @@ LangString str_msg_compat_vi ${LANG_RUSSIAN} \
LangString str_msg_compat_vim ${LANG_RUSSIAN} \
"Работа в варианте функциональности редактора Vim"
LangString str_msg_compat_defaults ${LANG_RUSSIAN} \
"Работа редактора Vim с некоторыми улучшениями (файл defaults.vim)"
"Включить некоторые улучшения (из файла defaults.vim)"
LangString str_msg_compat_all ${LANG_RUSSIAN} \
"Работа редактора Vim со всеми улучшениями (файл vimrc_example.vim). \
Используется по умолчанию"
"Включить все улучшения (из файла vimrc_example.vim). Стандартно"
LangString str_msg_keymap_title ${LANG_RUSSIAN} \
" Клавиатурные команды "
LangString str_msg_keymap_desc ${LANG_RUSSIAN} \
"Клавиатурные команды используемые в ОС Windows (CTRL+V, CTRL+C, CTRL+S, CTRL+F и т. п.)"
"Изменение клавиатурных команд CTRL+V, CTRL+C, CTRL+S, CTRL+F и т. п."
LangString str_msg_keymap_default ${LANG_RUSSIAN} \
"Не изменять клавиатурные команды. Использовать принятые в редакторе Vim"
"Без изменения, использовать как принято в редакторе Vim"
LangString str_msg_keymap_windows ${LANG_RUSSIAN} \
"Изменить указанные клавиатурные команды"
"Изменить и использовать как принято в ОС Windows"
LangString str_msg_mouse_title ${LANG_RUSSIAN} \
" Манипулятор «мышь» "
LangString str_msg_mouse_desc ${LANG_RUSSIAN} \
"Действий правой и левой кнопки манипулятора «мышь»"
"Действия правой и левой кнопки манипулятора «мышь»"
LangString str_msg_mouse_default ${LANG_RUSSIAN} \
"Правая кнопка — всплывающее меню, левая кнопка — режим визуальный"
"Правая — всплывающее меню, левая — режим визуальный (Vim)"
LangString str_msg_mouse_windows ${LANG_RUSSIAN} \
"Правая кнопка — всплывающее меню, левая кнопка — режим выборки (как в ОС Windows)"
"Правая — всплывающее меню, левая — режим выборки (Windows)"
LangString str_msg_mouse_unix ${LANG_RUSSIAN} \
"Правая кнопка — расширяемый режим выбора, левая кнопка — режим визуальный (как в UNIXподобных ОС)"
"Правая — расширение выборки, левая — режим визуальный (UNIX)"

View File

@ -3,10 +3,11 @@
# serbian.nsi: Serbian language strings for gvim NSIS installer.
#
# Locale ID : 3098
# Locale Name : sr
# fileencoding : UTF-8
# Author : Ivan Pešić
!insertmacro MUI_LANGUAGE "Српски"
!insertmacro MUI_LANGUAGE "Serbian"
# Overwrite the default translation.
@ -16,6 +17,20 @@ LangString ^SetupCaption ${LANG_SERBIAN} \
LangString ^UninstallCaption ${LANG_SERBIAN} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_SERBIAN} "..\lang\LICENSE.sr.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_SERBIAN} "README.sr.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

View File

@ -4,6 +4,7 @@
# installer.
#
# Locale ID : 2052
# Locale Name : cn
# fileencoding : UTF-8
# Author : Guopeng Wen, David Liu
@ -17,6 +18,21 @@ LangString ^SetupCaption ${LANG_SIMPCHINESE} \
LangString ^UninstallCaption ${LANG_SIMPCHINESE} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \
# "..\lang\LICENSE.zh_cn.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.zh_cn.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

View File

@ -4,6 +4,7 @@
# installer.
#
# Locale ID : 1028
# Locale Name : tw
# fileencoding : UTF-8
# Author : Guopeng Wen
@ -17,6 +18,21 @@ LangString ^SetupCaption ${LANG_TRADCHINESE} \
LangString ^UninstallCaption ${LANG_TRADCHINESE} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_TRADCHINESE} \
# "..\lang\LICENSE.zh_tw.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_TRADCHINESE} "README.zh_tw.txt"
##############################################################################
# MUI Configuration Strings {{{1
##############################################################################

View File

@ -1,4 +1,9 @@
# vi:set ts=8 sts=4 sw=4 et fdm=marker:
#
# turkish.nsi: Turkish language strings for gvim NSIS installer.
#
# Locale ID : 1055
# Locale Name : tr
# fileencoding : UTF-8
# Author : Emir SARI
@ -11,6 +16,22 @@ LangString ^SetupCaption ${LANG_TURKISH} \
LangString ^UninstallCaption ${LANG_TURKISH} \
"$(^Name) Uninstall"
##############################################################################
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_TURKISH} "..\lang\LICENSE.tr.nsis.txt"
##############################################################################
# Translated README.txt file, which is opened after installation {{{1
##############################################################################
LangString vim_readme_file 0 "README.txt"
#LangString vim_readme_file ${LANG_TURKISH} "README.tr.txt"
##############################################################################
LangString str_show_readme ${LANG_TURKISH} \
"Kurulum bittikten sonra README dosyasını"

149
runtime/autoload/cargo.vim Normal file
View File

@ -0,0 +1,149 @@
" Last Modified: 2023-09-11
function! cargo#Load()
" Utility call to get this script loaded, for debugging
endfunction
function! cargo#cmd(args) abort
" Trim trailing spaces. This is necessary since :terminal command parses
" trailing spaces as an empty argument.
let args = substitute(a:args, '\s\+$', '', '')
if exists('g:cargo_shell_command_runner')
let cmd = g:cargo_shell_command_runner
elseif has('terminal')
let cmd = 'terminal'
elseif has('nvim')
let cmd = 'noautocmd new | terminal'
else
let cmd = '!'
endif
execute cmd 'cargo' args
endfunction
function! s:nearest_cargo(...) abort
" If the second argument is not specified, the first argument determines
" whether we will start from the current directory or the directory of the
" current buffer, otherwise, we start with the provided path on the
" second argument.
let l:is_getcwd = get(a:, 1, 0)
if l:is_getcwd
let l:starting_path = get(a:, 2, getcwd())
else
let l:starting_path = get(a:, 2, expand('%:p:h'))
endif
return findfile('Cargo.toml', l:starting_path . ';')
endfunction
function! cargo#nearestCargo(is_getcwd) abort
return s:nearest_cargo(a:is_getcwd)
endfunction
function! cargo#nearestWorkspaceCargo(is_getcwd) abort
let l:nearest = s:nearest_cargo(a:is_getcwd)
while l:nearest !=# ''
for l:line in readfile(l:nearest, '', 0x100)
if l:line =~# '\V[workspace]'
return l:nearest
endif
endfor
let l:next = fnamemodify(l:nearest, ':p:h:h')
let l:nearest = s:nearest_cargo(0, l:next)
endwhile
return ''
endfunction
function! cargo#nearestRootCargo(is_getcwd) abort
" Try to find a workspace Cargo.toml, and if not found, take the nearest
" regular Cargo.toml
let l:workspace_cargo = cargo#nearestWorkspaceCargo(a:is_getcwd)
if l:workspace_cargo !=# ''
return l:workspace_cargo
endif
return s:nearest_cargo(a:is_getcwd)
endfunction
function! cargo#build(args)
call cargo#cmd("build " . a:args)
endfunction
function! cargo#check(args)
call cargo#cmd("check " . a:args)
endfunction
function! cargo#clean(args)
call cargo#cmd("clean " . a:args)
endfunction
function! cargo#doc(args)
call cargo#cmd("doc " . a:args)
endfunction
function! cargo#new(args)
call cargo#cmd("new " . a:args)
cd `=a:args`
endfunction
function! cargo#init(args)
call cargo#cmd("init " . a:args)
endfunction
function! cargo#run(args)
call cargo#cmd("run " . a:args)
endfunction
function! cargo#test(args)
call cargo#cmd("test " . a:args)
endfunction
function! cargo#bench(args)
call cargo#cmd("bench " . a:args)
endfunction
function! cargo#update(args)
call cargo#cmd("update " . a:args)
endfunction
function! cargo#search(args)
call cargo#cmd("search " . a:args)
endfunction
function! cargo#publish(args)
call cargo#cmd("publish " . a:args)
endfunction
function! cargo#install(args)
call cargo#cmd("install " . a:args)
endfunction
function! cargo#runtarget(args)
let l:filename = expand('%:p')
let l:read_manifest = system('cargo read-manifest')
let l:metadata = json_decode(l:read_manifest)
let l:targets = get(l:metadata, 'targets', [])
let l:did_run = 0
for l:target in l:targets
let l:src_path = get(l:target, 'src_path', '')
let l:kinds = get(l:target, 'kind', [])
let l:name = get(l:target, 'name', '')
if l:src_path == l:filename
if index(l:kinds, 'example') != -1
let l:did_run = 1
call cargo#run("--example " . shellescape(l:name) . " " . a:args)
return
elseif index(l:kinds, 'bin') != -1
let l:did_run = 1
call cargo#run("--bin " . shellescape(l:name) . " " . a:args)
return
endif
endif
endfor
if l:did_run != 1
call cargo#run(a:args)
return
endif
endfunction
" vim: set et sw=4 sts=4 ts=8:

View File

@ -0,0 +1,29 @@
" Last Modified: 2023-09-11
function! cargo#quickfix#CmdPre() abort
if &filetype ==# 'rust' && get(b:, 'current_compiler', '') ==# 'cargo' &&
\ &makeprg =~ '\V\^cargo\ \.\*'
" Preserve the current directory, and 'lcd' to the nearest Cargo file.
let b:rust_compiler_cargo_qf_has_lcd = haslocaldir()
let b:rust_compiler_cargo_qf_prev_cd = getcwd()
let b:rust_compiler_cargo_qf_prev_cd_saved = 1
let l:nearest = fnamemodify(cargo#nearestRootCargo(0), ':h')
execute 'lchdir! '.l:nearest
else
let b:rust_compiler_cargo_qf_prev_cd_saved = 0
endif
endfunction
function! cargo#quickfix#CmdPost() abort
if exists("b:rust_compiler_cargo_qf_prev_cd_saved") && b:rust_compiler_cargo_qf_prev_cd_saved
" Restore the current directory.
if b:rust_compiler_cargo_qf_has_lcd
execute 'lchdir! '.b:rust_compiler_cargo_qf_prev_cd
else
execute 'chdir! '.b:rust_compiler_cargo_qf_prev_cd
endif
let b:rust_compiler_cargo_qf_prev_cd_saved = 0
endif
endfunction
" vim: set et sw=4 sts=4 ts=8:

View File

@ -3,7 +3,7 @@ vim9script noclear
# Vim completion script
# Language: C
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Last Change: 2024 Jun 06
# Rewritten in Vim9 script by github user lacygoill
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
@ -210,7 +210,7 @@ export def Complete(findstart: bool, abase: string): any # {{{1
# Find the variable in the tags file(s)
var diclist: list<dict<any>> = taglist('^' .. items[0] .. '$')
# Remove members, these can't appear without something in front.
->filter((_, v: dict<string>): bool =>
->filter((_, v: dict<any>): bool =>
v->has_key('kind') ? v.kind != 'm' : true)
res = []

View File

@ -3,7 +3,7 @@ vim9script
# Language: ConTeXt typesetting engine
# Maintainer: Nicola Vitacolonna <nvitacolonna@gmail.com>
# Former Maintainers: Nikolai Weibull <now@bitwi.se>
# Latest Revision: 2022 Sep 19
# Latest Revision: 2023 Dec 26
# Typesetting {{{
import autoload './typeset.vim'

View File

@ -2,15 +2,19 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Jul 09
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
# These functions are moved here from runtime/filetype.vim to make startup
# faster.
var prolog_pattern = '^\s*\(:-\|%\+\(\s\|$\)\|\/\*\)\|\.\s*$'
export def Check_inp()
if getline(1) =~ '^\*'
if getline(1) =~ '%%'
setf tex
elseif getline(1) =~ '^\*'
setf abaqus
else
var n = 1
@ -26,7 +30,7 @@ export def Check_inp()
enddef
# This function checks for the kind of assembly that is wanted by the user, or
# can be detected from the first five lines of the file.
# can be detected from the beginning of the file.
export def FTasm()
# make sure b:asmsyntax exists
if !exists("b:asmsyntax")
@ -57,9 +61,30 @@ export def FTasmsyntax()
var match = matchstr(head, '\sasmsyntax=\zs[a-zA-Z0-9]\+\ze\s')
if match != ''
b:asmsyntax = match
elseif ((head =~? '\.title') || (head =~? '\.ident') || (head =~? '\.macro') || (head =~? '\.subtitle') || (head =~? '\.library'))
b:asmsyntax = "vmasm"
return
endif
# Use heuristics
var is_slash_star_encountered = false
var i = 1
const n = min([50, line("$")])
while i <= n
const line = getline(i)
if line =~ '^/\*'
is_slash_star_encountered = true
endif
if line =~# '^; Listing generated by Microsoft' || line =~? '^\%(\%(CONST\|_BSS\|_DATA\|_TEXT\)\s\+SEGMENT\>\)\|\s*\.[2-6]86P\?\>\|\s*\.XMM\>'
b:asmsyntax = "masm"
return
elseif line =~ 'Texas Instruments Incorporated' || (line =~ '^\*' && !is_slash_star_encountered)
# tiasm uses `* commment`, but detection is unreliable if '/*' is seen
b:asmsyntax = "tiasm"
return
elseif ((line =~? '\.title\>\|\.ident\>\|\.macro\>\|\.subtitle\>\|\.library\>'))
b:asmsyntax = "vmasm"
return
endif
i += 1
endwhile
enddef
var ft_visual_basic_content = '\c^\s*\%(Attribute\s\+VB_Name\|Begin\s\+\%(VB\.\|{\%(\x\+-\)\+\x\+}\)\)'
@ -140,6 +165,14 @@ export def FTcfg()
endif
enddef
export def FTcl()
if join(getline(1, 4), '') =~ '/\*'
setf opencl
else
setf lisp
endif
enddef
export def FTcls()
if exists("g:filetype_cls")
exe "setf " .. g:filetype_cls
@ -165,6 +198,23 @@ export def FTcls()
endif
enddef
export def FTll()
if getline(1) =~ ';\|\<source_filename\>\|\<target\>'
setf llvm
return
endif
var n = 1
while n < 100 && n <= line("$")
var line = getline(n)
if line =~ '^\s*%'
setf lex
return
endif
n += 1
endwhile
setf lifelines
enddef
export def FTlpc()
if exists("g:lpc_syntax_for_c")
var lnum = 1
@ -179,19 +229,36 @@ export def FTlpc()
setf c
enddef
export def FTheader()
if match(getline(1, min([line("$"), 200])), '^@\(interface\|end\|class\)') > -1
if exists("g:c_syntax_for_h")
setf objc
else
setf objcpp
# Searches within the first `maxlines` lines of the file for distinctive
# Objective-C or C++ syntax and returns the appropriate filetype. Returns a
# null_string if the search was inconclusive.
def CheckObjCOrCpp(maxlines = 100): string
var n = 1
while n < maxlines && n <= line('$')
const line = getline(n)
if line =~ '\v^\s*\@%(class|interface|end)>'
return 'objcpp'
elseif line =~ '\v^\s*%(class|namespace|template|using)>'
return 'cpp'
endif
elseif exists("g:c_syntax_for_h")
++n
endwhile
return null_string
enddef
# Determines whether a *.h file is C, C++, Ch, or Objective-C/Objective-C++.
export def FTheader()
if exists('g:filetype_h')
execute $'setf {g:filetype_h}'
elseif exists('g:c_syntax_for_h')
setf c
elseif exists("g:ch_syntax_for_h")
elseif exists('g:ch_syntax_for_h')
setf ch
else
setf cpp
# Search the first 100 lines of the file for distinctive Objective-C or C++
# syntax and set the filetype accordingly. Otherwise, use C as the default
# filetype.
execute $'setf {CheckObjCOrCpp() ?? 'c'}'
endif
enddef
@ -279,6 +346,23 @@ export def DtraceCheck()
endif
enddef
export def FTdef()
# LaTeX def files are usually generated by docstrip, which will output '%%' in first line
if getline(1) =~ '%%'
setf tex
endif
if get(g:, "filetype_def", "") == "modula2" || IsModula2()
SetFiletypeModula2()
return
endif
if exists("g:filetype_def")
exe "setf " .. g:filetype_def
else
setf def
endif
enddef
export def FTe()
if exists('g:filetype_euphoria')
exe 'setf ' .. g:filetype_euphoria
@ -357,18 +441,64 @@ export def FTfs()
endif
enddef
# Distinguish between HTML, XHTML and Django
# Recursively search for Hare source files in a directory and any
# subdirectories, up to a given depth.
def IsHareModule(dir: string, depth: number): bool
if depth <= 0
return !empty(glob(dir .. '/*.ha'))
endif
return reduce(sort(glob(dir .. '/*', true, true),
(a, b) => isdirectory(a) - isdirectory(b)),
(acc, n) => acc
|| n =~ '\.ha$'
|| isdirectory(n)
&& IsHareModule(n, depth - 1),
false)
enddef
# Determine if a README file exists within a Hare module and should be given the
# Haredoc filetype.
export def FTharedoc()
if exists('g:filetype_haredoc')
if IsHareModule('<afile>:h', get(g:, 'haredoc_search_depth', 1))
setf haredoc
endif
endif
enddef
# Distinguish between HTML, XHTML, Django and Angular
export def FThtml()
var n = 1
while n < 10 && n <= line("$")
# Test if the filename follows the Angular component template convention
# Disabled for the reasons mentioned here: #13594
# if expand('%:t') =~ '^.*\.component\.html$'
# setf htmlangular
# return
# endif
while n < 40 && n <= line("$")
# Check for Angular
if getline(n) =~ '@\(if\|for\|defer\|switch\)\|\*\(ngIf\|ngFor\|ngSwitch\|ngTemplateOutlet\)\|ng-template\|ng-content'
setf htmlangular
return
endif
# Check for XHTML
if getline(n) =~ '\<DTD\s\+XHTML\s'
setf xhtml
return
endif
if getline(n) =~ '{%\s*\(extends\|block\|load\)\>\|{#\s\+'
# Check for Django
if getline(n) =~ '{%\s*\(autoescape\|block\|comment\|csrf_token\|cycle\|debug\|extends\|filter\|firstof\|for\|if\|ifchanged\|include\|load\|lorem\|now\|query_string\|regroup\|resetcycle\|spaceless\|templatetag\|url\|verbatim\|widthratio\|with\)\>\|{#\s\+'
setf htmldjango
return
endif
# Check for SuperHTML
if getline(n) =~ '<extend\|<super>'
setf superhtml
return
endif
n += 1
endwhile
setf FALLBACK html
@ -387,20 +517,24 @@ export def FTidl()
setf idl
enddef
# Distinguish between "default", Prolog and Cproto prototype file.
# Distinguish between "default", Prolog, zsh module's C and Cproto prototype file.
export def ProtoCheck(default: string)
# zsh modules use '#include "*.pro"'
# https://github.com/zsh-users/zsh/blob/63f086d167960a27ecdbcb762179e2c2bf8a29f5/Src/Modules/example.c#L31
if getline(1) =~ '/* Generated automatically */'
setf c
# Cproto files have a comment in the first line and a function prototype in
# the second line, it always ends in ";". Indent files may also have
# comments, thus we can't match comments to see the difference.
# IDL files can have a single ';' in the second line, require at least one
# chacter before the ';'.
if getline(2) =~ '.;$'
elseif getline(2) =~ '.;$'
setf cpp
else
# recognize Prolog by specific text in the first non-empty line
# require a blank after the '%' because Perl uses "%list" and "%translate"
var lnum = getline(nextnonblank(1))
if lnum =~ '\<prolog\>' || lnum =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || lnum =~ ':-'
if lnum =~ '\<prolog\>' || lnum =~ prolog_pattern
setf prolog
else
exe 'setf ' .. default
@ -465,6 +599,55 @@ export def FTm()
endif
enddef
export def FTmake()
# Check if it is a BSD, GNU, or Microsoft Makefile
unlet! b:make_flavor
# 1. filename
if expand('%:t') == 'BSDmakefile'
b:make_flavor = 'bsd'
setf make
return
elseif expand('%:t') == 'GNUmakefile'
b:make_flavor = 'gnu'
setf make
return
endif
# 2. user's setting
if exists('g:make_flavor')
b:make_flavor = g:make_flavor
setf make
return
elseif get(g:, 'make_microsoft')
echom "make_microsoft is deprecated; try g:make_flavor = 'microsoft' instead"
b:make_flavor = 'microsoft'
setf make
return
endif
# 3. try to detect a flavor from file content
var n = 1
while n < 1000 && n <= line('$')
var line = getline(n)
if line =~? '^\s*!\s*\(ifn\=\(def\)\=\|include\|message\|error\)\>'
b:make_flavor = 'microsoft'
break
elseif line =~ '^\.\%(export\|error\|for\|if\%(n\=\%(def\|make\)\)\=\|info\|warning\)\>'
b:make_flavor = 'bsd'
break
elseif line =~ '^ *\%(ifn\=\%(eq\|def\)\|define\|override\)\>'
b:make_flavor = 'gnu'
break
elseif line =~ '\$[({][a-z-]\+\s\+\S\+' # a function call, e.g. $(shell pwd)
b:make_flavor = 'gnu'
break
endif
n += 1
endwhile
setf make
enddef
export def FTmms()
var n = 1
while n < 20
@ -482,14 +665,19 @@ export def FTmms()
setf mmix
enddef
# This function checks if one of the first five lines start with a dot. In
# that case it is probably an nroff file: 'filetype' is set and 1 is returned.
# This function checks if one of the first five lines start with a typical
# nroff pattern in man files. In that case it is probably an nroff file:
# 'filetype' is set and 1 is returned.
export def FTnroff(): number
if getline(1)[0] .. getline(2)[0] .. getline(3)[0]
.. getline(4)[0] .. getline(5)[0] =~ '\.'
setf nroff
return 1
endif
var n = 1
while n <= 5
var line = getline(n)
if line =~ '^\%([.'']\s*\%(TH\|D[dt]\|S[Hh]\|d[es]1\?\|so\)\s\+\S\|[.'']\s*ig\>\|\%([.'']\s*\)\?\\"\)'
setf nroff
return 1
endif
n += 1
endwhile
return 0
enddef
@ -517,16 +705,53 @@ def IsLProlog(): bool
return getline(lnum) =~ '\<module\s\+\w\+\s*\.\s*\(%\|$\)'
enddef
def IsModula2(): bool
return getline(nextnonblank(1)) =~ '\<MODULE\s\+\w\+\s*\%(\[.*]\s*\)\=;\|^\s*(\*'
enddef
def SetFiletypeModula2()
const KNOWN_DIALECTS = ["iso", "pim", "r10"]
const KNOWN_EXTENSIONS = ["gm2"]
const LINE_COUNT = 200
const TAG = '(\*!m2\(\w\+\)\%(+\(\w\+\)\)\=\*)'
var dialect = get(g:, "modula2_default_dialect", "pim")
var extension = get(g:, "modula2_default_extension", "")
var matches = []
# ignore unknown dialects or badly formatted tags
for lnum in range(1, min([line("$"), LINE_COUNT]))
matches = matchlist(getline(lnum), TAG)
if !empty(matches)
if index(KNOWN_DIALECTS, matches[1]) >= 0
dialect = matches[1]
endif
if index(KNOWN_EXTENSIONS, matches[2]) >= 0
extension = matches[2]
endif
break
endif
endfor
modula2#SetDialect(dialect, extension)
setf modula2
enddef
# Determine if *.mod is ABB RAPID, LambdaProlog, Modula-2, Modsim III or go.mod
export def FTmod()
if get(g:, "filetype_mod", "") == "modula2" || IsModula2()
SetFiletypeModula2()
return
endif
if exists("g:filetype_mod")
exe "setf " .. g:filetype_mod
elseif expand("<afile>") =~ '\<go.mod$'
setf gomod
elseif IsLProlog()
setf lprolog
elseif getline(nextnonblank(1)) =~ '\%(\<MODULE\s\+\w\+\s*;\|^\s*(\*\)'
setf modula2
elseif IsRapid()
setf rapid
else
@ -542,7 +767,7 @@ export def FTpl()
# recognize Prolog by specific text in the first non-empty line
# require a blank after the '%' because Perl uses "%list" and "%translate"
var line = getline(nextnonblank(1))
if line =~ '\<prolog\>' || line =~ '^\s*\(%\+\(\s\|$\)\|/\*\)' || line =~ ':-'
if line =~ '\<prolog\>' || line =~ prolog_pattern
setf prolog
else
setf perl
@ -590,23 +815,27 @@ export def FTprogress_cweb()
endif
enddef
export def FTprogress_asm()
# These include the leading '%' sign
var ft_swig_keywords = '^\s*%\%(addmethods\|apply\|beginfile\|clear\|constant\|define\|echo\|enddef\|endoffile\|extend\|feature\|fragment\|ignore\|import\|importfile\|include\|includefile\|inline\|insert\|keyword\|module\|name\|namewarn\|native\|newobject\|parms\|pragma\|rename\|template\|typedef\|typemap\|types\|varargs\|warn\)'
# This is the start/end of a block that is copied literally to the processor file (C/C++)
var ft_swig_verbatim_block_start = '^\s*%{'
export def FTi()
if exists("g:filetype_i")
exe "setf " .. g:filetype_i
return
endif
# This function checks for an assembly comment the first ten lines.
# This function checks for an assembly comment or a SWIG keyword or verbatim block in the first 50 lines.
# If not found, assume Progress.
var lnum = 1
while lnum <= 10 && lnum < line('$')
while lnum <= 50 && lnum < line('$')
var line = getline(lnum)
if line =~ '^\s*;' || line =~ '^\*'
FTasm()
return
elseif line !~ '^\s*$' || line =~ '^/\*'
# Not an empty line: Doesn't look like valid assembly code.
# Or it looks like a Progress /* comment
break
elseif line =~ ft_swig_keywords || line =~ ft_swig_verbatim_block_start
setf swig
return
endif
lnum += 1
endwhile
@ -724,16 +953,16 @@ export def SetFileTypeSH(name: string, setft = true): string
if setft && expand("<amatch>") =~ g:ft_ignore_pat
return ''
endif
if name =~ '\<csh\>'
if name =~ '^csh$' || name =~ '^#!.\{-2,}\<csh\>'
# Some .sh scripts contain #!/bin/csh.
return SetFileTypeShell("csh", setft)
elseif name =~ '\<tcsh\>'
elseif name =~ '^tcsh$' || name =~ '^#!.\{-2,}\<tcsh\>'
# Some .sh scripts contain #!/bin/tcsh.
return SetFileTypeShell("tcsh", setft)
elseif name =~ '\<zsh\>'
elseif name =~ '^zsh$' || name =~ '^#!.\{-2,}\<zsh\>'
# Some .sh scripts contain #!/bin/zsh.
return SetFileTypeShell("zsh", setft)
elseif name =~ '\<ksh\>'
elseif name =~ '^ksh$' || name =~ '^#!.\{-2,}\<ksh\>'
b:is_kornshell = 1
if exists("b:is_bash")
unlet b:is_bash
@ -741,7 +970,8 @@ export def SetFileTypeSH(name: string, setft = true): string
if exists("b:is_sh")
unlet b:is_sh
endif
elseif exists("g:bash_is_sh") || name =~ '\<bash\>' || name =~ '\<bash2\>'
elseif exists("g:bash_is_sh") || name =~ '^bash2\=$' ||
\ name =~ '^#!.\{-2,}\<bash2\=\>'
b:is_bash = 1
if exists("b:is_kornshell")
unlet b:is_kornshell
@ -749,7 +979,7 @@ export def SetFileTypeSH(name: string, setft = true): string
if exists("b:is_sh")
unlet b:is_sh
endif
elseif name =~ '\<sh\>' || name =~ '\<dash\>'
elseif name =~ '^\%(da\)\=sh$' || name =~ '^#!.\{-2,}\<\%(da\)\=sh\>'
# Ubuntu links "sh" to "dash", thus it is expected to work the same way
b:is_sh = 1
if exists("b:is_kornshell")
@ -855,6 +1085,14 @@ export def SQL()
endif
enddef
export def FTsa()
if join(getline(1, 4), "\n") =~# '\%(^\|\n\);'
setf tiasm
return
endif
setf sather
enddef
# This function checks the first 25 lines of file extension "sc" to resolve
# detection between scala and SuperCollider.
# NOTE: We don't check for 'Class : Method', as this can easily be confused
@ -1175,35 +1413,106 @@ export def FTtyp()
setf typst
enddef
# Set the filetype of a *.v file to Verilog, V or Cog based on the first 200
# Detect Microsoft Developer Studio Project files (Makefile) or Faust DSP
# files.
export def FTdsp()
if exists("g:filetype_dsp")
exe "setf " .. g:filetype_dsp
return
endif
# Test the filename
if expand('%:t') =~ '^[mM]akefile.*$'
setf make
return
endif
# Test the file contents
for line in getline(1, 200)
# Chech for comment style
if line =~ '^#.*'
setf make
return
endif
# Check for common lines
if line =~ '^.*Microsoft Developer Studio Project File.*$'
setf make
return
endif
if line =~ '^!MESSAGE This is not a valid makefile\..+$'
setf make
return
endif
# Check for keywords
if line =~ '^!(IF,ELSEIF,ENDIF).*$'
setf make
return
endif
# Check for common assignments
if line =~ '^SOURCE=.*$'
setf make
return
endif
endfor
# Otherwise, assume we have a Faust file
setf faust
enddef
# Set the filetype of a *.v file to Verilog, V or Cog based on the first 500
# lines.
export def FTv()
if did_filetype()
# ":setf" will do nothing, bail out early
return
endif
if exists("g:filetype_v")
exe "setf " .. g:filetype_v
return
endif
for line in getline(1, 200)
if line[0] =~ '^\s*/'
var in_comment = 0
for lnum in range(1, min([line("$"), 500]))
var line = getline(lnum)
# Skip Verilog and V comments (lines and blocks).
if line =~ '^\s*/\*'
# start comment block
in_comment = 1
endif
if in_comment == 1
if line =~ '\*/'
# end comment block
in_comment = 0
endif
# skip comment-block line
continue
endif
if line =~ '^\s*//'
# skip comment line
continue
endif
# Coq: line ends with a '.' followed by an optional variable number of
# spaces or contains the start of a comment, but not inside a Verilog or V
# comment.
# Example: "Definition x := 10. (*".
if (line =~ '\.\s*$' && line !~ '/[/*]') || (line =~ '(\*' && line !~ '/[/*].*(\*')
setf coq
return
endif
# Verilog: line ends with ';' followed by an optional variable number of
# spaces and an optional start of a comment.
# Example: " b <= a + 1; // Add 1".
if line =~ ';\(\s*\)\?\(/.*\)\?$'
# Alternatively: a module is defined: " module MyModule ( input )"
if line =~ ';\s*\(/[/*].*\)\?$' || line =~ '\C^\s*module\s\+\w\+\s*('
setf verilog
return
endif
# Coq: line ends with a '.' followed by an optional variable number of
# spaces and an optional start of a comment.
# Example: "Definition x := 10. (*".
if line =~ '\.\(\s*\)\?\((\*.*\)\?$'
setf coq
return
endif
endfor
# No line matched, fall back to "v".
@ -1218,5 +1527,21 @@ export def FTvba()
endif
enddef
export def Detect_UCI_statements(): bool
# Match a config or package statement at the start of the line.
const config_or_package_statement = '^\s*\(\(c\|config\)\|\(p\|package\)\)\s\+\S'
# Match a line that is either all blank or blank followed by a comment
const comment_or_blank = '^\s*\(#.*\)\?$'
# Return true iff the file has a config or package statement near the
# top of the file and all preceding lines were comments or blank.
return getline(1) =~# config_or_package_statement
\ || getline(1) =~# comment_or_blank
\ && ( getline(2) =~# config_or_package_statement
\ || getline(2) =~# comment_or_blank
\ && getline(3) =~# config_or_package_statement
\ )
enddef
# Uncomment this line to check for compilation errors early
# defcompile

182
runtime/autoload/dist/json.vim vendored Normal file
View File

@ -0,0 +1,182 @@
vim9script
# Maintainer: Maxim Kim <habamax@gmail.com>
# Last update: 2023-12-10
#
# Set of functions to format/beautify JSON data structures.
#
# Could be used to reformat a minified json in a buffer (put it into ~/.vim/ftplugin/json.vim):
# import autoload 'dist/json.vim'
# setl formatexpr=json.FormatExpr()
#
# Or to get a formatted string out of vim's dict/list/string:
# vim9script
# import autoload 'dist/json.vim'
# echo json.Format({
# "widget": { "debug": "on", "window": { "title": "Sample \"Konfabulator\" Widget",
# "name": "main_window", "width": 500, "height": 500
# },
# "image": { "src": "Images/Sun.png", "name": "sun1", "hOffset": 250,
# "vOffset": 250, "alignment": "center" },
# "text": { "data": "Click Here", "size": 36, "style": "bold", "name": "text1",
# "hOffset": 250, "vOffset": 100, "alignment": "center",
# "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;" } }
# })
#
# Should output:
# {
# "widget": {
# "debug": "on",
# "window": {
# "title": "Sample \"Konfabulator\" Widget",
# "name": "main_window",
# "width": 500,
# "height": 500
# },
# "image": {
# "src": "Images/Sun.png",
# "name": "sun1",
# "hOffset": 250,
# "vOffset": 250,
# "alignment": "center"
# },
# "text": {
# "data": "Click Here",
# "size": 36,
# "style": "bold",
# "name": "text1",
# "hOffset": 250,
# "vOffset": 100,
# "alignment": "center",
# "onMouseUp": "sun1.opacity = (sun1.opacity / 100) * 90;"
# }
# }
# }
#
# NOTE: order of `key: value` pairs is not kept.
#
# You can also use a JSON string instead of vim's dict/list to maintain order:
# echo json.Format('{"hello": 1, "world": 2}')
# {
# "hello": 1,
# "world": 2
# }
# To be able to reformat with `gq` add following to `~/.vim/ftplugin/json.vim`:
# import autoload 'dist/json.vim'
# setl formatexpr=json.FormatExpr()
export def FormatExpr(): number
FormatRange(v:lnum, v:lnum + v:count - 1)
return 0
enddef
# import autoload 'dist/json.vim'
# command -range=% JSONFormat json.FormatRange(<line1>, <line2>)
export def FormatRange(line1: number, line2: number)
var indent_base = matchstr(getline(line1), '^\s*')
var indent = &expandtab ? repeat(' ', &shiftwidth) : "\t"
var [l1, l2] = line1 > line2 ? [line2, line1] : [line1, line2]
var json_src = getline(l1, l2)->join()
var json_fmt = Format(json_src, {use_tabs: !&et, indent: &sw, indent_base: indent_base})->split("\n")
exe $":{l1},{l2}d"
if line('$') == 1 && getline(1) == ''
setline(l1, json_fmt[0])
append(l1, json_fmt[1 : ])
else
append(l1 - 1, json_fmt)
endif
enddef
# Format JSON string or dict/list as JSON
# import autoload 'dist/json.vim'
# echo json.Format('{"hello": "world"}', {use_tabs: false, indent: 2, indent_base: 0})
# {
# "hello": "world"
# }
# echo json.Format({'hello': 'world'}, {use_tabs: false, indent: 2, indent_base: 0})
# {
# "hello": "world"
# }
#
# Note, when `obj` is dict, order of the `key: value` pairs might be different:
# echo json.Format({'hello': 1, 'world': 2})
# {
# "world": 2,
# "hello": 1
# }
export def Format(obj: any, params: dict<any> = {}): string
var obj_str = ''
if type(obj) == v:t_string
obj_str = obj
else
obj_str = json_encode(obj)
endif
var indent_lvl = 0
var indent_base = get(params, "indent_base", "")
var indent = get(params, "use_tabs", false) ? "\t" : repeat(' ', get(params, "indent", 2))
var json_line = indent_base
var json = ""
var state = ""
for char in obj_str
if state == ""
if char =~ '[{\[]'
json_line ..= char
json ..= json_line .. "\n"
indent_lvl += 1
json_line = indent_base .. repeat(indent, indent_lvl)
elseif char =~ '[}\]]'
if json_line !~ '^\s*$'
json ..= json_line .. "\n"
indent_lvl -= 1
if indent_lvl < 0
json_line = strpart(indent_base, -indent_lvl * len(indent))
else
json_line = indent_base .. repeat(indent, indent_lvl)
endif
elseif json =~ '[{\[]\n$'
json = json[ : -2]
json_line = substitute(json_line, '^\s*', '', '')
indent_lvl -= 1
endif
json_line ..= char
elseif char == ':'
json_line ..= char .. ' '
elseif char == '"'
json_line ..= char
state = 'QUOTE'
elseif char == ','
json_line ..= char
json ..= json_line .. "\n"
json_line = indent_base .. repeat(indent, indent_lvl)
elseif char !~ '\s'
json_line ..= char
endif
elseif state == "QUOTE"
json_line ..= char
if char == '\'
state = "ESCAPE"
elseif char == '"'
state = ""
endif
elseif state == "ESCAPE"
state = "QUOTE"
json_line ..= char
else
json_line ..= char
endif
endfor
if json_line !~ '^\s*$'
json ..= json_line .. "\n"
endif
return json
enddef

View File

@ -3,7 +3,10 @@
" Maintainer: Jason Franklin <jason@oneway.dev>
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Autoload Split: Bram Moolenaar
" Last Change: 2023 Jun 28
" Last Change: 2024 Jan 17 (make it work on AIX, see #13847)
" 2024 Jul 06 (honor command modifiers, #15117)
" 2025 Mar 05 (add :keepjumps, #16791)
" 2025 Mar 09 (improve :Man completion for man-db, #16843)
let s:cpo_save = &cpo
set cpo-=C
@ -13,14 +16,108 @@ let s:man_tag_depth = 0
let s:man_sect_arg = ""
let s:man_find_arg = "-w"
try
if !has("win32") && $OSTYPE !~ 'cygwin\|linux' && system('uname -s') =~ "SunOS" && system('uname -r') =~ "^5"
let s:man_sect_arg = "-s"
let s:man_find_arg = "-l"
if !has("win32") && $OSTYPE !~ 'cygwin\|linux'
" cache the value
let uname_s = system('uname -s')
if uname_s =~ "SunOS" && system('uname -r') =~ "^5"
" Special Case for Man on SunOS
let s:man_sect_arg = "-s"
let s:man_find_arg = "-l"
elseif uname_s =~? 'AIX'
" Special Case for Man on AIX
let s:man_sect_arg = ""
let s:man_find_arg = ""
endif
endif
catch /E145:/
" Ignore the error in restricted mode
endtry
unlet! uname_s
let s:man_db_pages_by_section = v:null
func! s:ManDbPagesBySection() abort
if s:man_db_pages_by_section isnot v:null
return s:man_db_pages_by_section
endif
let s:man_db_pages_by_section = {}
let list_command = 'apropos --long .'
let unparsed_lines = []
for line in systemlist(list_command)
" Typical lines:
" vim (1) - Vi IMproved, a programmer's text editor
"
" Unusual lines:
" pgm_read_ T _ (3avr) - (unknown subject)
"
" Code that shows the line's format:
" https://gitlab.com/man-db/man-db/-/blob/2607d203472efb036d888e9e7997724a41a53876/src/whatis.c#L409
let match = matchlist(line, '^\(.\{-1,}\) (\(\S\+\)) ')
if empty(match)
call add(unparsed_lines, line)
continue
endif
let [page, section] = match[1:2]
if !has_key(s:man_db_pages_by_section, section)
let s:man_db_pages_by_section[section] = []
endif
call add(s:man_db_pages_by_section[section], page)
endfor
if !empty(unparsed_lines)
echomsg 'Unable to parse ' .. string(len(unparsed_lines)) .. ' lines ' ..
\ 'from the output of `' .. list_command .. '`. Example lines:'
for line in unparsed_lines[:9]
echomsg line
endfor
endif
return s:man_db_pages_by_section
endfunc
func! dist#man#Reload() abort
if g:ft_man_implementation ==# 'man-db'
let s:man_db_pages_by_section = v:null
call s:ManDbPagesBySection()
endif
endfunc
func! s:StartsWithCaseInsensitive(haystack, needle) abort
if empty(a:needle)
return v:true
endif
return a:haystack[:len(a:needle)-1] ==? a:needle
endfunc
func! dist#man#ManDbComplete(arg_lead, cmd_line, cursor_pos) abort
let args = split(trim(a:cmd_line[: a:cursor_pos - 1], '', 1), '', v:true)
let pages_by_section = s:ManDbPagesBySection()
if len(args) > 2
" Page in the section args[1]. At least on Debian testing as of
" 2025-03-06, man seems to match sections case-insensitively and match any
" prefix of the section. E.g., `man 3 sigprocmask` and `man 3PoSi
" sigprocmask` with both load sigprocmask(3posix) even though the 3 in the
" first command is also the name of a different section.
let results = []
for [section, pages] in items(pages_by_section)
if s:StartsWithCaseInsensitive(section, args[1])
call extend(results, pages)
endif
endfor
else
" Could be a section, or a page in any section. Add space after sections
" since there has to be a second argument in that case.
let results = flattennew(values(pages_by_section), 1)
for section in keys(pages_by_section)
call add(results, section .. ' ')
endfor
endif
call sort(results)
call uniq(results)
call filter(results,
\ {_, val -> s:StartsWithCaseInsensitive(val, a:arg_lead)})
return results
endfunc
func s:ParseIntoPageAndSection()
" Accommodate a reference that terminates in a hyphen.
"
@ -153,7 +250,9 @@ func dist#man#GetPage(cmdmods, ...)
endwhile
endif
if &filetype != "man"
if exists("g:ft_man_open_mode")
if a:cmdmods =~ '\<\(tab\|vertical\|horizontal\)\>'
let open_cmd = a:cmdmods . ' split'
elseif exists("g:ft_man_open_mode")
if g:ft_man_open_mode == 'vert'
let open_cmd = 'vsplit'
elseif g:ft_man_open_mode == 'tab'
@ -162,7 +261,7 @@ func dist#man#GetPage(cmdmods, ...)
let open_cmd = 'split'
endif
else
let open_cmd = a:cmdmods . ' split'
let open_cmd = 'split'
endif
endif
endif
@ -173,7 +272,7 @@ func dist#man#GetPage(cmdmods, ...)
setl buftype=nofile noswapfile
setl fdc=0 ma nofen nonu nornu
%delete _
keepjumps %delete _
let unsetwidth = 0
if empty($MANWIDTH)
let $MANWIDTH = winwidth(0)
@ -196,17 +295,17 @@ func dist#man#GetPage(cmdmods, ...)
" Emulate piping the buffer through the "col -b" command.
" Ref: https://github.com/vim/vim/issues/12301
silent! keepjumps keeppatterns %s/\v(.)\b\ze\1?//ge
exe 'silent! keepjumps keeppatterns %s/\v(.)\b\ze\1?//e' .. (&gdefault ? '' : 'g')
if unsetwidth
let $MANWIDTH = ''
endif
" Remove blank lines from top and bottom.
while line('$') > 1 && getline(1) =~ '^\s*$'
1delete _
keepjumps 1delete _
endwhile
while line('$') > 1 && getline('$') =~ '^\s*$'
$delete _
keepjumps $delete _
endwhile
1
setl ft=man nomod

View File

@ -4,7 +4,7 @@ vim9script
# Invoked from "scripts.vim" in 'runtimepath'
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Aug 10
# Last Change: 2025 Apr 24
# Former Maintainer: Bram Moolenaar <Bram@vim.org>
export def DetectFiletype()
@ -26,8 +26,9 @@ def DetectFromHashBang(firstline: string)
# "#!/usr/bin/bash" to make matching easier.
# Recognize only a few {options} that are commonly used.
if line1 =~ '^#!\s*\S*\<env\s'
line1 = substitute(line1, '\S\+=\S\+', '', 'g')
line1 = substitute(line1, '\(-[iS]\|--ignore-environment\|--split-string\)', '', '')
line1 = substitute(line1, '\s\zs--split-string[ \t=]', '', '')
line1 = substitute(line1, '\s\zs[A-Za-z0-9_]\+=\S*\ze\s', '', 'g')
line1 = substitute(line1, '\s\zs\%(-[iS]\+\|--ignore-environment\)\ze\s', '', 'g')
line1 = substitute(line1, '\<env\s\+', '', '')
endif
@ -133,6 +134,9 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ 'node\(js\)\=\>\|js\>' || name =~ 'rhino\>'
return 'javascript'
elseif name =~# 'just'
return 'just'
# BC calculator
elseif name =~ '^bc\>'
return 'bc'
@ -217,6 +221,22 @@ export def Exe2filetype(name: string, line1: string): string
elseif name =~ '^\%(rexx\|regina\)\>'
return 'rexx'
# Janet
elseif name =~ '^janet\>'
return 'janet'
# Dart
elseif name =~ '^dart\>'
return 'dart'
# Execline (s6)
elseif name =~ '^execlineb\>'
return 'execline'
# Vim
elseif name =~ '^vim\>'
return 'vim'
endif
return ''
@ -361,7 +381,7 @@ def DetectFromText(line1: string)
# Strace
# inaccurate fast match first, then use accurate slow match
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:.]* *execve(')
elseif (line1 =~ 'execve(' && line1 =~ '^[0-9:. ]*execve(')
|| line1 =~ '^__libc_start_main'
setl ft=strace

35
runtime/autoload/dist/vim.vim vendored Normal file
View File

@ -0,0 +1,35 @@
" Vim runtime support library,
" runs the Vim9 script version or legacy script version
" on demand (mostly for Neovim compatability)
"
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2025 Apr 27
" enable the zip and gzip plugin by default, if not set
if !exists('g:zip_exec')
let g:zip_exec = 1
endif
if !exists('g:gzip_exec')
let g:gzip_exec = 1
endif
if !has('vim9script')
function dist#vim#IsSafeExecutable(filetype, executable)
let cwd = getcwd()
if empty(exepath(a:executable))
return v:false
endif
return get(g:, a:filetype .. '_exec', get(g:, 'plugin_exec', 0)) &&
\ (fnamemodify(exepath(a:executable), ':p:h') !=# cwd
\ || (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1 &&
\ cwd != '.'))
endfunction
finish
endif
def dist#vim#IsSafeExecutable(filetype: string, executable: string): bool
return dist#vim9#IsSafeExecutable(filetype, executable)
enddef

130
runtime/autoload/dist/vim9.vim vendored Normal file
View File

@ -0,0 +1,130 @@
vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Jan 29
export def IsSafeExecutable(filetype: string, executable: string): bool
if empty(exepath(executable))
return v:false
endif
var cwd = getcwd()
return get(g:, filetype .. '_exec', get(g:, 'plugin_exec', 0))
&& (fnamemodify(exepath(executable), ':p:h') !=# cwd
|| (split($PATH, has('win32') ? ';' : ':')->index(cwd) != -1
&& cwd != '.'))
enddef
def Redir(): string
if get(g:, 'netrw_suppress_gx_mesg', true)
if &srr =~# "%s"
return printf(&srr, has("win32") ? "nul" : "/dev/null")
elseif &srr =~# '>&\?$'
return &srr .. (has("win32") ? "nul" : "/dev/null")
else
return &srr .. (has("win32") ? "> nul" : "> /dev/null")
endif
endif
return ''
enddef
if has('unix')
if has('win32unix')
# Cygwin provides cygstart
if executable('cygstart')
export def Launch(args: string)
execute $'silent ! cygstart --hide {args} {Redir()}' | redraw!
enddef
elseif !empty($MSYSTEM) && executable('start')
# MSYS2/Git Bash comes by default without cygstart; see
# https://www.msys2.org/wiki/How-does-MSYS2-differ-from-Cygwin
# Instead it provides /usr/bin/start script running `cmd.exe //c start`
# Adding "" //b` sets void title, hides cmd window and blocks path conversion
# of /b to \b\ " by MSYS2; see https://www.msys2.org/docs/filesystem-paths/
export def Launch(args: string)
execute $'silent !start "" //b {args} {Redir()}' | redraw!
enddef
else
# imitate /usr/bin/start script for other environments and hope for the best
export def Launch(args: string)
execute $'silent !cmd /c start "" /b {args} {Redir()}' | redraw!
enddef
endif
elseif exists('$WSL_DISTRO_NAME') # use cmd.exe to start GUI apps in WSL
export def Launch(args: string)
const command = (args =~? '\v<\f+\.(exe|com|bat|cmd)>')
? $'cmd.exe /c start /b {args} {Redir()}'
: $'nohup {args} {Redir()} &'
execute $'silent ! {command}' | redraw!
enddef
else
export def Launch(args: string)
const fork = has('gui_running') ? '' : '&'
execute $':silent ! nohup {args} {Redir()} {fork}' | redraw!
enddef
endif
elseif has('win32')
export def Launch(args: string)
const shell = (&shell =~? '\<cmd\.exe\>') ? '' : 'cmd.exe /c'
const quotes = empty(shell) ? '' : '""'
execute $'silent ! {shell} start {quotes} /b {args} {Redir()}' | redraw!
enddef
else
export def Launch(dummy: string)
echom 'No common launcher found'
enddef
endif
var os_viewer = null_string
# Git Bash
if has('win32unix')
# (cyg)start suffices
os_viewer = ''
# Windows / WSL
elseif executable('explorer.exe')
os_viewer = 'explorer.exe'
# Linux / BSD
elseif executable('xdg-open')
os_viewer = 'xdg-open'
# MacOS
elseif executable('open')
os_viewer = 'open'
endif
def Viewer(): string
# g:Openprg could be a string of program + its arguments, test if first
# argument is executable
var user_viewer = get(g:, "Openprg", get(g:, "netrw_browsex_viewer", ""))
# Take care of an off-by-one check for "for" too
if executable(trim(user_viewer))
return user_viewer
endif
var args = split(user_viewer, '\s\+\zs')
var viewer = get(args, 0, '')
for arg in args[1 :]
if executable(trim(viewer))
return user_viewer
endif
viewer ..= arg
endfor
if os_viewer == null
echoerr "No program to open this path found. See :help Open for more information."
endif
return os_viewer
enddef
export def Open(file: string)
Launch($"{Viewer()} {shellescape(file, 1)}")
enddef
# Uncomment this line to check for compilation errors early
# defcompile
# vim: ts=8 sts=2 sw=2 et

View File

@ -2,7 +2,12 @@ vim9script
# Language: Vim script
# Maintainer: github user lacygoill
# Last Change: 2023 Jun 29
# Last Change: 2025 Apr 13
#
# Includes changes from The Vim Project:
# - 2024 Feb 09: Fix indent after literal Dict (A. Radev via #13966)
# - 2024 Nov 08: Fix indent after :silent! function (D. Kearns via #16009)
# - 2024 Dec 26: Fix indent for enums (Jim Zhou via #16293)
# NOTE: Whenever you change the code, make sure the tests are still passing:
#
@ -168,6 +173,7 @@ const MODIFIERS: dict<string> = {
def: ['export', 'static'],
class: ['export', 'abstract', 'export abstract'],
interface: ['export'],
enum: ['export'],
}
# ...
# class: ['export', 'abstract', 'export abstract'],
@ -292,7 +298,7 @@ patterns = []
endfor
}
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
const STARTS_NAMED_BLOCK: string = $'^\s*\%(sil\%[ent]!\=\s\+\)\=\%({patterns->join('\|')}\)\>\%(\s\|$\|!\)\@='
# STARTS_CURLY_BLOCK {{{3
@ -381,7 +387,7 @@ const LINE_CONTINUATION_AT_EOL: string = '\%('
# It can be the start of a dictionary or a block.
# We only want to match the former.
.. '\|' .. $'^\%({STARTS_CURLY_BLOCK}\)\@!.*\zs{{'
.. '\)\s*\%(\s#.*\)\=$'
.. '\)\s*\%(\s#[^{].*\)\=$'
# }}}2
# SOL {{{2
# BACKSLASH_AT_SOL {{{3
@ -630,6 +636,7 @@ def Offset( # {{{2
elseif !line_A.isfirst
&& (line_B->EndsWithLineContinuation()
|| line_A.text =~ LINE_CONTINUATION_AT_SOL)
&& !(line_B->EndsWithComma() && line_A.lnum->IsInside('EnumBlock'))
return shiftwidth()
endif
@ -974,8 +981,10 @@ def SearchPair( # {{{3
if end == '[' || end == ']'
e = e->escape('[]')
endif
# VIM_INDENT_TEST_TRACE_START
return searchpair('\C' .. s, (middle == '' ? '' : '\C' .. middle), '\C' .. e,
flags, (): bool => InCommentOrString(), stopline, TIMEOUT)
# VIM_INDENT_TEST_TRACE_END dist#vimindent#SearchPair
enddef
def SearchPairStart( # {{{3
@ -1047,6 +1056,22 @@ def ContinuesBelowBracketBlock( # {{{3
enddef
def IsInside(lnum: number, syntax: string): bool # {{{3
if syntax == 'EnumBlock'
var cur_pos = getpos('.')
cursor(lnum, 1)
var enum_pos = search('^\C\s*\%(export\s\)\=\s*enum\s\+\S\+', 'bnW')
var endenum_pos = search('^\C\s*endenum\>', 'bnW')
setpos('.', cur_pos)
if enum_pos == 0 && endenum_pos == 0
return false
endif
if (enum_pos > 0 && (endenum_pos == 0 || enum_pos > endenum_pos))
return true
endif
return false
endif
if !exists('b:vimindent')
|| !b:vimindent->has_key($'is_{syntax}')
return false
@ -1245,7 +1270,9 @@ def NonCommentedMatch(line: dict<any>, pat: string): bool # {{{3
var pos: list<number> = getcurpos()
cursor(line.lnum, 1)
# VIM_INDENT_TEST_TRACE_START
var match_lnum: number = search(pat, 'cnW', line.lnum, TIMEOUT, (): bool => InCommentOrString())
# VIM_INDENT_TEST_TRACE_END dist#vimindent#NonCommentedMatch
setpos('.', pos)
return match_lnum > 0
enddef

View File

@ -1,10 +1,20 @@
" ---------------------------------------------------------------------
" getscript.vim
" Author: Charles E. Campbell
" Maintainer: This runtime file is looking for a new maintainer.
" Original Author: Charles E. Campbell
" Date: Jan 21, 2014
" Version: 36
" Version: 37
" Installing: :help glvs-install
" Usage: :help glvs
" Last Change: {{{1
" 2024 Sep 08 by Vim Project: several small fixes (#15640)
" 2024 Sep 23 by Vim Project: runtime dir selection fix (#15722)
" autoloading search path fix
" substitution of hardcoded commands with global variables
" 2024 Nov 12 by Vim Project: fix problems on Windows (#16036)
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
" 2025 May 11 by Vim Project: check network connectivity (#17249)
" }}}
"
" GetLatestVimScripts: 642 1 :AutoInstall: getscript.vim
"redraw!|call inputsave()|call input("Press <cr> to continue")|call inputrestore()
@ -15,14 +25,14 @@
if exists("g:loaded_getscript")
finish
endif
let g:loaded_getscript= "v36"
let g:loaded_getscript= "v37"
if &cp
echoerr "GetLatestVimScripts is not vi-compatible; not loaded (you need to set nocp)"
finish
endif
if v:version < 702
if v:version < 901
echohl WarningMsg
echo "***warning*** this version of GetLatestVimScripts needs vim 7.2"
echo "***warning*** this version of GetLatestVimScripts needs vim 9.1"
echohl Normal
finish
endif
@ -50,6 +60,9 @@ endif
if !exists("g:GetLatestVimScripts_wget")
if executable("wget")
let g:GetLatestVimScripts_wget= "wget"
elseif executable("curl.exe")
" enforce extension: windows powershell desktop version has a curl alias that hides curl.exe
let g:GetLatestVimScripts_wget= "curl.exe"
elseif executable("curl")
let g:GetLatestVimScripts_wget= "curl"
else
@ -62,8 +75,8 @@ endif
if !exists("g:GetLatestVimScripts_options")
if g:GetLatestVimScripts_wget == "wget"
let g:GetLatestVimScripts_options= "-q -O"
elseif g:GetLatestVimScripts_wget == "curl"
let g:GetLatestVimScripts_options= "-s -O"
elseif g:GetLatestVimScripts_wget =~ "curl"
let g:GetLatestVimScripts_options= "-s -o"
else
let g:GetLatestVimScripts_options= ""
endif
@ -76,7 +89,33 @@ endif
" set up default scriptaddr address
if !exists("g:GetLatestVimScripts_scriptaddr")
let g:GetLatestVimScripts_scriptaddr = 'http://vim.sourceforge.net/script.php?script_id='
let g:GetLatestVimScripts_scriptaddr = 'https://www.vim.org/scripts/script.php?script_id='
endif
if !exists("g:GetLatestVimScripts_downloadaddr")
let g:GetLatestVimScripts_downloadaddr = 'https://www.vim.org/scripts/download_script.php?src_id='
endif
" define decompression tools (on windows this allows redirection to wsl or git tools).
" Note tar is available as builtin since Windows 11.
if !exists("g:GetLatestVimScripts_bunzip2")
let g:GetLatestVimScripts_bunzip2= "bunzip2"
endif
if !exists("g:GetLatestVimScripts_bunzip3")
let g:GetLatestVimScripts_bunzip3= "bunzip3"
endif
if !exists("g:GetLatestVimScripts_gunzip")
let g:GetLatestVimScripts_gunzip= "gunzip"
endif
if !exists("g:GetLatestVimScripts_unxz")
let g:GetLatestVimScripts_unxz= "unxz"
endif
if !exists("g:GetLatestVimScripts_unzip")
let g:GetLatestVimScripts_unzip= "unzip"
endif
"" For debugging:
@ -88,18 +127,19 @@ endif
let s:autoinstall= ""
if g:GetLatestVimScripts_allowautoinstall
if (has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")) && &shell != "bash"
" windows (but not cygwin/bash)
let s:dotvim= "vimfiles"
if !exists("g:GetLatestVimScripts_mv")
let g:GetLatestVimScripts_mv= "ren"
endif
let s:is_windows = has("win32") || has("gui_win32") || has("gui_win32s") || has("win16") || has("win64") || has("win32unix") || has("win95")
let s:dotvim= s:is_windows ? "vimfiles" : ".vim"
else
" unix
let s:dotvim= ".vim"
if !exists("g:GetLatestVimScripts_mv")
let g:GetLatestVimScripts_mv= "mv"
if !exists("g:GetLatestVimScripts_mv")
if &shell =~? '\<pwsh\>\|\<powershell\>'
let g:GetLatestVimScripts_mv= "move -Force"
elseif s:is_windows && &shell =~? '\<cmd\>'
" windows (but not cygwin/bash)
let g:GetLatestVimScripts_mv= "move /Y"
else
" unix or cygwin bash/zsh
" 'mv' overrides existing files without asking
let g:GetLatestVimScripts_mv= "mv"
endif
endif
@ -108,9 +148,6 @@ if g:GetLatestVimScripts_allowautoinstall
elseif exists('$HOME') && isdirectory(expand("$HOME")."/".s:dotvim)
let s:autoinstall= $HOME."/".s:dotvim
endif
" call Decho("s:autoinstall<".s:autoinstall.">")
"else "Decho
" call Decho("g:GetLatestVimScripts_allowautoinstall=".g:GetLatestVimScripts_allowautoinstall.": :AutoInstall: disabled")
endif
" ---------------------------------------------------------------------
@ -124,30 +161,19 @@ silent! com -nargs=0 GLVS call getscript#GetLatestVimScripts()
" scripts based on the list in
" (first dir in runtimepath)/GetLatest/GetLatestVimScripts.dat
fun! getscript#GetLatestVimScripts()
" call Dfunc("GetLatestVimScripts() autoinstall<".s:autoinstall.">")
" insure that wget is executable
if executable(g:GetLatestVimScripts_wget) != 1
echoerr "GetLatestVimScripts needs ".g:GetLatestVimScripts_wget." which apparently is not available on your system"
" call Dret("GetLatestVimScripts : wget not executable/available")
return
endif
" insure that fnameescape() is available
if !exists("*fnameescape")
echoerr "GetLatestVimScripts needs fnameescape() (provided by 7.1.299 or later)"
return
endif
" Find the .../GetLatest subdirectory under the runtimepath
for datadir in split(&rtp,',') + ['']
if isdirectory(datadir."/GetLatest")
" call Decho("found directory<".datadir.">")
let datadir= datadir . "/GetLatest"
break
endif
if filereadable(datadir."GetLatestVimScripts.dat")
" call Decho("found ".datadir."/GetLatestVimScripts.dat")
break
endif
endfor
@ -155,32 +181,25 @@ fun! getscript#GetLatestVimScripts()
" Sanity checks: readability and writability
if datadir == ""
echoerr 'Missing "GetLatest/" on your runtimepath - see :help glvs-dist-install'
" call Dret("GetLatestVimScripts : unable to find a GetLatest subdirectory")
return
endif
if filewritable(datadir) != 2
echoerr "(getLatestVimScripts) Your ".datadir." isn't writable"
" call Dret("GetLatestVimScripts : non-writable directory<".datadir.">")
return
endif
let datafile= datadir."/GetLatestVimScripts.dat"
if !filereadable(datafile)
echoerr "Your data file<".datafile."> isn't readable"
" call Dret("GetLatestVimScripts : non-readable datafile<".datafile.">")
return
endif
if !filewritable(datafile)
echoerr "Your data file<".datafile."> isn't writable"
" call Dret("GetLatestVimScripts : non-writable datafile<".datafile.">")
return
endif
" --------------------
" Passed sanity checks
" --------------------
" call Decho("datadir <".datadir.">")
" call Decho("datafile <".datafile.">")
" don't let any event handlers interfere (like winmanager's, taglist's, etc)
let eikeep = &ei
let hlskeep = &hls
@ -193,23 +212,24 @@ fun! getscript#GetLatestVimScripts()
" 3. split window
" 4. edit datafile
let origdir= getcwd()
" call Decho("exe cd ".fnameescape(substitute(datadir,'\','/','ge')))
exe "cd ".fnameescape(substitute(datadir,'\','/','ge'))
split
" call Decho("exe e ".fnameescape(substitute(datafile,'\','/','ge')))
exe "e ".fnameescape(substitute(datafile,'\','/','ge'))
res 1000
let s:downloads = 0
let s:downerrors= 0
let s:message = []
" Check on dependencies mentioned in plugins
" call Decho(" ")
" call Decho("searching plugins for GetLatestVimScripts dependencies")
let lastline = line("$")
" call Decho("lastline#".lastline)
let firstdir = substitute(&rtp,',.*$','','')
let plugins = split(globpath(firstdir,"plugin/**/*.vim"),'\n')
let plugins = plugins + split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"ftplugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"AsNeeded/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"pack/*/start/*/plugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"pack/*/opt/*/plugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"pack/*/start/*/ftplugin/**/*.vim"),'\n')
let plugins += split(globpath(firstdir,"pack/*/opt/*/ftplugin/**/*.vim"),'\n')
let foundscript = 0
" this loop updates the GetLatestVimScripts.dat file
@ -218,14 +238,10 @@ fun! getscript#GetLatestVimScripts()
" It reads the plugin script at the end of the GetLatestVimScripts.dat
" file, examines it, and then removes it.
for plugin in plugins
" call Decho(" ")
" call Decho("plugin<".plugin.">")
" read plugin in
" evidently a :r creates a new buffer (the "#" buffer) that is subsequently unused -- bwiping it
$
" call Decho(".dependency checking<".plugin."> line$=".line("$"))
" call Decho("..exe silent r ".fnameescape(plugin))
exe "silent r ".fnameescape(plugin)
exe "silent bwipe ".bufnr("#")
@ -233,7 +249,6 @@ fun! getscript#GetLatestVimScripts()
let depscript = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\d\+\s\+\d\+\s\+\(.*\)$','\1','e')
let depscriptid = substitute(getline("."),'^"\s\+GetLatestVimScripts:\s\+\(\d\+\)\s\+.*$','\1','')
let llp1 = lastline+1
" call Decho("..depscript<".depscript.">")
" found a "GetLatestVimScripts: # #" line in the script;
" check if it's already in the datafile by searching backwards from llp1,
@ -247,21 +262,17 @@ fun! getscript#GetLatestVimScripts()
" this second search is taken when, for example, a 0 0 scriptname is to be skipped over
let srchline= search('\<'.noai_script.'\>','bW')
endif
" call Decho("..noai_script<".noai_script."> depscriptid#".depscriptid." srchline#".srchline." curline#".line(".")." lastline#".lastline)
if srchline == 0
" found a new script to permanently include in the datafile
let keep_rega = @a
let @a = substitute(getline(curline),'^"\s\+GetLatestVimScripts:\s\+','','')
echomsg "Appending <".@a."> to ".datafile." for ".depscript
" call Decho("..Appending <".@a."> to ".datafile." for ".depscript)
exe lastline."put a"
let @a = keep_rega
let lastline = llp1
let curline = curline + 1
let foundscript = foundscript + 1
" else " Decho
" call Decho("..found <".noai_script."> (already in datafile at line#".srchline.")")
endif
let curline = curline + 1
@ -270,12 +281,8 @@ fun! getscript#GetLatestVimScripts()
" llp1: last line plus one
let llp1= lastline + 1
" call Decho(".deleting lines: ".llp1.",$d")
exe "silent! ".llp1.",$d"
endfor
" call Decho("--- end dependency checking loop --- foundscript=".foundscript)
" call Decho(" ")
" call Dredir("BUFFER TEST (GetLatestVimScripts 1)","ls!")
if foundscript == 0
setlocal nomod
@ -284,32 +291,32 @@ fun! getscript#GetLatestVimScripts()
" --------------------------------------------------------------------
" Check on out-of-date scripts using GetLatest/GetLatestVimScripts.dat
" --------------------------------------------------------------------
" call Decho("begin: checking out-of-date scripts using datafile<".datafile.">")
setlocal lz
1
" /^-----/,$g/^\s*\d/call Decho(getline("."))
1
/^-----/,$g/^\s*\d/call s:GetOneScript()
" call Decho("--- end out-of-date checking --- ")
" Final report (an echomsg)
try
silent! ?^-------?
catch /^Vim\%((\a\+)\)\=:E114/
" call Dret("GetLatestVimScripts : nothing done!")
return
endtry
exe "norm! kz\<CR>"
redraw!
if !empty(s:message)
echohl WarningMsg
for mess in s:message
echom mess
endfor
let s:downerrors += len(s:message)
endif
let s:msg = ""
if s:downloads == 1
let s:msg = "Downloaded one updated script to <".datadir.">"
elseif s:downloads == 2
let s:msg= "Downloaded two updated scripts to <".datadir.">"
elseif s:downloads > 1
let s:msg= "Downloaded ".s:downloads." updated scripts to <".datadir.">"
else
let s:msg= "Everything was already current"
let s:msg= empty(s:message) ? "Everything was already current" : "There were some errors"
endif
if s:downerrors > 0
let s:msg= s:msg." (".s:downerrors." downloading errors)"
@ -327,24 +334,29 @@ fun! getscript#GetLatestVimScripts()
let &hls = hlskeep
let &acd = acdkeep
setlocal nolz
" call Dredir("BUFFER TEST (GetLatestVimScripts 2)","ls!")
" call Dret("GetLatestVimScripts : did ".s:downloads." downloads")
endfun
" ---------------------------------------------------------------------
" GetOneScript: (Get Latest Vim Script) this function operates {{{1
" GetOneScript: (Get Latest Vim script) this function operates {{{1
" on the current line, interpreting two numbers and text as
" ScriptID, SourceID, and Filename.
" It downloads any scripts that have newer versions from vim.sourceforge.net.
fun! s:GetOneScript(...)
" call Dfunc("GetOneScript()")
" set options to allow progress to be shown on screen
let rega= @a
let t_ti= &t_ti
let t_te= &t_te
let rs = &rs
let ssl = &ssl
set t_ti= t_te= nors
" avoid issues with shellescape() on Windows
if s:is_windows && &shell =~? '\<cmd\>'
set noshellslash
endif
" restore valures afterwards
defer execute("let @a = rega | let &t_ti = t_ti | let &t_te = t_te | let &rs = rs | let &ssl = ssl")
" put current line on top-of-screen and interpret it into
" a script identifier : used to obtain webpage
@ -355,14 +367,9 @@ fun! s:GetOneScript(...)
let srcid = a:2
let fname = a:3
let cmmnt = ""
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
else
let curline = getline(".")
if curline =~ '^\s*#'
let @a= rega
" call Dret("GetOneScript : skipping a pure comment line")
return
endif
let parsepat = '^\s*\(\d\+\)\s\+\(\d\+\)\s\+\(.\{-}\)\(\s*#.*\)\=$'
@ -386,37 +393,26 @@ fun! s:GetOneScript(...)
catch /^Vim\%((\a\+)\)\=:E486/
let cmmnt= ""
endtry
" call Decho("curline <".curline.">")
" call Decho("parsepat<".parsepat.">")
" call Decho("scriptid<".scriptid.">")
" call Decho("srcid <".srcid.">")
" call Decho("fname <".fname.">")
endif
" plugin author protection from downloading his/her own scripts atop their latest work
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
if scriptid == 0 || srcid == 0
" When looking for :AutoInstall: lines, skip scripts that have 0 0 scriptname
let @a= rega
" call Dret("GetOneScript : skipping a scriptid==srcid==0 line")
return
endif
let doautoinstall= 0
if fname =~ ":AutoInstall:"
" call Decho("case AutoInstall: fname<".fname.">")
let aicmmnt= substitute(fname,'\s\+:AutoInstall:\s\+',' ','')
" call Decho("aicmmnt<".aicmmnt."> s:autoinstall=".s:autoinstall)
if s:autoinstall != ""
let doautoinstall = g:GetLatestVimScripts_allowautoinstall
endif
else
let aicmmnt= fname
endif
" call Decho("aicmmnt<".aicmmnt.">: doautoinstall=".doautoinstall)
exe "norm z\<CR>"
redraw!
" call Decho('considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid)
echo 'considering <'.aicmmnt.'> scriptid='.scriptid.' srcid='.srcid
" grab a copy of the plugin's vim.sourceforge.net webpage
@ -424,15 +420,17 @@ fun! s:GetOneScript(...)
let tmpfile = tempname()
let v:errmsg = ""
" Check if URLs are reachable
if !CheckVimScriptURL(scriptid, srcid)
return
endif
" make up to three tries at downloading the description
let itry= 1
while itry <= 3
" call Decho(".try#".itry." to download description of <".aicmmnt."> with addr=".scriptaddr)
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)."|bw!")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile).' '.shellescape(scriptaddr)|bw!
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(tmpfile)." ".shellescape(scriptaddr)
endif
if itry == 1
@ -450,7 +448,6 @@ fun! s:GetOneScript(...)
endif
let itry= itry + 1
endwhile
" call Decho(" --- end downloading tries while loop --- itry=".itry)
" testing: did finding "Click on the package..." fail?
if findpkg == 0 || itry >= 4
@ -461,13 +458,9 @@ fun! s:GetOneScript(...)
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "Click on the package..." in description page for <'.aicmmnt.">"
" call Dret("GetOneScript : srch for /Click on the package/ failed")
let @a= rega
return
endif
" call Decho('found "Click on the package to download"')
let findsrcid= search('src_id=','W')
if findsrcid == 0
@ -478,29 +471,22 @@ fun! s:GetOneScript(...)
let &t_te = t_te
let &rs = rs
let s:downerrors = s:downerrors + 1
" call Decho("***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">")
echomsg "***warning*** couldn'".'t find "src_id=" in description page for <'.aicmmnt.">"
let @a= rega
" call Dret("GetOneScript : srch for /src_id/ failed")
return
endif
" call Decho('found "src_id=" in description page')
let srcidpat = '^\s*<td class.*src_id=\(\d\+\)">\([^<]\+\)<.*$'
let latestsrcid= substitute(getline("."),srcidpat,'\1','')
let sname = substitute(getline("."),srcidpat,'\2','') " script name actually downloaded
" call Decho("srcidpat<".srcidpat."> latestsrcid<".latestsrcid."> sname<".sname.">")
silent q!
call delete(tmpfile)
" convert the strings-of-numbers into numbers
let srcid = srcid + 0
let latestsrcid = latestsrcid + 0
" call Decho("srcid=".srcid." latestsrcid=".latestsrcid." sname<".sname.">")
" has the plugin's most-recent srcid increased, which indicates that it has been updated
if latestsrcid > srcid
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."]: need to update <".sname.">")
let s:downloads= s:downloads + 1
if sname == bufname("%")
@ -511,88 +497,65 @@ fun! s:GetOneScript(...)
" -----------------------------------------------------------------------------
" the plugin has been updated since we last obtained it, so download a new copy
" -----------------------------------------------------------------------------
" call Decho(".downloading new <".sname.">")
echomsg ".downloading new <".sname.">"
if has("win32") || has("win16") || has("win95")
" call Decho(".new|exe silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)."|q")
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='.latestsrcid)|q
new|exe "silent r!".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)|bw!
else
" call Decho(".exe silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id='))
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape('http://vim.sourceforge.net/scripts/download_script.php?src_id=').latestsrcid
exe "silent !".g:GetLatestVimScripts_wget." ".g:GetLatestVimScripts_options." ".shellescape(sname)." ".shellescape(g:GetLatestVimScripts_downloadaddr.latestsrcid)
endif
" --------------------------------------------------------------------------
" AutoInstall: only if doautoinstall has been requested by the plugin itself
" --------------------------------------------------------------------------
" call Decho("checking if plugin requested autoinstall: doautoinstall=".doautoinstall)
if doautoinstall
" call Decho(" ")
" call Decho("Autoinstall: getcwd<".getcwd()."> filereadable(".sname.")=".filereadable(sname))
if filereadable(sname)
" call Decho("<".sname."> is readable")
" call Decho("exe silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall))
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".shellescape(s:autoinstall)
let curdir = fnameescape(substitute(getcwd(),'\','/','ge'))
let installdir= curdir."/Installed"
if !isdirectory(installdir)
call mkdir(installdir)
endif
" call Decho("curdir<".curdir."> installdir<".installdir.">")
" call Decho("exe cd ".fnameescape(s:autoinstall))
exe "cd ".fnameescape(s:autoinstall)
" determine target directory for moves
let firstdir= substitute(&rtp,',.*$','','')
let pname = substitute(sname,'\..*','.vim','')
" call Decho("determine tgtdir: is <".firstdir.'/AsNeeded/'.pname." readable?")
if filereadable(firstdir.'/AsNeeded/'.pname)
let tgtdir= "AsNeeded"
else
let tgtdir= "plugin"
endif
" call Decho("tgtdir<".tgtdir."> pname<".pname.">")
" decompress
if sname =~ '\.bz2$'
" call Decho("decompress: attempt to bunzip2 ".sname)
exe "sil !bunzip2 ".shellescape(sname)
exe "sil !".g:GetLatestVimScripts_bunzip2." ".shellescape(sname)
let sname= substitute(sname,'\.bz2$','','')
" call Decho("decompress: new sname<".sname."> after bunzip2")
elseif sname =~ '\.bz3$'
exe "sil !".g:GetLatestVimScripts_bunzip3." ".shellescape(sname)
let sname= substitute(sname,'\.bz3$','','')
elseif sname =~ '\.gz$'
" call Decho("decompress: attempt to gunzip ".sname)
exe "sil !gunzip ".shellescape(sname)
exe "sil !".g:GetLatestVimScripts_gunzip." ".shellescape(sname)
let sname= substitute(sname,'\.gz$','','')
" call Decho("decompress: new sname<".sname."> after gunzip")
elseif sname =~ '\.xz$'
" call Decho("decompress: attempt to unxz ".sname)
exe "sil !unxz ".shellescape(sname)
exe "sil !".g:GetLatestVimScripts_unxz." ".shellescape(sname)
let sname= substitute(sname,'\.xz$','','')
" call Decho("decompress: new sname<".sname."> after unxz")
else
" call Decho("no decompression needed")
endif
" distribute archive(.zip, .tar, .vba, ...) contents
" distribute archive(.zip, .tar, .vba, .vmb, ...) contents
if sname =~ '\.zip$'
" call Decho("dearchive: attempt to unzip ".sname)
exe "silent !unzip -o ".shellescape(sname)
exe "silent !".g:GetLatestVimScripts_unzip." -o ".shellescape(sname)
elseif sname =~ '\.tar$'
" call Decho("dearchive: attempt to untar ".sname)
exe "silent !tar -xvf ".shellescape(sname)
elseif sname =~ '\.tgz$'
" call Decho("dearchive: attempt to untar+gunzip ".sname)
exe "silent !tar -zxvf ".shellescape(sname)
elseif sname =~ '\.taz$'
" call Decho("dearchive: attempt to untar+uncompress ".sname)
exe "silent !tar -Zxvf ".shellescape(sname)
elseif sname =~ '\.tbz$'
" call Decho("dearchive: attempt to untar+bunzip2 ".sname)
exe "silent !tar -jxvf ".shellescape(sname)
elseif sname =~ '\.txz$'
" call Decho("dearchive: attempt to untar+xz ".sname)
exe "silent !tar -Jxvf ".shellescape(sname)
elseif sname =~ '\.vba$'
" call Decho("dearchive: attempt to handle a vimball: ".sname)
elseif sname =~ '\.vba$\|\.vmb$'
silent 1split
if exists("g:vimball_home")
let oldvimballhome= g:vimball_home
@ -606,28 +569,22 @@ fun! s:GetOneScript(...)
else
unlet g:vimball_home
endif
else
" call Decho("no dearchiving needed")
endif
" ---------------------------------------------
" move plugin to plugin/ or AsNeeded/ directory
" ---------------------------------------------
if sname =~ '.vim$'
" call Decho("dearchive: attempt to simply move ".sname." to ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".tgtdir
else
" call Decho("dearchive: move <".sname."> to installdir<".installdir.">")
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape(sname)." ".installdir
endif
if tgtdir != "plugin"
" call Decho("exe silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir)
exe "silent !".g:GetLatestVimScripts_mv." plugin/".shellescape(pname)." ".tgtdir
exe "silent !".g:GetLatestVimScripts_mv." ".shellescape("plugin/".pname)." ".tgtdir
endif
" helptags step
let docdir= substitute(&rtp,',.*','','e')."/doc"
" call Decho("helptags: docdir<".docdir.">")
exe "helptags ".fnameescape(docdir)
exe "cd ".fnameescape(curdir)
endif
@ -642,19 +599,42 @@ fun! s:GetOneScript(...)
" update the data in the <GetLatestVimScripts.dat> file
call setline(line("."),modline)
" call Decho("update data in ".expand("%")."#".line(".").": modline<".modline.">")
" else " Decho
" call Decho("[latestsrcid=".latestsrcid."] <= [srcid=".srcid."], no need to update")
endif
endfun
" CheckVimScriptURL: Check Network Connection {{{1
" Check status code of scriptaddr and downloadaddr
" return v:true if the script is downloadable or v:false in case of errors
fun CheckVimScriptURL(script_id, src_id)
" doesn't work with powershell
if !executable('curl') || &shell =~? 'pwsh\|powershell'
return v:true
endif
let output = has("win32") ? ' -o NUL ' : ' -o /dev/null '
let temp = tempname()
defer delete(temp)
let script_url = g:GetLatestVimScripts_scriptaddr . a:script_id
let download_url = g:GetLatestVimScripts_downloadaddr . a:src_id
let script_cmd = 'curl -s -I -w "%{http_code}"' . output . shellescape(script_url) . ' >' . shellescape(temp)
call system(script_cmd)
let script_status = readfile(temp, 'b')[0]
let download_cmd = 'curl -s -I -w "%{http_code}"' . output . shellescape(download_url) . ' >' . shellescape(temp)
call system(download_cmd)
let download_status = readfile(temp, 'b')[0]
if script_status !=# '200'
let s:message += [ printf('Error: Failed to reach script: %s', a:script_id) ]
return v:false
endif
" restore options
let &t_ti = t_ti
let &t_te = t_te
let &rs = rs
let @a = rega
" call Dredir("BUFFER TEST (GetOneScript)","ls!")
" call Dret("GetOneScript")
if download_status !=# '200'
let s:message += [ printf('Error: Failed to download script %s', a:script_id) ]
return v:false
endif
return v:true
endfun
" ---------------------------------------------------------------------

View File

@ -1,6 +1,6 @@
" Vim autoload file for editing compressed files.
" Maintainer: The Vim Project <https://github.com/vim/vim>
" Last Change: 2023 Aug 10
" Last Change: 2024 Nov 25
" Former Maintainer: Bram Moolenaar <Bram@vim.org>
" These functions are used by the gzip plugin.
@ -11,7 +11,7 @@ fun s:check(cmd)
let name = substitute(a:cmd, '\(\S*\).*', '\1', '')
if !exists("s:have_" . name)
" safety check, don't execute anything from the current directory
let f = fnamemodify(exepath(name), ":p:h") !=# getcwd()
let f = dist#vim#IsSafeExecutable('gzip', name)
if !f
echoerr "Warning: NOT executing " .. name .. " from current directory!"
endif
@ -148,6 +148,9 @@ fun gzip#read(cmd)
else
let fname = escape(expand("%:r"), " \t\n*?[{`$\\%#'\"|!<")
endif
if filereadable(undofile(expand("%")))
exe "sil rundo " . fnameescape(undofile(expand("%")))
endif
if &verbose >= 8
execute "doau BufReadPost " . fname
else

26
runtime/autoload/hare.vim Normal file
View File

@ -0,0 +1,26 @@
" Vim autoload file.
" Language: Hare
" Maintainer: Amelia Clarke <selene@perilune.dev>
" Last Updated: 2024-05-10
" Upstream: https://git.sr.ht/~sircmpwn/hare.vim
" Attempt to find the directory for a given Hare module.
function hare#FindModule(str)
let path = substitute(trim(a:str, ':', 2), '::', '/', 'g')
let dir = finddir(path)
while !empty(path) && empty(dir)
let path = substitute(path, '/\?\h\w*$', '', '')
let dir = finddir(path)
endwhile
return dir
endfunction
" Return the value of HAREPATH if it exists. Otherwise use a reasonable default.
function hare#GetPath()
if empty($HAREPATH)
return '/usr/src/hare/stdlib,/usr/src/hare/third-party'
endif
return substitute($HAREPATH, ':', ',', 'g')
endfunction
" vim: et sts=2 sw=2 ts=8

55
runtime/autoload/hcl.vim Normal file
View File

@ -0,0 +1,55 @@
" Language: HCL
" Maintainer: Gregory Anders
" Last Change: 2024-09-03
" Based on: https://github.com/hashivim/vim-terraform
" License: ISC
"
" Copyright (c) 2014-2016 Mark Cornick <mark@markcornick.com>
"
" Permission to use, copy, modify, and/or distribute this software for any purpose
" with or without fee is hereby granted, provided that the above copyright notice
" and this permission notice appear in all copies.
"
" THE SOFTWARE IS PROVIDED 'AS IS' AND THE AUTHOR DISCLAIMS ALL WARRANTIES WITH
" REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND
" FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY SPECIAL, DIRECT,
" INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS
" OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER
" TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF
" THIS SOFTWARE.
function! hcl#indentexpr(lnum)
" Beginning of the file should have no indent
if a:lnum == 0
return 0
endif
" Usual case is to continue at the same indent as the previous non-blank line.
let prevlnum = prevnonblank(a:lnum-1)
let thisindent = indent(prevlnum)
" If that previous line is a non-comment ending in [ { (, increase the
" indent level.
let prevline = getline(prevlnum)
if prevline !~# '^\s*\(#\|//\)' && prevline =~# '[\[{\(]\s*$'
let thisindent += &shiftwidth
endif
" If the current line ends a block, decrease the indent level.
let thisline = getline(a:lnum)
if thisline =~# '^\s*[\)}\]]'
let thisindent -= &shiftwidth
endif
" If the previous line starts a block comment /*, increase by one
if prevline =~# '/\*'
let thisindent += 1
endif
" If the previous line ends a block comment */, decrease by one
if prevline =~# '\*/'
let thisindent -= 1
endif
return thisindent
endfunction

View File

@ -0,0 +1,192 @@
" HTML folding script, :h ft-html-plugin
" Latest Change: 2025 May 10
" Original Author: Aliaksei Budavei <0x000c70@gmail.com>
function! htmlfold#MapBalancedTags() abort
" Describe only _a capturable-name prefix_ for start and end patterns of
" a tag so that start tags with attributes spanning across lines can also be
" matched with a single call of "getline()".
let tag = '\m\c</\=\([0-9A-Za-z-]\+\)'
let names = []
let pairs = []
let ends = []
let pos = getpos('.')
try
call cursor(1, 1)
let [lnum, cnum] = searchpos(tag, 'cnW')
" Pair up nearest non-inlined tags in scope.
while lnum > 0
let name_attr = synIDattr(synID(lnum, cnum, 0), 'name')
if name_attr ==# 'htmlTag' || name_attr ==# 'htmlScriptTag'
let name = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
call insert(names, tolower(name), 0)
call insert(pairs, [lnum, -1], 0)
endif
elseif name_attr ==# 'htmlEndTag'
let name = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
let idx = index(names, tolower(name))
if idx >= 0
" Dismiss inlined balanced tags and opened-only tags.
if pairs[idx][0] != lnum
let pairs[idx][1] = lnum
call add(ends, lnum)
endif
" Claim a pair.
let names[: idx] = repeat([''], (idx + 1))
endif
endif
endif
" Advance the cursor, at "<", past "</a", "<a>", etc.
call cursor(lnum, (cnum + 3))
let [lnum, cnum] = searchpos(tag, 'cnW')
endwhile
finally
call setpos('.', pos)
endtry
if empty(ends)
return {}
endif
let folds = {}
let pending_end = ends[0]
let level = 0
while !empty(pairs)
let [start, end] = remove(pairs, -1)
if end < 0
continue
endif
if start >= pending_end
" Mark a sibling tag.
call remove(ends, 0)
while start >= ends[0]
" Mark a parent tag.
call remove(ends, 0)
let level -= 1
endwhile
let pending_end = ends[0]
else
" Mark a child tag.
let level += 1
endif
" Flatten the innermost inlined folds.
let folds[start] = get(folds, start, ('>' . level))
let folds[end] = get(folds, end, ('<' . level))
endwhile
return folds
endfunction
" See ":help vim9-mix".
if !has("vim9script")
finish
endif
def! g:htmlfold#MapBalancedTags(): dict<string>
# Describe only _a capturable-name prefix_ for start and end patterns of
# a tag so that start tags with attributes spanning across lines can also be
# matched with a single call of "getline()".
const tag: string = '\m\c</\=\([0-9A-Za-z-]\+\)'
var names: list<string> = []
var pairs: list<list<number>> = []
var ends: list<number> = []
const pos: list<number> = getpos('.')
try
cursor(1, 1)
var [lnum: number, cnum: number] = searchpos(tag, 'cnW')
# Pair up nearest non-inlined tags in scope.
while lnum > 0
const name_attr: string = synIDattr(synID(lnum, cnum, 0), 'name')
if name_attr ==# 'htmlTag' || name_attr ==# 'htmlScriptTag'
const name: string = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
insert(names, tolower(name), 0)
insert(pairs, [lnum, -1], 0)
endif
elseif name_attr ==# 'htmlEndTag'
const name: string = get(matchlist(getline(lnum), tag, (cnum - 1)), 1, '')
if !empty(name)
const idx: number = index(names, tolower(name))
if idx >= 0
# Dismiss inlined balanced tags and opened-only tags.
if pairs[idx][0] != lnum
pairs[idx][1] = lnum
add(ends, lnum)
endif
# Claim a pair.
names[: idx] = repeat([''], (idx + 1))
endif
endif
endif
# Advance the cursor, at "<", past "</a", "<a>", etc.
cursor(lnum, (cnum + 3))
[lnum, cnum] = searchpos(tag, 'cnW')
endwhile
finally
setpos('.', pos)
endtry
if empty(ends)
return {}
endif
var folds: dict<string> = {}
var pending_end: number = ends[0]
var level: number = 0
while !empty(pairs)
const [start: number, end: number] = remove(pairs, -1)
if end < 0
continue
endif
if start >= pending_end
# Mark a sibling tag.
remove(ends, 0)
while start >= ends[0]
# Mark a parent tag.
remove(ends, 0)
level -= 1
endwhile
pending_end = ends[0]
else
# Mark a child tag.
level += 1
endif
# Flatten the innermost inlined folds.
folds[start] = get(folds, start, ('>' .. level))
folds[end] = get(folds, end, ('<' .. level))
endwhile
return folds
enddef
" vim: fdm=syntax sw=2 ts=8 noet

View File

@ -0,0 +1,92 @@
" Vim formatting plugin file
" Language: Java
" Maintainer: Aliaksei Budavei <0x000c70 AT gmail DOT com>
" Repository: https://github.com/zzzyxwvut/java-vim.git
" Last Change: 2024 Sep 26
" Documented in ":help ft-java-plugin".
if &cp || exists("g:loaded_javaformat") || exists("g:java_ignore_javadoc") || exists("g:java_ignore_markdown")
finish
endif
let g:loaded_javaformat = 1
"""" STRIVE TO REMAIN COMPATIBLE FOR AT LEAST VIM 7.0.
function! javaformat#RemoveCommonMarkdownWhitespace() abort
if mode() != 'n'
return 0
endif
let pattern = '\(^\s*///\)\(\s*\)\(.*\)'
" E121 for v:numbermax before v8.2.2388.
" E15 for expr-<< before v8.2.5003.
let common = 0x7fffffff
let comments = []
for n in range(v:lnum, (v:lnum + v:count - 1))
let parts = matchlist(getline(n), pattern)
let whitespace = get(parts, 2, '')
let nonwhitespace = get(parts, 3, '')
if !empty(whitespace)
let common = min([common, strlen(whitespace)])
elseif !empty(nonwhitespace) || empty(parts)
" No whitespace prefix or not a Markdown comment.
return 0
endif
call add(comments, [whitespace, parts[1], nonwhitespace])
endfor
let cursor = v:lnum
for line in comments
call setline(cursor, join(line[1 :], strpart(line[0], common)))
let cursor += 1
endfor
return 0
endfunction
" See ":help vim9-mix".
if !has("vim9script")
finish
endif
def! g:javaformat#RemoveCommonMarkdownWhitespace(): number
if mode() != 'n'
return 0
endif
const pattern: string = '\(^\s*///\)\(\s*\)\(.*\)'
var common: number = v:numbermax
var comments: list<list<string>> = []
for n in range(v:lnum, (v:lnum + v:count - 1))
const parts: list<string> = matchlist(getline(n), pattern)
const whitespace: string = get(parts, 2, '')
const nonwhitespace: string = get(parts, 3, '')
if !empty(whitespace)
common = min([common, strlen(whitespace)])
elseif !empty(nonwhitespace) || empty(parts)
# No whitespace prefix or not a Markdown comment.
return 0
endif
add(comments, [whitespace, parts[1], nonwhitespace])
endfor
var cursor: number = v:lnum
for line in comments
setline(cursor, join(line[1 :], strpart(line[0], common)))
cursor += 1
endfor
return 0
enddef
" vim: fdm=syntax sw=4 ts=8 noet sta

View File

@ -0,0 +1,31 @@
" Vim filetype plugin file
" Language: Modula-2
" Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2024 Jan 04
" Dialect can be one of pim, iso, r10
function modula2#GetDialect() abort
if exists("b:modula2.dialect")
return b:modula2.dialect
endif
if exists("g:modula2_default_dialect")
let dialect = g:modula2_default_dialect
else
let dialect = "pim"
endif
return dialect
endfunction
function modula2#SetDialect(dialect, extension = "") abort
if exists("b:modula2")
unlockvar! b:modula2
endif
let b:modula2 = #{ dialect: a:dialect, extension: a:extension }
lockvar! b:modula2
endfunction
" vim: nowrap sw=2 sts=2 ts=8 noet fdm=marker:

File diff suppressed because it is too large Load Diff

View File

@ -1,362 +0,0 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Author: Charles E. Campbell
" Date: Sep 18, 2020
" Version: 11
" Copyright: Copyright (C) 1999-2012 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
" with or without modifications, provided that this copyright
" notice is copied with it. Like anything else that's free,
" netrwFileHandlers.vim is provided *as is* and comes with no
" warranty of any kind, either expressed or implied. In no
" event will the copyright holder be liable for any damages
" resulting from the use of this software.
"
" Rom 6:23 (WEB) For the wages of sin is death, but the free gift of God {{{1
" is eternal life in Christ Jesus our Lord.
" ---------------------------------------------------------------------
" Load Once: {{{1
if exists("g:loaded_netrwFileHandlers") || &cp
finish
endif
let g:loaded_netrwFileHandlers= "v11"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of netrwFileHandlers needs vim 7.2"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
" ---------------------------------------------------------------------
" netrwFileHandlers#Invoke: {{{1
fun! netrwFileHandlers#Invoke(exten,fname)
" call Dfunc("netrwFileHandlers#Invoke(exten<".a:exten."> fname<".a:fname.">)")
let exten= a:exten
" list of supported special characters. Consider rcs,v --- that can be
" supported with a NFH_rcsCOMMAv() handler
if exten =~ '[@:,$!=\-+%?;~]'
let specials= {
\ '@' : 'AT',
\ ':' : 'COLON',
\ ',' : 'COMMA',
\ '$' : 'DOLLAR',
\ '!' : 'EXCLAMATION',
\ '=' : 'EQUAL',
\ '-' : 'MINUS',
\ '+' : 'PLUS',
\ '%' : 'PERCENT',
\ '?' : 'QUESTION',
\ ';' : 'SEMICOLON',
\ '~' : 'TILDE'}
let exten= substitute(a:exten,'[@:,$!=\-+%?;~]','\=specials[submatch(0)]','ge')
" call Decho('fname<'.fname.'> done with dictionary')
endif
if a:exten != "" && exists("*NFH_".exten)
" support user NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= NFH_".exten.'("'.a:fname.'")'
elseif a:exten != "" && exists("*s:NFH_".exten)
" use builtin-NFH_*() functions
" call Decho("let ret= netrwFileHandlers#NFH_".a:exten.'("'.fname.'")')
exe "let ret= s:NFH_".a:exten.'("'.a:fname.'")'
endif
" call Dret("netrwFileHandlers#Invoke 0 : ret=".ret)
return 0
endfun
" ---------------------------------------------------------------------
" s:NFH_html: handles html when the user hits "x" when the {{{1
" cursor is atop a *.html file
fun! s:NFH_html(pagefile)
" call Dfunc("s:NFH_html(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla ".shellescape(page,1)
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape ".shellescape(page,1)
else
" call Dret("s:NFH_html 0")
return 0
endif
" call Dret("s:NFH_html 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_htm: handles html when the user hits "x" when the {{{1
" cursor is atop a *.htm file
fun! s:NFH_htm(pagefile)
" call Dfunc("s:NFH_htm(".a:pagefile.")")
let page= substitute(a:pagefile,'^','file://','')
if executable("mozilla")
" call Decho("executing !mozilla ".page)
exe "!mozilla ".shellescape(page,1)
elseif executable("netscape")
" call Decho("executing !netscape ".page)
exe "!netscape ".shellescape(page,1)
else
" call Dret("s:NFH_htm 0")
return 0
endif
" call Dret("s:NFH_htm 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_jpg: {{{1
fun! s:NFH_jpg(jpgfile)
" call Dfunc("s:NFH_jpg(jpgfile<".a:jpgfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:jpgfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
" call Decho("silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".escape(a:jpgfile," []|'"))
exe "!".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:jpgfile,1)
else
" call Dret("s:NFH_jpg 0")
return 0
endif
" call Dret("s:NFH_jpg 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_gif: {{{1
fun! s:NFH_gif(giffile)
" call Dfunc("s:NFH_gif(giffile<".a:giffile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:giffile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:giffile,1)
else
" call Dret("s:NFH_gif 0")
return 0
endif
" call Dret("s:NFH_gif 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_png: {{{1
fun! s:NFH_png(pngfile)
" call Dfunc("s:NFH_png(pngfile<".a:pngfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:pngfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pngfile,1)
else
" call Dret("s:NFH_png 0")
return 0
endif
" call Dret("s:NFH_png 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_pnm: {{{1
fun! s:NFH_pnm(pnmfile)
" call Dfunc("s:NFH_pnm(pnmfile<".a:pnmfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".shellescape(a:pnmfile,1)
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:pnmfile,1)
else
" call Dret("s:NFH_pnm 0")
return 0
endif
" call Dret("s:NFH_pnm 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_bmp: visualize bmp files {{{1
fun! s:NFH_bmp(bmpfile)
" call Dfunc("s:NFH_bmp(bmpfile<".a:bmpfile.">)")
if executable("gimp")
exe "silent! !gimp -s ".a:bmpfile
elseif executable(expand("$SystemRoot")."/SYSTEM32/MSPAINT.EXE")
exe "silent! !".expand("$SystemRoot")."/SYSTEM32/MSPAINT ".shellescape(a:bmpfile,1)
else
" call Dret("s:NFH_bmp 0")
return 0
endif
" call Dret("s:NFH_bmp 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_pdf: visualize pdf files {{{1
fun! s:NFH_pdf(pdf)
" call Dfunc("s:NFH_pdf(pdf<".a:pdf.">)")
if executable("gs")
exe 'silent! !gs '.shellescape(a:pdf,1)
elseif executable("pdftotext")
exe 'silent! pdftotext -nopgbrk '.shellescape(a:pdf,1)
else
" call Dret("s:NFH_pdf 0")
return 0
endif
" call Dret("s:NFH_pdf 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_doc: visualize doc files {{{1
fun! s:NFH_doc(doc)
" call Dfunc("s:NFH_doc(doc<".a:doc.">)")
if executable("oowriter")
exe 'silent! !oowriter '.shellescape(a:doc,1)
redraw!
else
" call Dret("s:NFH_doc 0")
return 0
endif
" call Dret("s:NFH_doc 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_sxw: visualize sxw files {{{1
fun! s:NFH_sxw(sxw)
" call Dfunc("s:NFH_sxw(sxw<".a:sxw.">)")
if executable("oowriter")
exe 'silent! !oowriter '.shellescape(a:sxw,1)
redraw!
else
" call Dret("s:NFH_sxw 0")
return 0
endif
" call Dret("s:NFH_sxw 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_xls: visualize xls files {{{1
fun! s:NFH_xls(xls)
" call Dfunc("s:NFH_xls(xls<".a:xls.">)")
if executable("oocalc")
exe 'silent! !oocalc '.shellescape(a:xls,1)
redraw!
else
" call Dret("s:NFH_xls 0")
return 0
endif
" call Dret("s:NFH_xls 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_ps: handles PostScript files {{{1
fun! s:NFH_ps(ps)
" call Dfunc("s:NFH_ps(ps<".a:ps.">)")
if executable("gs")
" call Decho("exe silent! !gs ".a:ps)
exe "silent! !gs ".shellescape(a:ps,1)
redraw!
elseif executable("ghostscript")
" call Decho("exe silent! !ghostscript ".a:ps)
exe "silent! !ghostscript ".shellescape(a:ps,1)
redraw!
elseif executable("gswin32")
" call Decho("exe silent! !gswin32 ".shellescape(a:ps,1))
exe "silent! !gswin32 ".shellescape(a:ps,1)
redraw!
else
" call Dret("s:NFH_ps 0")
return 0
endif
" call Dret("s:NFH_ps 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_eps: handles encapsulated PostScript files {{{1
fun! s:NFH_eps(eps)
" call Dfunc("s:NFH_eps()")
if executable("gs")
exe "silent! !gs ".shellescape(a:eps,1)
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".shellescape(a:eps,1)
redraw!
elseif executable("ghostscript")
exe "silent! !ghostscript ".shellescape(a:eps,1)
redraw!
elseif executable("gswin32")
exe "silent! !gswin32 ".shellescape(a:eps,1)
redraw!
else
" call Dret("s:NFH_eps 0")
return 0
endif
" call Dret("s:NFH_eps 0")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_fig: handles xfig files {{{1
fun! s:NFH_fig(fig)
" call Dfunc("s:NFH_fig()")
if executable("xfig")
exe "silent! !xfig ".a:fig
redraw!
else
" call Dret("s:NFH_fig 0")
return 0
endif
" call Dret("s:NFH_fig 1")
return 1
endfun
" ---------------------------------------------------------------------
" s:NFH_obj: handles tgif's obj files {{{1
fun! s:NFH_obj(obj)
" call Dfunc("s:NFH_obj()")
if has("unix") && executable("tgif")
exe "silent! !tgif ".a:obj
redraw!
else
" call Dret("s:NFH_obj 0")
return 0
endif
" call Dret("s:NFH_obj 1")
return 1
endfun
let &cpo= s:keepcpo
unlet s:keepcpo
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim: fdm=marker

Some files were not shown because too many files have changed in this diff Show More