Commit Graph
12237 Commits
Author SHA1 Message Date
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 bf9e8a9df9 Merge pull request #16546 from zeertzjq/vim-8.1.1797
vim-patch:8.1.{1797,1798}: the vgetorpeek() function is too long
2021-12-07 00:15:04 -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
Volodymyr Kot 67d3c98dac vim-patch:8.1.2104: the normal.c file is too big (#16389)
Problem:    The normal.c file is too big.
Solution:   Move do_pending_operator() to ops.c. (Yegappan Lakshmanan,
            closes vim/vim#4999).
https://github.com/vim/vim/commit/792cf5e1bec04c6d6d70cfbb9ef24c798b469731
2021-12-06 21:45:30 -05:00
zeertzjq afdd9c19aa refactor: fix indent in decode.c (#16543) 2021-12-06 21:23:52 -05:00
zeertzjq 296eb7203c vim-patch:8.1.1798: warning for unused variable in tiny version
Problem:    Warning for unused variable in tiny version. (Tony Mechelynck)
Solution:   Move inside #ifdef.  Reformat code.
https://github.com/vim/vim/commit/eda35f7127c6ac51573eda808687f6369c31ee2d
2021-12-07 06:47:33 +08:00
zeertzjq 95a5912158 vim-patch:8.1.1797: the vgetorpeek() function is too long
Problem:    The vgetorpeek() function is too long.
Solution:   Split off the part that handles mappings, with fix.
https://github.com/vim/vim/commit/edd680f3649c47d7ed5818e356e7c47f874f5cf8
2021-12-07 06:47:33 +08:00
Jan Edmund Lazo 523f03b506 lint (#16526) 2021-12-05 23:33:22 -05:00
Gregory Anders 71ac00ccb5 feat(api): add nvim_get_option_value 2021-12-04 14:04:23 -07:00
Björn Linse 76af219e3e Merge pull request #16411 from dundargoc/refactor/upgrade-uncrustify
refactor: upgrade uncrustify config version to 0.74.0
2021-12-04 12:31:42 +01:00
Christian Clason 2ccf6567b7 vim-patch:8.2.3730: "/etc/Muttrc.d/README" gets filetype muttrc (#16515)
Problem:    "/etc/Muttrc.d/README" gets filetype muttrc.
Solution:   Move the Muttrc.d pattern down, add exception for *.rc files.
https://github.com/vim/vim/commit/800b01b0c8a5983e23d8caa2be6c73d195448193
2021-12-04 12:26:37 +01:00
Christian Clason 419e0d117d vim-patch:8.2.3729: no support for squirrels (#16513)
Problem:    No support for squirrels. (closes vim/vim#9259)
Solution:   Recognize nuts.
https://github.com/vim/vim/commit/6f42cb6e5159b323814a53bbc82def4f2cfb17ad
2021-12-03 19:51:30 +01:00
Christian Clason e225397bcb vim-patch:8.2.3726: README file in a config directory gets wrong filetype (#16507)
Problem:    README file in a config directory gets wrong filetype.
Solution:   Match README before patterns that match everything in a directory.
https://github.com/vim/vim/commit/c903695be54189fd7199121e9cd669e722fbc9c2
2021-12-03 13:19:17 +01:00
Jan Edmund Lazo 828bf128a6 Merge pull request #15840 from vimpostor/vim-8.2.3430
vim-patch:8.2.{3430,3434,3462,3463,3555,3609,3610}: ModeChanged autocmd
2021-11-30 22:13:50 -05:00
Jan Edmund Lazo 2635b77dba Merge pull request #16420 from seandewar/vim-8.1.2136
vim-patch:8.1.2136,8.2.2465
2021-11-30 21:39:22 -05:00
zeertzjq 36565c9da2 vim-patch:8.2.2350: using "void" for no reason (#16410)
Problem:    Using "void" for no reason.
Solution:   Use "char *".
https://github.com/vim/vim/commit/033135eb8eccd00c9ee72c6c0cf4b8b9f81bd269
2021-11-30 21:34:33 -05:00
Jan Edmund Lazo 8ae7dabc10 Merge pull request #16381 from VVKot/vim-8.1.0228
vim-patch:8.1.0228, 8.1.1384, 8.1.1386, 8.1.1393, 8.2.3040
2021-11-30 21:21:36 -05:00
zeertzjq caf41a7ac9 vim-patch:8.2.3703: most people call F# "fsharp" and not "fs" (#16469)
Problem:    Most people call F# "fsharp" and not "fs".
Solution:   Rename filetype "fs" to "fsharp".
https://github.com/vim/vim/commit/53ba95e4f0a82f6dab1791bb01f6cddc9b3f61b3
2021-11-30 14:51:17 +01:00
Gregory Anders b6e531c1d9 docs(lsp): add annotations for private functions 2021-11-30 09:03:41 +01: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 e4976cbd26 Merge pull request #16452 from clason/vim-8.2.3685
vim-patch:8.2.{3451,3458,3452,3685,3686}: some filetypes are not recognized correctly
2021-11-28 11:57:07 +01:00
Christian Clason 1840c82b42 Merge pull request #16451 from clason/vim-8.2.3684
vim-patch:8.2.{3684,3687}: blockwise insert does not handle autoindent properly
2021-11-28 11:47:07 +01:00
Christian Clason 2f8ed7b822 vim-patch:8.2.3687: blockwise insert does not handle autoindent properly
Problem:    Blockwise insert does not handle autoindent properly when tab is
            inserted.
Solution:   Adjust text column for indent before computing column.
            (closes vim/vim#9229)
https://github.com/vim/vim/commit/59f4f9505ae7ca2499904b94100db103e5ada5a6
2021-11-28 00:47:14 +01:00
Christian Clason ea5699399e vim-patch:8.2.3686: filetype detection often mixes up Forth and F#
Problem:    Filetype detection often mixes up Forth and F#.
Solution:   Add a function to inspect the file contents. (Doug Kearns)
https://github.com/vim/vim/commit/3d14c0f2b964195d08b34bb43f89ec5f99255194
2021-11-27 19:21:57 +01:00
+3 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
Christian Clason b339cb5aca vim-patch:8.2.3451: not all apache files are recognized
Problem:    Not all apache files are recognized.
Solution:   Adjust the filetype pattern. (Zdenek Dohnal, closes vim/vim#8882)
https://github.com/vim/vim/commit/770ddbe1595f6dab836304203d5ca2e0b069266f
2021-11-27 16:26:33 +01:00
Christian Clason 47ad1a3584 vim-patch:8.2.3458: not all dictdconf files are recognized
Problem:    Not all dictdconf files are recognized.
Solution:   Adjust the pattern. (Doug Kearns)
https://github.com/vim/vim/commit/be01090efad242e30728275dea05420db6f96257
2021-11-27 16:26:20 +01:00
Christian Clason b156ffedb6 vim-patch:8.2.3685: Visual studio project files are not recognized
Problem:    Visual studio project files are not recognized.
Solution:   Use the xml file type. (Doug Kearns)
https://github.com/vim/vim/commit/c07f11e42fc2eac5e750bf05aa3030f9b02a22ca
2021-11-27 16:23:19 +01:00
Michael Lingelbach 512ec4632f fix: allow str_utfindex second argument to be an explicit nil (#16448)
* str_utfindex checks number of arguments only, but ignores the case in
  which the second argument is an explicit nil. Previously this required
  dropping the second argument entirely.
* Modify the C binding to explicitly check if the second argument is nil
2021-11-27 10:07:58 -05:00
Christian Clason a8dd1ea011 vim-patch:8.2.3684: blockwise insert does not handle autoindent properly
Problem:    Blockwise insert does not handle autoindent properly.
Solution:   Adjust text column for indent. (closes vim/vim#9229)
https://github.com/vim/vim/commit/e9b0b40b7978f683977922233b42dd439ef31920
2021-11-27 14:55:40 +01:00
Sean Dewar 6e3e8c51c0 test(oldtest): uncomment method call syntax uses
We should now be equal with Vim in regards to method call support of already ported built-ins.

Enable all relevant commented-out uses of the syntax in tests that I could grep.
2021-11-26 18:53:12 +00: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:
   https://github.com/vim/vim/commit/5b8cabfef7c3707f3e53e13844d90e5a217e1e84
 - buffer_name, buffer_number: (obsolete)
   https://github.com/vim/vim/commit/a8eee21e75324d199acb1663cb5009e03014a13a
 - charidx:
   https://github.com/vim/vim/commit/17793ef23aae0bc94539390ccfe5e63b0ad39ff2
 - flatten:
   https://github.com/vim/vim/commit/077a1e670ad69ef4cefc22103ca6635bd269e764
 - prompt_getprompt:
   https://github.com/vim/vim/commit/077cc7aa0e0c431e97795612374fe17fe7c88803
 - searchcount:
   https://github.com/vim/vim/commit/e8f5ec0d30b629d7166f0ad03434065d8bc822df
 - strptime:
   https://github.com/vim/vim/commit/10455d43fef041309ce0613fa792c635dd71e3a8
 - win_gettype:
   https://github.com/vim/vim/commit/00f3b4e007af07870168bf044cecc9d544483953
 - win_splitmove:
   https://github.com/vim/vim/commit/d20dcb3d011da6111153109f6e46fbd5c7fe9fb6

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 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)
https://github.com/vim/vim/commit/6434fc574dfbde11461e70e5a62712370edf38e6
2021-11-26 18:53:12 +00:00
Sean Dewar 2c185a18cd vim-patch:8.2.1168: wrong method argument for appendbufline()
Problem:    Wrong method argument for appendbufline().
Solution:   Use FEARG_3.
https://github.com/vim/vim/commit/92053ce59ecf93838f4d6e3019eef1bc47be4184

Cherry-pick base change for append (and appendbufline) from v8.2.1167.
These changes have no visible impact, but helps us sync with Vim.

Like Vim, BASE_LAST is now unused after this commit.
Keep it anyway in case it sees use in the future.
Comment-out LAST definition in eval.lua to appease linter.
2021-11-26 18:53:11 +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)
https://github.com/vim/vim/commit/f17e7ea67a798d0aa45ce24ea80c9e21d5164326

The rest of this patch was ported in:
https://github.com/neovim/neovim/commit/a1ed941a7881122fda2fd48e71e890ed55e4d08e
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)
https://github.com/vim/vim/commit/7035fd9d909c49cf5105a53753c1772c193d05b8
2021-11-26 18:53:11 +00:00
Sean Dewar f37f08314d vim-patch:8.1.2166: rubyeval() not tested as a method
Problem:    Rubyeval() not tested as a method.
Solution:   Change a test case.
https://github.com/vim/vim/commit/4a4981b7cd57b0b2289ed4f9d621ef4d90d767f0
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.
https://github.com/vim/vim/commit/f92e58cadb03156879e9bdbf6341bf662d9c87cc

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)
https://github.com/vim/vim/commit/3849992b16011e36a5cb5be4b127f843389b96fd

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:
https://github.com/vim/vim/commit/68e6560b84f196c82e27a72669684d5506a3a837

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.
https://github.com/vim/vim/commit/ce90e36f5969e733a0a919f1736453332c33aad6

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.
https://github.com/vim/vim/commit/f6ed61e1489e40eada55a4f1782e1ed82bcad7d9

+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.
https://github.com/vim/vim/commit/aad222c9c9a1e4fe6ae5a1fe95bb084619be0e65

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

Cherry-pick eval.txt changes for:
- bufadd from v8.1.1626:
  https://github.com/vim/vim/commit/5ca1ac373ae62b37152cb6f85916b402eda520a5
- setloclist and setqflist headers from:
  https://github.com/vim/vim/commit/b0d45e7f5354375edd02afafde3bd37dac1515ff

Correct eval.txt typo for settabwinvar method call (matches latest Vim).
2021-11-26 18:52:58 +00:00
Sean Dewar aad25ae4fc vim-patch:8.1.1995: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make sign functions usable as a method.
https://github.com/vim/vim/commit/93476fd6343ef40d088e064289cc279659d03953

Make sign_placelist and sign_unplacelist accept exactly one argument.
Before, they erroneously accepted one or more arguments.
2021-11-26 18:33:59 +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.
https://github.com/vim/vim/commit/196b4664432f932625cfb6371dc42c24efe6c203

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
Sean Dewar fa9076f276 vim-patch:8.1.1925: more functions can be used as methods
Problem:    More functions can be used as methods.
Solution:   Make various functions usable as a method.
https://github.com/vim/vim/commit/4c313b13fb7bfa694ec6d2a13175e8650c007b2a

The rest of this patch was ported in
https://github.com/neovim/neovim/commit/3137c7d63574a86ddc44f11c839e8e58c2994bf9

N/A patches for version.c:

vim-patch:8.1.2012: more functions can be used as methods

Problem:    More functions can be used as methods.
Solution:   Make terminal functions usable as a method.  Fix term_getattr().
https://github.com/vim/vim/commit/7ee80f766130f22598c928415c92ec612a8f18cf

vim-patch:8.2.3576: some functions are not documented for use with a method

Problem:    Some functions are not documented for use with a method.
Solution:   Add examples.  Fix that sign_unplacelist() only takes one
            argument. (Sean Dewar, closes vim/vim#9081)
https://github.com/vim/vim/commit/a63780b9770699bf8fda93affeab2c728bc76912

Addressed in the port of v8.1.1995.
2021-11-26 18:33:58 +00:00
Christian Clason afbf89dc01 vim-patch:8.2.3679: objc file detected as Octave (#16446)
Problem:    objc file detected as Octave. (Antony Lee)
Solution:   Detect objc by preprocessor lines. (Doug Kearns, closes vim/vim#9223,
            closes vim/vim#9220)
https://github.com/vim/vim/commit/7329cfab36356c48edab7ed68f6244eb9e20a5b1
2021-11-26 17:34:45 +01:00
Christian Clason a31e7523f4 vim-patch:8.2.3677: after a put the '] mark is on the last byte (#16442)
Problem:    After a put the '] mark is on the last byte of a multi-byte
            character.
Solution:   Move it to the first byte. (closes vim/vim#9047)
https://github.com/vim/vim/commit/4d07253a485819b3a9fd923d263e722ea2109c12
2021-11-26 12:16:04 +01:00
Mathias Fußenegger 72d62aa6aa chore(docs): clarify vim.notify log_level parameter (#16436) 2021-11-25 20:06:42 +01:00
Gregory Anders 150a5922aa feat(diagnostic)!: make DiagnosticChanged a first class autocmd (#16098)
This allows users to hook into diagnostic events with finer granularity
(e.g. per-buffer or file).

BREAKING CHANGE: DiagnosticsChanged and LspDiagnosticsChanged user
autocommands are removed.
2021-11-25 11:55:11 -07:00
Sean Dewar dac52e6d04 vim-patch:8.2.2465: using freed memory in :psearch
Problem:    Using freed memory in :psearch. (houyunsong)
Solution:   Check the current window is still valid.  Fix flaky test.
https://github.com/vim/vim/commit/92bb83e41ca42d0d00d21753810d92485c808a50

Test_cursorhold_insert timer's 100ms delay was already LoadAdjusted, but change
to 200ms (still LoadAdjust) to match Vim anyway.
2021-11-24 05:34:20 +00:00