Commit Graph

768 Commits

Author SHA1 Message Date
Gregory Anders
9e1ee9fb1d
refactor!: delete insertmode (#18547)
Neovim already removed `evim` (or any similar flags). The 'insertmode'
option is a weird remnant, so get rid of it.

The 'insertmode' option is replaced with a script that closely emulates
the option. This script is documented at :help 'insertmode'
2022-05-22 21:20:18 -06:00
Christian Clason
eb4b337d9e
vim-patch:partial:3f32a5f1601a (#18555)
Update runtime files and translations
3f32a5f160

skip eval.txt (requires 8.2.4883)
2022-05-13 15:20:58 +02:00
Sean Dewar
0d3f17a6c3
vim-patch:partial:d899e5112079 (#18474)
Update runtime files
d899e51120

- Skip vimhelp.vim stuff (syntax/help.vim, syntax.txt; v8.2.4891).
- Skip :let heredoc eval stuff (eval.txt; v8.2.4770).
- Skip uk.cp1251.po.
- Skip `*hl-CurSearch*` change (syntax.txt):
  - Vim's CurSearch works differently (Nvim's uses current cursor pos).
    Dunno know how applicable the redrawing comment is to Nvim...
  - Might be preferred to move it under `*hl-Search*` like Vim?
2022-05-08 10:15:36 +01:00
Justin M. Keyes
4fb48c5654
feat(server): set $NVIM, unset $NVIM_LISTEN_ADDRESS #11009
PROBLEM
------------------------------------------------------------------------
$NVIM_LISTEN_ADDRESS has conflicting purposes as both a parameter ("the
current process should listen on this address") and a descriptor ("the
current process is a child of this address").

This contradiction means the presence of NVIM_LISTEN_ADDRESS is
ambiguous, so child Nvim always tries to listen on its _parent's_
socket. This is the cause of lots of  "Failed to start server" spam in
our test/CI logs:

    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-4480-0
    WARN  2022-04-30… server_start:154: Failed to start server: address already in use: \\.\pipe\nvim-2168-0

SOLUTION
------------------------------------------------------------------------

1. Set $NVIM to the parent v:servername, *only* in child processes.
   - Now the correct way to detect a "parent" Nvim is to check for $NVIM.
2. Do NOT set $NVIM_LISTEN_ADDRESS in child processes.
3. On startup if $NVIM_LISTEN_ADDRESS exists, unset it immediately after
   server init.
4. Open a channel to parent automatically, expose it as v:parent.

Fixes #3118
Fixes #6764
Fixes #9336
Ref https://github.com/neovim/neovim/pull/8247#issuecomment-380275696
Ref #8696
2022-05-03 06:08:35 -07:00
zeertzjq
d531ef6813 vim-patch:8.2.0867: using \{xxx} for encoding a modifier is not nice
Problem:    Using \{xxx} for encoding a modifier is not nice.
Solution:   Use \<*xxx> instead, since it's the same as \<xxx> but producing a
            different code.
fccd93f091

Use this notation in langmap_spec.
2022-04-29 15:51:04 +08:00
zeertzjq
abe91e1efe vim-patch:8.2.0855: GUI tests fail because the test doesn't use a modifier
Problem:    GUI tests fail because the test doesn't use a modifier.
Solution:   Add "\{xxx}" to be able to encode a modifier.
ebe9d34aa0

Change macros to enums to use them in unit tests.
2022-04-29 15:51:04 +08:00
Christian Clason
0124a7bfa9
vim-patch:75ab590f8504 (#18170)
Update runtime files
75ab590f85

omit builtin.txt change to `expand()` (depends on 8.2.4726)
2022-04-19 15:14:17 +02:00
Sean Dewar
012c055804
vim-patch:partial:cbaff5e06ec5 (#18044)
Update runtime files
cbaff5e06e

Docs only.

Omit json_encode (different impl, Nvim throws E474 instead; see v8.2.4695).
Skip <MouseMove> (Nvim *kinda* has <MouseMove>, but most of this doc needs
  v8.2.4674 anyway...).
Nvim's 'hidden' doc was reworded somewhat, so manually integrate the changes
  (8331cd13c4).
Also apply "comma-separated" changes to all possible places in options.txt.
Cherry-pick *highlight-clear* tag from v8.2.3578.
2022-04-08 22:40:56 +02:00
Jan Edmund Lazo
163ec00f44 vim-patch:8.1.1015: quickfix buffer shows up in list, can't get buffer number
Problem:    Quickfix buffer shows up in list, can't get buffer number.
Solution:   Make the quickfix buffer unlisted when the quickfix window is
            closed.  get the quickfix buffer number with getqflist().
            (Yegappan Lakshmanan, closes vim/vim#4113)
647e24ba3d
2022-03-13 13:17:28 +08:00
Sean Dewar
b743e415fe
vim-patch:partial 1588bc8ebee2 (#17657)
Update runtime files
1588bc8ebe

docs only

skip :argdedupe changes (need v8.2.3888)
skip sound_playfile changes (need +sound)
skip fuzzy-matching changes in *command-attributes* (need #17536)
2022-03-09 08:44:28 +01:00
Christian Clason
9d3370a144
vim-patch:c51cf0329809 (#17530)
Update runtime files.
c51cf03298
2022-02-27 11:56:30 +01:00
zeertzjq
5220891571 vim-patch:8.2.4343: when reloading not all properties are detected
Problem:    When reloading not all properties are detected.
Solution:   Add the "edit" value to v:fcs_choice. (Rob Pilling, closes vim/vim#9579)
8196e94a8b

Cherry-pick some test changes from patch 8.1.1826.
2022-02-14 11:35:25 +08:00
Sean Dewar
28d5face21
Merge pull request #16862 from seandewar/vim-8.2.2658
vim-patch:8.2.{2658,2661,2736}: for loop over strings
2022-02-06 00:02:30 +00:00
zeertzjq
6ab71683d1 vim-patch:8.2.2324: not easy to get mark en cursor posotion by character count
Problem:    Not easy to get mark en cursor posotion by character count.
Solution:   Add functions that use character index. (Yegappan Lakshmanan,
            closes vim/vim#7648)
6f02b00bb0
2022-02-06 04:46:16 +08:00
Sean Dewar
7002a3433b
vim-patch:8.2.2658: :for cannot loop over a string
Problem:    :for cannot loop over a string.
Solution:   Accept a string argument and iterate over its characters.
74e54fcb44

v8.2.2659 is already ported.

N/A patches for version.c:

vim-patch:8.2.2736: Vim9: for loop over string is a bit slow

Problem:    Vim9: for loop over string is a bit slow.
Solution:   Avoid using strlen().
175a41c13f
2022-02-05 19:55:11 +00:00
zeertzjq
f25ab39faa vim-patch:8.1.0846: not easy to recognize the system Vim runs on
Problem:    Not easy to recognize the system Vim runs on.
Solution:   Add more items to the features list. (Ozaki Kiichi, closes vim/vim#3855)
39536dd557

Some doc changes have already been applied. Some others are N/A.
"moon" was removed in patch 8.2.0427 so I did not add it.
2022-02-04 09:23:54 +08:00
dundargoc
4a96e7809f
chore: typo fixes (#16921)
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
2022-01-29 23:15:22 +00:00
Daniel Steinberg
a94632d212 vim-patch:8.2.3917: the eval.txt help file is way too big
Problem:    The eval.txt help file is way too big.
Solution:   Move the builtin function details to a separate file.
1cae5a0a03

Note: Neovim-specific references to |functions| were changed to
|builtin-functions|. This included updates to:
  1. test/functional/vimscript/functions_spec.lua
  2. test/functional/vimscript/eval_spec.lua
  3. runtime/doc/lua.txt
2022-01-29 15:19:29 -05:00
Björn Linse
baec0d3152 feat(provider)!: remove support for python2 and python3.[3-5]
These versions of python has reached End-of-life. getting rid
of python2 support removes a lot of logic to support two
incompatible python versions in the same version.
2022-01-29 19:49:37 +01:00
Daniel Steinberg
6dcdec8042
vim-patch:8.2.4052: not easy to resize a window from a plugin (#17028) 2022-01-29 20:37:07 +08:00
Christian Clason
e866da12ee
vim-patch:2f0936cb9a2e (#17007)
* vim-patch:2f0936cb9a2e

Update runtime files
2f0936cb9a
2022-01-11 14:14:17 +01:00
dundargoc
08616571f4
chore: fix typos (#16506)
Co-authored-by: Gregory Anders <8965202+gpanders@users.noreply.github.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Christoph Hasse <hassec@users.noreply.github.com>
Co-authored-by: Alef Pereira <ealefpereira@gmail.com>
Co-authored-by: AusCyber <willp@outlook.com.au>
Co-authored-by: kylo252 <59826753+kylo252@users.noreply.github.com>
2021-12-28 18:15:16 +01:00
Christian Clason
8c720f6b9d
vim-patch:partial fa3b72348d88 (#16780)
Update runtime files
fa3b72348d

omit
doc/eval.txt (needs 8.2.3864)
doc/map.txt (needs 8.2.3619)
menu.vim (needs 8.2.0413)
2021-12-26 11:03:25 +01:00
zeertzjq
ccc4d83507 vim-patch:partial:6c391a74fe90
Update runtime files
6c391a74fe
2021-12-25 08:36:32 +08:00
zeertzjq
7fa8411d8b vim-patch:partial:6aa57295cfbe
Update runtime files
6aa57295cf
2021-12-25 08:32:58 +08:00
zeertzjq
8eff0ca6d5 vim-patch:8.2.2468: not easy to get the full command name from a shortened one
Problem:    Not easy to get the full command name from a shortened one.
Solution:   Add fullcommand(). (Martin Tournoij, closes vim/vim#7777)
038e09ee76
2021-12-25 07:42:06 +08:00
Thomas Vigouroux
684c782546 docs(autocmd): update docs to match implementation
docs(reg_recorded): add links to relevant docs

docs(Recording): update docs to match implementation

docs(Q) update references of Q to be gQ

docs(autocmd) add description about state of reg_record{ing,ed} for RecordingLeave

docs(vim_diff) add Recording{Enter,Leave} to features

docs(index) removed duplicate gQ

docs(options) removed line about gQ erroring in visual mode

Update runtime/doc/vim_diff.txt

Co-authored-by: zeertzjq <zeertzjq@outlook.com>

docs(vim_diff) removed double mention of Q
2021-12-18 08:54:07 -07:00
Thomas Vigouroux
8a4e26c6fe feat(autocmd): add Recording autocmds
feat(eval): add reg_recorded()

This function is used the get the last recorded register.

style(Recording): rename handler to match suggestions

fix(RecordingLeave): send autocommand earlier

This makes the autocommand fire just before setting reg_recorded to
reg_recording, this way we clearly show that we are actually just before
actually quitting the recording mode.
2021-12-18 10:54:26 +01:00
Jan Edmund Lazo
afaad8b54e
Merge pull request #16194 from seandewar/vim-8.1.1925
vim-patch:7.4.1777,8.1.{1925,1995,2011,2012,2013,2166},8.2.{0532,0871,1168,1241,3576}
2021-12-07 01:14:21 -05:00
Jan Edmund Lazo
18d81a6724
Merge pull request #16107 from zeertzjq/vim-8.1.1542
vim-patch:8.1.1542,8.2.3549: an OptionSet autocommand does not get enough info
2021-12-06 22:35:05 -05:00
ii14
bc1d13bb36 chore: fix typos
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2021-11-30 09:03:41 +01:00
Christian Clason
03d250eb45
vim-patch:6304be625ce4 (#16450)
Update runtime files.
6304be625c

skip doc/sign.txt (needs 8.2.3664)
2021-11-27 19:39:42 +01:00
dundargoc
caa6992a10
chore: fix typos (#16361)
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
Co-authored-by: Brede Yabo Sherling Kristensen <bredeyabo@hotmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: István Donkó <istvan.donko@gmail.com>
Co-authored-by: Julian Berman <Julian@GrayVines.com>
Co-authored-by: bryant <bryant@users.noreply.github.com>
Co-authored-by: Michael Lingelbach <m.j.lbach@gmail.com>
Co-authored-by: nlueb <9465658+nlueb@users.noreply.github.com>
Co-authored-by: Leonhard Saam <leonhard.saam@yahoo.com>
Co-authored-by: Jesse Wertheim <jaawerth@gmail.com>
Co-authored-by: dm1try <me@dmitry.it>
Co-authored-by: Jakub Łuczyński <doubleloop@o2.pl>
Co-authored-by: Louis Lebrault <louis.lebrault@gmail.com>
2021-11-27 11:10:48 -05:00
Sean Dewar
752ca2cb9f
fix(eval/method): add missing method support for existing built-ins
These functions were ported with the vim-patch token, but didn't actually port
the method call support that was in their patches (method call syntax wasn't
ported yet).

Add the missing method call support and latest docs for:
 - assert_nobeep:
   5b8cabfef7
 - buffer_name, buffer_number: (obsolete)
   a8eee21e75
 - charidx:
   17793ef23a
 - flatten:
   077a1e670a
 - prompt_getprompt:
   077cc7aa0e
 - searchcount:
   e8f5ec0d30
 - strptime:
   10455d43fe
 - win_gettype:
   00f3b4e007
 - win_splitmove:
   d20dcb3d01

Also fix assert_beeps, assert_nobeep and getenv to accept exactly one argument.
Previously, they could erroneously accept one or more.
2021-11-26 18:53:12 +00:00
Sean Dewar
7e1a2301ff
docs(eval): cherry-pick runtime update 2e693a88b2
2e693a88b2

Mainly to keep the method call docs up-to-date.
Much of this RT update has already been ported.
2021-11-26 18:53:12 +00:00
Sean Dewar
a0c7fff284
vim-patch:8.2.1241: cannot use getbufinfo() as a method
Problem:    Cannot use getbufinfo() as a method.
Solution:   Support using getbufinfo() as a method. (closes vim/vim#6458)
6434fc574d
2021-11-26 18:53:12 +00:00
Sean Dewar
6bc9af43ce
vim-patch:8.2.0871: cannot use getmarklist() as a method
Problem:    Cannot use getmarklist() as a method.
Solution:   Make getmarklist() work as a method.  Add one to the column
            number to match getpos(). (Yegappan Lakshmanan, closes vim/vim#6176)
f17e7ea67a

The rest of this patch was ported in:
a1ed941a78
2021-11-26 18:53:11 +00:00
Sean Dewar
60f0e18588
vim-patch:8.2.0532: cannot use simplify() as a method
Problem:    Cannot use simplify() as a method.
Solution:   Add FEARG_1. (closes vim/vim#5996)
7035fd9d90
2021-11-26 18:53:11 +00:00
Sean Dewar
2ad92e9476
vim-patch:8.1.2013: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
f92e58cadb

Cherry-pick s:normalize_fname for tolower test from v8.1.0894 and v8.1.1417 (even though it is
unused for now).

Fix header for win_id2tabwin in eval.txt.
2021-11-26 18:53:11 +00:00
Sean Dewar
38a831e54a
vim-patch:7.4.1777
Problem:    Newly added features can escape the sandbox.
Solution:   Add checks for restricted and secure. (Yasuhiro Matsumoto)
3849992b16

timer_start is missing check_secure.

The timer callback can, for example, call a function defined from outside the sandbox that does
stuff that would be disallowed from inside the sandbox. This is usually not allowed.

Cherry-pick eval.txt change from:
68e6560b84

Required for v8.1.2013.
2021-11-26 18:53:10 +00:00
Sean Dewar
39776d1a65
vim-patch:8.1.2011: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.  Make the window
            command test faster.
ce90e36f59

test_* functions in the patch are N/A as they modify internal state.

Include test changes for test_ignore_error and test_feedinput (though they aren't run).
Other changed tests were excluded from previous patches, except test_termcodes.vim, which hasn't
been ported yet.
2021-11-26 18:53:10 +00:00
Sean Dewar
0f4510cb1a
feat(eval/method): partially port v8.1.2004
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
f6ed61e148

+sound is needed for sound_* functions.

Make swapinfo and swapname take exactly one argument.
Previously, they could erroneously take one or more.
2021-11-26 18:53:10 +00:00
Sean Dewar
2ee0bc09d9
feat(eval/method): partially port v8.1.1996
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
aad222c9c9

Partial port as this does not include eval.txt change for listener_add.

Cherry-pick eval.txt changes for:
- bufadd from v8.1.1626:
  5ca1ac373a
- setloclist and setqflist headers from:
  b0d45e7f53

Correct eval.txt typo for settabwinvar method call (matches latest Vim).
2021-11-26 18:52:58 +00:00
Sean Dewar
4efcb72bb7
feat(eval/method): partially port v8.1.1993
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
196b466443

server2client requires +clientserver, which hasn't been ported yet.
The eval.txt docs and test_clientserver.vim tests for server2client already exist, so include those
changes.

test_bufline.vim: Test for setbufline requires v8.1.1189 (which was reverted in #10848).
2021-11-26 18:33:59 +00:00
Christian Clason
e6c46bac3f
vim-patch:88a4205f1cfb (#16399)
Update runtime files
88a4205f1c
2021-11-22 10:53:57 +01:00
zeertzjq
d40db0edbd vim-patch:8.1.1542: an OptionSet autocommand does not get enough info
Problem:    An OptionSet autocommand does not get enough info.
Solution:   Add v:option_command, v:option_oldlocal and v:option_oldglobal.
            (Latrice Wilgus, closes vim/vim#4118)
d7c9687947
2021-11-22 15:50:14 +08:00
zeertzjq
e05db65d2a
vim-patch:8.2.3627: difficult to know where the text starts in a window (#16377)
vim-patch:8.2.3627: difficult to know where the text starts in a window

Problem:    difficult to know where the text starts in a window. (Sergey
            Vlasov)
Solution:   Add the "textoff" entry in the result of getwininfo().
            (closes vim/vim#9163)
cdf5fdb294

Fix indent in Test_getbufwintabinfo().
2021-11-21 21:10:03 -05:00
zeertzjq
3d504f27a0 vim-patch:8.2.3618: getcwd() is unclear about how 'autochdir' is used
Problem:    getcwd() is unclear about how 'autochdir' is used.
Solution:   Update the help for getcwd().  Without any arguments always return
            the actual current directory. (closes vim/vim#9142)
851c7a699a
2021-11-19 20:07:04 +08:00
Christian Clason
c0efe49e78
vim-patch:519cc559b08b (#16340)
Update runtime files
519cc559b0
2021-11-17 10:02:59 +01:00
Christian Clason
8cbe100fcc
vim-patch:partial 113cb513f76d (#16260)
Update runtime files
113cb513f7

skip doc/eval.txt
skip doc/insert.txt
skip doc/user_06.txt (needs 8.2.3562)
partial skip doc/syntax.txt (needs 8.2.3562)
2021-11-08 00:10:44 +01:00