Commit Graph
2973 Commits
Author SHA1 Message Date
Jlll1 9d2a6cd11e docs(treesitter): change links for eq? and set! to codeblocks (#21047) 2022-11-15 10:23:56 +01:00
zeertzjqandBram Moolenaar 2685d27cd6 vim-patch:9.0.0883: a silent mapping may cause dots on the command line (#21061)
Problem:    A silent mapping may cause dots on the command line.
Solution:   Don't show dots for completion if they are not going to be removed
            again. (closes vim/vim#11501)

https://github.com/vim/vim/commit/698a00f55d60043d51b1c98cbbf3f9fd10badd2f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-15 07:23:57 +08:00
zeertzjqandYegappan Lakshmanan 849394e4e2 vim-patch:9.0.0863: col() and charcol() only work for the current window (#21038)
Problem:    col() and charcol() only work for the current window.
Solution:   Add an optional winid argument. (Yegappan Lakshmanan,
            closes vim/vim#11466, closes vim/vim#11461)

https://github.com/vim/vim/commit/4c8d2f02b3ce037bbe1d5ee12887e343c6bde88f

Cherry-pick test_functions.vim change from patch 8.2.0633.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-13 08:29:05 +08:00
zeertzjqandBram Moolenaar 7abe8ef422 vim-patch:9.0.0862: default value of 'endoffile' is wrong (#21032)
Problem:    Default value of 'endoffile' is wrong.
Solution:   The default must be 'noendoffile'.

https://github.com/vim/vim/commit/0aad88f073602849d1623122eb3c323f8e252def

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-12 23:31:17 +08:00
Lewis Russell 07eb4263ca feat(spell): support nospell in treesitter queries 2022-11-12 10:19:03 +00:00
zeertzjqandBram Moolenaar eee9560516 vim-patch:9.0.0861: solution for "!!sort" in closed fold is not optimal (#21027)
Problem:    Solution for "!!sort" in closed fold is not optimal.
Solution:   Use a different range instead of the subtle difference in handling
            a range with an offset. (issue vim/vim#11487)

https://github.com/vim/vim/commit/9954dc39ea090cee6bf41c888c41e60d9f52c3b8

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-12 07:43:36 +08:00
Sean DewarandBram Moolenaar befae73044 vim-patch:76db9e076318 (#21013)
Update runtime files

https://github.com/vim/vim/commit/76db9e076318cb0ae846f43b7549ad4f2d234c0b

- `col()`'s example was changed to use `:echowin` so that the message can be
  seen with `showmode`. Use "\n" to force a hit-enter instead as `:echowin`
  isn't ported.
- Replace interpolated string usage in syntax/modula3.vim (not ported).
- Add a space after the `wincmd =` examples in `*CTRL-W_=*` so that the inlined
  code is highlighted properly when followed by a full stop.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-10 09:05:25 +00:00
James Trew 61d152779d docs(treesitter): fix predicate syntax (#21016) 2022-11-10 09:12:28 +01:00
Eduard Baturin a122406be4 docs: swap CursorLineFold and CursorLineSign (#20875) 2022-11-10 06:34:02 +08:00
Jongwook Choi 59ff4691f6 fix(vim.ui.input): return empty string when inputs nothing (#20883)
fix(vim.ui.input): return empty string when inputs nothing

The previous behavior of `vim.ui.input()` when typing <CR> with
no text input (with an intention of having the empty string as input)
was to execute `on_confirm(nil)`, conflicting with its documentation.

Inputting an empty string should now correctly execute `on_confirm('')`.
This should be clearly distinguished from cancelling or aborting the
input UI, in which case `on_confirm(nil)` is executed as before.
2022-11-08 08:15:15 +08:00
bfredl 059dfda0ca Merge pull request #20991 from famiu/feat/api/nvim_cmd/command-name
feat(api): add command name to Lua command callback opts
2022-11-07 18:00:21 +01:00
Famiu Haque c022140ec6 feat(api): add command name to Lua command callback opts
Adds a `name` key to the opts dict passed to Lua command callbacks
created using `nvim_create_user_command()`. This is useful for when
multiple commands use the same callback.

Note that this kind of behavior is not as strange as one might think,
even some internal Neovim commands reuse the same internal C function,
differing their behavior by checking the command name. `substitute`,
`smagic` and `snomagic` are examples of that.

This will also be useful for generalized Lua command preview functions
that can preview a wide range of commands, in which case knowing the
command name is necessary for the preview function to actually be able
to execute the command that it's supposed to preview.
2022-11-07 22:27:37 +06:00
Raphael 3435cdfb94 refactor(highlight): rename FloatBorderTitle #20988
requested in https://github.com/neovim/neovim/pull/20184
2022-11-07 04:02:00 -08:00
Lewis Russell 31ffc360f2 docs(news): add linematch (#20927) 2022-11-07 10:22:16 +00:00
zeertzjq 2ed2c04aa5 docs(options): remove mentions of 'imactivatefunc' and 'imstatusfunc' 2022-11-07 14:25:32 +08:00
zeertzjqandYegappan Lakshmanan 42e44d6d33 vim-patch:8.2.3751: cannot assign a lambda to an option that takes a function
Problem:    Cannot assign a lambda to an option that takes a function.
Solution:   Automatically convert the lambda to a string. (Yegappan
            Lakshmanan, closes vim/vim#9286)

https://github.com/vim/vim/commit/6409553b6e3b4de4e1d72b8ee5445595214581ff

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 14:25:32 +08:00
Victor Blanchard d337814906 feat: ":write ++p" creates parent dirs #20835
- `:write ++p foo/bar/baz.txt` should create parent directories `foo/bar/` if
   they do not exist
    - Note: `:foo ++…` is usually for options. No existing options have
      a single-char abbreviation (presumably by design), so it's safe to
      special-case `++p` here.
- Same for `writefile(…, 'foo/bar/baz.txt', 'p')`
- `BufWriteCmd` can see the ++p flag via `v:cmdarg`.

closes #19884
2022-11-06 19:31:50 -08:00
Shougo 4fd876271a vim-patch:9.0.0756 #20680
Problem:    No autocmd event for changing text in a terminal window.
Solution:   Add TextChangedT. (Shougo Matsushita, closes vim/vim#11366)

https://github.com/vim/vim/commit/4ccaedfcd7526983f4b6b3b06b0bfb54f333f1f3
2022-11-06 19:02:29 -08:00
zeertzjqandBram Moolenaar 84881674fd vim-patch:9.0.0389: crash when 'tagfunc' closes the window
Problem:    Crash when 'tagfunc' closes the window.
Solution:   Bail out when the window was closed.

https://github.com/vim/vim/commit/ccfde4d028e891a41e3548323c3d47b06fb0b83e

Add docs for E1299 from Vim runtime.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-07 08:24:48 +08:00
zeertzjqandYegappan Lakshmanan 1e4adf4b56 vim-patch:8.2.3725: cannot use a lambda for 'completefunc' and 'omnifunc'
Problem:    Cannot use a lambda for 'completefunc' and 'omnifunc'.
Solution:   Implement lambda support. (Yegappan Lakshmanan, closes vim/vim#9257)
https://github.com/vim/vim/commit/8658c759f05b317707d56e3b65a5ef63930c7498

Comment out Vim9 script in tests.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 08:24:48 +08:00
zeertzjqandYegappan Lakshmanan 1508618d4c vim-patch:8.2.3712: cannot use Vim9 lambda for 'tagfunc'
Problem:    Cannot use Vim9 lambda for 'tagfunc'.
Solution:   Make it work, add more tests. (Yegappan Lakshmanan, closes vim/vim#9250)
https://github.com/vim/vim/commit/05e59e3a9ffddbf93c7af02cd2ba1d0f822d4625

Omit Vim9 script in code and comment out in tests.

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 08:24:48 +08:00
zeertzjqandYegappan Lakshmanan 900dd2bdab vim-patch:8.2.3665: cannot use a lambda for 'tagfunc'
Problem:    Cannot use a lambda for 'tagfunc'.
Solution:   Use 'tagfunc' like 'opfunc'. (Yegappan Lakshmanan, closes vim/vim#9204)
https://github.com/vim/vim/commit/19916a8c8920b6a1fd737ffa6d4e363fc7a96319

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-07 08:24:48 +08:00
Raphael 1af4bd04f9 feat(ui): add support to display a title in the border of a float (#20184)
add "title" and "title_pos" keys to win config dict.
2022-11-06 11:59:43 +01:00
Gregory Anders 5b8d8a4c99 docs(news): add news blurb for tmux clipboard change (#20950) 2022-11-05 16:48:13 -06:00
zeertzjqandChristian Brabandt e0ec83a970 vim-patch:8.2.4882: cannot make 'breakindent' use a specific column
Problem:    Cannot make 'breakindent' use a specific column.
Solution:   Add the "column" entry in 'breakindentopt'. (Christian Brabandt,
            closes vim/vim#10362, closes vim/vim#10325)

https://github.com/vim/vim/commit/e7d6dbc5721342e3d6b04cf285e4510b5569e707

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-11-05 19:35:56 +08:00
zeertzjqandChristian Brabandt b92ed35a0b vim-patch:8.2.4093: cached breakindent values not initialized properly
Problem:    Cached breakindent values not initialized properly.
Solution:   Initialize and cache formatlistpat. (Christian Brabandt,
            closes vim/vim#9526, closes vim/vim#9512)
https://github.com/vim/vim/commit/c53b467473160b5cfce77277fbae414bf43e66ce

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-11-05 19:35:56 +08:00
zeertzjqandYegappan Lakshmanan 8e868d699a vim-patch:8.2.4679: cannot have expandcmd() give an error message for mistakes
Problem:    Cannot have expandcmd() give an error message for mistakes.
Solution:   Add an optional argument to give errors. Fix memory leak when
            expanding files fails. (Yegappan Lakshmanan, closes vim/vim#10071)
https://github.com/vim/vim/commit/2b74b6805b5c8c4836b66df5d949f5ff6a77f8c7

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2022-11-05 18:06:00 +08:00
zeertzjqandBram Moolenaar 781616bee5 vim-patch:8.2.2606: strchars() defaults to counting composing characters
Problem:    strchars() defaults to counting composing characters.
Solution:   Add strcharlen() which ignores composing characters.

https://github.com/vim/vim/commit/70ce8a1561c5396e4c4381f76a005cbb97646f80

Use docs from latest Vim instead.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 18:06:00 +08:00
zeertzjqandChristian Brabandt b84666d2a0 vim-patch:8.2.4978: no error if engine selection atom is not at the start
Problem:    No error if engine selection atom is not at the start.
Solution:   Give an error. (Christian Brabandt, closes vim/vim#10439)

https://github.com/vim/vim/commit/360da40b47a84ee8586c3b5d062f8c64a2ac9cc6

Co-authored-by: Christian Brabandt <cb@256bit.org>
2022-11-05 16:09:22 +08:00
zeertzjqandBram Moolenaar 48405df046 vim-patch:8.2.3919: Vim9: wrong argument for append() results in two errors
Problem:    Vim9: wrong argument for append() results in two errors.
Solution:   Check did_emsg.  Also for setline().  Adjust the help for
            appendbufline().

https://github.com/vim/vim/commit/8b6256f6ec075cca40341e61ebc9f538b4902dd1

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 14:44:26 +08:00
zeertzjqandBram Moolenaar 02f80d9a8a vim-patch:8.2.1631: test_fails() does not check the context of the line number
Problem:    test_fails() does not check the context of the line number.
Solution:   Use another argument to specify the context of the line number.

https://github.com/vim/vim/commit/9bd5d879c2ecfbdbb168b090e12f4b89724a302e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:45:43 +08:00
zeertzjqandBram Moolenaar 0d8293364f vim-patch:8.2.1479: Vim9: error for list index uses wrong line number
Problem:    Vim9: error for list index uses wrong line number.
Solution:   Set source line number. (closes vim/vim#6724)  Add a way to assert the
            line number of the error with assert_fails().

https://github.com/vim/vim/commit/1d634542cf5ebcd1d5d83bd124b3e1d5e7c96c58

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:41:20 +08:00
zeertzjqandBram Moolenaar 8b0c5de4e0 vim-patch:partial:8.2.1183: assert_fails() checks the last error message
Problem:    assert_fails() checks the last error message.
Solution:   Check the first error, it is more relevant.  Fix all the tests
            that rely on the old behavior.

https://github.com/vim/vim/commit/9b7bf9e98f06ece595fed7a3ff53ecce89797a53

Skip test_listener.vim, test_textprop.vim, test_viminfo.vim.
Skip test_python2.vim: affected line fails and hasn't been ported.
Skip test_python3.vim: affected lines fail and haven't been ported.
Skip CHECK_LIST_MATERIALIZE.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-05 12:27:45 +08:00
zeertzjq e30929cda5 vim-patch:8.2.0644: insufficient testing for invalid function arguments
Problem:    Insufficient testing for invalid function arguments.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#5988)

https://github.com/vim/vim/commit/99fa721944dda9d07c53c907c33466728df5c271

Omit test_listener.vim: changed again in patch 8.2.1183.
Omit test_textprop.vim: changed again in patch 8.2.1183.
Cherry-pick quickfix feature checks from patch 8.1.2373.
Omit Test_saveas() change: duplicate and removed in patch 8.2.0866.
2022-11-05 09:25:31 +08:00
zeertzjq 24fa5f70ed vim-patch:8.2.0448: various functions not properly tested (#20926)
Problem:    Various functions not properly tested.
Solution:   Add more tests, especially for failures. (Yegappan Lakshmanan,
            closes vim/vim#5843)

https://github.com/vim/vim/commit/0e05de46226eb4e5ea580beefa71831f92d613d3

Cherry-pick test changes from patch 8.2.0427 and skip Test_has().
Cherry-pick Test_complete_wildmenu() change from patch 8.2.4339.
2022-11-04 18:17:26 +08:00
JonathonandLewis Russell 04fbb1de44 Enable new diff option linematch (#14537)
Co-authored-by: Lewis Russell <me@lewisr.dev>
2022-11-04 09:07:22 +00:00
dundargoc 4716a578ae docs: fix typos 2022-11-02 21:45:26 +08:00
zeertzjqandK.Takata 41f308feab vim-patch:9.0.0826: if 'endofline' is set CTRL-Z may be written in a wrong place (#20903)
Problem:    If 'endofline' is set the CTRL-Z may be written in the wrong
            place.
Solution:   Write CTRL-Z at the end of the file.  Update the help to explain
            the possibilities better. (Ken Takata, closes vim/vim#11486)

https://github.com/vim/vim/commit/3af982196b1b973e953c35351961f2a96fe34172

Co-authored-by: K.Takata <kentkt@csc.jp>
2022-11-02 08:02:52 +08:00
zeertzjqandBram Moolenaar c46d46e9f1 vim-patch:8.2.2343: Vim9: return type of readfile() is any (#20896)
Problem:    Vim9: return type of readfile() is any.
Solution:   Add readblob() so that readfile() can be expected to always
            return a list of strings. (closes vim/vim#7671)

https://github.com/vim/vim/commit/c423ad77ed763c11ba67729bbf63c1cf0915231f

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-11-01 20:21:48 +08:00
zeertzjqandBram Moolenaar feabc1c98c vim-patch:9.0.0816: CTRL-Z at end of file is always dropped
Problem:    CTRL-Z at end of file is always dropped.
Solution:   Add the 'endoffile' option, like the 'endofline' option.
            (closes vim/vim#11408, closes vim/vim#11397)

Cherry-pick test_fixeol.vim changes from patch 8.2.1432.
Cherry-pick 'endoffile' changes from latest Vim runtime update.

https://github.com/vim/vim/commit/fb0cf2357e0c85bbfd9f9178705ad8d77b6b3b4e

vim-patch:f0b567e32a46

Revert unintended Makefile change

https://github.com/vim/vim/commit/f0b567e32a462fe838170a202919d18b53eff987

vim-patch:72c8e3c070b3

Fix wrong struct access for member.

https://github.com/vim/vim/commit/72c8e3c070b30f82bc0d203a62c168e43a13e99b

vim-patch:3f68a4136eb9

Add missing entry for the 'endoffile' option.

https://github.com/vim/vim/commit/3f68a4136eb99840d739af5133ab31948f273f63

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-30 08:07:50 +08:00
Christian ClasonandBram Moolenaar 6884f017b5 vim-patch:partial:6ebe4f970b8b (#20860)
Update runtime files

https://github.com/vim/vim/commit/6ebe4f970b8b398087076a72a7aae6e680fb92da

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-29 17:41:22 +02:00
Martin Kunz 356244d50b fix(docs): nil as viable argument for goto_prev (#20852)
Added `nil` as a possible option to `vim.diagnostics.goto_prev` in the
docs
2022-10-28 17:13:27 -06:00
zeertzjq bbbcd5393d vim-patch:8.2.1585: messages in globals.h not translated
Problem:    Messages in globals.h not translated, xgettext on MS-Windows not
            fully supported.
Solution:   Add globals.h to list of input files.  Update MS-Windows makefiles
            to improve message translations. (Ken Takata, closes vim/vim#6858)

https://github.com/vim/vim/commit/fa57335e532e505ce9229ddb2354a593fb057561

Also update gettext() docs to match latest Vim.
2022-10-28 08:04:57 +08:00
zeertzjqandBram Moolenaar 5568267ccb vim-patch:8.2.1544: cannot translate messages in a Vim script
Problem:    Cannot translate messages in a Vim script.
Solution:   Add gettext().  Try it out for a few messages in the options
            window.

https://github.com/vim/vim/commit/0b39c3fd4c5d1c8ebd2efa85fced7df5e17efd3b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2022-10-28 08:03:31 +08:00
Christian Clason f44ad75380 docs(api): pattern is not expanded for autocommands (#20812)
Problem: Unlike `:autocmd`, `nvim_create_autocommand()` does not expand
environment variables in the `pattern`, which is unexpected.

Solution: Add a note to the documentation explaining this and suggesting
using `expand()` explicitly.
2022-10-27 22:31:58 +02:00
Raffaele Mancuso c86371258c docs(usr_05): update sentence about Nvim default behavior of Q (#20817)
While the user guide correctly describes the mapping in Vim, the default
behaviour in NeoVim seems to be the one described here.
2022-10-27 07:43:50 +08:00
NAKAI TsuyoshiandJustin M. Keyes 4573cfa3ad fix(lua): pesc, tbl_islist result types #20751
Problem:
- pesc() returns multiple results, it should return a single result.
- tbl_islist() returns non-boolean in some branches.
- Docstring: @generic must be declared first

Solution:
Constrain docstring annotations.
Fix return types.

Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-10-24 05:53:53 -07:00
ii14 7718241286 docs: ":che" is ":checkhealth" #20147 2022-10-23 04:04:23 -07:00
dundargocandMarco Lehmann 1887d8d7d0 docs: fix typos (#20724)
Co-authored-by: Marco Lehmann <m99@posteo.de>
2022-10-23 09:45:39 +08:00
dundargoc a11e96edfc docs(dev-style): remove rules covered by uncrustify
There's no reason for contributors to learn rules that can be automated
away.
2022-10-21 16:23:33 +02:00