Compare commits

...

1953 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
3292 changed files with 201568 additions and 92202 deletions

View File

@ -5,9 +5,9 @@ env:
freebsd_task:
name: FreeBSD
matrix:
- name: FreeBSD 14.1
- name: FreeBSD 14.3
freebsd_instance:
image_family: freebsd-14-1
image_family: freebsd-14-3
timeout_in: 20m
install_script:
- pkg install -y gettext
@ -21,3 +21,11 @@ freebsd_task:
- pw useradd cirrus -m
- chown -R cirrus:cirrus .
- sudo -u cirrus 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'
...

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

1239
.github/MAINTAINERS vendored

File diff suppressed because it is too large Load Diff

View File

@ -1,17 +1,18 @@
name: 'screendump'
description: "Upload failed syntax tests"
name: 'test_artifacts'
description: "Upload failed test artifacts"
runs:
using: "composite"
steps:
- name: Upload failed syntax tests
- name: Upload failed tests
uses: actions/upload-artifact@v4
with:
# Name of the artifact to upload.
name: ${{ github.workflow }}-${{ github.job }}-${{ join(matrix.*, '-') }}-failed-syntax-tests
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

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: 18
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,6 +77,11 @@ jobs:
compiler: gcc
coverage: true
extra: [unittests]
- features: huge
compiler: gcc
coverage: true
extra: [unittests]
architecture: arm64
- features: normal
compiler: gcc
extra: [vimtags]
@ -87,6 +96,13 @@ jobs:
# 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'
@ -94,18 +110,53 @@ jobs:
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+=( \
@ -114,7 +165,6 @@ jobs:
lcov \
libcanberra-dev \
libperl-dev \
python2-dev \
python3-dev \
liblua${LUA_VER}-dev \
lua${LUA_VER} \
@ -126,13 +176,14 @@ jobs:
libattr1-dev
)
fi
sudo apt-get update && sudo apt-get upgrade && 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
sudo add-apt-repository ppa:ubuntu-toolchain-r/test -y
# 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
@ -141,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 }}
@ -158,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)
@ -170,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
@ -193,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
@ -214,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 || true
- name: Check autoconf
if: contains(matrix.extra, 'unittests')
run: |
@ -263,15 +307,27 @@ 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/screendump
uses: ./.github/actions/test_artifacts
- name: Vim tags
if: contains(matrix.extra, 'vimtags')
@ -294,15 +350,16 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
uses: codecov/codecov-action@v4
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
@ -321,7 +378,7 @@ jobs:
fail-fast: false
matrix:
features: [tiny, normal, huge]
runner: [macos-12, macos-14]
runner: [macos-13, macos-15]
steps:
- name: Checkout repository from github
@ -333,19 +390,11 @@ jobs:
brew install lua libtool
echo "LUA_PREFIX=$(brew --prefix)" >> $GITHUB_ENV
- name: Install blackhole-2ch for macos-12
if: matrix.features == 'huge' && matrix.runner == 'macos-12'
- name: Set up Xcode
if: matrix.runner == 'macos-15'
run: |
# Install audio device for playing sound since some of macos-12 machines have no audio device installed.
if system_profiler -json SPAudioDataType | jq -er '.SPAudioDataType[]._items == []'; then
brew install blackhole-2ch
fi
- name: Grant microphone access for macos-14
if: matrix.features == 'huge' && matrix.runner == 'macos-14'
run: |
# Temporary fix to fix microphone permission issues for macos-14 when playing sound.
sqlite3 $HOME/Library/Application\ Support/com.apple.TCC/TCC.db "INSERT OR IGNORE INTO access VALUES ('kTCCServiceMicrophone','/usr/local/opt/runner/provisioner/provisioner',1,2,4,1,NULL,NULL,0,'UNUSED',NULL,0,1687786159,NULL,NULL,'UNUSED',1687786159);"
# 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: |
@ -388,6 +437,12 @@ 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: |
@ -395,12 +450,12 @@ jobs:
brew install diffutils
- name: Test
timeout-minutes: 20
timeout-minutes: 25
run: |
make ${TEST}
- if: ${{ !cancelled() }}
uses: ./.github/actions/screendump
uses: ./.github/actions/test_artifacts
windows:
runs-on: windows-2022
@ -421,19 +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.19'
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_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"
@ -501,6 +559,7 @@ jobs:
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'
@ -522,6 +581,8 @@ 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@v4
@ -555,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
@ -592,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)
@ -647,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
@ -662,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
@ -698,7 +784,7 @@ jobs:
)
- if: ${{ !cancelled() }}
uses: ./.github/actions/screendump
uses: ./.github/actions/test_artifacts
- name: Generate gcov files
if: matrix.coverage
@ -710,7 +796,7 @@ jobs:
- name: Codecov
timeout-minutes: 20
if: matrix.coverage
uses: codecov/codecov-action@v4
uses: codecov/codecov-action@v5
with:
directory: src
flags: windows,${{ matrix.toolchain }}-${{ matrix.arch }}-${{ matrix.features }}

View File

@ -9,7 +9,7 @@ permissions:
jobs:
scan:
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
env:
CC: gcc
@ -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

12
.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,6 +97,11 @@ 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-*
@ -109,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,21 +99,33 @@ 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-*
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

@ -3,7 +3,7 @@
Patches are welcome in whatever form.
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 mailing list. You can also send your patch there
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]
@ -12,23 +12,48 @@ 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
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
mailing list. 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
@ -46,13 +71,13 @@ 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. However, they may
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, email address, github handle and/or
upstream repository. You may also check the [MAINTAINERS][11] file.
upstream repository. You may also check the [MAINTAINERS][11] file.
The maintainer will take care of issues and send updates to the Vim project for
distribution with Vim.
@ -63,23 +88,25 @@ If the maintainer does not respond, contact the [vim-dev][0] mailing list.
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
- 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
- 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.
- 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.
@ -88,9 +115,11 @@ See https://www.vim.org/translations.php for examples.
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
style. Often it's also beneficial to check the surrounding code for the style
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]
@ -103,7 +132,7 @@ mailing list. For other questions please use the [Vi Stack Exchange][8] website,
[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
@ -113,3 +142,5 @@ mailing list. For other questions please use the [Vi Stack Exchange][8] website,
[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

176
Filelist
View File

@ -5,23 +5,30 @@
SRC_ALL = \
.cirrus.yml \
.gitattributes \
.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/actions/screendump/action.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 \
@ -49,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 \
@ -143,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 \
@ -153,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 \
@ -174,54 +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/crash/* \
src/testdir/ru_RU/LC_MESSAGES/__PACKAGE__.mo \
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 \
@ -277,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 \
@ -316,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 \
@ -325,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 \
@ -468,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 \
@ -486,18 +518,21 @@ 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 MS Windows and Unix-like.
@ -583,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 \
@ -598,6 +633,8 @@ 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 \
@ -634,7 +671,7 @@ 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).
@ -665,7 +702,7 @@ 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 \
@ -755,8 +792,15 @@ 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 \
@ -778,6 +822,11 @@ RT_ALL = \
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 \
@ -787,6 +836,16 @@ RT_ALL = \
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/LF translation.
RT_ALL_BIN = \
@ -821,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 \
@ -834,11 +894,14 @@ RT_SCRIPTS = \
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 \
@ -881,7 +944,6 @@ RT_DOS = \
README_dos.txt \
runtime/doc/Make_mvc.mak \
runtime/indent/Make_mvc.mak \
runtime/tutor/Make_mvc.mak \
runtime/lang/Make_mvc.mak \
vimtutor.bat \
@ -1011,7 +1073,8 @@ IN_README_DIR = \
# Generic language files.
LANG_GEN = \
README.??x.txt \
lang/README.*.txt \
lang/LICENSE.*.txt \
runtime/doc/*-da.1 \
runtime/doc/*-da.UTF-8.1 \
runtime/doc/*-de.1 \
@ -1027,7 +1090,6 @@ LANG_GEN = \
runtime/doc/*-ru.UTF-8.1 \
runtime/doc/*-tr.1 \
runtime/doc/*-tr.UTF-8.1 \
runtime/doc/uganda.??x \
runtime/lang/README.txt \
runtime/lang/Makefile \
runtime/lang/Make_all.mak \
@ -1035,21 +1097,20 @@ LANG_GEN = \
runtime/keymap/README.txt \
runtime/keymap/*.vim \
runtime/tutor/README.*.txt \
runtime/tutor/Makefile \
runtime/tutor/Make_all.mak \
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 \
@ -1093,6 +1154,7 @@ LANG_SRC = \
src/po/sjiscorr.c \
src/po/big5corr.c \
src/po/*.po \
src/po/vim.pot \
# The language files for the Win32 lang archive.
LANG_DOS = \
@ -1108,6 +1170,8 @@ IGNORE = \
.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 \

View File

@ -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 && \
@ -111,6 +115,7 @@ MINOR = 1
# - 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 = 1
# - > 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 = 1
# 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 = 1
# > 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 = 1
# 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 = 1
# 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.???; 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)
@ -408,8 +410,7 @@ amisrc: dist prepare
mv dist/vim$(VERSION)src.tar.gz dist/vim$(VERSION)src.tgz
# MS-DOS sources
dossrc: dist 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
@ -420,23 +421,19 @@ dossrc: dist dist/$(COMMENT_SRC) runtime/doc/uganda.nsis.txt \
$(SRC_DOS_BIN) \
$(SRC_AMI_DOS) \
$(SRC_DOS_UNIX) \
runtime/doc/uganda.nsis.??? \
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
cd dist && zip -9 -rD -z vim$(VERSION)src.zip vim <$(COMMENT_SRC)
runtime/doc/uganda.nsis.txt: runtime/doc/uganda.???
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

View File

@ -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,

View File

@ -15,6 +15,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,

View File

@ -2,7 +2,7 @@ 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

@ -2,7 +2,7 @@ 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

@ -2,15 +2,15 @@ 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):
vim91w32.zip Windows 95/98/NT/etc. console version
gvim91.zip Windows 95/98/NT/etc. GUI version
gvim91ole.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 (vim91rt.zip).
The sources are also available (vim91src.zip).

View File

@ -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\vim91\vim.exe
C:\command.com /c D:\editors\vim\vim91\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

@ -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

@ -3,7 +3,7 @@ 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

@ -2,7 +2,7 @@ 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,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

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

View File

@ -21,7 +21,7 @@ $(eval all_patterns := $(shell \
p; \
}'))
# In Makefile's `prepeare` target, all the IN_README_DIR files are moved from
# 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))

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>

View File

@ -1,4 +1,4 @@
README.rux.txt для версии 9.1 программы Vim — Vi IMproved.
README.ru.txt для версии 9.1 программы Vim — Vi IMproved.
ЧТО ТАКОЕ РЕДАКТОР VIM?
@ -20,6 +20,11 @@ README.rux.txt для версии 9.1 программы Vim — Vi IMproved.
функциональные клавиши клавиатуры необходимые команды, и использовать
манипулятор «мышь».
В редакторе Vim также обеспечивается (насколько это возможно) совместимость
с POSIX-реализацией редактора vi, если он скомпилирован с минимальным набором
функционала (обычно называемый vim.tiny). Данная сборка чаще всего используется
во многих дистрибутивах Linux в качестве предустановленного редактора vi.
Редактор Vim работает в ОС MS Windows (7, 8, 10, 11), macOS, Haiku, VMS и
практически во всех UNIX-подобных системах. А перенос на другие платформы не
должен представлять особой сложности.
@ -36,7 +41,7 @@ MS Windows 95/98/Me/NT/2000/XP/Vista, AmigaDOS, Atari MiNT, BeOS и RISC OS.
возможностей.
Существуют отдельные версии для Unix, PC, Amiga и некоторых других систем.
Данный файл README.rux.txt поставляется вместе с архивом рабочих файлов
Данный файл README.ru.txt поставляется вместе с архивом рабочих файлов
программы. Этот архив включает в себя документацию, файлы подсветки синтаксиса
и другие файлы, которые используются редактором во время работы. Чтобы
запустить программу Vim, вы должны получить либо архив с исполняемыми файлами,
@ -96,7 +101,7 @@ README_vms.txt VMS
Редактор Vim является благотворительным программным обеспечением.
Использование и копирование программы Vim не ограничено, однако рекомендуется
сделать добровольное пожертвование для нуждающихся детей в Уганде. Чтобы узнать
подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.rux" (введите
подробности, прочитайте, пожалуйста, файл "runtime/doc/uganda.txt" (введите
команду ":help uganda" в редакторе Vim).
Краткое описание лицензии.
@ -116,7 +121,7 @@ README_vms.txt VMS
над редактором Vim можно с помощью оказания финансовой поддержки.
Пожертвованные вами деньги будут в основном направлены на оказание помощи детям
Уганды, см. "runtime/doc/uganda.rux". Однако в любом случае финансирование
Уганды, см. "runtime/doc/uganda.txt". Однако в любом случае финансирование
будет способствовать повышению заинтересованности команды разработчиков
в продолжении работы над редактором Vim!

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

@ -3,22 +3,15 @@ Installation System (NSIS), available at http://nsis.sourceforge.net/
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.
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
@ -32,8 +25,8 @@ To build the installable .exe file:
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 another directory by passing /DVIMTOOLS=<dir> option to the
"makensis.exe" program via the command line.
specify a different directory by specifying the appropriate makefile value.
How to do this is described below.
5. For the terminal window to work in Vim, the library winpty is required.
You can get it at the following url:
@ -41,8 +34,8 @@ To build the installable .exe file:
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 another directory by passing
/DVIMTOOLS=<dir> option to the "makensis.exe" program via the command line.
directory). However, you can specify a different directory by specifying
the appropriate makefile value. How to do this is described below.
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
@ -52,12 +45,7 @@ To build the installable .exe file:
"../.." directory (above the "vim91" directory, where "diff.exe" and
"winpty{32|64}.dll").
7. On MS Windows do "nmake.exe -f Make_mvc.mak uganda.nsis.txt" in runtime/doc.
On Unix-like system do "make runtime/doc/uganda.nsis.txt" in top directory
or "make uganda.nsis.txt" in runtime/doc. The created files
"uganda.nsis.???" will be automatically converted to DOS file format.
8. Get gettext and iconv DLLs from the following site:
7. Get gettext and iconv DLLs from the following site:
https://github.com/mlocati/gettext-iconv-windows/releases
Both 64- and 32-bit versions are needed.
Download the files gettextX.X.X.X-iconvX.XX-shared-{32,64}.zip, extract
@ -74,35 +62,49 @@ To build the installable .exe file:
libintl-8.dll
libiconv-2.dll
The default <GETTEXT directory> is "..", however, you can specify another
directory by passing /DGETTEXT=<dir> option to "makensis.exe" program via
the command line.
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.
Install NSIS if you didn't do that already.
Download Unicode version the ShellExecAsUser plug-in for NSIS from:
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
and put "ShellExecAsUser.dll" to path\to\NSIS\Plugins\x86-unicode
Installer assembly stage
Unpack the images:
cd nsis
unzip icons.zip or 7z x icons.zip (on Unix-like or MS Windows)
WinRar.exe x icons.zip (on MS Windows)
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
Then build gvim.exe:
cd nsis
makensis.exe [options] gvim.nsi
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
Options (not mandatory):
/DVIMSRC=<dir> — directory where location of gvim_ole.exe, vimw32.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
Variables and their values available for building the installer (not mandatory):
"VIMSRC=<dir>" — directory where location of gvim_ole.exe, vimw32.exe,
GvimExt/*, etc.
/DVIMRT=<dir> — directory where location of runtime files
/DVIMTOOLS=<dir> — directory where location of extra tools: diff.exe,
winpty{32|64}.dll, winpty-agent.exe, libsodium.dll
/DGETTEXT=<dir> — directory where location of gettext libraries
/DHAVE_UPX=1 — additional compression of the installer. UPX program
"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.
/DHAVE_NLS=0 — do not add native language support
/DHAVE_MULTI_LANG=0 — to create an English-only the installer
/DWIN64=1 — to create a 64-bit the installer
"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: 2024 Mar 20
# Last Change: 2025 Feb 24
Unicode true
@ -14,19 +14,19 @@ Unicode true
# Location of runtime files
!ifndef VIMRT
!define VIMRT ".."
!define VIMRT "..\runtime"
!endif
# 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
# If you have UPX, use the switch /DHAVE_UPX=1 on the command line makensis.exe.
@ -53,6 +53,24 @@ Unicode true
!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.
@ -68,6 +86,8 @@ Unicode true
!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
@ -105,9 +125,13 @@ Unicode true
!define UNINST_REG_KEY_VIM "${UNINST_REG_KEY}\${PRODUCT}"
!if ${WIN64}
Name "${PRODUCT} (x64)"
!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
@ -208,6 +232,7 @@ Page custom SetCustom ValidateCustom
# Include support for other languages:
!if ${HAVE_MULTI_LANG}
!include "lang\portuguesebr.nsi"
!include "lang\danish.nsi"
!include "lang\dutch.nsi"
!include "lang\german.nsi"
@ -240,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
@ -417,6 +445,7 @@ 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
@ -485,7 +514,7 @@ Section "$(str_section_exe)" id_section_exe
File ${VIMRT}\tools\*.*
SetOutPath $0\tutor
File /x Makefile /x *.info ${VIMRT}\tutor\*.*
File /r /x *.info ${VIMRT}\tutor\*.*
SectionEnd
##########################################################
@ -615,110 +644,23 @@ SectionGroupEnd
Section "$(str_section_nls)" id_section_nls
SectionIn 1 3
#; FIXME: When adding new translations, do not forget to make changes here.
SetOutPath $0
!if /FileExists ..\README.dax.txt
${If} $Language = ${LANG_DANISH}
File ..\README.dax.txt
${EndIf}
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 ..\README.nlx.txt
${If} $Language = ${LANG_DUTCH}
File ..\README.nlx.txt
${EndIf}
!if /FileExists "..\lang\LICENSE.??.txt"
File ..\lang\LICENSE.??.txt
!if /FileExists "..\lang\LICENSE.??_??.txt"
File ..\lang\LICENSE.??_??.txt
!endif
!if /FileExists ..\README.dex.txt
${If} $Language = ${LANG_GERMAN}
File ..\README.dex.txt
${EndIf}
!endif
!if /FileExists ..\README.itx.txt
${If} $Language = ${LANG_ITALIAN}
File ..\README.itx.txt
${EndIf}
!endif
!if /FileExists ..\README.jax.txt
${If} $Language = ${LANG_JAPANESE}
File ..\README.jax.txt
${EndIf}
!endif
!if /FileExists ..\README.rux.txt
${If} $Language = ${LANG_RUSSIAN}
File ..\README.rux.txt
${EndIf}
!endif
!if /FileExists ..\README.srx.txt
${If} $Language = ${LANG_SERBIAN}
File ..\README.srx.txt
${EndIf}
!endif
!if /FileExists ..\README.cnx.txt
${If} $Language = ${LANG_SIMPCHINESE}
File ..\README.cnx.txt
${EndIf}
!endif
!if /FileExists ..\README.twx.txt
${If} $Language = ${LANG_TRADCHINESE}
File ..\README.twx.txt
${EndIf}
!endif
!if /FileExists ..\README.trx.txt
${OrIf} $Language = ${LANG_TURKISH}
File ..\README.trx.txt
${EndIf}
!endif
#; FIXME: When adding new translations, do not forget to make changes here.
SetOutPath $0\doc
!if /FileExists "${VIMRT}\doc\uganda.dax"
${If} $Language = ${LANG_DANISH}
File ${VIMRT}\doc\uganda.dax
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.nlx"
${If} $Language = ${LANG_DUTCH}
File ${VIMRT}\doc\uganda.nlx
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.dex"
${If} $Language = ${LANG_GERMAN}
File ${VIMRT}\doc\uganda.dex
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.itx"
${If} $Language = ${LANG_ITALIAN}
File ${VIMRT}\doc\uganda.itx
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.jax"
${If} $Language = ${LANG_JAPANESE}
File ${VIMRT}\doc\uganda.jax
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.rux"
${If} $Language = ${LANG_RUSSIAN}
File ${VIMRT}\doc\uganda.rux
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.srx"
${If} $Language = ${LANG_SERBIAN}
File ${VIMRT}\doc\uganda.srx
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.cnx"
${If} $Language = ${LANG_SIMPCHINESE}
File ${VIMRT}\doc\uganda.cnx
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.twx"
${If} $Language = ${LANG_TRADCHINESE}
File ${VIMRT}\doc\uganda.twx
${EndIf}
!endif
!if /FileExists "${VIMRT}\doc\uganda.trx"
${If} $Language = ${LANG_TURKISH}
File ${VIMRT}\doc\uganda.trx
${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 /x Makefile ${VIMRT}\lang\*.*
SetOutPath $0
@ -728,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"
# Install libgcc_s_sjlj-1.dll only if it is needed.
# !if /FileExists "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll"
# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
# "${GETTEXT}\gettext${BIT}\libgcc_s_sjlj-1.dll" \
# "$0\libgcc_s_sjlj-1.dll" "$0"
# !endif
!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
${If} ${SectionIsSelected} ${id_section_editwith}
${If} ${RunningX64}
@ -759,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"
# Install libgcc_s_sjlj-1.dll only if it is needed.
# !if /FileExists "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll"
# !insertmacro InstallLib DLL NOTSHARED REBOOT_NOTPROTECTED \
# "${GETTEXT}\gettext32\libgcc_s_sjlj-1.dll" \
# "$0\GvimExt32\libgcc_s_sjlj-1.dll" "$0\GvimExt32"
# !endif
!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}
SectionEnd
!endif
@ -873,6 +819,21 @@ Function .onInit
!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"

View File

@ -3,4 +3,5 @@
!define __GVIM_VER__NSH__
!define VER_MAJOR 9
!define VER_MINOR 1
!define PATCHLEVEL 0
!endif

View File

@ -18,17 +18,46 @@ allowable length of strings. For example:
drop-down lists on the .vimrc page - 55 characters.
Characters in this case mean characters of the English alphabet.
If you do not yet have a translated "uganda.txt" file and a main "README.txt"
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 "${VIMRT}\doc\uganda.nsis.txt"
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.
Also add the appropriate entries to the "gvim.nsi" file as done for other
languages.
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

@ -19,15 +19,15 @@ LangString ^UninstallCaption ${LANG_DANISH} "$(^Name) Uninstall"
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_DANISH} "${VIMRT}\doc\uganda.nsis.dax"
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.dax.txt"
#LangString vim_readme_file ${LANG_DANISH} "README.da.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_DUTCH} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_DUTCH} "${VIMRT}\doc\uganda.nsis.nlx"
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.nlx.txt"
#LangString vim_readme_file ${LANG_DUTCH} "README.nl.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -21,7 +21,7 @@ LangString ^UninstallCaption ${LANG_ENGLISH} \
# License file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_ENGLISH} "${VIMRT}\doc\uganda.nsis.txt"
LicenseLangString page_lic_file ${LANG_ENGLISH} "..\lang\LICENSE.nsis.txt"
##############################################################################
# README.txt file, which is opened after installation {{{1

View File

@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_GERMAN} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_GERMAN} "${VIMRT}\doc\uganda.nsis.dex"
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.dex.txt"
#LangString vim_readme_file ${LANG_GERMAN} "README.de.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_GREEK} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_GREEK} "${VIMRT}\doc\uganda.nsis.elx"
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.elx.txt"
#LangString vim_readme_file ${LANG_GREEK} "README.el.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -21,15 +21,13 @@ LangString ^UninstallCaption ${LANG_ITALIAN} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_ITALIAN} "${VIMRT}\doc\uganda.nsis.itx"
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 0 "README.txt"
#LangString vim_readme_file ${LANG_ITALIAN} "README.itx.txt"
LangString vim_readme_file ${LANG_ITALIAN} "README.it.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -31,15 +31,15 @@ LangString ^InstallBtn ${LANG_JAPANESE} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_JAPANESE} "${VIMRT}\doc\uganda.nsis.jax"
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.jax.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

@ -21,13 +21,13 @@ LangString ^UninstallCaption ${LANG_RUSSIAN} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file ${LANG_RUSSIAN} "${VIMRT}\doc\uganda.nsis.rux"
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.rux.txt"
LangString vim_readme_file ${LANG_RUSSIAN} "README.ru.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -21,15 +21,15 @@ LangString ^UninstallCaption ${LANG_SERBIAN} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_SERBIAN} "${VIMRT}\doc\uganda.nsis.srx"
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.srx.txt"
#LangString vim_readme_file ${LANG_SERBIAN} "README.sr.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -22,16 +22,16 @@ LangString ^UninstallCaption ${LANG_SIMPCHINESE} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_SIMPCHINESE} \
# "${VIMRT}\doc\uganda.nsis.cnx"
# "..\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.cnx.txt"
#LangString vim_readme_file ${LANG_SIMPCHINESE} "README.zh_cn.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -22,16 +22,16 @@ LangString ^UninstallCaption ${LANG_TRADCHINESE} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
LicenseLangString page_lic_file 0 "..\lang\LICENSE.nsis.txt"
#LicenseLangString page_lic_file ${LANG_TRADCHINESE} \
# "${VIMRT}\doc\uganda.nsis.twx"
# "..\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.twx.txt"
#LangString vim_readme_file ${LANG_TRADCHINESE} "README.zh_tw.txt"
##############################################################################
# MUI Configuration Strings {{{1

View File

@ -20,15 +20,15 @@ LangString ^UninstallCaption ${LANG_TURKISH} \
# Translated license file for the license page {{{1
##############################################################################
LicenseLangString page_lic_file 0 "${VIMRT}\doc\uganda.nsis.txt"
#LicenseLangString page_lic_file ${LANG_TURKISH} "${VIMRT}\doc\uganda.nsis.trx"
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.trx.txt"
#LangString vim_readme_file ${LANG_TURKISH} "README.tr.txt"
##############################################################################

View File

@ -3,12 +3,14 @@ vim9script
# Vim functions for file type detection
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2024 May 23
# 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) =~ '%%'
setf tex
@ -28,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")
@ -59,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\+}\)\)'
@ -142,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
@ -167,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
@ -181,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
@ -402,18 +467,38 @@ export def FTharedoc()
endif
enddef
# Distinguish between HTML, XHTML and Django
# Distinguish between HTML, XHTML, Django and Angular
export def FThtml()
var n = 1
# 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
# 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
@ -449,7 +534,7 @@ export def ProtoCheck(default: string)
# 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
@ -514,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
@ -531,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
@ -628,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
@ -814,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
@ -831,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
@ -839,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")
@ -945,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
@ -1315,7 +1463,7 @@ export def FTdsp()
setf faust
enddef
# Set the filetype of a *.v file to Verilog, V or Cog based on the first 200
# Set the filetype of a *.v file to Verilog, V or Cog based on the first 500
# lines.
export def FTv()
if did_filetype()
@ -1328,7 +1476,7 @@ export def FTv()
endif
var in_comment = 0
for lnum in range(1, min([line("$"), 200]))
for lnum in range(1, min([line("$"), 500]))
var line = getline(lnum)
# Skip Verilog and V comments (lines and blocks).
if line =~ '^\s*/\*'
@ -1360,7 +1508,8 @@ export def FTv()
# 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

View File

@ -4,6 +4,9 @@
" Maintainer: SungHyun Nam <goweol@gmail.com>
" Autoload Split: Bram Moolenaar
" 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
@ -33,6 +36,88 @@ 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.
"
@ -165,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'
@ -174,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
@ -185,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)
@ -215,10 +302,10 @@ func dist#man#GetPage(cmdmods, ...)
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'

View File

@ -1,9 +1,9 @@
" Vim runtime support library,
" runs the vim9 script version or legacy script version
" 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: 2023 Nov 04
" Last Change: 2025 Apr 27
" enable the zip and gzip plugin by default, if not set
@ -18,6 +18,9 @@ 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 &&

View File

@ -2,16 +2,129 @@ vim9script
# Vim runtime support library
#
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2023 Oct 25
# Maintainer: The Vim Project <https://github.com/vim/vim>
# Last Change: 2025 Jan 29
export def IsSafeExecutable(filetype: string, executable: string): bool
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 != '.'))
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,10 +2,12 @@ vim9script
# Language: Vim script
# Maintainer: github user lacygoill
# Last Change: 2023 Jun 29
# Last Change: 2025 Apr 13
#
# Includes Changes from Vim:
# 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:
#
@ -171,6 +173,7 @@ const MODIFIERS: dict<string> = {
def: ['export', 'static'],
class: ['export', 'abstract', 'export abstract'],
interface: ['export'],
enum: ['export'],
}
# ...
# class: ['export', 'abstract', 'export abstract'],
@ -295,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
@ -633,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
@ -977,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
@ -1050,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
@ -1248,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

@ -3,9 +3,18 @@
" 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()
@ -16,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
@ -51,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
@ -63,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
@ -77,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:
@ -89,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
@ -109,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
" ---------------------------------------------------------------------
@ -125,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
@ -156,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
@ -194,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
@ -219,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("#")
@ -234,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,
@ -248,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
@ -271,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
@ -285,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)"
@ -328,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
@ -356,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*#.*\)\=$'
@ -387,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
@ -425,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
@ -451,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
@ -462,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
@ -479,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("%")
@ -512,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
@ -607,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
@ -643,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.
@ -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

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

File diff suppressed because it is too large Load Diff

View File

@ -1,363 +0,0 @@
" netrwFileHandlers: contains various extension-based file handlers for
" netrw's browsers' x command ("eXecute launcher")
" Maintainer: This runtime file is looking for a new maintainer.
" Original 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

View File

@ -1,249 +0,0 @@
" netrwSettings.vim: makes netrw settings simpler
" Date: Nov 15, 2021
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E Campbell
" Version: 18
" Last Change:
" 2024 May 08 by Vim Project: cleanup legacy Win9X checks
" Copyright: Copyright (C) 1999-2007 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,
" netrwSettings.vim is provided *as is* and comes with no
" warranty of any kind, either expressed or implied. By using
" this plugin, you agree that in no event will the copyright
" holder be liable for any damages resulting from the use
" of this software.
"
" Mat 4:23 (WEB) Jesus went about in all Galilee, teaching in their {{{1
" synagogues, preaching the gospel of the kingdom, and healing
" every disease and every sickness among the people.
" Load Once: {{{1
if exists("g:loaded_netrwSettings") || &cp
finish
endif
let g:loaded_netrwSettings = "v18"
if v:version < 700
echohl WarningMsg
echo "***warning*** this version of netrwSettings needs vim 7.0"
echohl Normal
finish
endif
" ---------------------------------------------------------------------
" NetrwSettings: {{{1
fun! netrwSettings#NetrwSettings()
" this call is here largely just to insure that netrw has been loaded
call netrw#WinPath("")
if !exists("g:loaded_netrw")
echohl WarningMsg | echomsg "***sorry*** netrw needs to be loaded prior to using NetrwSettings" | echohl None
return
endif
above wincmd s
enew
setlocal noswapfile bh=wipe
set ft=vim
file Netrw\ Settings
" these variables have the following default effects when they don't
" exist (ie. have not been set by the user in his/her .vimrc)
if !exists("g:netrw_liststyle")
let g:netrw_liststyle= 0
let g:netrw_list_cmd= "ssh HOSTNAME ls -FLa"
endif
if !exists("g:netrw_silent")
let g:netrw_silent= 0
endif
if !exists("g:netrw_use_nt_rcp")
let g:netrw_use_nt_rcp= 0
endif
if !exists("g:netrw_ftp")
let g:netrw_ftp= 0
endif
if !exists("g:netrw_ignorenetrc")
let g:netrw_ignorenetrc= 0
endif
put ='+ ---------------------------------------------'
put ='+ NetrwSettings: by Charles E. Campbell'
put ='+ Press <F1> with cursor atop any line for help'
put ='+ ---------------------------------------------'
let s:netrw_settings_stop= line(".")
put =''
put ='+ Netrw Protocol Commands'
put = 'let g:netrw_dav_cmd = '.g:netrw_dav_cmd
put = 'let g:netrw_fetch_cmd = '.g:netrw_fetch_cmd
put = 'let g:netrw_ftp_cmd = '.g:netrw_ftp_cmd
put = 'let g:netrw_http_cmd = '.g:netrw_http_cmd
put = 'let g:netrw_rcp_cmd = '.g:netrw_rcp_cmd
put = 'let g:netrw_rsync_cmd = '.g:netrw_rsync_cmd
put = 'let g:netrw_scp_cmd = '.g:netrw_scp_cmd
put = 'let g:netrw_sftp_cmd = '.g:netrw_sftp_cmd
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
let s:netrw_protocol_stop= line(".")
put = ''
put ='+Netrw Transfer Control'
put = 'let g:netrw_cygwin = '.g:netrw_cygwin
put = 'let g:netrw_ftp = '.g:netrw_ftp
put = 'let g:netrw_ftpmode = '.g:netrw_ftpmode
put = 'let g:netrw_ignorenetrc = '.g:netrw_ignorenetrc
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_silent = '.g:netrw_silent
put = 'let g:netrw_use_nt_rcp = '.g:netrw_use_nt_rcp
let s:netrw_xfer_stop= line(".")
put =''
put ='+ Netrw Messages'
put ='let g:netrw_use_errorwindow = '.g:netrw_use_errorwindow
put = ''
put ='+ Netrw Browser Control'
if exists("g:netrw_altfile")
put = 'let g:netrw_altfile = '.g:netrw_altfile
else
put = 'let g:netrw_altfile = 0'
endif
put = 'let g:netrw_alto = '.g:netrw_alto
put = 'let g:netrw_altv = '.g:netrw_altv
put = 'let g:netrw_banner = '.g:netrw_banner
if exists("g:netrw_bannerbackslash")
put = 'let g:netrw_bannerbackslash = '.g:netrw_bannerbackslash
else
put = '\" let g:netrw_bannerbackslash = (not defined)'
endif
put = 'let g:netrw_browse_split = '.g:netrw_browse_split
if exists("g:netrw_browsex_viewer")
put = 'let g:netrw_browsex_viewer = '.g:netrw_browsex_viewer
else
put = '\" let g:netrw_browsex_viewer = (not defined)'
endif
put = 'let g:netrw_compress = '.g:netrw_compress
if exists("g:Netrw_corehandler")
put = 'let g:Netrw_corehandler = '.g:Netrw_corehandler
else
put = '\" let g:Netrw_corehandler = (not defined)'
endif
put = 'let g:netrw_ctags = '.g:netrw_ctags
put = 'let g:netrw_cursor = '.g:netrw_cursor
let decompressline= line("$")
put = 'let g:netrw_decompress = '.string(g:netrw_decompress)
if exists("g:netrw_dynamic_maxfilenamelen")
put = 'let g:netrw_dynamic_maxfilenamelen='.g:netrw_dynamic_maxfilenamelen
else
put = '\" let g:netrw_dynamic_maxfilenamelen= (not defined)'
endif
put = 'let g:netrw_dirhistmax = '.g:netrw_dirhistmax
put = 'let g:netrw_errorlvl = '.g:netrw_errorlvl
put = 'let g:netrw_fastbrowse = '.g:netrw_fastbrowse
let fnameescline= line("$")
put = 'let g:netrw_fname_escape = '.string(g:netrw_fname_escape)
put = 'let g:netrw_ftp_browse_reject = '.g:netrw_ftp_browse_reject
put = 'let g:netrw_ftp_list_cmd = '.g:netrw_ftp_list_cmd
put = 'let g:netrw_ftp_sizelist_cmd = '.g:netrw_ftp_sizelist_cmd
put = 'let g:netrw_ftp_timelist_cmd = '.g:netrw_ftp_timelist_cmd
let globescline= line("$")
put = 'let g:netrw_glob_escape = '.string(g:netrw_glob_escape)
put = 'let g:netrw_hide = '.g:netrw_hide
if exists("g:netrw_home")
put = 'let g:netrw_home = '.g:netrw_home
else
put = '\" let g:netrw_home = (not defined)'
endif
put = 'let g:netrw_keepdir = '.g:netrw_keepdir
put = 'let g:netrw_list_cmd = '.g:netrw_list_cmd
put = 'let g:netrw_list_hide = '.g:netrw_list_hide
put = 'let g:netrw_liststyle = '.g:netrw_liststyle
put = 'let g:netrw_localcopycmd = '.g:netrw_localcopycmd
put = 'let g:netrw_localcopycmdopt = '.g:netrw_localcopycmdopt
put = 'let g:netrw_localmkdir = '.g:netrw_localmkdir
put = 'let g:netrw_localmkdiropt = '.g:netrw_localmkdiropt
put = 'let g:netrw_localmovecmd = '.g:netrw_localmovecmd
put = 'let g:netrw_localmovecmdopt = '.g:netrw_localmovecmdopt
put = 'let g:netrw_maxfilenamelen = '.g:netrw_maxfilenamelen
put = 'let g:netrw_menu = '.g:netrw_menu
put = 'let g:netrw_mousemaps = '.g:netrw_mousemaps
put = 'let g:netrw_mkdir_cmd = '.g:netrw_mkdir_cmd
if exists("g:netrw_nobeval")
put = 'let g:netrw_nobeval = '.g:netrw_nobeval
else
put = '\" let g:netrw_nobeval = (not defined)'
endif
put = 'let g:netrw_remote_mkdir = '.g:netrw_remote_mkdir
put = 'let g:netrw_preview = '.g:netrw_preview
put = 'let g:netrw_rename_cmd = '.g:netrw_rename_cmd
put = 'let g:netrw_retmap = '.g:netrw_retmap
put = 'let g:netrw_rm_cmd = '.g:netrw_rm_cmd
put = 'let g:netrw_rmdir_cmd = '.g:netrw_rmdir_cmd
put = 'let g:netrw_rmf_cmd = '.g:netrw_rmf_cmd
put = 'let g:netrw_sort_by = '.g:netrw_sort_by
put = 'let g:netrw_sort_direction = '.g:netrw_sort_direction
put = 'let g:netrw_sort_options = '.g:netrw_sort_options
put = 'let g:netrw_sort_sequence = '.g:netrw_sort_sequence
put = 'let g:netrw_servername = '.g:netrw_servername
put = 'let g:netrw_special_syntax = '.g:netrw_special_syntax
put = 'let g:netrw_ssh_browse_reject = '.g:netrw_ssh_browse_reject
put = 'let g:netrw_ssh_cmd = '.g:netrw_ssh_cmd
put = 'let g:netrw_scpport = '.g:netrw_scpport
put = 'let g:netrw_sepchr = '.g:netrw_sepchr
put = 'let g:netrw_sshport = '.g:netrw_sshport
put = 'let g:netrw_timefmt = '.g:netrw_timefmt
let tmpfileescline= line("$")
put ='let g:netrw_tmpfile_escape...'
put = 'let g:netrw_use_noswf = '.g:netrw_use_noswf
put = 'let g:netrw_xstrlen = '.g:netrw_xstrlen
put = 'let g:netrw_winsize = '.g:netrw_winsize
put =''
put ='+ For help, place cursor on line and press <F1>'
1d
silent %s/^+/"/e
res 99
silent %s/= \([^0-9].*\)$/= '\1'/e
silent %s/= $/= ''/e
1
call setline(decompressline,"let g:netrw_decompress = ".substitute(string(g:netrw_decompress),"^'\\(.*\\)'$",'\1',''))
call setline(fnameescline, "let g:netrw_fname_escape = '".escape(g:netrw_fname_escape,"'")."'")
call setline(globescline, "let g:netrw_glob_escape = '".escape(g:netrw_glob_escape,"'")."'")
call setline(tmpfileescline,"let g:netrw_tmpfile_escape = '".escape(g:netrw_tmpfile_escape,"'")."'")
set nomod
nmap <buffer> <silent> <F1> :call NetrwSettingHelp()<cr>
nnoremap <buffer> <silent> <leftmouse> <leftmouse>:call NetrwSettingHelp()<cr>
let tmpfile= tempname()
exe 'au BufWriteCmd Netrw\ Settings silent w! '.tmpfile.'|so '.tmpfile.'|call delete("'.tmpfile.'")|set nomod'
endfun
" ---------------------------------------------------------------------
" NetrwSettingHelp: {{{2
fun! NetrwSettingHelp()
" call Dfunc("NetrwSettingHelp()")
let curline = getline(".")
if curline =~ '='
let varhelp = substitute(curline,'^\s*let ','','e')
let varhelp = substitute(varhelp,'\s*=.*$','','e')
" call Decho("trying help ".varhelp)
try
exe "he ".varhelp
catch /^Vim\%((\a\+)\)\=:E149/
echo "***sorry*** no help available for <".varhelp.">"
endtry
elseif line(".") < s:netrw_settings_stop
he netrw-settings
elseif line(".") < s:netrw_protocol_stop
he netrw-externapp
elseif line(".") < s:netrw_xfer_stop
he netrw-variables
else
he netrw-browse-var
endif
" call Dret("NetrwSettingHelp")
endfun
" ---------------------------------------------------------------------
" Modelines: {{{1
" vim:ts=8 fdm=marker

View File

@ -20,10 +20,12 @@ let g:python_indent = extend(get(g:, 'python_indent', {}), #{
let s:maxoff = 50 " maximum number of lines to look backwards for ()
function s:SearchBracket(fromlnum, flags)
" VIM_INDENT_TEST_TRACE_START
return searchpairpos('[[({]', '', '[])}]', a:flags,
\ {-> synstack('.', col('.'))
\ ->indexof({_, id -> synIDattr(id, 'name') =~ '\%(Comment\|Todo\|String\)$'}) >= 0},
\ [0, a:fromlnum - s:maxoff]->max(), g:python_indent.searchpair_timeout)
" VIM_INDENT_TEST_TRACE_END python#s:SearchBracket
endfunction
" See if the specified line is already user-dedented from the expected value.

View File

@ -1,6 +1,6 @@
" Maintainer: D. Ben Knoble <ben.knoble+github@gmail.com>
" URL: https://github.com/benknoble/vim-racket
" Last Change: 2023 Sep 22
" Last Change: 2024 Nov 12
vim9script
def MakePatternFromLiterals(xs: list<string>): string
@ -170,7 +170,7 @@ def PosLT(left: dict<any>, right: dict<any>): bool
enddef
def IsForFold(word: string): bool
return ['for/fold', 'for/foldr', 'for*/fold', 'for*/foldr']->index(word) >= 0
return ['for/fold', 'for/foldr', 'for/lists', 'for*/fold', 'for*/foldr', 'for*/lists']->index(word) >= 0
enddef
def IsSecondForm(blnum: number, bcol: number, vlnum: number): bool
@ -209,5 +209,5 @@ def IsSecondForm(blnum: number, bcol: number, vlnum: number): bool
endwhile
# assert_report(printf('forms seen pre-return: %d', forms_seen))
return forms_seen == 2 || (forms_seen == 1 && !empty(stack))
return (forms_seen == 2 && empty(stack)) || (forms_seen == 1 && !empty(stack))
enddef

View File

@ -1,5 +1,6 @@
" Author: Stephen Sugden <stephen@stephensugden.com>
" Last Modified: 2023-09-11
" Last Change: 2025 Mar 31 by Vim project (rename s:RustfmtConfigOptions())
"
" Adapted from https://github.com/fatih/vim-go
" For bugs, patches and license go to https://github.com/rust-lang/rust.vim
@ -61,7 +62,7 @@ function! s:RustfmtWriteMode()
endif
endfunction
function! s:RustfmtConfigOptions()
function! rustfmt#RustfmtConfigOptions()
let l:rustfmt_toml = findfile('rustfmt.toml', expand('%:p:h') . ';')
if l:rustfmt_toml !=# ''
return '--config-path '.shellescape(fnamemodify(l:rustfmt_toml, ":p"))
@ -84,7 +85,7 @@ function! s:RustfmtCommandRange(filename, line1, line2)
let l:arg = {"file": shellescape(a:filename), "range": [a:line1, a:line2]}
let l:write_mode = s:RustfmtWriteMode()
let l:rustfmt_config = s:RustfmtConfigOptions()
let l:rustfmt_config = rustfmt#RustfmtConfigOptions()
" FIXME: When --file-lines gets to be stable, add version range checking
" accordingly.
@ -99,7 +100,7 @@ endfunction
function! s:RustfmtCommand()
let write_mode = g:rustfmt_emit_files ? '--emit=stdout' : '--write-mode=display'
let config = s:RustfmtConfigOptions()
let config = rustfmt#RustfmtConfigOptions()
return join([g:rustfmt_command, write_mode, config, g:rustfmt_options])
endfunction

View File

@ -0,0 +1,352 @@
" Default pre- and post-compiler actions and commands for SpotBugs
" Maintainers: @konfekt and @zzzyxwvut
" Last Change: 2024 Dec 08
let s:save_cpo = &cpo
set cpo&vim
" Look for the setting of "g:spotbugs#state" in "ftplugin/java.vim".
let s:state = get(g:, 'spotbugs#state', {})
let s:commands = get(s:state, 'commands', {})
let s:compiler = get(s:state, 'compiler', '')
let s:readable = filereadable($VIMRUNTIME . '/compiler/' . s:compiler . '.vim')
if has_key(s:commands, 'DefaultPreCompilerCommand')
let g:SpotBugsPreCompilerCommand = s:commands.DefaultPreCompilerCommand
else
function! s:DefaultPreCompilerCommand(arguments) abort
execute 'make ' . a:arguments
cc
endfunction
let g:SpotBugsPreCompilerCommand = function('s:DefaultPreCompilerCommand')
endif
if has_key(s:commands, 'DefaultPreCompilerTestCommand')
let g:SpotBugsPreCompilerTestCommand = s:commands.DefaultPreCompilerTestCommand
else
function! s:DefaultPreCompilerTestCommand(arguments) abort
execute 'make ' . a:arguments
cc
endfunction
let g:SpotBugsPreCompilerTestCommand = function('s:DefaultPreCompilerTestCommand')
endif
if has_key(s:commands, 'DefaultPostCompilerCommand')
let g:SpotBugsPostCompilerCommand = s:commands.DefaultPostCompilerCommand
else
function! s:DefaultPostCompilerCommand(arguments) abort
execute 'make ' . a:arguments
endfunction
let g:SpotBugsPostCompilerCommand = function('s:DefaultPostCompilerCommand')
endif
if v:version > 900
function! spotbugs#DeleteClassFiles() abort
if !exists('b:spotbugs_class_files')
return
endif
for pathname in b:spotbugs_class_files
let classname = pathname =~# "^'.\\+\\.class'$"
\ ? eval(pathname)
\ : pathname
if classname =~# '\.class$' && filereadable(classname)
" Since v9.0.0795.
let octad = readblob(classname, 0, 8)
" Test the magic number and the major version number (45 for v1.0).
" Since v9.0.2027.
if len(octad) == 8 && octad[0 : 3] == 0zcafe.babe &&
\ or((octad[6] << 8), octad[7]) >= 45
echomsg printf('Deleting %s: %d', classname, delete(classname))
endif
endif
endfor
let b:spotbugs_class_files = []
endfunction
else
function! s:DeleteClassFilesWithNewLineCodes(classname) abort
" The distribution of "0a"s in class file versions 2560 and 2570:
"
" 0zca.fe.ba.be.00.00.0a.00 0zca.fe.ba.be.00.00.0a.0a
" 0zca.fe.ba.be.00.0a.0a.00 0zca.fe.ba.be.00.0a.0a.0a
" 0zca.fe.ba.be.0a.00.0a.00 0zca.fe.ba.be.0a.00.0a.0a
" 0zca.fe.ba.be.0a.0a.0a.00 0zca.fe.ba.be.0a.0a.0a.0a
let numbers = [0, 0, 0, 0, 0, 0, 0, 0]
let offset = 0
let lines = readfile(a:classname, 'b', 4)
" Track NL byte counts to handle files of less than 8 bytes.
let nl_cnt = len(lines)
" Track non-NL byte counts for "0zca.fe.ba.be.0a.0a.0a.0a".
let non_nl_cnt = 0
for line in lines
for idx in range(strlen(line))
" Remap NLs to Nuls.
let numbers[offset] = (line[idx] == "\n") ? 0 : char2nr(line[idx]) % 256
let non_nl_cnt += 1
let offset += 1
if offset > 7
break
endif
endfor
let nl_cnt -= 1
if offset > 7 || (nl_cnt < 1 && non_nl_cnt > 4)
break
endif
" Reclaim NLs.
let numbers[offset] = 10
let offset += 1
if offset > 7
break
endif
endfor
" Test the magic number and the major version number (45 for v1.0).
if offset > 7 && numbers[0] == 0xca && numbers[1] == 0xfe &&
\ numbers[2] == 0xba && numbers[3] == 0xbe &&
\ (numbers[6] * 256 + numbers[7]) >= 45
echomsg printf('Deleting %s: %d', a:classname, delete(a:classname))
endif
endfunction
function! spotbugs#DeleteClassFiles() abort
if !exists('b:spotbugs_class_files')
return
endif
let encoding = &encoding
try
set encoding=latin1
for pathname in b:spotbugs_class_files
let classname = pathname =~# "^'.\\+\\.class'$"
\ ? eval(pathname)
\ : pathname
if classname =~# '\.class$' && filereadable(classname)
let line = get(readfile(classname, 'b', 1), 0, '')
let length = strlen(line)
" Test the magic number and the major version number (45 for v1.0).
if length > 3 && line[0 : 3] == "\xca\xfe\xba\xbe"
if length > 7 && ((line[6] == "\n" ? 0 : char2nr(line[6]) % 256) * 256 +
\ (line[7] == "\n" ? 0 : char2nr(line[7]) % 256)) >= 45
echomsg printf('Deleting %s: %d', classname, delete(classname))
else
call s:DeleteClassFilesWithNewLineCodes(classname)
endif
endif
endif
endfor
finally
let &encoding = encoding
endtry
let b:spotbugs_class_files = []
endfunction
endif
function! spotbugs#DefaultPostCompilerAction() abort
" Since v7.4.191.
call call(g:SpotBugsPostCompilerCommand, ['%:S'])
endfunction
if s:readable && s:compiler ==# 'maven' && executable('mvn')
function! spotbugs#DefaultPreCompilerAction() abort
call spotbugs#DeleteClassFiles()
compiler maven
call call(g:SpotBugsPreCompilerCommand, ['compile'])
endfunction
function! spotbugs#DefaultPreCompilerTestAction() abort
call spotbugs#DeleteClassFiles()
compiler maven
call call(g:SpotBugsPreCompilerTestCommand, ['test-compile'])
endfunction
function! spotbugs#DefaultProperties() abort
return {
\ 'PreCompilerAction':
\ function('spotbugs#DefaultPreCompilerAction'),
\ 'PreCompilerTestAction':
\ function('spotbugs#DefaultPreCompilerTestAction'),
\ 'PostCompilerAction':
\ function('spotbugs#DefaultPostCompilerAction'),
\ 'sourceDirPath': ['src/main/java'],
\ 'classDirPath': ['target/classes'],
\ 'testSourceDirPath': ['src/test/java'],
\ 'testClassDirPath': ['target/test-classes'],
\ }
endfunction
unlet s:readable s:compiler
elseif s:readable && s:compiler ==# 'ant' && executable('ant')
function! spotbugs#DefaultPreCompilerAction() abort
call spotbugs#DeleteClassFiles()
compiler ant
call call(g:SpotBugsPreCompilerCommand, ['compile'])
endfunction
function! spotbugs#DefaultPreCompilerTestAction() abort
call spotbugs#DeleteClassFiles()
compiler ant
call call(g:SpotBugsPreCompilerTestCommand, ['compile-test'])
endfunction
function! spotbugs#DefaultProperties() abort
return {
\ 'PreCompilerAction':
\ function('spotbugs#DefaultPreCompilerAction'),
\ 'PreCompilerTestAction':
\ function('spotbugs#DefaultPreCompilerTestAction'),
\ 'PostCompilerAction':
\ function('spotbugs#DefaultPostCompilerAction'),
\ 'sourceDirPath': ['src'],
\ 'classDirPath': ['build/classes'],
\ 'testSourceDirPath': ['test'],
\ 'testClassDirPath': ['build/test/classes'],
\ }
endfunction
unlet s:readable s:compiler
elseif s:readable && s:compiler ==# 'javac' && executable('javac')
let s:filename = tempname()
function! spotbugs#DefaultPreCompilerAction() abort
call spotbugs#DeleteClassFiles()
compiler javac
if get(b:, 'javac_makeprg_params', get(g:, 'javac_makeprg_params', '')) =~ '\s@\S'
" Only read options and filenames from @options [@sources ...] and do
" not update these files when filelists change.
call call(g:SpotBugsPreCompilerCommand, [''])
else
" Collect filenames so that Javac can figure out what to compile.
let filelist = []
for arg_num in range(argc(-1))
let arg_name = argv(arg_num)
if arg_name =~# '\.java\=$'
call add(filelist, fnamemodify(arg_name, ':p:S'))
endif
endfor
for buf_num in range(1, bufnr('$'))
if !buflisted(buf_num)
continue
endif
let buf_name = bufname(buf_num)
if buf_name =~# '\.java\=$'
let buf_name = fnamemodify(buf_name, ':p:S')
if index(filelist, buf_name) < 0
call add(filelist, buf_name)
endif
endif
endfor
noautocmd call writefile(filelist, s:filename)
call call(g:SpotBugsPreCompilerCommand, [shellescape('@' . s:filename)])
endif
endfunction
function! spotbugs#DefaultPreCompilerTestAction() abort
call spotbugs#DefaultPreCompilerAction()
endfunction
function! spotbugs#DefaultProperties() abort
return {
\ 'PreCompilerAction':
\ function('spotbugs#DefaultPreCompilerAction'),
\ 'PostCompilerAction':
\ function('spotbugs#DefaultPostCompilerAction'),
\ }
endfunction
unlet s:readable s:compiler g:SpotBugsPreCompilerTestCommand
delfunction! s:DefaultPreCompilerTestCommand
else
function! spotbugs#DefaultPreCompilerAction() abort
echomsg printf('Not supported: "%s"', s:compiler)
endfunction
function! spotbugs#DefaultPreCompilerTestAction() abort
call spotbugs#DefaultPreCompilerAction()
endfunction
function! spotbugs#DefaultProperties() abort
return {}
endfunction
" XXX: Keep "s:compiler" around for "spotbugs#DefaultPreCompilerAction()",
" "s:DefaultPostCompilerCommand" -- "spotbugs#DefaultPostCompilerAction()".
unlet s:readable g:SpotBugsPreCompilerCommand g:SpotBugsPreCompilerTestCommand
delfunction! s:DefaultPreCompilerCommand
delfunction! s:DefaultPreCompilerTestCommand
endif
function! s:DefineBufferAutocmd(event, ...) abort
if !exists('#java_spotbugs#User')
return 1
endif
for l:event in insert(copy(a:000), a:event)
if l:event != 'User'
execute printf('silent! autocmd! java_spotbugs %s <buffer>', l:event)
execute printf('autocmd java_spotbugs %s <buffer> doautocmd User', l:event)
endif
endfor
return 0
endfunction
function! s:RemoveBufferAutocmd(event, ...) abort
if !exists('#java_spotbugs')
return 1
endif
for l:event in insert(copy(a:000), a:event)
if l:event != 'User'
execute printf('silent! autocmd! java_spotbugs %s <buffer>', l:event)
endif
endfor
return 0
endfunction
" Documented in ":help compiler-spotbugs".
command! -bar -nargs=+ -complete=event SpotBugsDefineBufferAutocmd
\ call s:DefineBufferAutocmd(<f-args>)
command! -bar -nargs=+ -complete=event SpotBugsRemoveBufferAutocmd
\ call s:RemoveBufferAutocmd(<f-args>)
let &cpo = s:save_cpo
unlet s:commands s:state s:save_cpo
" vim: set foldmethod=syntax shiftwidth=2 expandtab:

View File

@ -1,10 +1,22 @@
" tar.vim: Handles browsing tarfiles
" AUTOLOAD PORTION
" Date: Nov 14, 2023
" tar.vim: Handles browsing tarfiles - AUTOLOAD PORTION
" Date: Mar 01, 2025
" Version: 32b (with modifications from the Vim Project)
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E Campbell
" License: Vim License (see vim's :help license)
" Last Change:
" 2024 Jan 08 by Vim Project: fix a few problems (#138331, #12637, #8109)
" 2024 Feb 19 by Vim Project: announce adoption
" 2024 Nov 11 by Vim Project: support permissions (#7379)
" 2025 Feb 06 by Vim Project: add support for lz4 (#16591)
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
" 2025 Mar 01 by Vim Project: fix syntax error in tar#Read()
" 2025 Mar 02 by Vim Project: escape the filename before using :read
" 2025 Mar 02 by Vim Project: determine the compression using readblob()
" instead of shelling out to file(1)
" 2025 Apr 16 by Vim Project: decouple from netrw by adding s:WinPath()
" 2025 May 19 by Vim Project: restore working directory after read/write
" 2025 Jul 13 by Vim Project: warn with path traversal attacks
"
" Contains many ideas from Michael Toren's <tar.vim>
"
@ -17,31 +29,28 @@
" By using this plugin, you agree that in no event will the
" copyright holder be liable for any damages resulting from
" the use of this software.
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" ---------------------------------------------------------------------
" Load Once: {{{1
if &cp || exists("g:loaded_tar")
finish
endif
let g:loaded_tar= "v32a"
if v:version < 702
let g:loaded_tar= "v32b"
if v:version < 900
echohl WarningMsg
echo "***warning*** this version of tar needs vim 7.2"
echo "***warning*** this version of tar needs vim 9.0"
echohl Normal
finish
endif
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
"call Decho("loading autoload/tar.vim")
" ---------------------------------------------------------------------
" Default Settings: {{{1
if !exists("g:tar_browseoptions")
let g:tar_browseoptions= "Ptf"
let g:tar_browseoptions= "tf"
endif
if !exists("g:tar_readoptions")
let g:tar_readoptions= "OPxf"
let g:tar_readoptions= "pxf"
endif
if !exists("g:tar_cmd")
let g:tar_cmd= "tar"
@ -50,6 +59,7 @@ if !exists("g:tar_writeoptions")
let g:tar_writeoptions= "uf"
endif
if !exists("g:tar_delfile")
" Note: not supported on BSD
let g:tar_delfile="--delete -f"
endif
if !exists("g:netrw_cygwin")
@ -80,7 +90,7 @@ if !exists("g:tar_copycmd")
let g:tar_copycmd= g:netrw_localcopycmd
endif
if !exists("g:tar_extractcmd")
let g:tar_extractcmd= "tar -xf"
let g:tar_extractcmd= "tar -pxf"
endif
" set up shell quoting character
@ -96,39 +106,46 @@ if !exists("g:tar_shq")
else
let g:tar_shq= "'"
endif
" call Decho("g:tar_shq<".g:tar_shq.">")
endif
let g:tar_secure=' -- '
let g:tar_leading_pat='^\%([.]\{,2\}/\)\+'
" ----------------
" Functions: {{{1
" ----------------
" ---------------------------------------------------------------------
" s:Msg: {{{2
fun! s:Msg(func, severity, msg)
redraw!
if a:severity =~? 'error'
echohl Error
else
echohl WarningMsg
endif
echo $"***{a:severity}*** ({a:func}) {a:msg}"
echohl None
endfunc
" ---------------------------------------------------------------------
" tar#Browse: {{{2
fun! tar#Browse(tarfile)
" call Dfunc("tar#Browse(tarfile<".a:tarfile.">)")
let repkeep= &report
set report=10
" sanity checks
if !executable(g:tar_cmd)
redraw!
" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
echohl Error | echo '***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system'
call s:Msg('tar#Browse', 'error', $"{g:tar_cmd} not available on your system")
let &report= repkeep
" call Dret("tar#Browse")
return
endif
if !filereadable(a:tarfile)
" call Decho('a:tarfile<'.a:tarfile.'> not filereadable')
if a:tarfile !~# '^\a\+://'
" if it's an url, don't complain, let url-handlers such as vim do its thing
redraw!
" call Decho("***error*** (tar#Browse) File not readable<".a:tarfile.">")
echohl Error | echo "***error*** (tar#Browse) File not readable<".a:tarfile.">" | echohl None
call s:Msg('tar#Browse', 'error', $"File not readable<{a:tarfile}>")
endif
let &report= repkeep
" call Dret("tar#Browse : file<".a:tarfile."> not readable")
return
endif
if &ma != 1
@ -144,11 +161,10 @@ fun! tar#Browse(tarfile)
set ft=tar
" give header
" call Decho("printing header")
let lastline= line("$")
call setline(lastline+1,'" tar.vim version '.g:loaded_tar)
call setline(lastline+2,'" Browsing tarfile '.a:tarfile)
call setline(lastline+3,'" Select a file with cursor and press ENTER')
call setline(lastline+3,'" Select a file with cursor and press ENTER, "x" to extract a file')
keepj $put =''
keepj sil! 0d
keepj $
@ -161,72 +177,60 @@ fun! tar#Browse(tarfile)
let curlast= line("$")
if tarfile =~# '\.\(gz\)$'
" call Decho("1: exe silent r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' || tarfile =~# '\.\(tzst\)$'
if has("unix") && executable("file")
let filekind= system("file ".shellescape(tarfile,1))
else
let filekind= ""
endif
elseif tarfile =~# '\.\(tgz\)$' || tarfile =~# '\.\(tbz\)$' || tarfile =~# '\.\(txz\)$' ||
\ tarfile =~# '\.\(tzst\)$' || tarfile =~# '\.\(tlz4\)$'
let header= s:Header(tarfile)
if filekind =~ "bzip2"
if header =~? 'bzip2'
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif filekind =~ "XZ"
elseif header =~? 'bzip3'
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif header =~? 'xz'
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif filekind =~ "Zstandard"
elseif header =~? 'zstd'
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
elseif header =~? 'lz4'
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif header =~? 'gzip'
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
endif
elseif tarfile =~# '\.lrp'
" call Decho("2: exe silent r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! cat -- ".shellescape(tarfile,1)."|gzip -d -c -|".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(bz2\|tbz\|tb2\)$'
" call Decho("3: exe silent r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(bz3\|tb3\)$'
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(lzma\|tlz\)$'
" call Decho("3: exe silent r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(xz\|txz\)$'
" call Decho("3: exe silent r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - ")
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(zst\|tzst\)$'
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_browseoptions." - "
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("4: exe silent r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,0))
exe "sil! r! ".g:tar_cmd." -".g:tar_browseoptions." ".shellescape(tarfile,1)
endif
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (tar#Browse) please check your g:tar_browseoptions<".g:tar_browseoptions.">"
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
call s:Msg('tar#Browse', 'warning', $"please check your g:tar_browseoptions '<{g:tar_browseoptions}>'")
return
endif
"
" The following should not be neccessary, since in case of errors the
" previous if statement should have caught the problem (because tar exited
" with a non-zero exit code).
" if line("$") == curlast || ( line("$") == (curlast + 1) &&
" \ getline("$") =~# '\c\<\%(warning\|error\|inappropriate\|unrecognized\)\>' &&
" \ getline("$") =~ '\s' )
" redraw!
" echohl WarningMsg | echo "***warning*** (tar#Browse) ".a:tarfile." doesn't appear to be a tar file" | echohl None
" keepj sil! %d
" let eikeep= &ei
" set ei=BufReadCmd,FileReadCmd
" exe "r ".fnameescape(a:tarfile)
" let &ei= eikeep
" keepj sil! 1d
" call Dret("tar#Browse : a:tarfile<".a:tarfile.">")
" return
" endif
" remove tar: Removing leading '/' from member names
" Note: the message could be localized
if search('^tar: ') > 0 || search(g:tar_leading_pat) > 0
call append(3,'" Note: Path Traversal Attack detected!')
let b:leading_slash = 1
" remove the message output
sil g/^tar: /d
endif
" set up maps supported for tar
setlocal noma nomod ro
@ -237,29 +241,19 @@ fun! tar#Browse(tarfile)
endif
let &report= repkeep
" call Dret("tar#Browse : b:tarfile<".b:tarfile.">")
endfun
" ---------------------------------------------------------------------
" TarBrowseSelect: {{{2
fun! s:TarBrowseSelect()
" call Dfunc("TarBrowseSelect() b:tarfile<".b:tarfile."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let fname= getline(".")
" call Decho("fname<".fname.">")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
let ls= get(b:, 'leading_slash', 0)
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("TarBrowseSelect")
return
endif
@ -277,34 +271,62 @@ fun! s:TarBrowseSelect()
wincmd _
endif
let s:tblfile_{winnr()}= curfile
call tar#Read("tarfile:".tarfile.'::'.fname,1)
let b:leading_slash= ls
call tar#Read("tarfile:".tarfile.'::'.fname)
filetype detect
set nomod
exe 'com! -buffer -nargs=? -complete=file TarDiff :call tar#Diff(<q-args>,"'.fnameescape(fname).'")'
let &report= repkeep
" call Dret("TarBrowseSelect : s:tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
endfun
" ---------------------------------------------------------------------
" tar#Read: {{{2
fun! tar#Read(fname,mode)
" call Dfunc("tar#Read(fname<".a:fname.">,mode=".a:mode.")")
fun! tar#Read(fname)
let repkeep= &report
set report=10
let tarfile = substitute(a:fname,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(a:fname,'tarfile:.\{-}::\(.*\)$','\1','')
" be careful not to execute special crafted files
let escape_file = fname->substitute(g:tar_leading_pat, '', '')->fnameescape()
let curdir= getcwd()
let b:curdir= curdir
let tmpdir= tempname()
let b:tmpdir= tmpdir
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
try
exe "lcd ".fnameescape(tmpdir)
catch /^Vim\%((\a\+)\)\=:E344/
call s:Msg('tar#Read', 'error', "cannot lcd to temporary directory")
let &report= repkeep
return
endtry
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
lcd _ZIPVIM_
if has("win32unix") && executable("cygpath")
" assuming cygwin
let tarfile=substitute(system("cygpath -u ".shellescape(tarfile,0)),'\n$','','e')
endif
" call Decho("tarfile<".tarfile.">")
" call Decho("fname<".fname.">")
if fname =~ '\.bz2$' && executable("bzcat")
let decmp= "|bzcat"
let doro = 1
elseif fname =~ '\.t\=gz$' && executable("zcat")
elseif fname =~ '\.bz3$' && executable("bz3cat")
let decmp= "|bz3cat"
let doro = 1
elseif fname =~ '\.t\=gz$' && executable("zcat")
let decmp= "|zcat"
let doro = 1
elseif fname =~ '\.lzma$' && executable("lzcat")
@ -316,54 +338,77 @@ fun! tar#Read(fname,mode)
elseif fname =~ '\.zst$' && executable("zstdcat")
let decmp= "|zstdcat"
let doro = 1
elseif fname =~ '\.lz4$' && executable("lz4cat")
let decmp= "|lz4cat"
let doro = 1
else
let decmp=""
let doro = 0
if fname =~ '\.bz2$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
if fname =~ '\.bz2$\|\.bz3$\|\.gz$\|\.lzma$\|\.xz$\|\.zip$\|\.Z$'
setlocal bin
endif
endif
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
if tarfile =~# '\.bz2$'
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.bz3$'
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(gz\)$'
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\(\.tgz\|\.tbz\|\.txz\)'
if has("unix") && executable("file")
let filekind= system("file ".shellescape(tarfile,1))
else
let filekind= ""
endif
if filekind =~ "bzip2"
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif filekind =~ "XZ"
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
elseif filekind =~ "Zstandard"
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
else
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
let filekind= s:Header(tarfile)
if filekind =~? "bzip2"
exe "sil! r! bzip2 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~ "bzip3"
exe "sil! r! bzip3 -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "xz"
exe "sil! r! xz -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "zstd"
exe "sil! r! zstd --decompress --stdout -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif filekind =~? "gzip"
exe "sil! r! gzip -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
endif
elseif tarfile =~# '\.lrp$'
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! cat -- ".shellescape(tarfile,1)." | gzip -d -c - | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.lzma$'
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! lzma -d -c -- ".shellescape(tarfile,1)."| ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(xz\|txz\)$'
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".tar_secure.shellescape(fname,1).decmp
exe "sil! r! xz --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
elseif tarfile =~# '\.\(lz4\|tlz4\)$'
exe "sil! r! lz4 --decompress --stdout -- ".shellescape(tarfile,1)." | ".g:tar_cmd." -".g:tar_readoptions." - ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
else
if tarfile =~ '^\s*-'
" A file name starting with a dash is taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("8: exe silent r! ".g:tar_cmd." -".g:tar_readoptions.tar_secure.shellescape(tarfile,1)." ".shellescape(fname,1).decmp)
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".tar_secure.shellescape(fname,1).decmp
exe "silent r! ".g:tar_cmd." -".g:tar_readoptions.shellescape(tarfile,1)." ".g:tar_secure.shellescape(fname,1).decmp
exe "read ".escape_file
endif
if get(b:, 'leading_slash', 0)
sil g/^tar: /d
endif
redraw!
if v:shell_error != 0
lcd ..
call s:Rmdir("_ZIPVIM_")
exe "lcd ".fnameescape(curdir)
call s:Msg('tar#Read', 'error', $"sorry, unable to open or extract {tarfile} with {fname}")
endif
if doro
@ -372,122 +417,95 @@ fun! tar#Read(fname,mode)
endif
let b:tarfile= a:fname
exe "file tarfile::".fnameescape(fname)
" cleanup
keepj sil! 0d
set nomod
let &report= repkeep
" call Dret("tar#Read : b:tarfile<".b:tarfile.">")
exe "lcd ".fnameescape(curdir)
silent exe "file tarfile::". fname->fnameescape()
endfun
" ---------------------------------------------------------------------
" tar#Write: {{{2
fun! tar#Write(fname)
" call Dfunc("tar#Write(fname<".a:fname.">) b:tarfile<".b:tarfile."> tblfile_".winnr()."<".s:tblfile_{winnr()}.">")
let pwdkeep= getcwd()
let repkeep= &report
set report=10
if !exists("g:tar_secure") && a:fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#Write) rejecting tarfile member<'.a:fname.'> because of embedded "-"'
" call Dret('tar#Write : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
let curdir= b:curdir
let tmpdir= b:tmpdir
" sanity checks
if !executable(g:tar_cmd)
redraw!
" call Decho('***error*** (tar#Browse) "'.g:tar_cmd.'" not available on your system')
let &report= repkeep
" call Dret("tar#Write")
return
endif
if !exists("*mkdir")
redraw!
" call Decho("***error*** (tar#Write) sorry, mkdir() doesn't work on your system")
echohl Error | echo "***error*** (tar#Write) sorry, mkdir() doesn't work on your system" | echohl None
let &report= repkeep
" call Dret("tar#Write")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
" call Decho("orig tempname<".tmpdir.">")
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
" call Decho("tmpdir<".tmpdir.">")
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
try
exe "cd ".fnameescape(tmpdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
" call Decho("***error*** (tar#Write) cannot cd to temporary directory")
echohl Error | echo "***error*** (tar#Write) cannot cd to temporary directory" | Echohl None
let &report= repkeep
" call Dret("tar#Write")
return
endtry
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
let tarfile = substitute(b:tarfile,'tarfile:\(.\{-}\)::.*$','\1','')
let fname = substitute(b:tarfile,'tarfile:.\{-}::\(.*\)$','\1','')
if get(b:, 'leading_slash', 0)
call s:Msg('tar#Write', 'error', $"sorry, not attempting to update {tarfile} with {fname}")
let &report= repkeep
return
endif
if !isdirectory(fnameescape(tmpdir))
call mkdir(fnameescape(tmpdir), 'p')
endif
exe $"lcd {fnameescape(tmpdir)}"
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
endif
call mkdir("_ZIPVIM_")
lcd _ZIPVIM_
let dir = fnamemodify(fname, ':p:h')
if dir !~# '_ZIPVIM_$'
call mkdir(dir)
endif
" handle compressed archives
if tarfile =~# '\.bz2'
call system("bzip2 -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.bz2','','e')
let compress= "bzip2 -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.bz3'
call system("bzip3 -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.bz3','','e')
let compress= "bzip3 -- ".shellescape(tarfile,0)
elseif tarfile =~# '\.gz'
call system("gzip -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.gz','','e')
let compress= "gzip -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.tgz'
call system("gzip -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.tgz','.tar','e')
let compress= "gzip -- ".shellescape(tarfile,0)
let tgz = 1
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.xz'
call system("xz -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.xz','','e')
let compress= "xz -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
elseif tarfile =~# '\.zst'
call system("zstd --decompress --rm -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.zst','','e')
let compress= "zstd --rm -- ".shellescape(tarfile,0)
elseif tarfile =~# '\.lz4'
call system("lz4 --decompress --rm -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.lz4','','e')
let compress= "lz4 --rm -- ".shellescape(tarfile,0)
elseif tarfile =~# '\.lzma'
call system("lzma -d -- ".shellescape(tarfile,0))
let tarfile = substitute(tarfile,'\.lzma','','e')
let compress= "lzma -- ".shellescape(tarfile,0)
" call Decho("compress<".compress.">")
endif
" call Decho("tarfile<".tarfile.">")
" Note: no support for name.tar.tbz/.txz/.tgz/.tlz4/.tzst
if v:shell_error != 0
redraw!
" call Decho("***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname)
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".tarfile." with ".fname | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {tarfile} with {fname}")
else
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
@ -502,39 +520,26 @@ fun! tar#Write(fname)
" A file name starting with a dash may be taken as an option. Prepend ./ to avoid that.
let tarfile = substitute(tarfile, '-', './-', '')
endif
" call Decho("tarfile<".tarfile."> fname<".fname.">")
if exists("g:tar_secure")
let tar_secure= " -- "
else
let tar_secure= " "
endif
exe "w! ".fnameescape(fname)
" don't overwrite a file forcefully
exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let tarfile = substitute(system("cygpath ".shellescape(tarfile,0)),'\n','','e')
endif
" delete old file from tarfile
" call Decho("system(".g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0)." -- ".shellescape(fname,0).")")
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
" Note: BSD tar does not support --delete flag
call system(g:tar_cmd." ".g:tar_delfile." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {fnameescape(tarfile)} with {fnameescape(fname)} --delete not supported?")
else
" update tarfile with new file
" call Decho(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).tar_secure.shellescape(fname,0))
call system(g:tar_cmd." -".g:tar_writeoptions." ".shellescape(tarfile,0).g:tar_secure.shellescape(fname,0))
if v:shell_error != 0
redraw!
" call Decho("***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname))
echohl Error | echo "***error*** (tar#Write) sorry, unable to update ".fnameescape(tarfile)." with ".fnameescape(fname) | echohl None
call s:Msg('tar#Write', 'error', $"sorry, unable to update {fnameescape(tarfile)} with {fnameescape(fname)}")
elseif exists("compress")
" call Decho("call system(".compress.")")
call system(compress)
if exists("tgz")
" call Decho("rename(".tarfile.".gz,".substitute(tarfile,'\.tar$','.tgz','e').")")
call rename(tarfile.".gz",substitute(tarfile,'\.tar$','.tgz','e'))
endif
endif
@ -542,7 +547,6 @@ fun! tar#Write(fname)
" support writing tarfiles across a network
if s:tblfile_{winnr()} =~ '^\a\+://'
" call Decho("handle writing <".tarfile."> across network to <".s:tblfile_{winnr()}.">")
let tblfile= s:tblfile_{winnr()}
1split|noswapfile enew
let binkeep= &l:binary
@ -558,23 +562,22 @@ fun! tar#Write(fname)
endif
" cleanup and restore current directory
cd ..
lcd ..
call s:Rmdir("_ZIPVIM_")
exe "cd ".fnameescape(curdir)
exe "lcd ".fnameescape(pwdkeep)
setlocal nomod
let &report= repkeep
" call Dret("tar#Write")
endfun
" ---------------------------------------------------------------------
" tar#Diff: {{{2
fun! tar#Diff(userfname,fname)
" call Dfunc("tar#Diff(userfname<".a:userfname."> fname<".a:fname.")")
let fname= a:fname
if a:userfname != ""
let fname= a:userfname
endif
exe "lcd ".fnameescape(b:tmpdir). '/_ZIPVIM_'
if filereadable(fname)
" sets current file (from tarball) for diff'ing
" splits window vertically
@ -588,133 +591,129 @@ fun! tar#Diff(userfname,fname)
redraw!
echo "***warning*** unable to read file<".fname.">"
endif
" call Dret("tar#Diff")
endfun
" ---------------------------------------------------------------------
" tar#Extract: extract a file from a (possibly compressed) tar archive {{{2
fun! tar#Extract()
" call Dfunc("tar#Extract()")
let repkeep= &report
set report=10
let fname= getline(".")
" call Decho("fname<".fname.">")
if !exists("g:tar_secure") && fname =~ '^\s*-\|\s\+-'
redraw!
echohl WarningMsg | echo '***warning*** (tar#BrowseSelect) rejecting tarfile member<'.fname.'> because of embedded "-"'
" call Dret('tar#BrowseSelect : rejecting tarfile member<'.fname.'> because of embedded "-"')
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("TarBrowseSelect")
return
endif
let tarball = expand("%")
" call Decho("tarball<".tarball.">")
let tarbase = substitute(tarball,'\..*$','','')
" call Decho("tarbase<".tarbase.">")
let extractcmd= netrw#WinPath(g:tar_extractcmd)
let extractcmd= s:WinPath(g:tar_extractcmd)
if filereadable(tarbase.".tar")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
echo "***note*** successfully extracted ". fname
endif
elseif filereadable(tarbase.".tgz")
let extractcmd= substitute(extractcmd,"-","-z","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tgz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tgz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd."t ".tarbase.".tgz ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tgz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.gz")
let extractcmd= substitute(extractcmd,"-","-z","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.gz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.gz ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.gz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tbz")
let extractcmd= substitute(extractcmd,"-","-j","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tbz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd."j ".tarbase.".tbz ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tbz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.bz2")
let extractcmd= substitute(extractcmd,"-","-j","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.bz2 ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd."j ".tarbase.".tar.bz2 ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz2 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.bz3")
let extractcmd= substitute(extractcmd,"-","-j","")
call system(extractcmd." ".shellescape(tarbase).".tar.bz3 ".shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.bz3 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".txz")
let extractcmd= substitute(extractcmd,"-","-J","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".txz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".txz ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.txz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.xz")
let extractcmd= substitute(extractcmd,"-","-J","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.xz ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.xz ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.xz {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tzst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tzst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tzst ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tzst {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.zst")
let extractcmd= substitute(extractcmd,"-","--zstd","")
" call Decho("system(".extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname).")")
call system(extractcmd." ".shellescape(tarbase).".tar.zst ".shellescape(fname))
if v:shell_error != 0
echohl Error | echo "***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!" | echohl NONE
" call Decho("***error*** ".extractcmd." ".tarbase.".tar.zst ".fname.": failed!")
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.zst {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tlz4")
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tlz4 ".shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tlz4 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
elseif filereadable(tarbase.".tar.lz4")
let extractcmd= substitute(extractcmd,"-","-I lz4","")
call system(extractcmd." ".shellescape(tarbase).".tar.lz4".shellescape(fname))
if v:shell_error != 0
call s:Msg('tar#Extract', 'error', $"{extractcmd} {tarbase}.tar.lz4 {fname}: failed!")
else
echo "***note*** successfully extracted ".fname
endif
@ -722,61 +721,80 @@ fun! tar#Extract()
" restore option
let &report= repkeep
" call Dret("tar#Extract")
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if has("unix")
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
elseif has("win32") || has("win95") || has("win64") || has("win16")
if &shell =~? "sh$"
call system("/bin/rm -rf -- ".shellescape(a:fname,0))
else
call system("del /S ".shellescape(a:fname,0))
endif
call delete(a:fname, 'rf')
endfun
" s:FileHeader: {{{2
fun! s:Header(fname)
let header= readblob(a:fname, 0, 6)
if header[0:2] == str2blob(['BZh']) " bzip2 header
return "bzip2"
elseif header[0:2] == str2blob(['BZ3']) " bzip3 header
return "bzip3"
elseif header == str2blob(["\3757zXZ\n"]) " xz header
return "xz"
elseif header[0:3] == str2blob(["\x28\xB5\x2F\xFD"]) " zstd header
return "zstd"
elseif header[0:3] == str2blob(["\004\"M\030"]) " lz4 header
return "lz4"
elseif (header[0:1] == str2blob(["\037\235"]) ||
\ header[0:1] == str2blob(["\037\213"]) ||
\ header[0:1] == str2blob(["\037\236"]) ||
\ header[0:1] == str2blob(["\037\240"]) ||
\ header[0:1] == str2blob(["\037\036"]))
return "gzip"
endif
" call Dret("Rmdir")
return "unknown"
endfun
" ---------------------------------------------------------------------
" s:WinPath: {{{2
fun! s:WinPath(path)
if (!g:netrw_cygwin || &shell !~ '\%(\<bash\>\|\<zsh\>\)\%(\.exe\)\=$') && has("win32")
" remove cygdrive prefix, if present
let path = substitute(a:path, '/cygdrive/\(.\)', '\1:', '')
" remove trailing slash (Win95)
let path = substitute(path, '\(\\\|/\)$', '', 'g')
" remove escaped spaces
let path = substitute(path, '\ ', ' ', 'g')
" convert slashes to backslashes
let path = substitute(path, '/', '\', 'g')
else
let path = a:path
endif
return path
endfun
" ---------------------------------------------------------------------
" tar#Vimuntar: installs a tarball in the user's .vim / vimfiles directory {{{2
fun! tar#Vimuntar(...)
" call Dfunc("tar#Vimuntar() a:0=".a:0." a:1<".(exists("a:1")? a:1 : "-n/a-").">")
let tarball = expand("%")
" call Decho("tarball<".tarball.">")
let tarbase = substitute(tarball,'\..*$','','')
" call Decho("tarbase<".tarbase.">")
let tarhome = expand("%:p")
if has("win32") || has("win95") || has("win64") || has("win16")
let tarhome= substitute(tarhome,'\\','/','g')
endif
let tarhome= substitute(tarhome,'/[^/]*$','','')
" call Decho("tarhome<".tarhome.">")
let tartail = expand("%:t")
" call Decho("tartail<".tartail.">")
let curdir = getcwd()
" call Decho("curdir <".curdir.">")
" set up vimhome
if a:0 > 0 && a:1 != ""
let vimhome= a:1
else
let vimhome= vimball#VimballHome()
endif
" call Decho("vimhome<".vimhome.">")
" call Decho("curdir<".curdir."> vimhome<".vimhome.">")
if simplify(curdir) != simplify(vimhome)
" copy (possibly compressed) tarball to .vim/vimfiles
" call Decho(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
call system(netrw#WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
" call Decho("exe cd ".fnameescape(vimhome))
exe "cd ".fnameescape(vimhome)
call system(s:WinPath(g:tar_copycmd)." ".shellescape(tartail)." ".shellescape(vimhome))
exe "lcd ".fnameescape(vimhome)
endif
" call Decho("getcwd<".getcwd().">")
" if necessary, decompress the tarball; then, extract it
if tartail =~ '\.tgz'
@ -788,34 +806,27 @@ fun! tar#Vimuntar(...)
echoerr "unable to decompress<".tartail."> on this system"
if simplify(curdir) != simplify(tarhome)
" remove decompressed tarball, restore directory
" call Decho("delete(".tartail.".tar)")
call delete(tartail.".tar")
" call Decho("exe cd ".fnameescape(curdir))
exe "cd ".fnameescape(curdir)
exe "lcd ".fnameescape(curdir)
endif
" call Dret("tar#Vimuntar")
return
endif
else
call vimball#Decompress(tartail,0)
endif
let extractcmd= netrw#WinPath(g:tar_extractcmd)
" call Decho("system(".extractcmd." ".shellescape(tarbase.".tar").")")
let extractcmd= s:WinPath(g:tar_extractcmd)
call system(extractcmd." ".shellescape(tarbase.".tar"))
" set up help
if filereadable("doc/".tarbase.".txt")
" call Decho("exe helptags ".getcwd()."/doc")
exe "helptags ".getcwd()."/doc"
endif
if simplify(tarhome) != simplify(vimhome)
" remove decompressed tarball, restore directory
call delete(vimhome."/".tarbase.".tar")
exe "cd ".fnameescape(curdir)
exe "lcd ".fnameescape(curdir)
endif
" call Dret("tar#Vimuntar")
endfun
" =====================================================================

243
runtime/autoload/tutor.vim Normal file
View File

@ -0,0 +1,243 @@
" vim: fdm=marker et ts=4 sw=4
" Setup: {{{1
function! tutor#SetupVim()
if !exists('g:did_load_ftplugin') || g:did_load_ftplugin != 1
filetype plugin on
endif
if has('syntax')
if !exists('g:syntax_on') || g:syntax_on == 0
syntax on
endif
endif
endfunction
" Loads metadata file, if available
function! tutor#LoadMetadata()
let b:tutor_metadata = json_decode(join(readfile(expand('%').'.json'), "\n"))
endfunction
" Mappings: {{{1
function! tutor#SetNormalMappings()
nnoremap <silent> <buffer> <CR> :call tutor#FollowLink(0)<cr>
nnoremap <silent> <buffer> <2-LeftMouse> :call tutor#MouseDoubleClick()<cr>
nnoremap <buffer> >> :call tutor#InjectCommand()<cr>
endfunction
function! tutor#MouseDoubleClick()
if foldclosed(line('.')) > -1
normal! zo
else
if match(getline('.'), '^#\{1,} ') > -1
silent normal! zc
else
call tutor#FollowLink(0)
endif
endif
endfunction
function! tutor#InjectCommand()
let l:cmd = substitute(getline('.'), '^\s*', '', '')
exe l:cmd
redraw | echohl WarningMsg | echon "tutor: ran" | echohl None | echon " " | echohl Statement | echon l:cmd
endfunction
function! tutor#FollowLink(force)
let l:stack_s = join(map(synstack(line('.'), col('.')), 'synIDattr(v:val, "name")'), '')
if l:stack_s =~# 'tutorLink'
let l:link_start = searchpairpos('\[', '', ')', 'nbcW')
let l:link_end = searchpairpos('\[', '', ')', 'ncW')
if l:link_start[0] == l:link_end[0]
let l:linkData = getline(l:link_start[0])[l:link_start[1]-1:l:link_end[1]-1]
else
return
endif
let l:target = matchstr(l:linkData, '(\@<=.*)\@=')
if a:force != 1 && match(l:target, '\*.\+\*') > -1
call cursor(l:link_start[0], l:link_end[1])
call search(l:target, '')
normal! ^
elseif a:force != 1 && match(l:target, '^@tutor:') > -1
let l:tutor = matchstr(l:target, '@tutor:\zs.*')
exe "Tutor ".l:tutor
else
exe "help ".l:target
endif
endif
endfunction
" Folding And Info: {{{1
function! tutor#TutorFolds()
if getline(v:lnum) =~# '^#\{1,6}'
return ">". len(matchstr(getline(v:lnum), '^#\{1,6}'))
else
return "="
endif
endfunction
" Marks: {{{1
function! tutor#ApplyMarks()
hi! link tutorExpect Special
if exists('b:tutor_metadata') && has_key(b:tutor_metadata, 'expect')
let b:tutor_sign_id = 1
for expct in keys(b:tutor_metadata['expect'])
let lnum = eval(expct)
call matchaddpos('tutorExpect', [lnum])
call tutor#CheckLine(lnum)
endfor
endif
endfunction
function! tutor#ApplyMarksOnChanged()
if exists('b:tutor_metadata') && has_key(b:tutor_metadata, 'expect')
let lnum = line('.')
if index(keys(b:tutor_metadata['expect']), string(lnum)) > -1
call tutor#CheckLine(lnum)
endif
endif
endfunction
function! tutor#CheckLine(line)
if exists('b:tutor_metadata') && has_key(b:tutor_metadata, 'expect')
let bufn = bufnr('%')
let ctext = getline(a:line)
if b:tutor_metadata['expect'][string(a:line)] == -1 || ctext ==# b:tutor_metadata['expect'][string(a:line)]
exe "sign place ".b:tutor_sign_id." line=".a:line." name=tutorok buffer=".bufn
else
exe "sign place ".b:tutor_sign_id." line=".a:line." name=tutorbad buffer=".bufn
endif
let b:tutor_sign_id+=1
endif
endfunction
" Tutor Cmd: {{{1
function! s:Locale()
if exists('v:lang') && v:lang =~ '\a\a'
let l:lang = v:lang
elseif $LC_ALL =~ '\a\a'
let l:lang = $LC_ALL
elseif $LANG =~ '\a\a'
let l:lang = $LANG
else
let l:lang = 'en_US'
endif
return split(l:lang, '_')
endfunction
function! s:GlobPath(lp, pat)
if version >= 704 && has('patch279')
return globpath(a:lp, a:pat, 1, 1)
else
return split(globpath(a:lp, a:pat, 1), '\n')
endif
endfunction
function! s:Sort(a, b)
let mod_a = fnamemodify(a:a, ':t')
let mod_b = fnamemodify(a:b, ':t')
if mod_a == mod_b
let retval = 0
elseif mod_a > mod_b
if match(mod_a, '^vim-') > -1 && match(mod_b, '^vim-') == -1
let retval = -1
else
let retval = 1
endif
else
if match(mod_b, '^vim-') > -1 && match(mod_a, '^vim-') == -1
let retval = 1
else
let retval = -1
endif
endif
return retval
endfunction
" returns a list of all tutor files matching the given name
function! tutor#GlobTutorials(name, locale)
let locale = a:locale
" search for tutorials:
" 1. non-localized
let l:tutors = s:GlobPath(&rtp, 'tutor/'.a:name.'.tutor')
" 2. localized for current locale
let l:locale_tutors = s:GlobPath(&rtp, 'tutor/'.locale.'/'.a:name.'.tutor')
" 3. fallback to 'en'
if len(l:locale_tutors) == 0
let l:locale_tutors = s:GlobPath(&rtp, 'tutor/en/'.a:name.'.tutor')
endif
call extend(l:tutors, l:locale_tutors)
return uniq(sort(l:tutors, 's:Sort'), 's:Sort')
endfunction
function! tutor#TutorCmd(tutor_name)
if match(a:tutor_name, '[[:space:]]') > 0
echom "Only one argument accepted (check spaces)"
return
endif
if a:tutor_name == ''
let l:tutor_name = 'vim-01-beginner.tutor'
else
let l:tutor_name = a:tutor_name
endif
if match(l:tutor_name, '\.tutor$') > 0
let l:tutor_name = fnamemodify(l:tutor_name, ':r')
endif
let l:tutors = tutor#GlobTutorials(l:tutor_name, s:Locale()[0])
if len(l:tutors) == 0
echom "No tutorial with that name found"
return
endif
if len(l:tutors) == 1
let l:to_open = l:tutors[0]
else
let l:idx = 0
let l:candidates = ['Several tutorials with that name found. Select one:']
for candidate in map(copy(l:tutors),
\'fnamemodify(v:val, ":h:h:t")."/".s:Locale()[0]."/".fnamemodify(v:val, ":t")')
let l:idx += 1
call add(l:candidates, l:idx.'. '.candidate)
endfor
let l:tutor_to_open = inputlist(l:candidates)
let l:to_open = l:tutors[l:tutor_to_open-1]
endif
call tutor#SetupVim()
exe "edit ".l:to_open
call tutor#EnableInteractive(v:true)
endfunction
function! tutor#TutorCmdComplete(lead,line,pos)
let l:tutors = tutor#GlobTutorials('*', s:Locale()[0])
let l:names = uniq(sort(map(l:tutors, 'fnamemodify(v:val, ":t:r")'), 's:Sort'))
return join(l:names, "\n")
endfunction
" Enables/disables interactive mode.
function! tutor#EnableInteractive(enable)
let enable = a:enable
if enable
setlocal buftype=nofile
setlocal concealcursor+=inv
setlocal conceallevel=2
call tutor#ApplyMarks()
augroup tutor_interactive
autocmd! TextChanged,TextChangedI <buffer> call tutor#ApplyMarksOnChanged()
augroup END
else
setlocal buftype<
setlocal concealcursor<
setlocal conceallevel<
if exists('#tutor_interactive')
autocmd! tutor_interactive * <buffer>
endif
endif
endfunction

View File

@ -0,0 +1,79 @@
" Language: Typst
" Previous Maintainer: Gregory Anders
" Maintainer: Luca Saccarola <github.e41mv@aleeas.com>
" Last Change: 2024 Dec 09
" Based on: https://github.com/kaarmu/typst.vim
function! typst#indentexpr() abort
let l:lnum = v:lnum
let s:sw = shiftwidth()
let [l:plnum, l:pline] = s:get_prev_nonblank(l:lnum - 1)
if l:plnum == 0 | return 0 | endif
let l:line = getline(l:lnum)
let l:ind = indent(l:plnum)
let l:synname = synIDattr(synID(l:lnum, 1, 1), 'name')
" Use last indent for block comments
if l:synname == 'typstCommentBlock'
return l:ind
" do not change the indents of bullet lists
elseif l:synname == 'typstMarkupBulletList'
return indent(a:lnum)
endif
if l:pline =~ '\v[{[(]\s*$'
let l:ind += s:sw
endif
if l:line =~ '\v^\s*[}\])]'
let l:ind -= s:sw
endif
return l:ind
endfunction
function typst#foldexpr()
let line = getline(v:lnum)
" Whenever the user wants to fold nested headers under the parent
let nested = get(g:, "typst_foldnested", 1)
" Regular headers
let depth = match(line, '\(^=\+\)\@<=\( .*$\)\@=')
" Do not fold nested regular headers
if depth > 1 && !nested
let depth = 1
endif
if depth > 0
" check syntax, it should be typstMarkupHeading
let syncode = synstack(v:lnum, 1)
if len(syncode) > 0 && synIDattr(syncode[0], 'name') ==# 'typstMarkupHeading'
return ">" . depth
endif
endif
return "="
endfunction
" Gets the previous non-blank line that is not a comment.
function! s:get_prev_nonblank(lnum) abort
let l:lnum = prevnonblank(a:lnum)
let l:line = getline(l:lnum)
while l:lnum > 0 && l:line =~ '^\s*//'
let l:lnum = prevnonblank(l:lnum - 1)
let l:line = getline(l:lnum)
endwhile
return [l:lnum, s:remove_comments(l:line)]
endfunction
" Removes comments from the given line.
function! s:remove_comments(line) abort
return substitute(a:line, '\s*//.*', '', '')
endfunction

View File

@ -2,8 +2,10 @@
" Maintainer: This runtime file is looking for a new maintainer.
" Original Author: Charles E. Campbell
" Date: Apr 11, 2016
" Version: 37
" Version: 37 (with modifications from the Vim Project)
" GetLatestVimScripts: 1502 1 :AutoInstall: vimball.vim
" Last Change:
" 2025 Feb 28 by Vim Project: add support for bzip3 (#16755)
" Copyright: (c) 2004-2011 by Charles E. Campbell
" The VIM LICENSE applies to Vimball.vim, and Vimball.txt
" (see |copyright|) except use "Vimball" instead of "Vim".
@ -530,6 +532,26 @@ fun! vimball#Decompress(fname,...)
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
elseif expand("%") =~ '.*\.bz3' && executable("bunzip3")
" handle *.bz3 with bunzip3
silent exe "!bunzip3 ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,"(vimball#Decompress) bunzip3 may have failed with <".a:fname.">")
endif
let fname= substitute(a:fname,'\.bz3$','','')
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
elseif expand("%") =~ '.*\.bz3' && executable("bzip3")
" handle *.bz3 with bzip3 -d
silent exe "!bzip3 -d ".shellescape(a:fname)
if v:shell_error != 0
call vimball#ShowMesg(s:WARNING,'(vimball#Decompress) "bzip3 -d" may have failed with <'.a:fname.">")
endif
let fname= substitute(a:fname,'\.bz3$','','')
exe "e ".escape(fname,' \')
if a:0 == 0| call vimball#ShowMesg(s:USAGE,"Source this file to extract it! (:so %)") | endif
elseif expand("%") =~ '.*\.zip' && executable("unzip")
" handle *.zip with unzip
silent exe "!unzip ".shellescape(a:fname)

View File

@ -1,11 +1,21 @@
" zip.vim: Handles browsing zipfiles
" AUTOLOAD PORTION
" Date: Mar 12, 2023
" Version: 33
" AUTOLOAD PORTION
" Date: 2024 Aug 21
" Version: 34
" Maintainer: This runtime file is looking for a new maintainer.
" Former Maintainer: Charles E Campbell
" Last Change:
" 2024 Jun 16 by Vim Project: handle whitespace on Windows properly (#14998)
" 2024 Jun 16 by Vim Project: handle whitespace on Windows properly (#14998)
" 2024 Jul 23 by Vim Project: fix 'x' command
" 2024 Jul 24 by Vim Project: use delete() function
" 2024 Jul 30 by Vim Project: fix opening remote zipfile
" 2024 Aug 04 by Vim Project: escape '[' in name of file to be extracted
" 2024 Aug 05 by Vim Project: workaround for the FreeBSD's unzip
" 2024 Aug 05 by Vim Project: clean-up and make it work with shellslash on Windows
" 2024 Aug 18 by Vim Project: correctly handle special globbing chars
" 2024 Aug 21 by Vim Project: simplify condition to detect MS-Windows
" 2025 Mar 11 by Vim Project: handle filenames with leading '-' correctly
" 2025 Jul 12 by Vim Project: drop ../ on write to prevent path traversal attacks
" License: Vim License (see vim's :help license)
" Copyright: Copyright (C) 2005-2019 Charles E. Campbell {{{1
" Permission is hereby granted to use and distribute this code,
@ -22,16 +32,9 @@
if &cp || exists("g:loaded_zip")
finish
endif
let g:loaded_zip= "v33"
if v:version < 702
echohl WarningMsg
echo "***warning*** this version of zip needs vim 7.2 or later"
echohl Normal
finish
endif
let g:loaded_zip= "v34"
let s:keepcpo= &cpo
set cpo&vim
"DechoTabOn
let s:zipfile_escape = ' ?&;\'
let s:ERROR = 2
@ -59,8 +62,28 @@ if !exists("g:zip_extractcmd")
let g:zip_extractcmd= g:zip_unzipcmd
endif
" ---------------------------------------------------------------------
" required early
" s:Mess: {{{2
fun! s:Mess(group, msg)
redraw!
exe "echohl " . a:group
echomsg a:msg
echohl Normal
endfun
if v:version < 901
" required for defer
call s:Mess('WarningMsg', "***warning*** this version of zip needs vim 9.1 or later")
finish
endif
" sanity checks
if !executable(g:zip_unzipcmd)
call s:Mess('Error', "***error*** (zip#Browse) unzip not available on your system")
finish
endif
if !dist#vim#IsSafeExecutable('zip', g:zip_unzipcmd)
echoerr "Warning: NOT executing " .. g:zip_unzipcmd .. " from current directory!"
call s:Mess('Error', "Warning: NOT executing " .. g:zip_unzipcmd .. " from current directory!")
finish
endif
@ -71,47 +94,28 @@ endif
" ---------------------------------------------------------------------
" zip#Browse: {{{2
fun! zip#Browse(zipfile)
" call Dfunc("zip#Browse(zipfile<".a:zipfile.">)")
" sanity check: insure that the zipfile has "PK" as its first two letters
" (zipped files have a leading PK as a "magic cookie")
if !filereadable(a:zipfile) || readfile(a:zipfile, "", 1)[0] !~ '^PK'
exe "noswapfile noautocmd noswapfile e ".fnameescape(a:zipfile)
" call Dret("zip#Browse : not a zipfile<".a:zipfile.">")
" sanity check: ensure that the zipfile has "PK" as its first two letters
" (zip files have a leading PK as a "magic cookie")
if filereadable(a:zipfile) && readblob(a:zipfile, 0, 2) != 0z50.4B
exe "noswapfile noautocmd e " .. fnameescape(a:zipfile)
return
" else " Decho
" call Decho("zip#Browse: a:zipfile<".a:zipfile."> passed PK test - it's a zip file")
endif
let repkeep= &report
set report=10
let dict = s:SetSaneOpts()
defer s:RestoreOpts(dict)
" sanity checks
if !exists("*fnameescape")
if &verbose > 1
echoerr "the zip plugin is not available (your vim doesn't support fnameescape())"
endif
return
endif
if !executable(g:zip_unzipcmd)
redraw!
echohl Error | echo "***error*** (zip#Browse) unzip not available on your system"
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Browse")
call s:Mess('Error', "***error*** (zip#Browse) unzip not available on your system")
return
endif
if !filereadable(a:zipfile)
if a:zipfile !~# '^\a\+://'
" if it's an url, don't complain, let url-handlers such as vim do its thing
redraw!
echohl Error | echo "***error*** (zip#Browse) File not readable<".a:zipfile.">" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
call s:Mess('Error', "***error*** (zip#Browse) File not readable <".a:zipfile.">")
endif
let &report= repkeep
" call Dret("zip#Browse : file<".a:zipfile."> not readable")
return
endif
" call Decho("passed sanity checks")
if &ma != 1
set ma
endif
@ -136,19 +140,15 @@ fun! zip#Browse(zipfile)
\ '" Select a file with cursor and press ENTER'])
keepj $
" call Decho("exe silent r! ".g:zip_unzipcmd." -l -- ".s:Escape(a:zipfile,1))
exe "keepj sil! r! ".g:zip_unzipcmd." -Z -1 -- ".s:Escape(a:zipfile,1)
exe $"keepj sil r! {g:zip_unzipcmd} -Z1 -- {s:Escape(a:zipfile, 1)}"
if v:shell_error != 0
redraw!
echohl WarningMsg | echo "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
call s:Mess('WarningMsg', "***warning*** (zip#Browse) ".fnameescape(a:zipfile)." is not a zip file")
keepj sil! %d
let eikeep= &ei
set ei=BufReadCmd,FileReadCmd
exe "keepj r ".fnameescape(a:zipfile)
let &ei= eikeep
keepj 1d
" call Dret("zip#Browse")
return
endif
@ -160,63 +160,46 @@ fun! zip#Browse(zipfile)
noremap <silent> <buffer> <leftmouse> <leftmouse>:call <SID>ZipBrowseSelect()<cr>
endif
let &report= repkeep
" call Dret("zip#Browse")
endfun
" ---------------------------------------------------------------------
" ZipBrowseSelect: {{{2
fun! s:ZipBrowseSelect()
" call Dfunc("ZipBrowseSelect() zipfile<".((exists("b:zipfile"))? b:zipfile : "n/a")."> curfile<".expand("%").">")
let repkeep= &report
set report=10
let dict = s:SetSaneOpts()
defer s:RestoreOpts(dict)
let fname= getline(".")
if !exists("b:zipfile")
" call Dret("ZipBrowseSelect : b:zipfile doesn't exist!")
return
endif
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("ZipBrowseSelect")
return
endif
if fname =~ '/$'
redraw!
echohl Error | echo "***error*** (zip#Browse) Please specify a file, not a directory" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("ZipBrowseSelect")
call s:Mess('Error', "***error*** (zip#Browse) Please specify a file, not a directory")
return
endif
" call Decho("fname<".fname.">")
" get zipfile to the new-window
let zipfile = b:zipfile
let curfile = expand("%")
" call Decho("zipfile<".zipfile.">")
" call Decho("curfile<".curfile.">")
noswapfile new
if !exists("g:zip_nomax") || g:zip_nomax == 0
wincmd _
endif
let s:zipfile_{winnr()}= curfile
" call Decho("exe e ".fnameescape("zipfile://".zipfile.'::'.fname))
exe "noswapfile e ".fnameescape("zipfile://".zipfile.'::'.fname)
filetype detect
let &report= repkeep
" call Dret("ZipBrowseSelect : s:zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
endfun
" ---------------------------------------------------------------------
" zip#Read: {{{2
fun! zip#Read(fname,mode)
let repkeep= &report
set report=10
let dict = s:SetSaneOpts()
defer s:RestoreOpts(dict)
if has("unix")
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
@ -224,23 +207,20 @@ fun! zip#Read(fname,mode)
else
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
let fname = substitute(fname, '[', '[[]', 'g')
endif
let fname = fname->substitute('[', '[[]', 'g')->escape('?*\\')
" sanity check
if !executable(substitute(g:zip_unzipcmd,'\s\+.*$','',''))
redraw!
echohl Error | echo "***error*** (zip#Read) sorry, your system doesn't appear to have the ".g:zip_unzipcmd." program" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
call s:Mess('Error', "***error*** (zip#Read) sorry, your system doesn't appear to have the ".g:zip_unzipcmd." program")
return
endif
" the following code does much the same thing as
" exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fnameescape(fname),1)
" exe "keepj sil! r! ".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1)
" but allows zipfile://... entries in quickfix lists
let temp = tempname()
let fn = expand('%:p')
exe "sil! !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1).' > '.temp
exe "sil !".g:zip_unzipcmd." -p -- ".s:Escape(zipfile,1)." ".s:Escape(fname,1).' > '.temp
sil exe 'keepalt file '.temp
sil keepj e!
sil exe 'keepalt file '.fnameescape(fn)
@ -251,165 +231,153 @@ fun! zip#Read(fname,mode)
" cleanup
set nomod
let &report= repkeep
endfun
" ---------------------------------------------------------------------
" zip#Write: {{{2
fun! zip#Write(fname)
" call Dfunc("zip#Write(fname<".a:fname.">) zipfile_".winnr()."<".s:zipfile_{winnr()}.">")
let repkeep= &report
set report=10
let dict = s:SetSaneOpts()
let need_rename = 0
defer s:RestoreOpts(dict)
" sanity checks
if !executable(substitute(g:zip_zipcmd,'\s\+.*$','',''))
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
endif
if !exists("*mkdir")
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, mkdir() doesn't work on your system" | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
let &report= repkeep
" call Dret("zip#Write")
return
call s:Mess('Error', "***error*** (zip#Write) sorry, your system doesn't appear to have the ".g:zip_zipcmd." program")
return
endif
let curdir= getcwd()
let tmpdir= tempname()
" call Decho("orig tempname<".tmpdir.">")
if tmpdir =~ '\.'
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
let tmpdir= substitute(tmpdir,'\.[^.]*$','','e')
endif
" call Decho("tmpdir<".tmpdir.">")
call mkdir(tmpdir,"p")
" attempt to change to the indicated directory
if s:ChgDir(tmpdir,s:ERROR,"(zip#Write) cannot cd to temporary directory")
let &report= repkeep
" call Dret("zip#Write")
return
return
endif
" call Decho("current directory now: ".getcwd())
" place temporary files under .../_ZIPVIM_/
if isdirectory("_ZIPVIM_")
call s:Rmdir("_ZIPVIM_")
call delete("_ZIPVIM_", "rf")
endif
call mkdir("_ZIPVIM_")
cd _ZIPVIM_
" call Decho("current directory now: ".getcwd())
if has("unix")
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','')
let zipfile = substitute(a:fname,'zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'zipfile://.\{-}::\([^\\].*\)$','\1','')
else
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
let zipfile = substitute(a:fname,'^.\{-}zipfile://\(.\{-}\)::[^\\].*$','\1','')
let fname = substitute(a:fname,'^.\{-}zipfile://.\{-}::\([^\\].*\)$','\1','')
endif
if fname =~ '^[.]\{1,2}/'
call system(g:zip_zipcmd." -d ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
let fname = fname->substitute('^\([.]\{1,2}/\)\+', '', 'g')
let need_rename = 1
endif
" call Decho("zipfile<".zipfile.">")
" call Decho("fname <".fname.">")
if fname =~ '/'
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
let dirpath = substitute(fname,'/[^/]\+$','','e')
if has("win32unix") && executable("cygpath")
let dirpath = substitute(system("cygpath ".s:Escape(dirpath,0)),'\n','','e')
endif
" call Decho("mkdir(dirpath<".dirpath.">,p)")
call mkdir(dirpath,"p")
endif
call mkdir(dirpath,"p")
endif
if zipfile !~ '/'
let zipfile= curdir.'/'.zipfile
let zipfile= curdir.'/'.zipfile
endif
" call Decho("zipfile<".zipfile."> fname<".fname.">")
exe "w! ".fnameescape(fname)
" don't overwrite files forcefully
exe "w ".fnameescape(fname)
if has("win32unix") && executable("cygpath")
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
let zipfile = substitute(system("cygpath ".s:Escape(zipfile,0)),'\n','','e')
endif
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
let fname = substitute(fname, '[', '[[]', 'g')
endif
" call Decho(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
call system(g:zip_zipcmd." -u ".s:Escape(fnamemodify(zipfile,":p"),0)." ".s:Escape(fname,0))
if v:shell_error != 0
redraw!
echohl Error | echo "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname | echohl None
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
call s:Mess('Error', "***error*** (zip#Write) sorry, unable to update ".zipfile." with ".fname)
elseif s:zipfile_{winnr()} =~ '^\a\+://'
" support writing zipfiles across a network
let netzipfile= s:zipfile_{winnr()}
" call Decho("handle writing <".zipfile."> across network as <".netzipfile.">")
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "noswapfile e! ".fnameescape(zipfile)
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
" support writing zipfiles across a network
let netzipfile= s:zipfile_{winnr()}
1split|enew
let binkeep= &binary
let eikeep = &ei
set binary ei=all
exe "noswapfile e! ".fnameescape(zipfile)
call netrw#NetWrite(netzipfile)
let &ei = eikeep
let &binary = binkeep
q!
unlet s:zipfile_{winnr()}
elseif need_rename
exe $"sil keepalt file {fnameescape($"zipfile://{zipfile}::{fname}")}"
call s:Mess('Warning', "***error*** (zip#Browse) Path Traversal Attack detected, dropping relative path")
endif
" cleanup and restore current directory
cd ..
call s:Rmdir("_ZIPVIM_")
call delete("_ZIPVIM_", "rf")
call s:ChgDir(curdir,s:WARNING,"(zip#Write) unable to return to ".curdir."!")
call s:Rmdir(tmpdir)
call delete(tmpdir, "rf")
setlocal nomod
let &report= repkeep
" call Dret("zip#Write")
endfun
" ---------------------------------------------------------------------
" zip#Extract: extract a file from a zip archive {{{2
fun! zip#Extract()
" call Dfunc("zip#Extract()")
let repkeep= &report
set report=10
let dict = s:SetSaneOpts()
defer s:RestoreOpts(dict)
let fname= getline(".")
" call Decho("fname<".fname.">")
" sanity check
if fname =~ '^"'
let &report= repkeep
" call Dret("zip#Extract")
return
return
endif
if fname =~ '/$'
redraw!
echohl Error | echo "***error*** (zip#Extract) Please specify a file, not a directory" | echohl None
let &report= repkeep
" call Dret("zip#Extract")
return
call s:Mess('Error', "***error*** (zip#Extract) Please specify a file, not a directory")
return
elseif fname =~ '^[.]\?[.]/'
call s:Mess('Error', "***error*** (zip#Browse) Path Traversal Attack detected, not extracting!")
return
endif
if filereadable(fname)
call s:Mess('Error', "***error*** (zip#Extract) <" .. fname .."> already exists in directory, not overwriting!")
return
endif
let target = fname->substitute('\[', '[[]', 'g')
" unzip 6.0 does not support -- to denote end-of-arguments
" unzip 6.1 (2010) apparently supports, it, but hasn't been released
" so the workaround is to use glob '[-]' so that it won't be considered an argument
" else, it would be possible to use 'unzip -o <file.zip> '-d/tmp' to extract the whole archive
let target = target->substitute('^-', '[&]', '')
if &shell =~ 'cmd' && has("win32")
let target = target
\ ->substitute('[?*]', '[&]', 'g')
\ ->substitute('[\\]', '?', 'g')
\ ->shellescape()
" there cannot be a file name with '\' in its name, unzip replaces it by _
let fname = fname->substitute('[\\?*]', '_', 'g')
else
let target = target->escape('*?\\')->shellescape()
endif
" extract the file mentioned under the cursor
" call Decho("system(".g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell).")")
call system(g:zip_extractcmd." ".shellescape(b:zipfile)." ".shellescape(shell))
" call Decho("zipfile<".b:zipfile.">")
call system($"{g:zip_extractcmd} -o {shellescape(b:zipfile)} {target}")
if v:shell_error != 0
echohl Error | echo "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!" | echohl NONE
call s:Mess('Error', "***error*** ".g:zip_extractcmd." ".b:zipfile." ".fname.": failed!")
elseif !filereadable(fname)
echohl Error | echo "***error*** attempted to extract ".fname." but it doesn't appear to be present!"
call s:Mess('Error', "***error*** attempted to extract ".fname." but it doesn't appear to be present!")
else
echo "***note*** successfully extracted ".fname
echomsg "***note*** successfully extracted ".fname
endif
" restore option
let &report= repkeep
" call Dret("zip#Extract")
endfun
" ---------------------------------------------------------------------
@ -424,48 +392,48 @@ fun! s:Escape(fname,isfilt)
else
let qnameq= g:zip_shq.escape(a:fname,g:zip_shq).g:zip_shq
endif
if exists("+shellslash") && &shellslash && &shell =~ "cmd.exe"
" renormalize directory separator on Windows
let qnameq=substitute(qnameq, '/', '\\', 'g')
endif
return qnameq
endfun
" ---------------------------------------------------------------------
" ChgDir: {{{2
" s:ChgDir: {{{2
fun! s:ChgDir(newdir,errlvl,errmsg)
" call Dfunc("ChgDir(newdir<".a:newdir."> errlvl=".a:errlvl." errmsg<".a:errmsg.">)")
try
exe "cd ".fnameescape(a:newdir)
catch /^Vim\%((\a\+)\)\=:E344/
redraw!
if a:errlvl == s:NOTE
echo "***note*** ".a:errmsg
echomsg "***note*** ".a:errmsg
elseif a:errlvl == s:WARNING
echohl WarningMsg | echo "***warning*** ".a:errmsg | echohl NONE
call s:Mess("WarningMsg", "***warning*** ".a:errmsg)
elseif a:errlvl == s:ERROR
echohl Error | echo "***error*** ".a:errmsg | echohl NONE
call s:Mess("Error", "***error*** ".a:errmsg)
endif
" call inputsave()|call input("Press <cr> to continue")|call inputrestore()
" call Dret("ChgDir 1")
return 1
endtry
" call Dret("ChgDir 0")
return 0
endfun
" ---------------------------------------------------------------------
" s:Rmdir: {{{2
fun! s:Rmdir(fname)
" call Dfunc("Rmdir(fname<".a:fname.">)")
if (has("win32") || has("win95") || has("win64") || has("win16")) && &shell !~? 'sh$'
call system("rmdir /S/Q ".s:Escape(a:fname,0))
else
call system("/bin/rm -rf ".s:Escape(a:fname,0))
endif
" call Dret("Rmdir")
" s:SetSaneOpts: {{{2
fun! s:SetSaneOpts()
let dict = {}
let dict.report = &report
let dict.shellslash = &shellslash
let &report = 10
let &shellslash = 0
return dict
endfun
" ---------------------------------------------------------------------
" s:RestoreOpts: {{{2
fun! s:RestoreOpts(dict)
for [key, val] in items(a:dict)
exe $"let &{key} = {val}"
endfor
endfun
" ------------------------------------------------------------------------

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer Steven Vertigan <steven@vertigan.wattle.id.au>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Mon 08 Jan 2024 09:42:49 AM AEDT
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -22,9 +22,11 @@ hi Normal guifg=#ffd700 guibg=#000087 gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#005faf gui=NONE cterm=NONE
hi Pmenu guifg=#ffffff guibg=#008787 gui=NONE cterm=NONE
hi PmenuSel guifg=#008787 guibg=#ffffff gui=NONE cterm=NONE
hi PmenuMatch guifg=#ffd700 guibg=#008787 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff7f50 guibg=#ffffff gui=NONE cterm=NONE
hi QuickFixLine guifg=#000000 guibg=#d787d7 gui=NONE cterm=NONE
hi ColorColumn guifg=NONE guibg=#870087 gui=NONE cterm=NONE
hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal guifg=#008787 guibg=NONE gui=NONE cterm=NONE
hi Cursor guifg=#000000 guibg=#00ff00 gui=NONE cterm=NONE
hi CursorColumn guifg=NONE guibg=#005faf gui=NONE cterm=NONE
hi CursorIM guifg=#000000 guibg=#ffd700 gui=NONE cterm=NONE
@ -75,6 +77,7 @@ hi Type guifg=#ffa500 guibg=NONE gui=bold cterm=NONE
hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
hi Label guifg=#ffd700 guibg=NONE gui=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg
@ -132,9 +135,11 @@ if s:t_Co >= 256
hi CursorLine ctermfg=NONE ctermbg=25 cterm=NONE
hi Pmenu ctermfg=231 ctermbg=30 cterm=NONE
hi PmenuSel ctermfg=30 ctermbg=231 cterm=NONE
hi PmenuMatch ctermfg=220 ctermbg=30 cterm=NONE
hi PmenuMatchSel ctermfg=209 ctermbg=231 cterm=NONE
hi QuickFixLine ctermfg=16 ctermbg=176 cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=90 cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=30 ctermbg=NONE cterm=NONE
hi Cursor ctermfg=16 ctermbg=46 cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=25 cterm=NONE
hi CursorIM ctermfg=16 ctermbg=220 cterm=NONE
@ -185,6 +190,7 @@ if s:t_Co >= 256
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Label ctermfg=220 ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg
@ -245,9 +251,11 @@ if s:t_Co >= 16
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi Pmenu ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuSel ctermfg=black ctermbg=white cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=white cterm=bold
hi QuickFixLine ctermfg=black ctermbg=magenta cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=darkmagenta cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Cursor ctermfg=black ctermbg=green cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=blue cterm=NONE
hi CursorIM ctermfg=black ctermbg=yellow cterm=NONE
@ -298,6 +306,7 @@ if s:t_Co >= 16
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Label ctermfg=yellow ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg
@ -358,6 +367,8 @@ if s:t_Co >= 8
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi Pmenu ctermfg=black ctermbg=cyan cterm=NONE
hi PmenuSel ctermfg=black ctermbg=gray cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=cyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=gray cterm=bold
hi QuickFixLine ctermfg=black ctermbg=magenta cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=magenta cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
@ -410,6 +421,7 @@ if s:t_Co >= 8
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Label ctermfg=yellow ctermbg=NONE cterm=NONE
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link Debug Special
hi! link Added String
hi! link Removed WarningMsg

View File

@ -4,7 +4,7 @@
" Maintainer: Original author Bohdan Vlasyuk <bohdan@vstu.edu.ua>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Mon 08 Jan 2024 09:43:03 AM AEDT
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -19,6 +19,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#8b0000', '#90f020', '#ffa500', '#00008b', '#8b008b', '#008b8b', '#c0c0c0', '#808080', '#ffa0a0', '#90f020', '#ffff60', '#0030ff', '#ff00ff', '#90fff0', '#ffffff']
endif
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link CursorColumn CursorLine
hi! link CursorIM Cursor
hi! link EndOfBuffer NonText
@ -68,7 +69,7 @@ hi! link CurSearch Search
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi Normal guifg=#c0c0c0 guibg=#000040 gui=NONE cterm=NONE
hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal guifg=#008b8b guibg=NONE gui=NONE cterm=NONE
hi ColorColumn guifg=#c0c0c0 guibg=#8b0000 gui=NONE cterm=NONE
hi Cursor guifg=#000000 guibg=#ffff60 gui=NONE cterm=NONE
hi QuickFixLine guifg=#000000 guibg=#ff80ff gui=NONE cterm=NONE
@ -85,6 +86,8 @@ hi Pmenu guifg=#ffffff guibg=#0030ff gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=#0030ff guibg=#ffffff gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#ffffff gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff80ff guibg=#0030ff gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff00ff guibg=#ffffff gui=NONE cterm=NONE
hi Question guifg=#90f020 guibg=NONE gui=NONE cterm=NONE
hi SignColumn guifg=#808080 guibg=NONE gui=NONE cterm=NONE
hi SpecialKey guifg=#008b8b guibg=NONE gui=NONE cterm=NONE
@ -127,6 +130,7 @@ hi DiffDelete guifg=#ffffff guibg=#af5faf gui=NONE cterm=NONE
if s:t_Co >= 256
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link CursorColumn CursorLine
hi! link CursorIM Cursor
hi! link EndOfBuffer NonText
@ -176,7 +180,7 @@ if s:t_Co >= 256
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi Normal ctermfg=252 ctermbg=17 cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=30 ctermbg=NONE cterm=NONE
hi ColorColumn ctermfg=252 ctermbg=88 cterm=NONE
hi Cursor ctermfg=16 ctermbg=227 cterm=NONE
hi QuickFixLine ctermfg=16 ctermbg=213 cterm=NONE
@ -193,6 +197,8 @@ if s:t_Co >= 256
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=27 ctermbg=231 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=231 cterm=NONE
hi PmenuMatch ctermfg=213 ctermbg=27 cterm=NONE
hi PmenuMatchSel ctermfg=201 ctermbg=231 cterm=NONE
hi Question ctermfg=118 ctermbg=NONE cterm=NONE
hi SignColumn ctermfg=102 ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=30 ctermbg=NONE cterm=NONE
@ -238,7 +244,7 @@ endif
if s:t_Co >= 16
hi Normal ctermfg=grey ctermbg=black cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi ColorColumn ctermfg=grey ctermbg=darkred cterm=NONE
hi Cursor ctermfg=black ctermbg=yellow cterm=NONE
hi QuickFixLine ctermfg=black ctermbg=magenta cterm=NONE
@ -255,6 +261,8 @@ if s:t_Co >= 16
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=blue ctermbg=white cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=white cterm=NONE
hi PmenuMatch ctermfg=magenta ctermbg=blue cterm=NONE
hi PmenuMatchSel ctermfg=darkmagenta ctermbg=white cterm=NONE
hi Question ctermfg=green ctermbg=NONE cterm=NONE
hi SignColumn ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=darkcyan ctermbg=NONE cterm=NONE
@ -318,6 +326,8 @@ if s:t_Co >= 8
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=blue ctermbg=grey cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuMatch ctermfg=grey ctermbg=blue cterm=bold
hi PmenuMatchSel ctermfg=blue ctermbg=grey cterm=bold
hi Question ctermfg=darkgreen ctermbg=NONE cterm=bold
hi Search ctermfg=darkcyan ctermbg=blue cterm=NONE
hi SignColumn ctermfg=grey ctermbg=NONE cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer David Schweikert <david@schweikert.ch>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:34
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -19,6 +19,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#ffffff', '#0000ff', '#00cd00', '#cd00cd', '#008b8b', '#0000ff', '#ff1493', '#bcbcbc', '#ee0000', '#0000ff', '#00cd00', '#cd00cd', '#008b8b', '#0000ff', '#ff1493', '#000000']
endif
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@ -38,6 +39,8 @@ hi Pmenu guifg=#000000 guibg=#add8e6 gui=NONE cterm=NONE
hi PmenuSel guifg=#ffffff guibg=#00008b gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#ffffff gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#008b8b gui=NONE cterm=NONE
hi PmenuMatch guifg=#cd00cd guibg=#add8e6 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff87ff guibg=#00008b gui=NONE cterm=NONE
hi TabLine guifg=#000000 guibg=#e4e4e4 gui=NONE cterm=NONE
hi TabLineFill guifg=NONE guibg=#bcbcbc gui=NONE cterm=NONE
hi TabLineSel guifg=#000000 guibg=#ffffff gui=bold cterm=bold
@ -45,6 +48,7 @@ hi ToolbarLine guifg=NONE guibg=#e4e4e4 gui=NONE cterm=NONE
hi ToolbarButton guifg=#ffffff guibg=#bcbcbc gui=bold cterm=bold
hi NonText guifg=#bcbcbc guibg=NONE gui=NONE cterm=NONE
hi SpecialKey guifg=#bcbcbc guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#bcbcbc guibg=NONE gui=NONE cterm=NONE
hi Folded guifg=#00008b guibg=#e4e4e4 gui=NONE cterm=NONE
hi Visual guifg=#000000 guibg=#d0d0d0 gui=NONE cterm=NONE
hi VisualNOS guifg=NONE guibg=#ee0000 gui=NONE cterm=NONE
@ -82,7 +86,6 @@ hi PreProc guifg=#cd00cd guibg=NONE gui=NONE cterm=NONE
hi Type guifg=#0000ff guibg=NONE gui=bold cterm=bold
hi Special guifg=#ff1493 guibg=NONE gui=NONE cterm=NONE
hi Directory guifg=#008b8b guibg=NONE gui=bold cterm=bold
hi Conceal guifg=#ee0000 guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title guifg=#cd00cd guibg=NONE gui=bold cterm=bold
hi CursorLine guifg=NONE guibg=#e4e4e4 gui=NONE cterm=NONE
@ -93,6 +96,7 @@ hi DiffDelete guifg=#ffffff guibg=#af5faf gui=NONE cterm=NONE
if s:t_Co >= 256
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@ -112,6 +116,8 @@ if s:t_Co >= 256
hi PmenuSel ctermfg=231 ctermbg=18 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=231 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=30 cterm=NONE
hi PmenuMatch ctermfg=164 ctermbg=152 cterm=NONE
hi PmenuMatchSel ctermfg=213 ctermbg=18 cterm=NONE
hi TabLine ctermfg=16 ctermbg=254 cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=250 cterm=NONE
hi TabLineSel ctermfg=16 ctermbg=231 cterm=bold
@ -119,6 +125,7 @@ if s:t_Co >= 256
hi ToolbarButton ctermfg=231 ctermbg=250 cterm=bold
hi NonText ctermfg=250 ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=250 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=250 ctermbg=NONE cterm=NONE
hi Folded ctermfg=18 ctermbg=254 cterm=NONE
hi Visual ctermfg=16 ctermbg=252 cterm=NONE
hi VisualNOS ctermfg=NONE ctermbg=196 cterm=NONE
@ -156,7 +163,6 @@ if s:t_Co >= 256
hi Type ctermfg=21 ctermbg=NONE cterm=bold
hi Special ctermfg=198 ctermbg=NONE cterm=NONE
hi Directory ctermfg=30 ctermbg=NONE cterm=bold
hi Conceal ctermfg=196 ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=164 ctermbg=NONE cterm=bold
hi CursorLine ctermfg=NONE ctermbg=254 cterm=NONE
@ -180,6 +186,8 @@ if s:t_Co >= 16
hi PmenuSel ctermfg=white ctermbg=darkblue cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=white cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkcyan cterm=NONE
hi PmenuMatch ctermfg=darkmagenta ctermbg=grey cterm=NONE
hi PmenuMatchSel ctermfg=magenta ctermbg=darkblue cterm=NONE
hi TabLine ctermfg=black ctermbg=grey cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=darkgrey cterm=NONE
hi TabLineSel ctermfg=black ctermbg=white cterm=bold
@ -187,6 +195,7 @@ if s:t_Co >= 16
hi ToolbarButton ctermfg=white ctermbg=darkgrey cterm=bold
hi NonText ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Conceal ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Folded ctermfg=darkblue ctermbg=grey cterm=NONE
hi Visual ctermfg=black ctermbg=darkgrey cterm=NONE
hi VisualNOS ctermfg=NONE ctermbg=darkred cterm=NONE
@ -224,7 +233,6 @@ if s:t_Co >= 16
hi Type ctermfg=blue ctermbg=NONE cterm=bold
hi Special ctermfg=magenta ctermbg=NONE cterm=NONE
hi Directory ctermfg=darkcyan ctermbg=NONE cterm=bold
hi Conceal ctermfg=darkred ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=darkmagenta ctermbg=NONE cterm=bold
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
@ -249,6 +257,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkgreen cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLine ctermfg=gray ctermbg=black cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=black cterm=NONE
hi TabLineSel ctermfg=black ctermbg=gray cterm=NONE
@ -256,6 +266,7 @@ if s:t_Co >= 8
hi ToolbarButton ctermfg=black ctermbg=gray cterm=bold,reverse
hi NonText ctermfg=darkblue ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Folded ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Visual ctermfg=NONE ctermbg=NONE cterm=reverse
hi VisualNOS ctermfg=NONE ctermbg=NONE cterm=underline
@ -291,7 +302,6 @@ if s:t_Co >= 8
hi Type ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Special ctermfg=darkmagenta ctermbg=NONE cterm=bold
hi Directory ctermfg=darkcyan ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=darkmagenta ctermbg=NONE cterm=bold
hi DiffAdd ctermfg=white ctermbg=darkgreen cterm=NONE
@ -398,6 +408,7 @@ endif
" Color: darkmagenta #870087 18 darkmagenta
" Color: darkcyan #008787 30 darkcyan
" Color: gray #878787 102 gray
" Color: magenta #ff87ff 213 magenta
" Term colors: bg0 statement constant preproc identifier type special bg1
" Term colors: comment statement constant preproc identifier type special fg0
" Color: bgDiffA #5F875F 65 darkgreen

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer Hans Fugal <hans@fugal.net>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:34
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -27,6 +27,7 @@ hi! link CursorLineSign CursorLine
hi! link EndOfBuffer NonText
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#ffffff guibg=#333333 gui=NONE cterm=NONE
hi StatusLine guifg=#333333 guibg=#c2bfa5 gui=NONE cterm=NONE
hi StatusLineNC guifg=#7f7f8c guibg=#c2bfa5 gui=NONE cterm=NONE
@ -37,6 +38,8 @@ hi Pmenu guifg=#ffffff guibg=#666666 gui=NONE cterm=NONE
hi PmenuSel guifg=#333333 guibg=#f0e68c gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#333333 gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#c2bfa5 gui=NONE cterm=NONE
hi PmenuMatch guifg=#ffa0a0 guibg=#666666 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#cd5c5c guibg=#f0e68c gui=NONE cterm=NONE
hi TabLine guifg=#333333 guibg=#c2bfa5 gui=NONE cterm=NONE
hi TabLineFill guifg=NONE guibg=#c2bfa5 gui=NONE cterm=NONE
hi TabLineSel guifg=#333333 guibg=#f0e68c gui=NONE cterm=NONE
@ -101,6 +104,7 @@ if s:t_Co >= 256
hi! link EndOfBuffer NonText
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=231 ctermbg=236 cterm=NONE
hi StatusLine ctermfg=236 ctermbg=144 cterm=NONE
hi StatusLineNC ctermfg=242 ctermbg=144 cterm=NONE
@ -111,6 +115,8 @@ if s:t_Co >= 256
hi PmenuSel ctermfg=236 ctermbg=186 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=236 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=144 cterm=NONE
hi PmenuMatch ctermfg=217 ctermbg=241 cterm=NONE
hi PmenuMatchSel ctermfg=167 ctermbg=186 cterm=NONE
hi TabLine ctermfg=236 ctermbg=144 cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=144 cterm=NONE
hi TabLineSel ctermfg=236 ctermbg=186 cterm=NONE
@ -177,6 +183,8 @@ if s:t_Co >= 16
hi PmenuSel ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=white cterm=NONE
hi PmenuMatch ctermfg=NONE ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=yellow cterm=bold
hi TabLine ctermfg=black ctermbg=grey cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=white cterm=NONE
hi TabLineSel ctermfg=white ctermbg=black cterm=NONE
@ -243,6 +251,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLine ctermfg=black ctermbg=grey cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=grey cterm=NONE
hi TabLineSel ctermfg=grey ctermbg=black cterm=NONE

View File

@ -3,7 +3,7 @@
" Maintainer: original maintainer Ron Aaron <ron@ronware.org>
" Website: https://www.github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:35
" Last Change: 2024 Aug 15
" Generated by Colortemplate v2.2.3
@ -72,6 +72,8 @@ hi Pmenu guifg=#ffffff guibg=#444444 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#bebebe gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#00cdcd gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#ffffff gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff00ff guibg=#444444 gui=bold cterm=bold
hi PmenuMatchSel guifg=#ff00ff guibg=#00cdcd gui=bold cterm=bold
hi Question guifg=#00ff00 guibg=NONE gui=bold cterm=bold
hi Search guifg=#000000 guibg=#ffff00 gui=NONE cterm=NONE
hi SignColumn guifg=#00ffff guibg=NONE gui=NONE cterm=NONE
@ -140,6 +142,8 @@ if s:t_Co >= 256
hi PmenuSbar ctermfg=NONE ctermbg=250 cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=44 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=231 cterm=NONE
hi PmenuMatch ctermfg=201 ctermbg=238 cterm=bold
hi PmenuMatchSel ctermfg=201 ctermbg=44 cterm=bold
hi Question ctermfg=46 ctermbg=NONE cterm=bold
hi Search ctermfg=16 ctermbg=226 cterm=NONE
hi SignColumn ctermfg=51 ctermbg=NONE cterm=NONE
@ -211,6 +215,8 @@ if s:t_Co >= 16
hi PmenuSbar ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=white cterm=NONE
hi PmenuMatch ctermfg=magenta ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=magenta ctermbg=darkcyan cterm=bold
hi Question ctermfg=green ctermbg=NONE cterm=bold
hi Search ctermfg=black ctermbg=yellow cterm=NONE
hi SignColumn ctermfg=cyan ctermbg=NONE cterm=NONE
@ -281,6 +287,8 @@ if s:t_Co >= 8
hi PmenuSbar ctermfg=grey ctermbg=grey cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkcyan cterm=NONE
hi PmenuMatch ctermfg=grey ctermbg=NONE cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold
hi Question ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Search ctermfg=black ctermbg=darkyellow cterm=NONE
hi SignColumn ctermfg=darkcyan ctermbg=NONE cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer Steven Vertigan <steven@vertigan.wattle.id.au>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Mon 08 Jan 2024 09:43:27 AM AEDT
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -19,6 +19,7 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#cd0000', '#00cd00', '#cdcd00', '#0087ff', '#cd00cd', '#00cdcd', '#e5e5e5', '#7f7f7f', '#ff0000', '#00ff00', '#ffff00', '#5c5cff', '#ff00ff', '#00ffff', '#ffffff']
endif
hi! link VertSplit StatusLineNC
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link TabLineFill TabLine
@ -75,6 +76,8 @@ hi StatusLine guifg=#333333 guibg=#ffffff gui=bold cterm=bold
hi StatusLineNC guifg=#333333 guibg=#d3d3d3 gui=NONE cterm=NONE
hi TabLineSel guifg=#333333 guibg=#ffffff gui=bold cterm=bold
hi TabLine guifg=#333333 guibg=#d3d3d3 gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff80ff guibg=#4d4d4d gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#8b008b guibg=#bebebe gui=NONE cterm=NONE
hi Pmenu guifg=#ffffff guibg=#4d4d4d gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#bebebe gui=NONE cterm=NONE
@ -84,7 +87,7 @@ hi Cursor guifg=#000000 guibg=#00ff00 gui=NONE cterm=NONE
hi Error guifg=#ff0000 guibg=#ffffff gui=reverse cterm=reverse
hi ErrorMsg guifg=#ffffff guibg=#ff0000 gui=NONE cterm=NONE
hi LineNr guifg=#ffff00 guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal guifg=#666666 guibg=NONE gui=NONE cterm=NONE
hi FoldColumn guifg=#add8e6 guibg=NONE gui=NONE cterm=NONE
hi Folded guifg=#00008b guibg=#d3d3d3 gui=bold cterm=bold
hi IncSearch guifg=#00ff00 guibg=NONE gui=reverse cterm=reverse
@ -127,6 +130,7 @@ hi DiffDelete guifg=#ffffff guibg=#af5faf gui=NONE cterm=NONE
if s:t_Co >= 256
hi! link VertSplit StatusLineNC
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link TabLineFill TabLine
@ -183,6 +187,8 @@ if s:t_Co >= 256
hi StatusLineNC ctermfg=236 ctermbg=252 cterm=NONE
hi TabLineSel ctermfg=236 ctermbg=231 cterm=bold
hi TabLine ctermfg=236 ctermbg=252 cterm=NONE
hi PmenuMatch ctermfg=201 ctermbg=239 cterm=NONE
hi PmenuMatchSel ctermfg=90 ctermbg=250 cterm=NONE
hi Pmenu ctermfg=231 ctermbg=239 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=250 cterm=NONE
@ -192,7 +198,7 @@ if s:t_Co >= 256
hi Error ctermfg=196 ctermbg=231 cterm=reverse
hi ErrorMsg ctermfg=231 ctermbg=196 cterm=NONE
hi LineNr ctermfg=226 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=241 ctermbg=NONE cterm=NONE
hi FoldColumn ctermfg=153 ctermbg=NONE cterm=NONE
hi Folded ctermfg=18 ctermbg=252 cterm=bold
hi IncSearch ctermfg=46 ctermbg=NONE cterm=reverse
@ -238,6 +244,7 @@ endif
if s:t_Co >= 16
hi! link VertSplit StatusLineNC
hi! link PopupSelected PmenuSel
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link TabLineFill TabLine
@ -294,6 +301,8 @@ if s:t_Co >= 16
hi StatusLineNC ctermfg=black ctermbg=gray cterm=NONE
hi TabLineSel ctermfg=black ctermbg=white cterm=NONE
hi TabLine ctermfg=black ctermbg=gray cterm=NONE
hi PmenuMatch ctermfg=white ctermbg=darkgray cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=gray cterm=bold
hi Pmenu ctermfg=white ctermbg=darkgray cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=black ctermbg=gray cterm=NONE
@ -303,7 +312,7 @@ if s:t_Co >= 16
hi Error ctermfg=red ctermbg=white cterm=reverse
hi ErrorMsg ctermfg=white ctermbg=red cterm=NONE
hi LineNr ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=darkgray ctermbg=NONE cterm=NONE
hi FoldColumn ctermfg=lightblue ctermbg=NONE cterm=NONE
hi Folded ctermfg=darkblue ctermbg=gray cterm=bold
hi IncSearch ctermfg=green ctermbg=NONE cterm=reverse
@ -361,6 +370,8 @@ if s:t_Co >= 8
hi PmenuSbar ctermfg=NONE ctermbg=gray cterm=NONE
hi PmenuSel ctermfg=black ctermbg=gray cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=gray cterm=bold
hi QuickFixLine ctermfg=gray ctermbg=darkmagenta cterm=NONE
hi Error ctermfg=red ctermbg=gray cterm=reverse
hi ErrorMsg ctermfg=gray ctermbg=red cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Mon 08 Jan 2024 09:39:53 AM AEDT
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -16,13 +16,13 @@ let g:colors_name = 'habamax'
let s:t_Co = has('gui_running') ? -1 : (&t_Co ?? 0)
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#1c1c1c', '#d75f5f', '#87af87', '#afaf87', '#5f87af', '#af87af', '#5f8787', '#9e9e9e', '#767676', '#d7875f', '#afd7af', '#d7d787', '#87afd7', '#d7afd7', '#87afaf', '#bcbcbc']
let g:terminal_ansi_colors = ['#1c1c1c', '#af5f5f', '#5faf5f', '#af875f', '#5f87af', '#af87af', '#5f8787', '#9e9e9e', '#767676', '#d75f87', '#87d787', '#d7af87', '#5fafd7', '#d787d7', '#87afaf', '#bcbcbc']
endif
hi! link Terminal Normal
hi! link StatuslineTerm Statusline
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link javaScriptFunction Statement
hi! link javaScriptIdentifier Statement
hi! link sqlKeyword Statement
@ -34,7 +34,6 @@ hi! link vimOper Normal
hi! link vimSep Normal
hi! link vimParenSep Normal
hi! link vimCommentString Comment
hi! link gitCommitSummary Title
hi! link markdownUrl String
hi Normal guifg=#bcbcbc guibg=#1c1c1c gui=NONE cterm=NONE
hi Statusline guifg=#1c1c1c guibg=#9e9e9e gui=NONE cterm=NONE
@ -42,11 +41,11 @@ hi StatuslineNC guifg=#1c1c1c guibg=#767676 gui=NONE cterm=NONE
hi VertSplit guifg=#767676 guibg=#767676 gui=NONE cterm=NONE
hi TabLine guifg=#1c1c1c guibg=#767676 gui=NONE cterm=NONE
hi TabLineFill guifg=#1c1c1c guibg=#767676 gui=NONE cterm=NONE
hi TabLineSel guifg=NONE guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
hi TabLineSel guifg=#1c1c1c guibg=#9e9e9e gui=bold cterm=bold
hi ToolbarLine guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton guifg=#9e9e9e guibg=#1c1c1c gui=bold,reverse cterm=bold,reverse
hi ToolbarButton guifg=#767676 guibg=#1c1c1c gui=bold,reverse cterm=bold,reverse
hi QuickFixLine guifg=#1c1c1c guibg=#5f87af gui=NONE cterm=NONE
hi CursorLineNr guifg=#ffaf5f guibg=NONE gui=bold cterm=bold
hi CursorLineNr guifg=#dadada guibg=NONE gui=bold cterm=bold
hi LineNr guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi LineNrAbove guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi LineNrBelow guifg=#585858 guibg=NONE gui=NONE cterm=NONE
@ -54,71 +53,72 @@ hi NonText guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi EndOfBuffer guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi SpecialKey guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi FoldColumn guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi Visual guifg=#1c1c1c guibg=#87afaf gui=NONE cterm=NONE
hi Visual guifg=#87afaf guibg=#1c1c1c gui=reverse cterm=reverse
hi VisualNOS guifg=#1c1c1c guibg=#5f8787 gui=NONE cterm=NONE
hi Pmenu guifg=NONE guibg=#3a3a3a gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#767676 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=#1c1c1c guibg=#afaf87 gui=NONE cterm=NONE
hi PmenuKind guifg=#d7875f guibg=#3a3a3a gui=NONE cterm=NONE
hi PmenuKindSel guifg=#d75f5f guibg=#afaf87 gui=NONE cterm=NONE
hi PmenuSel guifg=NONE guibg=#585858 gui=NONE cterm=NONE
hi PmenuKind guifg=#5f8787 guibg=#3a3a3a gui=NONE cterm=NONE
hi PmenuKindSel guifg=#5f8787 guibg=#585858 gui=NONE cterm=NONE
hi PmenuExtra guifg=#767676 guibg=#3a3a3a gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#1c1c1c guibg=#afaf87 gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#9e9e9e guibg=#585858 gui=NONE cterm=NONE
hi PmenuMatch guifg=#ffaf5f guibg=#3a3a3a gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ffaf5f guibg=#585858 gui=NONE cterm=NONE
hi SignColumn guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error guifg=#d75f5f guibg=#1c1c1c gui=reverse cterm=reverse
hi ErrorMsg guifg=#d75f5f guibg=#1c1c1c gui=reverse cterm=reverse
hi ModeMsg guifg=#1c1c1c guibg=#d7d787 gui=NONE cterm=NONE
hi MoreMsg guifg=#87af87 guibg=NONE gui=NONE cterm=NONE
hi Question guifg=#afaf87 guibg=NONE gui=NONE cterm=NONE
hi WarningMsg guifg=#d7875f guibg=NONE gui=NONE cterm=NONE
hi Todo guifg=#d7d787 guibg=#1c1c1c gui=reverse cterm=reverse
hi Error guifg=#af5f5f guibg=#1c1c1c gui=reverse cterm=reverse
hi ErrorMsg guifg=#af5f5f guibg=#1c1c1c gui=reverse cterm=reverse
hi ModeMsg guifg=NONE guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg guifg=#5faf5f guibg=NONE gui=NONE cterm=NONE
hi Question guifg=#d7af87 guibg=NONE gui=NONE cterm=NONE
hi WarningMsg guifg=#d75f87 guibg=NONE gui=NONE cterm=NONE
hi Todo guifg=#dadada guibg=NONE gui=bold cterm=bold
hi MatchParen guifg=#ff00af guibg=NONE gui=bold cterm=bold
hi Search guifg=#1c1c1c guibg=#87af87 gui=NONE cterm=NONE
hi IncSearch guifg=#1c1c1c guibg=#ffaf5f gui=NONE cterm=NONE
hi CurSearch guifg=#1c1c1c guibg=#afaf87 gui=NONE cterm=NONE
hi WildMenu guifg=#1c1c1c guibg=#d7d787 gui=NONE cterm=NONE
hi Search guifg=#5fafd7 guibg=#1c1c1c gui=reverse cterm=reverse
hi IncSearch guifg=#ffaf5f guibg=#1c1c1c gui=reverse cterm=reverse
hi CurSearch guifg=#ffaf5f guibg=#1c1c1c gui=reverse cterm=reverse
hi WildMenu guifg=#1c1c1c guibg=#d7af87 gui=bold cterm=bold
hi debugPC guifg=#1c1c1c guibg=#5f87af gui=NONE cterm=NONE
hi debugBreakpoint guifg=#1c1c1c guibg=#d7875f gui=NONE cterm=NONE
hi Cursor guifg=#1c1c1c guibg=#ffaf5f gui=NONE cterm=NONE
hi debugBreakpoint guifg=#1c1c1c guibg=#d75f87 gui=NONE cterm=NONE
hi Cursor guifg=#000000 guibg=#dadada gui=NONE cterm=NONE
hi lCursor guifg=#1c1c1c guibg=#5fff00 gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#303030 gui=NONE cterm=NONE
hi CursorColumn guifg=NONE guibg=#303030 gui=NONE cterm=NONE
hi Folded guifg=#9e9e9e guibg=#262626 gui=NONE cterm=NONE
hi ColorColumn guifg=NONE guibg=#3a3a3a gui=NONE cterm=NONE
hi SpellBad guifg=NONE guibg=NONE guisp=#d75f5f gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellCap guifg=NONE guibg=NONE guisp=#5f87af gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellLocal guifg=NONE guibg=NONE guisp=#87af87 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellRare guifg=NONE guibg=NONE guisp=#d7afd7 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellCap guifg=NONE guibg=NONE guisp=#ffaf5f gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellLocal guifg=NONE guibg=NONE guisp=#5fd75f gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi SpellRare guifg=NONE guibg=NONE guisp=#d787d7 gui=undercurl ctermfg=NONE ctermbg=NONE cterm=underline
hi Comment guifg=#767676 guibg=NONE gui=NONE cterm=NONE
hi Constant guifg=#d7875f guibg=NONE gui=NONE cterm=NONE
hi String guifg=#87af87 guibg=NONE gui=NONE cterm=NONE
hi Character guifg=#afd7af guibg=NONE gui=NONE cterm=NONE
hi Constant guifg=#d75f87 guibg=NONE gui=NONE cterm=NONE
hi String guifg=#5faf5f guibg=NONE gui=NONE cterm=NONE
hi Character guifg=#87d787 guibg=NONE gui=NONE cterm=NONE
hi Identifier guifg=#87afaf guibg=NONE gui=NONE cterm=NONE
hi Statement guifg=#af87af guibg=NONE gui=NONE cterm=NONE
hi PreProc guifg=#afaf87 guibg=NONE gui=NONE cterm=NONE
hi Type guifg=#87afd7 guibg=NONE gui=NONE cterm=NONE
hi PreProc guifg=#af875f guibg=NONE gui=NONE cterm=NONE
hi Type guifg=#5f87af guibg=NONE gui=NONE cterm=NONE
hi Special guifg=#5f8787 guibg=NONE gui=NONE cterm=NONE
hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
hi Title guifg=#d7d787 guibg=NONE gui=bold cterm=bold
hi Title guifg=NONE guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory guifg=#87afaf guibg=NONE gui=bold cterm=bold
hi Conceal guifg=#767676 guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Debug guifg=#5f8787 guibg=NONE gui=NONE cterm=NONE
hi DiffAdd guifg=#dadada guibg=#5f875f gui=NONE cterm=NONE
hi DiffDelete guifg=#af875f guibg=NONE gui=NONE cterm=NONE
hi Added guifg=#87af87 guibg=NONE gui=NONE cterm=NONE
hi Changed guifg=#5f8787 guibg=NONE gui=NONE cterm=NONE
hi DiffAdd guifg=#5faf5f guibg=NONE gui=reverse cterm=reverse
hi DiffChange guifg=#5f87af guibg=NONE gui=reverse cterm=reverse
hi DiffText guifg=#af87af guibg=NONE gui=reverse cterm=reverse
hi DiffDelete guifg=#af5f5f guibg=NONE gui=reverse cterm=reverse
hi Added guifg=#5fd75f guibg=NONE gui=NONE cterm=NONE
hi Changed guifg=#ffaf5f guibg=NONE gui=NONE cterm=NONE
hi Removed guifg=#d75f5f guibg=NONE gui=NONE cterm=NONE
hi diffSubname guifg=#af87af guibg=NONE gui=NONE cterm=NONE
hi DiffText guifg=#dadada guibg=#878787 gui=NONE cterm=NONE
hi DiffChange guifg=#bcbcbc guibg=#5f5f5f gui=NONE cterm=NONE
if s:t_Co >= 256
hi! link Terminal Normal
hi! link StatuslineTerm Statusline
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link javaScriptFunction Statement
hi! link javaScriptIdentifier Statement
hi! link sqlKeyword Statement
@ -130,7 +130,6 @@ if s:t_Co >= 256
hi! link vimSep Normal
hi! link vimParenSep Normal
hi! link vimCommentString Comment
hi! link gitCommitSummary Title
hi! link markdownUrl String
hi Normal ctermfg=250 ctermbg=234 cterm=NONE
hi Statusline ctermfg=234 ctermbg=247 cterm=NONE
@ -138,11 +137,11 @@ if s:t_Co >= 256
hi VertSplit ctermfg=243 ctermbg=243 cterm=NONE
hi TabLine ctermfg=234 ctermbg=243 cterm=NONE
hi TabLineFill ctermfg=234 ctermbg=243 cterm=NONE
hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold
hi TabLineSel ctermfg=234 ctermbg=247 cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton ctermfg=247 ctermbg=234 cterm=bold,reverse
hi ToolbarButton ctermfg=243 ctermbg=234 cterm=bold,reverse
hi QuickFixLine ctermfg=234 ctermbg=67 cterm=NONE
hi CursorLineNr ctermfg=215 ctermbg=NONE cterm=bold
hi CursorLineNr ctermfg=253 ctermbg=NONE cterm=bold
hi LineNr ctermfg=240 ctermbg=NONE cterm=NONE
hi LineNrAbove ctermfg=240 ctermbg=NONE cterm=NONE
hi LineNrBelow ctermfg=240 ctermbg=NONE cterm=NONE
@ -150,62 +149,63 @@ if s:t_Co >= 256
hi EndOfBuffer ctermfg=240 ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=240 ctermbg=NONE cterm=NONE
hi FoldColumn ctermfg=240 ctermbg=NONE cterm=NONE
hi Visual ctermfg=234 ctermbg=109 cterm=NONE
hi Visual ctermfg=109 ctermbg=234 cterm=reverse
hi VisualNOS ctermfg=234 ctermbg=66 cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=237 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=243 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=234 ctermbg=144 cterm=NONE
hi PmenuKind ctermfg=173 ctermbg=237 cterm=NONE
hi PmenuKindSel ctermfg=167 ctermbg=144 cterm=NONE
hi PmenuSel ctermfg=NONE ctermbg=240 cterm=NONE
hi PmenuKind ctermfg=66 ctermbg=237 cterm=NONE
hi PmenuKindSel ctermfg=66 ctermbg=240 cterm=NONE
hi PmenuExtra ctermfg=243 ctermbg=237 cterm=NONE
hi PmenuExtraSel ctermfg=234 ctermbg=144 cterm=NONE
hi PmenuExtraSel ctermfg=247 ctermbg=240 cterm=NONE
hi PmenuMatch ctermfg=215 ctermbg=237 cterm=NONE
hi PmenuMatchSel ctermfg=215 ctermbg=240 cterm=NONE
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=167 ctermbg=234 cterm=reverse
hi ErrorMsg ctermfg=167 ctermbg=234 cterm=reverse
hi ModeMsg ctermfg=234 ctermbg=186 cterm=NONE
hi MoreMsg ctermfg=108 ctermbg=NONE cterm=NONE
hi Question ctermfg=144 ctermbg=NONE cterm=NONE
hi WarningMsg ctermfg=173 ctermbg=NONE cterm=NONE
hi Todo ctermfg=186 ctermbg=234 cterm=reverse
hi Error ctermfg=131 ctermbg=234 cterm=reverse
hi ErrorMsg ctermfg=131 ctermbg=234 cterm=reverse
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=71 ctermbg=NONE cterm=NONE
hi Question ctermfg=180 ctermbg=NONE cterm=NONE
hi WarningMsg ctermfg=168 ctermbg=NONE cterm=NONE
hi Todo ctermfg=253 ctermbg=NONE cterm=bold
hi MatchParen ctermfg=199 ctermbg=NONE cterm=bold
hi Search ctermfg=234 ctermbg=108 cterm=NONE
hi IncSearch ctermfg=234 ctermbg=215 cterm=NONE
hi CurSearch ctermfg=234 ctermbg=144 cterm=NONE
hi WildMenu ctermfg=234 ctermbg=186 cterm=NONE
hi Search ctermfg=74 ctermbg=234 cterm=reverse
hi IncSearch ctermfg=215 ctermbg=234 cterm=reverse
hi CurSearch ctermfg=215 ctermbg=234 cterm=reverse
hi WildMenu ctermfg=234 ctermbg=180 cterm=bold
hi debugPC ctermfg=234 ctermbg=67 cterm=NONE
hi debugBreakpoint ctermfg=234 ctermbg=173 cterm=NONE
hi debugBreakpoint ctermfg=234 ctermbg=168 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=236 cterm=NONE
hi CursorColumn ctermfg=NONE ctermbg=236 cterm=NONE
hi Folded ctermfg=247 ctermbg=235 cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=237 cterm=NONE
hi SpellBad ctermfg=167 ctermbg=NONE cterm=underline
hi SpellCap ctermfg=67 ctermbg=NONE cterm=underline
hi SpellLocal ctermfg=108 ctermbg=NONE cterm=underline
hi SpellRare ctermfg=182 ctermbg=NONE cterm=underline
hi SpellCap ctermfg=215 ctermbg=NONE cterm=underline
hi SpellLocal ctermfg=77 ctermbg=NONE cterm=underline
hi SpellRare ctermfg=176 ctermbg=NONE cterm=underline
hi Comment ctermfg=243 ctermbg=NONE cterm=NONE
hi Constant ctermfg=173 ctermbg=NONE cterm=NONE
hi String ctermfg=108 ctermbg=NONE cterm=NONE
hi Character ctermfg=151 ctermbg=NONE cterm=NONE
hi Constant ctermfg=168 ctermbg=NONE cterm=NONE
hi String ctermfg=71 ctermbg=NONE cterm=NONE
hi Character ctermfg=114 ctermbg=NONE cterm=NONE
hi Identifier ctermfg=109 ctermbg=NONE cterm=NONE
hi Statement ctermfg=139 ctermbg=NONE cterm=NONE
hi PreProc ctermfg=144 ctermbg=NONE cterm=NONE
hi Type ctermfg=110 ctermbg=NONE cterm=NONE
hi PreProc ctermfg=137 ctermbg=NONE cterm=NONE
hi Type ctermfg=67 ctermbg=NONE cterm=NONE
hi Special ctermfg=66 ctermbg=NONE cterm=NONE
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=186 ctermbg=NONE cterm=bold
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=109 ctermbg=NONE cterm=bold
hi Conceal ctermfg=243 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=240 ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Debug ctermfg=66 ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=253 ctermbg=65 cterm=NONE
hi DiffDelete ctermfg=137 ctermbg=NONE cterm=NONE
hi Added ctermfg=108 ctermbg=NONE cterm=NONE
hi Changed ctermfg=66 ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=71 ctermbg=NONE cterm=reverse
hi DiffChange ctermfg=67 ctermbg=NONE cterm=reverse
hi DiffText ctermfg=139 ctermbg=NONE cterm=reverse
hi DiffDelete ctermfg=131 ctermbg=NONE cterm=reverse
hi Added ctermfg=77 ctermbg=NONE cterm=NONE
hi Changed ctermfg=215 ctermbg=NONE cterm=NONE
hi Removed ctermfg=167 ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=139 ctermbg=NONE cterm=NONE
hi DiffText ctermfg=253 ctermbg=102 cterm=NONE
hi DiffChange ctermfg=250 ctermbg=59 cterm=NONE
unlet s:t_Co
finish
endif
@ -217,11 +217,11 @@ if s:t_Co >= 16
hi VertSplit ctermfg=darkgray ctermbg=darkgray cterm=NONE
hi TabLine ctermfg=black ctermbg=darkgray cterm=NONE
hi TabLineFill ctermfg=black ctermbg=darkgray cterm=NONE
hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=bold
hi TabLineSel ctermfg=black ctermbg=gray cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton ctermfg=gray ctermbg=black cterm=bold,reverse
hi QuickFixLine ctermfg=black ctermbg=blue cterm=NONE
hi CursorLineNr ctermfg=red ctermbg=NONE cterm=bold
hi ToolbarButton ctermfg=darkgray ctermbg=black cterm=bold,reverse
hi QuickFixLine ctermfg=black ctermbg=darkblue cterm=NONE
hi CursorLineNr ctermfg=white ctermbg=NONE cterm=bold
hi LineNr ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi LineNrAbove ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi LineNrBelow ctermfg=darkgrey ctermbg=NONE cterm=NONE
@ -229,7 +229,7 @@ if s:t_Co >= 16
hi EndOfBuffer ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi FoldColumn ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Visual ctermfg=black ctermbg=cyan cterm=NONE
hi Visual ctermfg=cyan ctermbg=black cterm=reverse
hi VisualNOS ctermfg=black ctermbg=darkcyan cterm=NONE
hi Pmenu ctermfg=black ctermbg=gray cterm=NONE
hi PmenuThumb ctermfg=gray ctermbg=black cterm=NONE
@ -239,27 +239,29 @@ if s:t_Co >= 16
hi PmenuKindSel ctermfg=darkred ctermbg=darkyellow cterm=NONE
hi PmenuExtra ctermfg=darkgray ctermbg=gray cterm=NONE
hi PmenuExtraSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=gray cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=darkred ctermbg=black cterm=reverse
hi ErrorMsg ctermfg=darkred ctermbg=black cterm=reverse
hi ModeMsg ctermfg=black ctermbg=yellow cterm=NONE
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Question ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Question ctermfg=yellow ctermbg=NONE cterm=NONE
hi WarningMsg ctermfg=red ctermbg=NONE cterm=NONE
hi Todo ctermfg=yellow ctermbg=black cterm=reverse
hi Todo ctermfg=white ctermbg=NONE cterm=bold
hi MatchParen ctermfg=magenta ctermbg=NONE cterm=bold
hi Search ctermfg=black ctermbg=darkgreen cterm=NONE
hi IncSearch ctermfg=black ctermbg=red cterm=NONE
hi CurSearch ctermfg=black ctermbg=darkyellow cterm=NONE
hi WildMenu ctermfg=black ctermbg=yellow cterm=NONE
hi debugPC ctermfg=black ctermbg=blue cterm=NONE
hi Search ctermfg=blue ctermbg=black cterm=reverse
hi IncSearch ctermfg=red ctermbg=black cterm=reverse
hi CurSearch ctermfg=red ctermbg=black cterm=reverse
hi WildMenu ctermfg=black ctermbg=yellow cterm=bold
hi debugPC ctermfg=black ctermbg=darkblue cterm=NONE
hi debugBreakpoint ctermfg=black ctermbg=red cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi CursorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi Folded ctermfg=black ctermbg=darkyellow cterm=NONE
hi ColorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi SpellBad ctermfg=darkred ctermbg=NONE cterm=underline
hi SpellCap ctermfg=blue ctermbg=NONE cterm=underline
hi SpellCap ctermfg=darkyellow ctermbg=NONE cterm=underline
hi SpellLocal ctermfg=darkgreen ctermbg=NONE cterm=underline
hi SpellRare ctermfg=magenta ctermbg=NONE cterm=underline
hi Comment ctermfg=darkgray ctermbg=NONE cterm=NONE
@ -269,22 +271,21 @@ if s:t_Co >= 16
hi Identifier ctermfg=cyan ctermbg=NONE cterm=NONE
hi Statement ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi PreProc ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Type ctermfg=blue ctermbg=NONE cterm=NONE
hi Type ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Special ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=yellow ctermbg=NONE cterm=bold
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=cyan ctermbg=NONE cterm=bold
hi Conceal ctermfg=darkgray ctermbg=NONE cterm=NONE
hi Conceal ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Debug ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=white ctermbg=darkgreen cterm=NONE
hi DiffDelete ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=darkgreen ctermbg=NONE cterm=reverse
hi DiffChange ctermfg=darkblue ctermbg=NONE cterm=reverse
hi DiffText ctermfg=darkmagenta ctermbg=NONE cterm=reverse
hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=reverse
hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi DiffText ctermfg=white ctermbg=lightgrey cterm=NONE
hi DiffChange ctermfg=white ctermbg=darkgray cterm=NONE
unlet s:t_Co
finish
endif
@ -293,13 +294,13 @@ if s:t_Co >= 8
hi Normal ctermfg=gray ctermbg=black cterm=NONE
hi Statusline ctermfg=gray ctermbg=black cterm=bold,reverse
hi StatuslineNC ctermfg=gray ctermbg=black cterm=reverse
hi VertSplit ctermfg=gray ctermbg=black cterm=reverse
hi VertSplit ctermfg=gray ctermbg=gray cterm=NONE
hi TabLine ctermfg=black ctermbg=gray cterm=NONE
hi TabLineFill ctermfg=black ctermbg=gray cterm=NONE
hi TabLineSel ctermfg=NONE ctermbg=NONE cterm=NONE
hi TabLineFill ctermfg=gray ctermbg=gray cterm=NONE
hi TabLineSel ctermfg=black ctermbg=gray cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarButton ctermfg=gray ctermbg=black cterm=bold,reverse
hi QuickFixLine ctermfg=black ctermbg=blue cterm=NONE
hi ToolbarButton ctermfg=gray ctermbg=black cterm=reverse
hi QuickFixLine ctermfg=black ctermbg=darkblue cterm=NONE
hi CursorLineNr ctermfg=darkyellow ctermbg=NONE cterm=bold
hi LineNr ctermfg=gray ctermbg=NONE cterm=bold
hi LineNrAbove ctermfg=gray ctermbg=NONE cterm=bold
@ -318,52 +319,53 @@ if s:t_Co >= 8
hi PmenuKindSel ctermfg=darkred ctermbg=darkyellow cterm=NONE
hi PmenuExtra ctermfg=black ctermbg=gray cterm=NONE
hi PmenuExtraSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=gray cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=darkred ctermbg=gray cterm=bold,reverse
hi ErrorMsg ctermfg=darkred ctermbg=gray cterm=bold,reverse
hi ModeMsg ctermfg=black ctermbg=darkyellow cterm=NONE
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Question ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi WarningMsg ctermfg=darkred ctermbg=NONE cterm=NONE
hi Todo ctermfg=darkyellow ctermbg=black cterm=reverse
hi Todo ctermfg=gray ctermbg=NONE cterm=bold
hi MatchParen ctermfg=magenta ctermbg=NONE cterm=bold
hi Search ctermfg=black ctermbg=darkgreen cterm=NONE
hi Search ctermfg=black ctermbg=darkblue cterm=NONE
hi IncSearch ctermfg=black ctermbg=darkyellow cterm=NONE
hi CurSearch ctermfg=black ctermbg=darkyellow cterm=NONE
hi WildMenu ctermfg=black ctermbg=darkyellow cterm=NONE
hi debugPC ctermfg=black ctermbg=blue cterm=NONE
hi debugPC ctermfg=black ctermbg=darkblue cterm=NONE
hi debugBreakpoint ctermfg=black ctermbg=darkcyan cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi CursorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi Folded ctermfg=black ctermbg=darkyellow cterm=NONE
hi ColorColumn ctermfg=black ctermbg=darkyellow cterm=NONE
hi SpellBad ctermfg=darkred ctermbg=gray cterm=reverse
hi SpellCap ctermfg=blue ctermbg=gray cterm=reverse
hi SpellCap ctermfg=darkblue ctermbg=gray cterm=reverse
hi SpellLocal ctermfg=darkgreen ctermbg=black cterm=reverse
hi SpellRare ctermfg=darkmagenta ctermbg=gray cterm=reverse
hi Comment ctermfg=gray ctermbg=NONE cterm=bold
hi Constant ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Constant ctermfg=darkred ctermbg=NONE cterm=NONE
hi String ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Character ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Identifier ctermfg=gray ctermbg=NONE cterm=NONE
hi Statement ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi PreProc ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Type ctermfg=blue ctermbg=NONE cterm=NONE
hi Type ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Special ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=darkyellow ctermbg=NONE cterm=bold
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=darkcyan ctermbg=NONE cterm=bold
hi Conceal ctermfg=gray ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Debug ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=white ctermbg=darkgreen cterm=NONE
hi DiffDelete ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=darkgreen ctermbg=NONE cterm=reverse
hi DiffChange ctermfg=darkblue ctermbg=NONE cterm=reverse
hi DiffText ctermfg=darkmagenta ctermbg=NONE cterm=reverse
hi DiffDelete ctermfg=darkred ctermbg=NONE cterm=reverse
hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi diffSubname ctermfg=darkmagenta ctermbg=NONE cterm=NONE
hi DiffText ctermfg=white ctermbg=black cterm=bold,reverse
hi DiffChange ctermfg=black ctermbg=white cterm=NONE
unlet s:t_Co
finish
endif
@ -437,36 +439,39 @@ if s:t_Co >= 0
endif
" Background: dark
" Color: color00 #1C1C1C 234 black
" Color: color00 #1c1c1c 234 black
" Color: color08 #767676 243 darkgray
" Color: color01 #D75F5F 167 darkred
" Color: color09 #D7875F 173 red
" Color: color02 #87AF87 108 darkgreen
" Color: color10 #AFD7AF 151 green
" Color: color03 #AFAF87 144 darkyellow
" Color: color11 #D7D787 186 yellow
" Color: color04 #5F87AF 67 blue
" Color: color12 #87AFD7 110 blue
" Color: color05 #AF87AF 139 darkmagenta
" Color: color13 #D7AFD7 182 magenta
" Color: color06 #5F8787 66 darkcyan
" Color: color14 #87AFAF 109 cyan
" Color: color07 #9E9E9E 247 gray
" Color: color15 #BCBCBC 250 white
" Color: color01 #af5f5f 131 darkred
" Color: color09 #d75f87 168 red
" Color: color02 #5faf5f 71 darkgreen
" Color: color10 #87d787 114 green
" Color: color03 #af875f 137 darkyellow
" Color: color11 #d7af87 180 yellow
" Color: color04 #5f87af 67 darkblue
" Color: color12 #5fafd7 74 blue
" Color: color05 #af87af 139 darkmagenta
" Color: color13 #d787d7 176 magenta
" Color: color06 #5f8787 66 darkcyan
" Color: color14 #87afaf 109 cyan
" Color: color07 #9e9e9e 247 gray
" Color: color15 #bcbcbc 250 white
" Color: colorLine #303030 236 darkgrey
" Color: colorB #3a3a3a 237 darkgrey
" Color: colorF #262626 235 darkgrey
" Color: colorNonT #585858 240 darkgrey
" Color: colorC #FFAF5F 215 red
" Color: colorlC #5FFF00 82 green
" Color: colorV #1F3F5F 109 cyan
" Color: colorC #ffaf5f 215 red
" Color: colorlC #5fff00 82 green
" Color: colorV #1f3f5f 109 cyan
" Color: colorMP #ff00af 199 magenta
" Color: diffAdd #5f875f 65 darkgreen
" Color: diffDelete #af875f 137 darkyellow
" Color: diffChange #5f5f5f 59 darkgray
" Color: diffText #878787 102 lightgrey
" Color: diffAdd #5faf5f 71 darkgreen
" Color: diffDelete #af5f5f 131 darkred
" Color: diffChange #5f87af 67 darkblue
" Color: diffText #af87af 139 darkmagenta
" Color: black #000000 16 black
" Color: white #dadada 253 white
" Color: Added #5fd75f 77 darkgreen
" Color: Changed #ffaf5f 215 darkyellow
" Color: Removed #d75f5f 167 darkred
" Term colors: color00 color01 color02 color03 color04 color05 color06 color07
" Term colors: color08 color09 color10 color11 color12 color13 color14 color15
" vim: et ts=8 sw=2 sts=2

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer Shian Lee.
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:36
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -29,6 +29,8 @@ hi Pmenu guifg=#dadada guibg=#444444 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#ffff00 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#000000 gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#6c6c6c gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff00ff guibg=#444444 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff00ff guibg=#ffff00 gui=NONE cterm=NONE
hi TabLine guifg=#dadada guibg=#444444 gui=NONE cterm=NONE
hi TabLineFill guifg=NONE guibg=#6c6c6c gui=NONE cterm=NONE
hi TabLineSel guifg=#ffffff guibg=#000000 gui=bold cterm=bold
@ -79,6 +81,7 @@ hi Conceal guifg=#6c6c6c guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title guifg=#ff00ff guibg=NONE gui=bold cterm=bold
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@ -103,6 +106,8 @@ if s:t_Co >= 256
hi PmenuSel ctermfg=16 ctermbg=226 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=16 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=242 cterm=NONE
hi PmenuMatch ctermfg=201 ctermbg=238 cterm=NONE
hi PmenuMatchSel ctermfg=201 ctermbg=226 cterm=NONE
hi TabLine ctermfg=253 ctermbg=238 cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=242 cterm=NONE
hi TabLineSel ctermfg=231 ctermbg=16 cterm=bold
@ -153,6 +158,7 @@ if s:t_Co >= 256
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=201 ctermbg=NONE cterm=bold
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@ -180,6 +186,8 @@ if s:t_Co >= 16
hi PmenuSel ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuMatch ctermfg=white ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=yellow cterm=bold
hi TabLine ctermfg=white ctermbg=darkgrey cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=grey cterm=NONE
hi TabLineSel ctermfg=white ctermbg=black cterm=bold
@ -230,6 +238,7 @@ if s:t_Co >= 16
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=magenta ctermbg=NONE cterm=bold
hi! link Terminal Normal
hi! link PopupSelected PmenuSel
hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link CurSearch Search
@ -257,6 +266,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=grey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLine ctermfg=black ctermbg=grey cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=grey cterm=NONE
hi TabLineSel ctermfg=grey ctermbg=black cterm=NONE

View File

@ -3,7 +3,7 @@
" Maintainer: original maintainer Ron Aaron <ron@ronware.org>
" Website: https://www.github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:36
" Last Change: 2024 Aug 15
" Generated by Colortemplate v2.2.3
@ -62,7 +62,7 @@ hi CursorLine guifg=NONE guibg=#555555 gui=NONE cterm=NONE
hi CursorLineNr guifg=#ffff00 guibg=NONE gui=bold cterm=bold
hi Folded guifg=#00cdcd guibg=#666666 gui=NONE cterm=NONE
hi QuickFixLine guifg=#000000 guibg=#ffff00 gui=NONE cterm=NONE
hi Conceal guifg=#e5e5e5 guibg=#a9a9a9 gui=NONE cterm=NONE
hi Conceal guifg=#666666 guibg=NONE gui=NONE cterm=NONE
hi Cursor guifg=#000000 guibg=#00ff00 gui=NONE cterm=NONE
hi Directory guifg=#cc8000 guibg=NONE gui=NONE cterm=NONE
hi EndOfBuffer guifg=#cd0000 guibg=NONE gui=bold cterm=bold
@ -77,6 +77,8 @@ hi Pmenu guifg=#ffffff guibg=#444444 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#00cdcd gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#ffffff gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff00ff guibg=#444444 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff0000 guibg=#00cdcd gui=NONE cterm=NONE
hi Question guifg=#5c5cff guibg=NONE gui=bold cterm=bold
hi Search guifg=#ffffff guibg=#ff0000 gui=NONE cterm=NONE
hi SignColumn guifg=#00ffff guibg=NONE gui=NONE cterm=NONE
@ -123,7 +125,7 @@ if s:t_Co >= 256
hi CursorLineNr ctermfg=226 ctermbg=NONE cterm=bold
hi Folded ctermfg=44 ctermbg=59 cterm=NONE
hi QuickFixLine ctermfg=16 ctermbg=226 cterm=NONE
hi Conceal ctermfg=254 ctermbg=145 cterm=NONE
hi Conceal ctermfg=59 ctermbg=NONE cterm=NONE
hi Cursor ctermfg=16 ctermbg=46 cterm=NONE
hi Directory ctermfg=172 ctermbg=NONE cterm=NONE
hi EndOfBuffer ctermfg=160 ctermbg=NONE cterm=bold
@ -138,6 +140,8 @@ if s:t_Co >= 256
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=44 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=231 cterm=NONE
hi PmenuMatch ctermfg=201 ctermbg=238 cterm=NONE
hi PmenuMatchSel ctermfg=196 ctermbg=44 cterm=NONE
hi Question ctermfg=63 ctermbg=NONE cterm=bold
hi Search ctermfg=231 ctermbg=196 cterm=NONE
hi SignColumn ctermfg=51 ctermbg=NONE cterm=NONE
@ -187,7 +191,7 @@ if s:t_Co >= 16
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi Folded ctermfg=darkblue ctermbg=NONE cterm=NONE
hi QuickFixLine ctermfg=black ctermbg=yellow cterm=NONE
hi Conceal ctermfg=grey ctermbg=grey cterm=NONE
hi Conceal ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Cursor ctermfg=black ctermbg=green cterm=NONE
hi Directory ctermfg=darkyellow ctermbg=NONE cterm=NONE
hi EndOfBuffer ctermfg=darkred ctermbg=NONE cterm=bold
@ -202,6 +206,8 @@ if s:t_Co >= 16
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=white cterm=NONE
hi PmenuMatch ctermfg=white ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold
hi Question ctermfg=blue ctermbg=NONE cterm=bold
hi Search ctermfg=white ctermbg=red cterm=NONE
hi SignColumn ctermfg=cyan ctermbg=NONE cterm=NONE
@ -265,6 +271,8 @@ if s:t_Co >= 8
hi PmenuSbar ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkcyan cterm=NONE
hi PmenuMatch ctermfg=grey ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold
hi Question ctermfg=darkblue ctermbg=NONE cterm=bold
hi Search ctermfg=grey ctermbg=darkred cterm=NONE
hi SignColumn ctermfg=darkcyan ctermbg=NONE cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>
" Website: https://www.github.com/vim/colorschemes
" License: Vim License (see `:help license`)
" Last Updated: Mon 08 Jan 2024 09:41:03 AM AEDT
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -92,6 +92,7 @@ hi! link LineNrAbove LineNr
hi! link LineNrBelow LineNr
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
if &background ==# 'dark'
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#af5f5f', '#5faf5f', '#af875f', '#5f87af', '#d787d7', '#5fafaf', '#c6c6c6', '#767676', '#ff5f5f', '#5fd75f', '#ffd787', '#5fafff', '#ff87ff', '#5fd7d7', '#ffffff']
@ -120,6 +121,8 @@ if &background ==# 'dark'
hi PmenuKindSel guifg=#ff5f5f guibg=#4e4e4e gui=NONE cterm=NONE
hi PmenuExtra guifg=#767676 guibg=#303030 gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#767676 guibg=#4e4e4e gui=NONE cterm=NONE
hi PmenuMatch guifg=#d787d7 guibg=#303030 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#d787d7 guibg=#4e4e4e gui=NONE cterm=NONE
hi SignColumn guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error guifg=#ffffff guibg=#ff5f5f gui=NONE cterm=NONE
hi ErrorMsg guifg=#ffffff guibg=#ff5f5f gui=NONE cterm=NONE
@ -158,7 +161,7 @@ if &background ==# 'dark'
hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
hi Title guifg=NONE guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory guifg=#5fafff guibg=NONE gui=bold cterm=bold
hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal guifg=#585858 guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi DiffAdd guifg=#c6c6c6 guibg=#875f87 gui=NONE cterm=NONE
hi DiffChange guifg=#c6c6c6 guibg=#5f5f5f gui=NONE cterm=NONE
@ -211,6 +214,8 @@ else
hi PmenuKindSel guifg=#af0000 guibg=#c6c6c6 gui=NONE cterm=NONE
hi PmenuExtra guifg=#767676 guibg=#e4e4e4 gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#767676 guibg=#c6c6c6 gui=NONE cterm=NONE
hi PmenuMatch guifg=#af00af guibg=#e4e4e4 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#af00af guibg=#c6c6c6 gui=NONE cterm=NONE
hi SignColumn guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error guifg=#ffffff guibg=#d70000 gui=NONE cterm=NONE
hi ErrorMsg guifg=#ffffff guibg=#d70000 gui=NONE cterm=NONE
@ -249,7 +254,7 @@ else
hi Underlined guifg=NONE guibg=NONE gui=underline ctermfg=NONE ctermbg=NONE cterm=underline
hi Title guifg=NONE guibg=NONE gui=bold ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory guifg=#005fd7 guibg=NONE gui=bold cterm=bold
hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal guifg=#9e9e9e guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi DiffAdd guifg=#000000 guibg=#d7afd7 gui=NONE cterm=NONE
hi DiffChange guifg=#000000 guibg=#d0d0d0 gui=NONE cterm=NONE
@ -356,6 +361,7 @@ if s:t_Co >= 256
hi! link LineNrBelow LineNr
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
if &background ==# 'dark'
hi Normal ctermfg=251 ctermbg=16 cterm=NONE
hi Statusline ctermfg=251 ctermbg=16 cterm=bold,reverse
@ -381,6 +387,8 @@ if s:t_Co >= 256
hi PmenuKindSel ctermfg=203 ctermbg=239 cterm=NONE
hi PmenuExtra ctermfg=243 ctermbg=236 cterm=NONE
hi PmenuExtraSel ctermfg=243 ctermbg=239 cterm=NONE
hi PmenuMatch ctermfg=176 ctermbg=236 cterm=NONE
hi PmenuMatchSel ctermfg=176 ctermbg=239 cterm=NONE
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=231 ctermbg=203 cterm=NONE
hi ErrorMsg ctermfg=231 ctermbg=203 cterm=NONE
@ -417,7 +425,7 @@ if s:t_Co >= 256
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=75 ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=240 ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=251 ctermbg=96 cterm=NONE
hi DiffChange ctermfg=251 ctermbg=59 cterm=NONE
@ -467,6 +475,8 @@ if s:t_Co >= 256
hi PmenuKindSel ctermfg=124 ctermbg=251 cterm=NONE
hi PmenuExtra ctermfg=243 ctermbg=254 cterm=NONE
hi PmenuExtraSel ctermfg=243 ctermbg=251 cterm=NONE
hi PmenuMatch ctermfg=127 ctermbg=254 cterm=NONE
hi PmenuMatchSel ctermfg=127 ctermbg=251 cterm=NONE
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=231 ctermbg=160 cterm=NONE
hi ErrorMsg ctermfg=231 ctermbg=160 cterm=NONE
@ -503,7 +513,7 @@ if s:t_Co >= 256
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=26 ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=247 ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=16 ctermbg=182 cterm=NONE
hi DiffChange ctermfg=16 ctermbg=252 cterm=NONE
@ -559,6 +569,8 @@ if s:t_Co >= 16
hi PmenuKindSel ctermfg=darkred ctermbg=darkcyan cterm=NONE
hi PmenuExtra ctermfg=black ctermbg=grey cterm=NONE
hi PmenuExtraSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=grey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=white ctermbg=red cterm=NONE
hi ErrorMsg ctermfg=white ctermbg=red cterm=NONE
@ -594,7 +606,7 @@ if s:t_Co >= 16
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=blue ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=grey ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=white ctermbg=darkmagenta cterm=NONE
hi DiffChange ctermfg=white ctermbg=darkgreen cterm=NONE
@ -680,7 +692,7 @@ if s:t_Co >= 16
hi Underlined ctermfg=NONE ctermbg=NONE cterm=underline
hi Title ctermfg=NONE ctermbg=NONE cterm=bold
hi Directory ctermfg=darkblue ctermbg=NONE cterm=bold
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi DiffAdd ctermfg=black ctermbg=darkmagenta cterm=NONE
hi DiffChange ctermfg=black ctermbg=lightgray cterm=NONE
@ -736,6 +748,8 @@ if s:t_Co >= 8
hi PmenuKindSel ctermfg=darkred ctermbg=darkcyan cterm=NONE
hi PmenuExtra ctermfg=black ctermbg=grey cterm=NONE
hi PmenuExtraSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=grey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold
hi SignColumn ctermfg=NONE ctermbg=NONE cterm=NONE
hi Error ctermfg=grey ctermbg=darkred cterm=NONE
hi ErrorMsg ctermfg=grey ctermbg=darkred cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer Bram Moolenaar <Bram@vim.org>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:37
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -28,6 +28,7 @@ hi! link StatuslineTerm Statusline
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#000000 guibg=#e4e4e4 gui=NONE cterm=NONE
hi EndOfBuffer guifg=#0000ff guibg=#cccccc gui=bold cterm=bold
hi Folded guifg=#00008b guibg=#d3d3d3 gui=NONE cterm=NONE
@ -42,6 +43,8 @@ hi Pmenu guifg=#000000 guibg=#b2b2b2 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#ffff00 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#e4e4e4 gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#000000 gui=NONE cterm=NONE
hi PmenuMatch guifg=#a52a2a guibg=#b2b2b2 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#a52a2a guibg=#ffff00 gui=NONE cterm=NONE
hi TabLine guifg=#000000 guibg=#bcbcbc gui=underline cterm=underline
hi TabLineFill guifg=NONE guibg=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel guifg=#000000 guibg=#e4e4e4 gui=bold cterm=bold
@ -82,7 +85,7 @@ hi Type guifg=#2e8b57 guibg=NONE gui=bold cterm=bold
hi Special guifg=#6a5acd guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Directory guifg=#008787 guibg=NONE gui=bold cterm=bold
hi Conceal guifg=#0000ff guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#878787 guibg=NONE gui=NONE cterm=NONE
hi Title guifg=#a52a2a guibg=NONE gui=bold cterm=bold
hi DiffAdd guifg=#ffffff guibg=#5f875f gui=NONE cterm=NONE
hi DiffChange guifg=#ffffff guibg=#5f87af gui=NONE cterm=NONE
@ -100,6 +103,7 @@ if s:t_Co >= 256
hi! link StatuslineTermNC StatuslineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=16 ctermbg=254 cterm=NONE
hi EndOfBuffer ctermfg=21 ctermbg=252 cterm=bold
hi Folded ctermfg=18 ctermbg=252 cterm=NONE
@ -114,6 +118,8 @@ if s:t_Co >= 256
hi PmenuSel ctermfg=16 ctermbg=226 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=254 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=16 cterm=NONE
hi PmenuMatch ctermfg=124 ctermbg=249 cterm=NONE
hi PmenuMatchSel ctermfg=124 ctermbg=226 cterm=NONE
hi TabLine ctermfg=16 ctermbg=250 cterm=underline
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=16 ctermbg=254 cterm=bold
@ -154,7 +160,7 @@ if s:t_Co >= 256
hi Special ctermfg=62 ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Directory ctermfg=30 ctermbg=NONE cterm=bold
hi Conceal ctermfg=21 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=102 ctermbg=NONE cterm=NONE
hi Title ctermfg=124 ctermbg=NONE cterm=bold
hi DiffAdd ctermfg=231 ctermbg=65 cterm=NONE
hi DiffChange ctermfg=231 ctermbg=67 cterm=NONE
@ -179,6 +185,8 @@ if s:t_Co >= 16
hi PmenuSel ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=white cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=yellow cterm=bold
hi TabLine ctermfg=black ctermbg=white cterm=underline
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=black ctermbg=grey cterm=bold
@ -219,7 +227,7 @@ if s:t_Co >= 16
hi Special ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Directory ctermfg=darkcyan ctermbg=NONE cterm=bold
hi Conceal ctermfg=blue ctermbg=NONE cterm=NONE
hi Conceal ctermfg=gray ctermbg=NONE cterm=NONE
hi Title ctermfg=darkred ctermbg=NONE cterm=bold
hi DiffAdd ctermfg=white ctermbg=darkgreen cterm=NONE
hi DiffChange ctermfg=white ctermbg=blue cterm=NONE
@ -244,6 +252,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkgreen cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLine ctermfg=gray ctermbg=black cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=black ctermbg=gray cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer Ron Aaron <ron@ronware.org>.
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Mon 08 Jan 2024 09:50:15 AM AEDT
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -28,6 +28,7 @@ hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Added Constant
hi Normal guifg=#87ff87 guibg=#000000 gui=NONE cterm=NONE
hi EndOfBuffer guifg=#0000ff guibg=#000000 gui=NONE cterm=NONE
@ -38,6 +39,8 @@ hi Pmenu guifg=#ffffff guibg=#444444 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#ffff00 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#303030 gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#bcbcbc gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff00ff guibg=#444444 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff00ff guibg=#ffff00 gui=NONE cterm=NONE
hi TabLineFill guifg=NONE guibg=#303030 gui=NONE cterm=NONE
hi TabLine guifg=#87ff87 guibg=#444444 gui=NONE cterm=NONE
hi TabLineSel guifg=#ffffff guibg=#000000 gui=NONE cterm=NONE
@ -101,6 +104,7 @@ if s:t_Co >= 256
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Added Constant
hi Normal ctermfg=120 ctermbg=16 cterm=NONE
hi EndOfBuffer ctermfg=21 ctermbg=16 cterm=NONE
@ -111,6 +115,8 @@ if s:t_Co >= 256
hi PmenuSel ctermfg=16 ctermbg=226 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=236 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=250 cterm=NONE
hi PmenuMatch ctermfg=201 ctermbg=238 cterm=NONE
hi PmenuMatchSel ctermfg=201 ctermbg=226 cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=236 cterm=NONE
hi TabLine ctermfg=120 ctermbg=238 cterm=NONE
hi TabLineSel ctermfg=231 ctermbg=16 cterm=NONE
@ -176,6 +182,8 @@ if s:t_Co >= 16
hi PmenuSel ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuMatch ctermfg=white ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=yellow cterm=bold
hi TabLineFill ctermfg=NONE ctermbg=grey cterm=NONE
hi TabLine ctermfg=green ctermbg=darkgrey cterm=NONE
hi TabLineSel ctermfg=white ctermbg=black cterm=NONE
@ -241,6 +249,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLineFill ctermfg=NONE ctermbg=grey cterm=NONE
hi TabLine ctermfg=grey ctermbg=black cterm=reverse
hi TabLineSel ctermfg=grey ctermbg=black cterm=NONE

View File

@ -3,7 +3,7 @@
" Maintainer: Original maintainerRon Aaron <ron@ronware.org>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:38
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -25,6 +25,7 @@ hi! link CursorLineFold CursorLine
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#ffffff guibg=#000000 gui=NONE cterm=NONE
hi Comment guifg=#808080 guibg=NONE gui=NONE cterm=NONE
hi Constant guifg=#00ffff guibg=NONE gui=NONE cterm=NONE
@ -37,7 +38,7 @@ hi Underlined guifg=#80a0ff guibg=NONE gui=underline cterm=underline
hi Ignore guifg=#000000 guibg=#000000 gui=NONE cterm=NONE
hi Error guifg=#ffffff guibg=#ff0000 gui=NONE cterm=NONE
hi Todo guifg=#000000 guibg=#c0c000 gui=NONE cterm=NONE
hi Conceal guifg=#e5e5e5 guibg=#a9a9a9 gui=NONE cterm=NONE
hi Conceal guifg=#666666 guibg=NONE gui=NONE cterm=NONE
hi Cursor guifg=#000000 guibg=#ffffff gui=NONE cterm=NONE
hi lCursor guifg=#000000 guibg=#ffffff gui=NONE cterm=NONE
hi CursorIM guifg=NONE guibg=fg gui=NONE cterm=NONE
@ -80,6 +81,8 @@ hi TabLineFill guifg=NONE guibg=#000000 gui=reverse cterm=reverse
hi TabLineSel guifg=#ffffff guibg=#000000 gui=bold cterm=bold
hi ToolbarLine guifg=NONE guibg=#000000 gui=NONE cterm=NONE
hi ToolbarButton guifg=#000000 guibg=#e5e5e5 gui=bold cterm=bold
hi PmenuMatch guifg=#ff00ff guibg=#303030 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff00ff guibg=#e5e5e5 gui=NONE cterm=NONE
hi Pmenu guifg=fg guibg=#303030 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#e5e5e5 gui=NONE cterm=NONE
@ -98,6 +101,7 @@ if s:t_Co >= 256
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=231 ctermbg=16 cterm=NONE
hi Comment ctermfg=244 ctermbg=NONE cterm=NONE
hi Constant ctermfg=51 ctermbg=NONE cterm=NONE
@ -110,7 +114,7 @@ if s:t_Co >= 256
hi Ignore ctermfg=16 ctermbg=16 cterm=NONE
hi Error ctermfg=231 ctermbg=196 cterm=NONE
hi Todo ctermfg=16 ctermbg=142 cterm=NONE
hi Conceal ctermfg=254 ctermbg=248 cterm=NONE
hi Conceal ctermfg=241 ctermbg=NONE cterm=NONE
hi Cursor ctermfg=16 ctermbg=231 cterm=NONE
hi lCursor ctermfg=16 ctermbg=231 cterm=NONE
hi CursorIM ctermfg=NONE ctermbg=fg cterm=NONE
@ -153,6 +157,8 @@ if s:t_Co >= 256
hi TabLineSel ctermfg=231 ctermbg=16 cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=16 cterm=NONE
hi ToolbarButton ctermfg=16 ctermbg=254 cterm=bold
hi PmenuMatch ctermfg=201 ctermbg=236 cterm=NONE
hi PmenuMatchSel ctermfg=201 ctermbg=254 cterm=NONE
hi Pmenu ctermfg=fg ctermbg=236 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=254 cterm=NONE
@ -178,7 +184,7 @@ if s:t_Co >= 16
hi Ignore ctermfg=black ctermbg=black cterm=NONE
hi Error ctermfg=white ctermbg=red cterm=NONE
hi Todo ctermfg=black ctermbg=darkyellow cterm=NONE
hi Conceal ctermfg=grey ctermbg=grey cterm=NONE
hi Conceal ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Cursor ctermfg=black ctermbg=white cterm=NONE
hi lCursor ctermfg=black ctermbg=white cterm=NONE
hi CursorIM ctermfg=NONE ctermbg=fg cterm=NONE
@ -221,6 +227,8 @@ if s:t_Co >= 16
hi TabLineSel ctermfg=white ctermbg=black cterm=bold
hi ToolbarLine ctermfg=NONE ctermbg=black cterm=NONE
hi ToolbarButton ctermfg=black ctermbg=grey cterm=bold
hi PmenuMatch ctermfg=fg ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=grey cterm=bold
hi Pmenu ctermfg=fg ctermbg=darkgrey cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuSel ctermfg=black ctermbg=grey cterm=NONE
@ -245,6 +253,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=grey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLine ctermfg=black ctermbg=grey cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=grey cterm=NONE
hi TabLineSel ctermfg=grey ctermbg=black cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer David Ne\v{c}as (Yeti) <yeti@physics.muni.cz>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:39
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -26,6 +26,7 @@ hi! link CursorLineFold CursorLine
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#000000 guibg=#ffdab9 gui=NONE cterm=NONE
hi Folded guifg=#000000 guibg=#e3c1a5 gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#f5c195 gui=NONE cterm=NONE
@ -39,9 +40,11 @@ hi StatusLineTerm guifg=#ffffff guibg=#2e8b57 gui=bold cterm=bold
hi StatusLineTermNC guifg=#ffdab9 guibg=#008b8b gui=bold cterm=bold
hi VertSplit guifg=#ffdab9 guibg=#737373 gui=NONE cterm=NONE
hi Pmenu guifg=#000000 guibg=#ffaf87 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#f5c195 gui=bold cterm=bold
hi PmenuSbar guifg=NONE guibg=#ffdab9 gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#737373 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#f5c195 gui=bold cterm=bold
hi PmenuMatch guifg=#a52a2a guibg=#ffaf87 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#a52a2a guibg=#f5c195 gui=bold cterm=bold
hi TabLine guifg=#ffdab9 guibg=#737373 gui=underline cterm=underline
hi TabLineFill guifg=NONE guibg=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel guifg=#000000 guibg=#ffdab9 gui=bold cterm=bold
@ -81,7 +84,7 @@ hi PreProc guifg=#cd00cd guibg=NONE gui=NONE cterm=NONE
hi Type guifg=#2e8b57 guibg=NONE gui=bold cterm=bold
hi Special guifg=#6a5acd guibg=NONE gui=NONE cterm=NONE
hi Directory guifg=#008b8b guibg=NONE gui=bold cterm=bold
hi Conceal guifg=#406090 guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#737373 guibg=NONE gui=NONE cterm=NONE
hi Ignore guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title guifg=#cd00cd guibg=NONE gui=bold cterm=bold
hi DiffAdd guifg=#ffffff guibg=#5f875f gui=NONE cterm=NONE
@ -98,6 +101,7 @@ if s:t_Co >= 256
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=16 ctermbg=223 cterm=NONE
hi Folded ctermfg=16 ctermbg=252 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=180 cterm=NONE
@ -111,9 +115,11 @@ if s:t_Co >= 256
hi StatusLineTermNC ctermfg=223 ctermbg=30 cterm=bold
hi VertSplit ctermfg=223 ctermbg=243 cterm=NONE
hi Pmenu ctermfg=16 ctermbg=216 cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=180 cterm=bold
hi PmenuSbar ctermfg=NONE ctermbg=223 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=243 cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=180 cterm=bold
hi PmenuMatch ctermfg=124 ctermbg=216 cterm=NONE
hi PmenuMatchSel ctermfg=124 ctermbg=180 cterm=bold
hi TabLine ctermfg=223 ctermbg=243 cterm=underline
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=16 ctermbg=223 cterm=bold
@ -153,7 +159,7 @@ if s:t_Co >= 256
hi Type ctermfg=29 ctermbg=NONE cterm=bold
hi Special ctermfg=62 ctermbg=NONE cterm=NONE
hi Directory ctermfg=30 ctermbg=NONE cterm=bold
hi Conceal ctermfg=25 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=243 ctermbg=NONE cterm=NONE
hi Ignore ctermfg=NONE ctermbg=NONE cterm=NONE
hi Title ctermfg=164 ctermbg=NONE cterm=bold
hi DiffAdd ctermfg=231 ctermbg=65 cterm=NONE
@ -178,9 +184,11 @@ if s:t_Co >= 16
hi StatusLineTermNC ctermfg=white ctermbg=darkcyan cterm=bold
hi VertSplit ctermfg=white ctermbg=darkgrey cterm=NONE
hi Pmenu ctermfg=black ctermbg=grey cterm=NONE
hi PmenuSel ctermfg=black ctermbg=yellow cterm=bold
hi PmenuSbar ctermfg=NONE ctermbg=white cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkgrey cterm=NONE
hi PmenuSel ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=grey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=yellow cterm=bold
hi TabLine ctermfg=white ctermbg=darkgrey cterm=underline
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=black ctermbg=white cterm=bold
@ -248,6 +256,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=NONE cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkgreen cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLine ctermfg=gray ctermbg=black cterm=NONE
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=black ctermbg=white cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Maxence Weynans <neutaaaaan@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Vim License (see `:help license`)`
" Last Updated: Fri 15 Dec 2023 20:05:39
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -13,11 +13,15 @@ let g:colors_name = 'quiet'
let s:t_Co = has('gui_running') ? -1 : (&t_Co ?? 0)
hi! link Added Normal
hi! link Changed Normal
hi! link Removed Normal
hi! link Terminal Normal
hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
@ -74,10 +78,12 @@ if &background ==# 'dark'
hi MoreMsg guifg=#dadada guibg=NONE gui=NONE cterm=NONE
hi NonText guifg=#707070 guibg=NONE gui=NONE cterm=NONE
hi Pmenu guifg=#000000 guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuMatch guifg=#d7005f guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuExtra guifg=#000000 guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuKind guifg=#000000 guibg=#a8a8a8 gui=bold cterm=bold
hi PmenuSbar guifg=#707070 guibg=#585858 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#dadada gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#d7005f guibg=#dadada gui=bold cterm=bold
hi PmenuExtraSel guifg=#000000 guibg=#dadada gui=NONE cterm=NONE
hi PmenuKindSel guifg=#000000 guibg=#dadada gui=bold cterm=bold
hi PmenuThumb guifg=#dadada guibg=#dadada gui=NONE cterm=NONE
@ -144,10 +150,12 @@ else
hi MoreMsg guifg=#000000 guibg=NONE gui=NONE cterm=NONE
hi NonText guifg=#626262 guibg=NONE gui=NONE cterm=NONE
hi Pmenu guifg=#000000 guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuMatch guifg=#d70000 guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuExtra guifg=#000000 guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuKind guifg=#000000 guibg=#a8a8a8 gui=bold cterm=bold
hi PmenuSbar guifg=#000000 guibg=#e4e4e4 gui=NONE cterm=NONE
hi PmenuSel guifg=#d7d7d7 guibg=#000000 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#d70000 guibg=#000000 gui=bold cterm=bold
hi PmenuExtraSel guifg=#d7d7d7 guibg=#000000 gui=NONE cterm=NONE
hi PmenuKindSel guifg=#d7d7d7 guibg=#000000 gui=bold cterm=bold
hi PmenuThumb guifg=#000000 guibg=#000000 gui=NONE cterm=NONE
@ -213,10 +221,12 @@ if s:t_Co >= 256
hi MoreMsg ctermfg=253 ctermbg=NONE cterm=NONE
hi NonText ctermfg=242 ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=16 ctermbg=248 cterm=NONE
hi PmenuMatch ctermfg=161 ctermbg=248 cterm=NONE
hi PmenuExtra ctermfg=16 ctermbg=248 cterm=NONE
hi PmenuKind ctermfg=16 ctermbg=248 cterm=bold
hi PmenuSbar ctermfg=242 ctermbg=240 cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=253 cterm=NONE
hi PmenuMatchSel ctermfg=161 ctermbg=253 cterm=bold
hi PmenuExtraSel ctermfg=16 ctermbg=253 cterm=NONE
hi PmenuKindSel ctermfg=16 ctermbg=253 cterm=bold
hi PmenuThumb ctermfg=253 ctermbg=253 cterm=NONE
@ -280,10 +290,12 @@ if s:t_Co >= 256
hi MoreMsg ctermfg=16 ctermbg=NONE cterm=NONE
hi NonText ctermfg=241 ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=16 ctermbg=248 cterm=NONE
hi PmenuMatch ctermfg=160 ctermbg=248 cterm=NONE
hi PmenuExtra ctermfg=16 ctermbg=248 cterm=NONE
hi PmenuKind ctermfg=16 ctermbg=248 cterm=bold
hi PmenuSbar ctermfg=16 ctermbg=254 cterm=NONE
hi PmenuSel ctermfg=188 ctermbg=16 cterm=NONE
hi PmenuMatchSel ctermfg=160 ctermbg=16 cterm=bold
hi PmenuExtraSel ctermfg=188 ctermbg=16 cterm=NONE
hi PmenuKindSel ctermfg=188 ctermbg=16 cterm=bold
hi PmenuThumb ctermfg=16 ctermbg=16 cterm=NONE
@ -359,9 +371,11 @@ if s:t_Co >= 16
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse
hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold
hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE
@ -425,9 +439,11 @@ if s:t_Co >= 16
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse
hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold
hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE
@ -498,9 +514,11 @@ if s:t_Co >= 8
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse
hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold
hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE
@ -564,9 +582,11 @@ if s:t_Co >= 8
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse
hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold
hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Maxim Kim <habamax@gmail.com>, ported from gruvbox8 of Lifepillar <lifepillar@lifepillar.me>
" Website: https://www.github.com/vim/colorschemes
" License: Vim License (see `:help license`)
" Last Updated: Fri 15 Dec 2023 20:05:40
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -21,14 +21,16 @@ hi! link Tag Special
hi! link lCursor Cursor
hi! link MessageWindow PMenu
hi! link PopupNotification Todo
hi! link CurSearch Search
hi! link PopupSelected PmenuSel
hi! link CurSearch IncSearch
hi! link Terminal Normal
if &background ==# 'dark'
if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#1c1c1c', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#a89984', '#928374', '#fb4934', '#b8bb26', '#fabd2f', '#83a598', '#d3869b', '#8ec07c', '#ebdbb2']
endif
hi Normal guifg=#ebdbb2 guibg=#1c1c1c gui=NONE cterm=NONE
hi CursorLineNr guifg=#fabd2f guibg=#303030 gui=NONE cterm=NONE
hi CursorLineNr guifg=#fabd2f guibg=#1c1c1c gui=bold cterm=bold
hi FoldColumn guifg=#928374 guibg=#1c1c1c gui=NONE cterm=NONE
hi SignColumn guifg=#928374 guibg=#1c1c1c gui=NONE cterm=NONE
hi VertSplit guifg=#303030 guibg=#1c1c1c gui=NONE cterm=NONE
@ -49,6 +51,8 @@ if &background ==# 'dark'
hi PmenuKindSel guifg=#fb4934 guibg=#83a598 gui=NONE cterm=NONE
hi PmenuExtra guifg=#a89984 guibg=#3c3836 gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#303030 guibg=#83a598 gui=NONE cterm=NONE
hi PmenuMatch guifg=#b16286 guibg=#3c3836 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#b16286 guibg=#83a598 gui=bold cterm=bold
hi SpecialKey guifg=#928374 guibg=NONE gui=NONE cterm=NONE
hi StatusLine guifg=#504945 guibg=#ebdbb2 gui=bold,reverse cterm=bold,reverse
hi StatusLineNC guifg=#3c3836 guibg=#a89984 gui=reverse cterm=reverse
@ -60,7 +64,7 @@ if &background ==# 'dark'
hi Visual guifg=#1c1c1c guibg=#83a598 gui=NONE cterm=NONE
hi WildMenu guifg=#83a598 guibg=#504945 gui=bold cterm=bold
hi EndOfBuffer guifg=#504945 guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#83a598 guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#504945 guibg=NONE gui=NONE cterm=NONE
hi Cursor guifg=#1c1c1c guibg=#fbf1c7 gui=NONE cterm=NONE
hi DiffAdd guifg=#b8bb26 guibg=#1c1c1c gui=reverse cterm=reverse
hi DiffChange guifg=#8ec07c guibg=#1c1c1c gui=reverse cterm=reverse
@ -119,7 +123,7 @@ else
let g:terminal_ansi_colors = ['#3c3836', '#cc241d', '#98971a', '#d79921', '#458588', '#b16286', '#689d6a', '#7c6f64', '#928374', '#9d0006', '#79740e', '#b57614', '#076678', '#8f3f71', '#427b58', '#fbf1c7']
endif
hi Normal guifg=#3c3836 guibg=#fbf1c7 gui=NONE cterm=NONE
hi CursorLineNr guifg=#b57614 guibg=#e5d4b1 gui=NONE cterm=NONE
hi CursorLineNr guifg=#b57614 guibg=#fbf1c7 gui=bold cterm=bold
hi FoldColumn guifg=#928374 guibg=#fbf1c7 gui=NONE cterm=NONE
hi SignColumn guifg=#3c3836 guibg=#fbf1c7 gui=NONE cterm=NONE
hi VertSplit guifg=#bdae93 guibg=#fbf1c7 gui=NONE cterm=NONE
@ -140,6 +144,8 @@ else
hi PmenuKindSel guifg=#9d0006 guibg=#076678 gui=NONE cterm=NONE
hi PmenuExtra guifg=#7c6f64 guibg=#e5d4b1 gui=NONE cterm=NONE
hi PmenuExtraSel guifg=#bdae93 guibg=#076678 gui=NONE cterm=NONE
hi PmenuMatch guifg=#8f3f71 guibg=#e5d4b1 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#d3869b guibg=#076678 gui=bold cterm=bold
hi SpecialKey guifg=#928374 guibg=NONE gui=NONE cterm=NONE
hi StatusLine guifg=#bdae93 guibg=#3c3836 gui=bold,reverse cterm=bold,reverse
hi StatusLineNC guifg=#ebdbb2 guibg=#3c3836 gui=reverse cterm=reverse
@ -151,7 +157,7 @@ else
hi Visual guifg=#fbf1c7 guibg=#076678 gui=NONE cterm=NONE
hi WildMenu guifg=#076678 guibg=#e5d4b1 gui=bold cterm=bold
hi EndOfBuffer guifg=#e5d4b1 guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#076678 guibg=NONE gui=NONE cterm=NONE
hi Conceal guifg=#a89984 guibg=NONE gui=NONE cterm=NONE
hi Cursor guifg=#fbf1c7 guibg=#282828 gui=NONE cterm=NONE
hi DiffAdd guifg=#79740e guibg=#fbf1c7 gui=reverse cterm=reverse
hi DiffChange guifg=#427b58 guibg=#fbf1c7 gui=reverse cterm=reverse
@ -209,7 +215,7 @@ endif
if s:t_Co >= 256
if &background ==# 'dark'
hi Normal ctermfg=187 ctermbg=234 cterm=NONE
hi CursorLineNr ctermfg=214 ctermbg=236 cterm=NONE
hi CursorLineNr ctermfg=214 ctermbg=234 cterm=bold
hi FoldColumn ctermfg=102 ctermbg=234 cterm=NONE
hi SignColumn ctermfg=102 ctermbg=234 cterm=NONE
hi VertSplit ctermfg=236 ctermbg=234 cterm=NONE
@ -230,6 +236,8 @@ if s:t_Co >= 256
hi PmenuKindSel ctermfg=203 ctermbg=109 cterm=NONE
hi PmenuExtra ctermfg=102 ctermbg=237 cterm=NONE
hi PmenuExtraSel ctermfg=236 ctermbg=109 cterm=NONE
hi PmenuMatch ctermfg=132 ctermbg=237 cterm=NONE
hi PmenuMatchSel ctermfg=132 ctermbg=109 cterm=bold
hi SpecialKey ctermfg=102 ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=239 ctermbg=187 cterm=bold,reverse
hi StatusLineNC ctermfg=237 ctermbg=102 cterm=reverse
@ -241,7 +249,7 @@ if s:t_Co >= 256
hi Visual ctermfg=234 ctermbg=109 cterm=NONE
hi WildMenu ctermfg=109 ctermbg=239 cterm=bold
hi EndOfBuffer ctermfg=239 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=109 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=239 ctermbg=NONE cterm=NONE
hi Cursor ctermfg=234 ctermbg=230 cterm=NONE
hi DiffAdd ctermfg=142 ctermbg=234 cterm=reverse
hi DiffChange ctermfg=107 ctermbg=234 cterm=reverse
@ -297,7 +305,7 @@ if s:t_Co >= 256
else
" Light background
hi Normal ctermfg=237 ctermbg=230 cterm=NONE
hi CursorLineNr ctermfg=172 ctermbg=188 cterm=NONE
hi CursorLineNr ctermfg=172 ctermbg=230 cterm=bold
hi FoldColumn ctermfg=102 ctermbg=230 cterm=NONE
hi SignColumn ctermfg=237 ctermbg=230 cterm=NONE
hi VertSplit ctermfg=144 ctermbg=230 cterm=NONE
@ -318,6 +326,8 @@ if s:t_Co >= 256
hi PmenuKindSel ctermfg=124 ctermbg=23 cterm=NONE
hi PmenuExtra ctermfg=243 ctermbg=188 cterm=NONE
hi PmenuExtraSel ctermfg=144 ctermbg=23 cterm=NONE
hi PmenuMatch ctermfg=126 ctermbg=188 cterm=NONE
hi PmenuMatchSel ctermfg=175 ctermbg=23 cterm=bold
hi SpecialKey ctermfg=102 ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=144 ctermbg=237 cterm=bold,reverse
hi StatusLineNC ctermfg=187 ctermbg=237 cterm=reverse
@ -329,7 +339,7 @@ if s:t_Co >= 256
hi Visual ctermfg=230 ctermbg=23 cterm=NONE
hi WildMenu ctermfg=23 ctermbg=188 cterm=bold
hi EndOfBuffer ctermfg=188 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=23 ctermbg=NONE cterm=NONE
hi Conceal ctermfg=137 ctermbg=NONE cterm=NONE
hi Cursor ctermfg=230 ctermbg=235 cterm=NONE
hi DiffAdd ctermfg=64 ctermbg=230 cterm=reverse
hi DiffChange ctermfg=29 ctermbg=230 cterm=reverse
@ -409,6 +419,8 @@ if s:t_Co >= 16
hi PmenuKindSel ctermfg=DarkRed ctermbg=Blue cterm=NONE
hi PmenuExtra ctermfg=gray ctermbg=DarkGray cterm=NONE
hi PmenuExtraSel ctermfg=Black ctermbg=Blue cterm=NONE
hi PmenuMatch ctermfg=White ctermbg=DarkGray cterm=bold
hi PmenuMatchSel ctermfg=Black ctermbg=Blue cterm=bold
hi SignColumn ctermfg=DarkGray ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=DarkGray ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=gray ctermbg=Black cterm=bold,reverse
@ -422,7 +434,7 @@ if s:t_Co >= 16
hi Visual ctermfg=Black ctermbg=Blue cterm=NONE
hi WildMenu ctermfg=White ctermbg=Black cterm=bold
hi EndOfBuffer ctermfg=DarkGray ctermbg=NONE cterm=NONE
hi Conceal ctermfg=Blue ctermbg=NONE cterm=NONE
hi Conceal ctermfg=DarkGray ctermbg=NONE cterm=NONE
hi Cursor ctermfg=Black ctermbg=White cterm=NONE
hi DiffAdd ctermfg=Green ctermbg=Black cterm=reverse
hi DiffChange ctermfg=Cyan ctermbg=Black cterm=reverse
@ -497,6 +509,8 @@ if s:t_Co >= 16
hi PmenuKindSel ctermfg=DarkRed ctermbg=Blue cterm=NONE
hi PmenuExtra ctermfg=DarkGray ctermbg=Grey cterm=NONE
hi PmenuExtraSel ctermfg=White ctermbg=Blue cterm=NONE
hi PmenuMatch ctermfg=Black ctermbg=Grey cterm=bold
hi PmenuMatchSel ctermfg=White ctermbg=Blue cterm=bold
hi SignColumn ctermfg=Grey ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=Grey ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=DarkGray ctermbg=White cterm=bold,reverse
@ -510,7 +524,7 @@ if s:t_Co >= 16
hi Visual ctermfg=White ctermbg=Blue cterm=NONE
hi WildMenu ctermfg=Black ctermbg=White cterm=bold
hi EndOfBuffer ctermfg=Grey ctermbg=NONE cterm=NONE
hi Conceal ctermfg=Blue ctermbg=NONE cterm=NONE
hi Conceal ctermfg=Grey ctermbg=NONE cterm=NONE
hi Cursor ctermfg=White ctermbg=DarkGray cterm=NONE
hi DiffAdd ctermfg=Green ctermbg=White cterm=reverse
hi DiffChange ctermfg=Cyan ctermbg=White cterm=reverse
@ -590,6 +604,8 @@ if s:t_Co >= 8
hi PmenuKindSel ctermfg=Red ctermbg=Blue cterm=NONE
hi PmenuExtra ctermfg=DarkGray ctermbg=White cterm=NONE
hi PmenuExtraSel ctermfg=DarkGray ctermbg=Blue cterm=NONE
hi PmenuMatch ctermfg=DarkGray ctermbg=White cterm=bold
hi PmenuMatchSel ctermfg=Black ctermbg=Blue cterm=bold
hi SignColumn ctermfg=gray ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=gray ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=gray ctermbg=Black cterm=bold,reverse
@ -603,7 +619,7 @@ if s:t_Co >= 8
hi Visual ctermfg=Black ctermbg=Blue cterm=NONE
hi WildMenu ctermfg=Blue ctermbg=DarkGray cterm=bold
hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=Blue ctermbg=NONE cterm=NONE
hi Conceal ctermfg=DarkGray ctermbg=NONE cterm=NONE
hi Cursor ctermfg=Black ctermbg=White cterm=NONE
hi DiffAdd ctermfg=Green ctermbg=Black cterm=reverse
hi DiffChange ctermfg=Cyan ctermbg=Black cterm=reverse
@ -678,6 +694,8 @@ if s:t_Co >= 8
hi PmenuKindSel ctermfg=Red ctermbg=Blue cterm=NONE
hi PmenuExtra ctermfg=Grey ctermbg=Black cterm=NONE
hi PmenuExtraSel ctermfg=Grey ctermbg=Blue cterm=NONE
hi PmenuMatch ctermfg=Grey ctermbg=Black cterm=bold
hi PmenuMatchSel ctermfg=White ctermbg=Blue cterm=bold
hi SignColumn ctermfg=Black ctermbg=NONE cterm=NONE
hi SpecialKey ctermfg=Black ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=Black ctermbg=White cterm=bold,reverse
@ -691,7 +709,7 @@ if s:t_Co >= 8
hi Visual ctermfg=White ctermbg=Blue cterm=NONE
hi WildMenu ctermfg=Blue ctermbg=Grey cterm=bold
hi EndOfBuffer ctermfg=NONE ctermbg=NONE cterm=NONE
hi Conceal ctermfg=Blue ctermbg=NONE cterm=NONE
hi Conceal ctermfg=Grey ctermbg=NONE cterm=NONE
hi Cursor ctermfg=White ctermbg=DarkGray cterm=NONE
hi DiffAdd ctermfg=Green ctermbg=White cterm=reverse
hi DiffChange ctermfg=Cyan ctermbg=White cterm=reverse
@ -852,7 +870,7 @@ endif
" Color: bg1 #ebdbb2 187 Grey
" Color: bg2 #e5d4b1 188 Grey
" Color: bg3 #bdae93 144
" Color: bg4 #a89984 137
" Color: bg4 #a89984 137 Grey
" Color: bg5 #ebe1b7 229 Grey
" Color: bg6 #ffffd7 231 Grey
" Color: fg0 #282828 235 DarkGray
@ -866,6 +884,7 @@ endif
" Color: yellow #b57614 172 Yellow
" Color: blue #076678 23 Blue
" Color: purple #8f3f71 126 Magenta
" Color: lightpurple #d3869b 175 Magenta
" Color: aqua #427b58 29 Cyan
" Color: orange #ff5f00 202 Magenta
" Term colors: fg1 neutralred neutralgreen neutralyellow neutralblue neutralpurple neutralaqua fg4

View File

@ -3,7 +3,7 @@
" Maintainer: original maintainer Ron Aaron <ron@ronware.org>
" Website: https://www.github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:41
" Last Change: 2024 Aug 15
" Generated by Colortemplate v2.2.3
@ -58,7 +58,7 @@ hi CursorColumn guifg=NONE guibg=#666666 gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#666666 gui=NONE cterm=NONE
hi CursorLineNr guifg=#ffff00 guibg=NONE gui=bold cterm=NONE
hi QuickFixLine guifg=#000000 guibg=#00cdcd gui=NONE cterm=NONE
hi Conceal guifg=#e5e5e5 guibg=#a9a9a9 gui=NONE cterm=NONE
hi Conceal guifg=#666666 guibg=NONE gui=NONE cterm=NONE
hi Cursor guifg=#ffffff guibg=#60a060 gui=NONE cterm=NONE
hi Directory guifg=#00ffff guibg=NONE gui=NONE cterm=NONE
hi EndOfBuffer guifg=#ffff00 guibg=#303030 gui=NONE cterm=NONE
@ -75,6 +75,8 @@ hi Pmenu guifg=#ffffff guibg=#444444 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#000000 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#00cdcd gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#e5e5e5 gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff00ff guibg=#444444 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff00ff guibg=#00cdcd gui=NONE cterm=NONE
hi Question guifg=#00ff00 guibg=#000000 gui=bold cterm=NONE
hi Search guifg=#000000 guibg=#a9a9a9 gui=bold cterm=NONE
hi SignColumn guifg=#00ffff guibg=NONE gui=NONE cterm=NONE
@ -123,7 +125,7 @@ if s:t_Co >= 256
hi CursorLine ctermfg=NONE ctermbg=59 cterm=NONE
hi CursorLineNr ctermfg=226 ctermbg=NONE cterm=NONE
hi QuickFixLine ctermfg=16 ctermbg=44 cterm=NONE
hi Conceal ctermfg=254 ctermbg=145 cterm=NONE
hi Conceal ctermfg=59 ctermbg=NONE cterm=NONE
hi Cursor ctermfg=231 ctermbg=71 cterm=NONE
hi Directory ctermfg=51 ctermbg=NONE cterm=NONE
hi EndOfBuffer ctermfg=226 ctermbg=236 cterm=NONE
@ -140,6 +142,8 @@ if s:t_Co >= 256
hi PmenuSbar ctermfg=NONE ctermbg=16 cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=44 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=254 cterm=NONE
hi PmenuMatch ctermfg=201 ctermbg=238 cterm=NONE
hi PmenuMatchSel ctermfg=201 ctermbg=44 cterm=NONE
hi Question ctermfg=46 ctermbg=16 cterm=NONE
hi Search ctermfg=16 ctermbg=145 cterm=NONE
hi SignColumn ctermfg=51 ctermbg=NONE cterm=NONE
@ -191,7 +195,7 @@ if s:t_Co >= 16
hi CursorLine ctermfg=NONE ctermbg=NONE cterm=underline
hi CursorLineNr ctermfg=yellow ctermbg=NONE cterm=underline
hi QuickFixLine ctermfg=black ctermbg=darkcyan cterm=NONE
hi Conceal ctermfg=grey ctermbg=grey cterm=NONE
hi Conceal ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Cursor ctermfg=white ctermbg=green cterm=NONE
hi Directory ctermfg=cyan ctermbg=NONE cterm=NONE
hi EndOfBuffer ctermfg=yellow ctermbg=darkgrey cterm=NONE
@ -208,6 +212,8 @@ if s:t_Co >= 16
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuMatch ctermfg=white ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold
hi Question ctermfg=green ctermbg=black cterm=NONE
hi Search ctermfg=black ctermbg=grey cterm=NONE
hi SignColumn ctermfg=cyan ctermbg=NONE cterm=NONE
@ -275,6 +281,8 @@ if s:t_Co >= 8
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=grey cterm=NONE
hi PmenuMatch ctermfg=grey ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkcyan cterm=bold
hi Question ctermfg=darkgreen ctermbg=black cterm=bold
hi Search ctermfg=black ctermbg=grey cterm=NONE
hi SignColumn ctermfg=darkcyan ctermbg=NONE cterm=NONE

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer is Yasuhiro Matsumoto <mattn@mail.goo.ne.jp>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:41
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -30,6 +30,7 @@ hi! link Tag Special
hi! link Operator Statement
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#000000 guibg=#ffffff gui=NONE cterm=NONE
hi Folded guifg=#00008b guibg=#dadada gui=NONE cterm=NONE
hi CursorLine guifg=NONE guibg=#dadada gui=NONE cterm=NONE
@ -45,6 +46,8 @@ hi Pmenu guifg=#000000 guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#ffff60 gui=NONE cterm=NONE
hi PmenuSbar guifg=#ffffff guibg=#ffffff gui=NONE cterm=NONE
hi PmenuThumb guifg=#767676 guibg=#767676 gui=NONE cterm=NONE
hi PmenuMatch guifg=#ff0000 guibg=#a8a8a8 gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#ff0000 guibg=#ffff60 gui=NONE cterm=NONE
hi TabLine guifg=#000000 guibg=#dadada gui=underline cterm=underline
hi TabLineFill guifg=NONE guibg=NONE gui=reverse ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel guifg=#000000 guibg=#ffffff gui=bold cterm=bold
@ -79,7 +82,7 @@ hi Statement guifg=#2e8b57 guibg=NONE gui=bold cterm=bold
hi Type guifg=#2e8b57 guibg=NONE gui=bold cterm=bold
hi Comment guifg=#a8a8a8 guibg=NONE gui=bold cterm=NONE
hi StorageClass guifg=#ff0000 guibg=NONE gui=bold cterm=bold
hi Conceal guifg=#dadada guibg=#767676 gui=NONE cterm=NONE
hi Conceal guifg=#add8e6 guibg=NONE gui=NONE cterm=NONE
hi Identifier guifg=#008b8b guibg=NONE gui=NONE cterm=NONE
hi Constant guifg=#a07070 guibg=NONE gui=NONE cterm=NONE
hi Number guifg=#a07070 guibg=NONE gui=bold cterm=bold
@ -108,6 +111,7 @@ if s:t_Co >= 256
hi! link Operator Statement
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=16 ctermbg=231 cterm=NONE
hi Folded ctermfg=18 ctermbg=253 cterm=NONE
hi CursorLine ctermfg=NONE ctermbg=253 cterm=NONE
@ -123,6 +127,8 @@ if s:t_Co >= 256
hi PmenuSel ctermfg=16 ctermbg=228 cterm=NONE
hi PmenuSbar ctermfg=231 ctermbg=231 cterm=NONE
hi PmenuThumb ctermfg=243 ctermbg=243 cterm=NONE
hi PmenuMatch ctermfg=196 ctermbg=248 cterm=NONE
hi PmenuMatchSel ctermfg=196 ctermbg=228 cterm=NONE
hi TabLine ctermfg=16 ctermbg=253 cterm=underline
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=16 ctermbg=231 cterm=bold
@ -157,7 +163,7 @@ if s:t_Co >= 256
hi Type ctermfg=29 ctermbg=NONE cterm=bold
hi Comment ctermfg=248 ctermbg=NONE cterm=NONE
hi StorageClass ctermfg=196 ctermbg=NONE cterm=bold
hi Conceal ctermfg=253 ctermbg=243 cterm=NONE
hi Conceal ctermfg=153 ctermbg=NONE cterm=NONE
hi Identifier ctermfg=30 ctermbg=NONE cterm=NONE
hi Constant ctermfg=95 ctermbg=NONE cterm=NONE
hi Number ctermfg=95 ctermbg=NONE cterm=bold
@ -192,6 +198,8 @@ if s:t_Co >= 16
hi PmenuSel ctermfg=black ctermbg=yellow cterm=NONE
hi PmenuSbar ctermfg=white ctermbg=white cterm=NONE
hi PmenuThumb ctermfg=darkgrey ctermbg=darkgrey cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=yellow cterm=bold
hi TabLine ctermfg=black ctermbg=grey cterm=underline
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=black ctermbg=white cterm=bold
@ -226,7 +234,7 @@ if s:t_Co >= 16
hi Type ctermfg=darkgreen ctermbg=NONE cterm=bold
hi Comment ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi StorageClass ctermfg=red ctermbg=NONE cterm=bold
hi Conceal ctermfg=grey ctermbg=darkgrey cterm=NONE
hi Conceal ctermfg=blue ctermbg=NONE cterm=NONE
hi Identifier ctermfg=darkcyan ctermbg=NONE cterm=NONE
hi Constant ctermfg=darkred ctermbg=NONE cterm=NONE
hi Number ctermfg=darkred ctermbg=NONE cterm=bold
@ -261,6 +269,8 @@ if s:t_Co >= 8
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=grey ctermbg=grey cterm=NONE
hi PmenuThumb ctermfg=black ctermbg=black cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLine ctermfg=black ctermbg=grey cterm=reverse
hi TabLineFill ctermfg=NONE ctermbg=NONE cterm=reverse
hi TabLineSel ctermfg=grey ctermbg=black cterm=reverse

View File

@ -4,7 +4,7 @@
" Maintainer: Original maintainer Ralph Amissah <ralph@amissah.com>
" Website: https://github.com/vim/colorschemes
" License: Same as Vim
" Last Updated: Fri 15 Dec 2023 20:05:41
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -26,6 +26,7 @@ hi! link CursorLineFold CursorLine
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal guifg=#ffffff guibg=#262626 gui=NONE cterm=NONE
hi EndOfBuffer guifg=#5f87d7 guibg=NONE gui=NONE cterm=NONE
hi StatusLine guifg=#000000 guibg=#afaf87 gui=NONE cterm=NONE
@ -33,10 +34,12 @@ hi StatusLineNC guifg=#666666 guibg=#afaf87 gui=NONE cterm=NONE
hi StatusLineTerm guifg=#000000 guibg=#afaf87 gui=NONE cterm=NONE
hi StatusLineTermNC guifg=#666666 guibg=#afaf87 gui=NONE cterm=NONE
hi VertSplit guifg=#666666 guibg=#afaf87 gui=NONE cterm=NONE
hi PmenuSel guifg=#262626 guibg=#d7d787 gui=NONE cterm=NONE
hi Pmenu guifg=NONE guibg=#4a4a4a gui=NONE cterm=NONE
hi PmenuSel guifg=#262626 guibg=#d7d787 gui=NONE cterm=NONE
hi PmenuSbar guifg=NONE guibg=#262626 gui=NONE cterm=NONE
hi PmenuThumb guifg=NONE guibg=#ffd700 gui=NONE cterm=NONE
hi PmenuMatch guifg=#d7875f guibg=#4a4a4a gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#d7875f guibg=#d7d787 gui=NONE cterm=NONE
hi TabLineSel guifg=#000000 guibg=#afaf87 gui=NONE cterm=NONE
hi TabLine guifg=#666666 guibg=#333333 gui=NONE cterm=NONE
hi TabLineFill guifg=#ff8787 guibg=#333333 gui=NONE cterm=NONE
@ -103,6 +106,7 @@ if s:t_Co >= 256
hi! link CursorLineSign CursorLine
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi Normal ctermfg=231 ctermbg=235 cterm=NONE
hi EndOfBuffer ctermfg=68 ctermbg=NONE cterm=NONE
hi StatusLine ctermfg=16 ctermbg=144 cterm=NONE
@ -110,10 +114,12 @@ if s:t_Co >= 256
hi StatusLineTerm ctermfg=16 ctermbg=144 cterm=NONE
hi StatusLineTermNC ctermfg=241 ctermbg=144 cterm=NONE
hi VertSplit ctermfg=241 ctermbg=144 cterm=NONE
hi PmenuSel ctermfg=235 ctermbg=186 cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=239 cterm=NONE
hi PmenuSel ctermfg=235 ctermbg=186 cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=235 cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=220 cterm=NONE
hi PmenuMatch ctermfg=173 ctermbg=239 cterm=NONE
hi PmenuMatchSel ctermfg=173 ctermbg=186 cterm=NONE
hi TabLineSel ctermfg=16 ctermbg=144 cterm=NONE
hi TabLine ctermfg=241 ctermbg=236 cterm=NONE
hi TabLineFill ctermfg=210 ctermbg=236 cterm=NONE
@ -180,10 +186,12 @@ if s:t_Co >= 16
hi StatusLineTerm ctermfg=white ctermbg=black cterm=bold,reverse
hi StatusLineTermNC ctermfg=black ctermbg=grey cterm=NONE
hi VertSplit ctermfg=darkgrey ctermbg=grey cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=darkgrey cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkmagenta cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=yellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkgrey cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkmagenta cterm=bold
hi TabLineSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi TabLine ctermfg=grey ctermbg=darkgrey cterm=NONE
hi TabLineFill ctermfg=cyan ctermbg=darkgrey cterm=NONE
@ -250,10 +258,12 @@ if s:t_Co >= 8
hi StatusLineTerm ctermfg=grey ctermbg=black cterm=bold,reverse
hi StatusLineTermNC ctermfg=grey ctermbg=black cterm=reverse
hi VertSplit ctermfg=grey ctermbg=black cterm=reverse
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi Pmenu ctermfg=black ctermbg=darkcyan cterm=NONE
hi PmenuSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi PmenuSbar ctermfg=NONE ctermbg=black cterm=NONE
hi PmenuThumb ctermfg=NONE ctermbg=darkyellow cterm=NONE
hi PmenuMatch ctermfg=black ctermbg=darkcyan cterm=bold
hi PmenuMatchSel ctermfg=black ctermbg=darkyellow cterm=bold
hi TabLineSel ctermfg=black ctermbg=darkyellow cterm=NONE
hi TabLine ctermfg=grey ctermbg=black cterm=reverse
hi TabLineFill ctermfg=grey ctermbg=black cterm=reverse

View File

@ -4,7 +4,7 @@
" Maintainer: Maxence Weynans <neutaaaaan@gmail.com>
" Website: https://github.com/vim/colorschemes
" License: Vim License (see `:help license`)`
" Last Updated: Fri 15 Dec 2023 20:05:42
" Last Change: 2025 Jan 07
" Generated by Colortemplate v2.2.3
@ -20,6 +20,7 @@ hi! link StatusLineTerm StatusLine
hi! link StatusLineTermNC StatusLineNC
hi! link MessageWindow Pmenu
hi! link PopupNotification Todo
hi! link PopupSelected PmenuSel
hi! link Boolean Constant
hi! link Character Constant
hi! link Conditional Statement
@ -51,6 +52,9 @@ if (has('termguicolors') && &termguicolors) || has('gui_running')
let g:terminal_ansi_colors = ['#000000', '#d75f5f', '#87d75f', '#d7af5f', '#87afd7', '#af87d7', '#5fafaf', '#dadada', '#707070', '#ff5f5f', '#87ff5f', '#ffd75f', '#87d7ff', '#d787ff', '#5fd7d7', '#ffffff']
endif
hi Normal guifg=#dadada guibg=#161821 gui=NONE cterm=NONE
hi Added guifg=#87d75f guibg=NONE gui=NONE cterm=NONE
hi Changed guifg=#87afd7 guibg=NONE gui=NONE cterm=NONE
hi Removed guifg=#d75f5f guibg=NONE gui=NONE cterm=NONE
hi ColorColumn guifg=NONE guibg=#262831 gui=NONE cterm=NONE
hi Conceal guifg=NONE guibg=NONE gui=NONE ctermfg=NONE ctermbg=NONE cterm=NONE
hi CurSearch guifg=#ff5fff guibg=#000000 gui=reverse cterm=reverse
@ -73,10 +77,12 @@ hi ModeMsg guifg=#dadada guibg=NONE gui=bold cterm=bold
hi MoreMsg guifg=#dadada guibg=NONE gui=NONE cterm=NONE
hi NonText guifg=#707070 guibg=NONE gui=NONE cterm=NONE
hi Pmenu guifg=#000000 guibg=#a6a8b1 gui=NONE cterm=NONE
hi PmenuMatch guifg=#d7005f guibg=#a6a8b1 gui=NONE cterm=NONE
hi PmenuExtra guifg=#000000 guibg=#a6a8b1 gui=NONE cterm=NONE
hi PmenuKind guifg=#000000 guibg=#a6a8b1 gui=bold cterm=bold
hi PmenuSbar guifg=#707070 guibg=#5f5f87 gui=NONE cterm=NONE
hi PmenuSel guifg=#000000 guibg=#d7d7ff gui=NONE cterm=NONE
hi PmenuMatchSel guifg=#d7005f guibg=#d7d7ff gui=bold cterm=bold
hi PmenuExtraSel guifg=#000000 guibg=#d7d7ff gui=NONE cterm=NONE
hi PmenuKindSel guifg=#000000 guibg=#d7d7ff gui=bold cterm=bold
hi PmenuThumb guifg=#dadada guibg=#d7d7ff gui=NONE cterm=NONE
@ -115,11 +121,13 @@ hi Underlined guifg=#dadada guibg=NONE gui=underline cterm=underline
hi CursorIM guifg=#000000 guibg=#afff00 gui=NONE cterm=NONE
hi ToolbarLine guifg=NONE guibg=#000000 gui=NONE cterm=NONE
hi ToolbarButton guifg=#dadada guibg=#000000 gui=bold cterm=bold
hi DiffRemoved guifg=#d75f5f guibg=NONE gui=NONE cterm=NONE
hi debugBreakpoint guifg=#8787af guibg=#000000 gui=bold,reverse cterm=bold,reverse
if s:t_Co >= 256
hi Normal ctermfg=253 ctermbg=233 cterm=NONE
hi Added ctermfg=113 ctermbg=NONE cterm=NONE
hi Changed ctermfg=110 ctermbg=NONE cterm=NONE
hi Removed ctermfg=167 ctermbg=NONE cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=235 cterm=NONE
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi CurSearch ctermfg=207 ctermbg=16 cterm=reverse
@ -142,10 +150,12 @@ if s:t_Co >= 256
hi MoreMsg ctermfg=253 ctermbg=NONE cterm=NONE
hi NonText ctermfg=242 ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=16 ctermbg=248 cterm=NONE
hi PmenuMatch ctermfg=161 ctermbg=248 cterm=NONE
hi PmenuExtra ctermfg=16 ctermbg=248 cterm=NONE
hi PmenuKind ctermfg=16 ctermbg=248 cterm=bold
hi PmenuSbar ctermfg=242 ctermbg=60 cterm=NONE
hi PmenuSel ctermfg=16 ctermbg=189 cterm=NONE
hi PmenuMatchSel ctermfg=161 ctermbg=189 cterm=bold
hi PmenuExtraSel ctermfg=16 ctermbg=189 cterm=NONE
hi PmenuKindSel ctermfg=16 ctermbg=189 cterm=bold
hi PmenuThumb ctermfg=253 ctermbg=189 cterm=NONE
@ -184,7 +194,6 @@ if s:t_Co >= 256
hi CursorIM ctermfg=16 ctermbg=154 cterm=NONE
hi ToolbarLine ctermfg=NONE ctermbg=16 cterm=NONE
hi ToolbarButton ctermfg=253 ctermbg=16 cterm=bold
hi DiffRemoved ctermfg=167 ctermbg=NONE cterm=NONE
hi debugBreakpoint ctermfg=103 ctermbg=16 cterm=bold,reverse
unlet s:t_Co
finish
@ -204,6 +213,9 @@ if s:t_Co >= 16
hi TabLine ctermfg=darkgrey ctermbg=NONE cterm=reverse
hi VertSplit ctermfg=darkgrey ctermbg=NONE cterm=NONE
hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=NONE cterm=reverse
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse
@ -220,9 +232,11 @@ if s:t_Co >= 16
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse
hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold
hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE
@ -256,7 +270,6 @@ if s:t_Co >= 16
hi CursorIM ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=reverse
hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi DiffRemoved ctermfg=darkred ctermbg=NONE cterm=NONE
hi debugBreakpoint ctermfg=NONE ctermbg=NONE cterm=bold,reverse
unlet s:t_Co
finish
@ -276,6 +289,9 @@ if s:t_Co >= 8
hi TabLine ctermfg=NONE ctermbg=NONE cterm=bold,underline
hi VertSplit ctermfg=NONE ctermbg=NONE cterm=NONE
hi Normal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Added ctermfg=darkgreen ctermbg=NONE cterm=NONE
hi Changed ctermfg=darkblue ctermbg=NONE cterm=NONE
hi Removed ctermfg=darkred ctermbg=NONE cterm=NONE
hi ColorColumn ctermfg=NONE ctermbg=NONE cterm=reverse
hi Conceal ctermfg=NONE ctermbg=NONE cterm=NONE
hi Cursor ctermfg=NONE ctermbg=NONE cterm=reverse
@ -292,9 +308,11 @@ if s:t_Co >= 8
hi ModeMsg ctermfg=NONE ctermbg=NONE cterm=bold
hi MoreMsg ctermfg=NONE ctermbg=NONE cterm=NONE
hi Pmenu ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuMatch ctermfg=NONE ctermbg=darkred cterm=reverse
hi PmenuExtra ctermfg=NONE ctermbg=NONE cterm=reverse
hi PmenuKind ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi PmenuSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuMatchSel ctermfg=darkred ctermbg=NONE cterm=bold
hi PmenuExtraSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuKindSel ctermfg=NONE ctermbg=NONE cterm=bold
hi PmenuThumb ctermfg=NONE ctermbg=NONE cterm=NONE
@ -328,7 +346,6 @@ if s:t_Co >= 8
hi CursorIM ctermfg=NONE ctermbg=NONE cterm=NONE
hi ToolbarLine ctermfg=NONE ctermbg=NONE cterm=reverse
hi ToolbarButton ctermfg=NONE ctermbg=NONE cterm=bold,reverse
hi DiffRemoved ctermfg=darkred ctermbg=NONE cterm=NONE
hi debugBreakpoint ctermfg=NONE ctermbg=NONE cterm=bold,reverse
unlet s:t_Co
finish

Some files were not shown because too many files have changed in this diff Show More