Commit Graph
330 Commits
Author SHA1 Message Date
zeertzjqandMilly 2168d772b8 vim-patch:9.1.0752: can set 'cedit' to an invalid value (#30616)
Problem:  can set cedit to an invalid value
Solution: Check that the value is a valid key name
          (Milly)

closes: vim/vim#15778

https://github.com/vim/vim/commit/25732435c56d762abb260499680939bd8882c708

Co-authored-by: Milly <milly.ca@gmail.com>
2024-10-01 23:39:28 +00:00
Lewis Russell 0fb5299e53 test: refactor exec_lua in xdiff_spec 2024-09-30 11:51:33 +01:00
Lewis Russell c65646c247 fix(diff): use mmfile_t in linematch
Problem:

Linematch used to use strchr to navigate a string, however strchr does
not supoprt embedded NULs.

Solution:

Use `mmfile_t` instead of `char *` in linematch and introduce `strnchr()`.

Also remove heap allocations from `matching_char_iwhite()`

Fixes: #30505
2024-09-30 11:51:33 +01:00
zeertzjqandShougo Matsushita c2fb1fc700 vim-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: vim/vim#15667

https://github.com/vim/vim/commit/6908428560a0d6ae27bf7af6fcb6dc362e31926c

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-09-26 22:15:28 +08:00
Justin M. Keyes ce7017b850 docs: render @see, @note items in _meta/api.lua #30494 2024-09-25 02:34:13 -07:00
3f6bc34e66 docs: lua error patterns #30240
Co-authored-by: Mathias Fussenegger <f.mathias@zignar.net>
Co-authored-by: Ananth Bhaskararaman <antsub@gmail.com>
2024-09-24 04:46:50 -07:00
zeertzjq d831392b15 feat(paste): unify cancel and error behavior (#30476)
Before this PR, the behavior of nvim_paste is:
- When vim.paste() returns false, return false to the client, but treat
  following chunks normally (i.e. rely on the client cancelling the
  paste as expected).
- When vim.paste() throws an error, still return true to the client, but
  drain the following chunks in the stream without calling vim.paste().

There are two problems with such behavior:
- When vim.paste() errors, the client is still supposed to send the
  remaining chunks of the stream, even though they do nothing.
- Having different code paths for two uncommon but similar situations
  complicates maintenance.

This PR makes both the cancel case and the error case return false to
the client and drain the remaining chunks of the stream, which, apart
from sharing the same code path, is beneficial whether the client checks
the return value of nvim_paste or not:
- If the client checks the return value, it can avoid sending the
  following chunks needlessly after an error.
- If the client doesn't check the return value, chunks following a
  cancelled chunk won't be pasted on the server regardless, which leads
  to less confusing behavior.
2024-09-24 07:14:14 +08:00
Justin M. Keyes 737f58e232 refactor(api)!: rename Dictionary => Dict
In the api_info() output:

    :new|put =map(filter(api_info().functions, '!has_key(v:val,''deprecated_since'')'), 'v:val')
    ...

    {'return_type': 'ArrayOf(Integer, 2)', 'name': 'nvim_win_get_position', 'method': v:true, 'parameters': [['Window', 'window']], 'since': 1}

The `ArrayOf(Integer, 2)` return type didn't break clients when we added
it, which is evidence that clients don't use the `return_type` field,
thus renaming Dictionary => Dict in api_info() is not (in practice)
a breaking change.
2024-09-23 14:42:57 +02:00
Evgeni Chasnovski 29bceb4f75 docs(api): nvim_get_runtime_file preserves 'runtimepath' order #30454 2024-09-22 03:51:22 -07:00
zeertzjq 7dbbaaec3f refactor!: rename 'jumpoptions' flag "unload" to "clean" (#30418)
Follow-up to #29347
2024-09-19 18:05:27 +08:00
glepnir a0d8c2b86e docs(eval): update param types of prompt-buffer functions (#30392) 2024-09-16 18:33:35 +08:00
Gregory Anders 98ba65b8be fix: replace NVIM with Nvim in default titlestring (#30348) 2024-09-11 20:32:08 +00:00
zeertzjqandChristian Brabandt 4b98d38870 vim-patch:d657d3d: runtime(doc): clarify the effect of the timeout for search()-functions (#30337)
related: vim/vim#15657
related: vim/vim#15404

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

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-09-11 06:09:58 +08:00
zeertzjq 3d1110674e vim-patch:9.1.0720: Wrong breakindentopt=list:-1 with multibyte or TABs (#30293)
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: vim/vim#15634
closes: vim/vim#15635

https://github.com/vim/vim/commit/61a6ac4d0066317131528f1b3ecc3b3a2599a75c
2024-09-07 10:50:52 +00:00
Justin M. Keyes 61e9137394 docs: misc #28970 2024-09-01 13:01:24 -07:00
Gregory Anders 318c0415d5 fix(ui): correctly pass metadata to get_node_text #30222
Fixes: #30220
2024-09-01 10:15:02 -07:00
bfredl cfdf68a7ac feat(mbyte): support extended grapheme clusters including more emoji
Use the grapheme break algorithm from utf8proc to support grapheme
clusters from recent unicode versions.

Handle variant selector VS16 turning some codepoints into double-width
emoji. This means we need to use ptr2cells rather than char2cells when
possible.
2024-08-30 11:49:09 +02:00
glepnir 6c2186a998 docs(eval): fix wrong return type of getcharsearch() (#30176) 2024-08-29 18:02:23 +08:00
cd05a72fec docs: misc (#29719)
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: Lauri Heiskanen <lauri.heiskanen@nimble.fi>
Co-authored-by: Piotr Doroszewski <5605596+Doroszewski@users.noreply.github.com>
Co-authored-by: Tobiasz Laskowski <tobil4sk@outlook.com>
Co-authored-by: ariel-lindemann <41641978+ariel-lindemann@users.noreply.github.com>
Co-authored-by: glepnir <glephunter@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-08-29 06:11:32 +08:00
JonnyKong b8135a76b7 fix(docs): wrong return value annotation for nvim_buf_get_extmarks 2024-08-25 08:36:00 +01:00
Maria José Solano a901fb875f fix(docs): add missing properties to hl_info #30032 2024-08-16 08:36:23 -07:00
Lewis Russell 9b5ab66678 test(lsp): refactor and tidy
- Merge all the top level 'LSP' describe blocks
- Refactor text edit tests
- Fix typing errors
- Add linebreaks between tests
2024-08-11 15:14:14 +01:00
Christian Clason 8df6736ca1 feat(term): enable reflow by default (#21124)
Problem: Contents of terminal buffer are not reflown when Nvim is
resized.

Solution: Enable reflow in libvterm by default. Now that libvterm is
vendored, also fix "TUI rapid resize" test failures there.

Note: Neovim's scrollback buffer does not support reflow (yet), so lines
vanishing into the buffer due to a too small window will be restored
without reflow.
2024-08-10 10:26:07 +02:00
zeertzjq e01ccda1be vim-patch:0cc5dce: 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: vim/vim#15451

https://github.com/vim/vim/commit/0cc5dce5780d39fe621f6146d4fb862318918125
2024-08-09 07:21:59 +08:00
zeertzjqandLemonBoy 37952bf7b4 vim-patch:8.2.4838: checking for absolute path is not trivial (#29990)
Problem:    Checking for absolute path is not trivial.
Solution:   Add isabsolutepath(). (closes vim/vim#10303)

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

vim-patch:8a3b805c6c9c

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-08-06 21:19:12 +08:00
zeertzjqandShougo Matsushita 28fbba2092 vim-patch:9.1.0465: missing filecopy() function (#29989)
Problem:  missing filecopy() function
Solution: implement filecopy() Vim script function
          (Shougo Matsushita)

closes: vim/vim#12346

https://github.com/vim/vim/commit/60c8743ab6c90e402e6ed49d27455ef7e5698abe

Co-authored-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
2024-08-06 12:49:59 +00:00
zeertzjqandBram Moolenaar 582bf4f1e1 vim-patch:9.0.0634: evaluating "expr" options has more overhead than needed
Problem:    Evaluating "expr" options has more overhead than needed.
Solution:   Use call_simple_func() for 'foldtext', 'includeexpr', 'printexpr',
            "expr" of 'spellsuggest', 'diffexpr', 'patchexpr', 'balloonexpr',
            'formatexpr', 'indentexpr' and 'charconvert'.

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

vim-patch:9.0.0635: build error and compiler warnings

Problem:    Build error and compiler warnings.
Solution:   Add missing change.  Add type casts.

https://github.com/vim/vim/commit/3292a229402c9892f5ab90645fbfe2b1db342f5b

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-08-02 11:56:51 +08:00
zeertzjqandBram Moolenaar 2b4049719a vim-patch:partial:f10911e: Update runtime files (#29936)
https://github.com/vim/vim/commit/f10911e5db16f1fe6ab519c5d091ad0c1df0d063

Also cherry-pick E1142 and E1156 tags from Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2024-08-01 03:50:38 +00:00
zeertzjqandYegappan Lakshmanan 0af056ebce vim-patch:49cdd62: runtime(doc): list of new/changed features in version9.txt
closes: vim/vim#13753

https://github.com/vim/vim/commit/49cdd629a39d7e40e7349e65cb177e2442871a04

Co-authored-by: Yegappan Lakshmanan <yegappan@yahoo.com>
2024-07-30 12:18:44 +08:00
zeertzjqandh-east fe5030c05e vim-patch:partial:52e7cc2: runtime(doc): tweak documentation style a bit (#29897)
closes: vim/vim#15371

https://github.com/vim/vim/commit/52e7cc26d81c61fff1b2e3b32e8b9b04347be1d3

Co-authored-by: h-east <h.east.727@gmail.com>
2024-07-29 00:02:31 +00:00
zeertzjq f73904f9d6 vim-patch:eb6d733: runtime(doc): fix more inconsistencies in assert function docs (#29796)
related: https://github.com/vim/vim/pull/15280#issuecomment-2233771449

closes: vim/vim#15285

https://github.com/vim/vim/commit/eb6d733bef312a0634770e023e8a41f0347f1503
2024-07-19 04:12:13 +00:00
zeertzjqandShane Harper 18f1a3aaa5 vim-patch:c1b3984: runtime(doc): minor updates. (#29778)
closes: vim/vim#15280

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

Co-authored-by: Shane Harper <shane@shaneharper.net>
2024-07-18 08:08:56 +08:00
zeertzjqandDominique Pellé c2b51e6c41 vim-patch:df62c62: runtime(doc): grammar fixes in options.txt (#29729)
closes: vim/vim#15265

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

Co-authored-by: Dominique Pellé <dominique.pelle@gmail.com>
2024-07-15 22:24:02 +00:00
Maria José Solano 8703e7bd12 docs(lpeg): merge upstream changes 2024-07-15 21:16:29 +01:00
04c158fbec docs: misc (#29622)
Co-authored-by: Christian Clason <c.clason@uni-graz.at>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-07-15 06:54:45 +08:00
zeertzjqandLemonBoy b1aa8f5eb8 vim-patch:9.1.0572: cannot specify tab page closing behaviour (#29682)
Problem:  cannot specify tab page closing behaviour
          (Gianluca Pacchiella)
Solution: Add the 'tabclose' option (LemonBoy).

fixes: vim/vim#5967
closes: vim/vim#15204

https://github.com/vim/vim/commit/5247b0b92e191a046b034171a3b34031e317735f

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-13 08:56:58 +08:00
zeertzjqandLemonBoy 83f42aa450 vim-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 vim/vim#374
closes: vim/vim#15205

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

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-12 07:39:36 +08:00
zeertzjqandLemonBoy 545aafbeb8 vim-patch:9.1.0547: No way to get the arity of a Vim function (#29638)
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: vim/vim#15097
closes: vim/vim#15109

https://github.com/vim/vim/commit/48b7d05a4f88c4326bd5d7a73a523f2d953b3e51

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-10 08:07:16 +08:00
zeertzjq 435ce99213 vim-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: vim/vim#15169

https://github.com/vim/vim/commit/fc3f5dba52099d82ccc8bfe309d58a6fac01373d
2024-07-08 06:20:22 +08:00
zeertzjqandLemonBoy 6a886a2511 vim-patch:9.1.0538: not possible to assign priority when defining a sign (#29592)
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: vim/vim#8334
closes: vim/vim#15124

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

Co-authored-by: LemonBoy <thatlemon@gmail.com>
2024-07-07 07:21:14 +08:00
zeertzjqanddistobs 5da9b49b19 vim-patch:9.1.0537: signed number detection for CTRL-X/A can be improved (#29590)
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: vim/vim#15033
closes: vim/vim#15110

https://github.com/vim/vim/commit/25ac6d67d92e0adda53b8d44b81c15031643ca1e

Co-authored-by: distobs <cuppotatocake@gmail.com>
2024-07-07 06:32:54 +08:00
zeertzjq e7020306a1 feat(jumplist): allow opting out of removing unloaded buffers (#29347)
Problem:  Cannot opt out of removing unloaded buffers from the jumplist.
Solution: Only enable that with "unload" flag in 'jumpoptions'.
2024-06-30 06:40:31 +08:00
bfredl bda63d5b97 refactor(typval)!: remove distinction of binary and nonbinary strings
This is a breaking change which will make refactor of typval and shada
code a lot easier. In particular, code that would use or check for
v:msgpack_types.binary in the wild would be broken. This appears to be
rarely used in existing plugins.

Also some cases where v:msgpack_type.string would be used to represent a
binary string of "string" type, we use a BLOB instead, which is
vimscripts native type for binary blobs, and already was used for BIN
formats when necessary.

msgpackdump(msgpackparse(data)) no longer preserves the distinction
of BIN and STR strings. This is very common behavior for
language-specific msgpack bindings. Nvim uses msgpack as a tool to
serialize its data. Nvim is not a tool to bit-perfectly manipulate
arbitrary msgpack data out in the wild.

The changed tests should indicate how behavior changes in various edge
cases.
2024-06-27 11:04:04 +02:00
zeertzjq 7746c54e10 Merge pull request #29357 from luukvbaal/statuscol
feat(column)!: rework 'statuscolumn' %r/l items
2024-06-17 06:33:15 +08:00
Luuk van Baal ad70c9892d feat(column)!: rework 'statuscolumn' %r/l items
Problem:  A custom 'statuscolumn' needs to check a bunch of options and
          placed signs to replicate the default number column.
Solution: Rework %l item to include the necessary logic to mimic the
          default number column. Remove now redundant %r item.
2024-06-16 19:04:34 +02:00
zeertzjq 7e65f3757b docs: document 'list' behavior when 'listchars' excludes "tab" (#29360) 2024-06-16 06:08:36 +08:00
6e28589e00 docs: misc (#29229)
Co-authored-by: Ilia Choly <ilia.choly@gmail.com>
Co-authored-by: Jose Pedro Oliveira <jose.p.oliveira.oss@gmail.com>
Co-authored-by: Maria José Solano <majosolano99@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2024-06-15 07:04:27 +08:00
zeertzjqandChristian Brabandt b969e3e0b9 vim-patch:c509c00: runtime(doc): fix wrong helptag for :defer
https://github.com/vim/vim/commit/c509c009bbc07eff678a9239a5813398e180f019

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-15 06:09:11 +08:00
zeertzjqandChristian Brabandt f557a985ef vim-patch:d6d4e13: runtime(doc): rewrite mkdir() doc and simplify {flags} meaning
related: vim/vim#14991

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

Co-authored-by: Christian Brabandt <cb@256bit.org>
2024-06-15 06:05:33 +08:00
zeertzjq 6ba1521687 vim-patch:d353d27: runtime(doc): restore description of "$" in col() and virtcol() (vim/vim#14981)
These are different from line() and getpos().

https://github.com/vim/vim/commit/d353d2782032b91498601afefee4256592f48074
2024-06-14 04:49:21 +08:00