Commit Graph

21367 Commits

Author SHA1 Message Date
76e6b81b23 vim-patch:8.2.3487: illegal memory access if buffer name is very long
Problem:    Illegal memory access if buffer name is very long.
Solution:   Make sure not to go over the end of the buffer.
826bfe4bbd

Adjust the test to use :noswapfile, as Nvim fails to create the swap file on Windows due to the file
name's length (E303).

We don't have this behaviour on Linux as we get "[Permission denied]" from readfile(), so there is
no attempt to create the swap file. However, Vim doesn't try to create the swap file on Windows
either for a different reason: MAXPATHL in Vim for Windows is only 1024 (compared to Nvim's 4096 on
the Windows CI), so readfile() gives "Illegal file name" instead, thus not needing :noswapfile for
both cases.
2022-04-13 21:31:24 +08:00
fc954d0a61 vim-patch:8.2.3486: illegal memory access with invalid sequence of commands
Problem:    Illegal memory access with invalid sequence of commands.
Solution:   Do not call leave_block() when not in a try block. (closes vim/vim#8966)
            Reset did_emsg so that exception is shown as an error.
cce81e9673

Vim9script is N/A, which includes leave_block.
2022-04-13 21:28:05 +08:00
789558d365 vim-patch:8.2.3480: test does not fail without the fix for a crash
Problem:    Test does not fail without the fix for a crash.
Solution:   Write the bad code in a file and source it. (Dominique Pellé,
            closes vim/vim#8961)
949de97da3
2022-04-13 21:27:38 +08:00
5feb8cdbb4 vim-patch:8.2.3478: still crash with error in :catch and also in :finally
Problem:    Still crash with error in :catch and also in :finally.
Solution:   Only call finish_exception() once. (closes vim/vim#8954)
f67d3fb736

Exclude CSF_FUNC_DEF change (Vim9script).
2022-04-13 21:15:24 +08:00
6415051796 refactor(ex_eval): cherry-pick CSF flags changes from v8.2.3099
4197828dc6

Cherry-pick the changes to existing flags values.
Required for v8.2.3478.

That patch mostly relates to Vim9script, but I'm careful not to mark it N/A in
case the flags have some use outside of Vim9 in the future.

Excludes CSF_FUNC_DEF (flag introduced in v8.2.1870 for Vim9's block scopes).
2022-04-13 21:15:24 +08:00
a25c35d6e4 vim-patch:8.2.3470: crash with error in :catch and also in :finally
Problem:    Crash with error in :catch and also in :finally.
Solution:   Only discard an exception if there is one. (closes vim/vim#8954)
a684a68409
2022-04-13 21:15:24 +08:00
93c72d866b vim-patch:8.2.3448: :endtry after function call that throws not found
Problem:    :endtry after function call that throws not found.
Solution:   Do check for following :endtry if an exception is being thrown.
            (closes vim/vim#8889)
1d34189ecb

Nvim obsoleted did_throw; check current_exception is not NULL instead.
2022-04-13 21:15:24 +08:00
b6026337f2 vim-patch:8.2.3416: second error is reported while exception is being thrown
Problem:    Second error is reported while exception is being thrown.
Solution:   Do not check for trailing characters when already aborting.
            (closes vim/vim#8842)
36f691f5f1
2022-04-13 21:15:24 +08:00
4dc09f38ee fix(translation): po file for Ukrainian (#18100) 2022-04-13 10:25:59 +02:00
18152cf6f1 Merge pull request #18092 from zeertzjq/test-termxx-no-pending
test: unskip tests skipped in #14661
2022-04-13 05:29:23 +08:00
bc19ae4e11 test: unskip tests skipped in #14661 2022-04-13 05:04:14 +08:00
4bef2f02e8 Merge pull request #17440 from zeertzjq/vim-8.2.3184
vim-patch:8.2.{3184,3226,3325}: digraph functions
2022-04-12 21:54:01 +08:00
c9d1fcd850 refactor(digraph.c): add more const qualifiers 2022-04-12 21:26:46 +08:00
b69ecacbb4 vim-patch:partial:a2baa73d1d33
Update runtime files.
a2baa73d1d

This only includes changes to docs of digraph functions.
2022-04-12 21:26:46 +08:00
0a813ae291 vim-patch:8.2.3325: digraph test fails when LC_ALL is set to "C"
Problem:    Digraph test fails when LC_ALL is set to "C".
Solution:   When restoring 'encoding' set it to "utf-8". (closes vim/vim#8742)
52eb372a04
2022-04-12 21:26:46 +08:00
3b0bcb8ad0 vim-patch:8.2.3226: new digraph functions use old naming scheme
Problem:    New digraph functions use old naming scheme.
Solution:   Use the digraph_ prefix. (Hirohito Higashi, closes vim/vim#8580)
29b857150c
2022-04-12 21:26:46 +08:00
cbc54cf484 vim-patch:8.2.3184: cannot add a digraph with a leading space
Problem:    Cannot add a digraph with a leading space.  It is not easy to list
            existing digraphs.
Solution:   Add setdigraph(), setdigraphlist(), getdigraph() and
            getdigraphlist(). (closes vim/vim#8580)
6106504e9e

Use GA_APPEND_VIA_PTR in registerdigraph().
Use tv_list_append_*() in getdigraphlist_appendpair().
Put the error messages in digraph.c.
E196 is N/A.
Remove mentions about 'encoding' being non-Unicode.
Nvim doesn't support setting encoding=japan, so skip a test.
2022-04-12 21:26:30 +08:00
7e1e906738 vim-patch:8.2.4739: accessing freed memory after WinScrolled autocmd event (#18090)
Problem:    Accessing freed memory after WinScrolled autocmd event.
Solution:   Check the window pointer is still valid. (closes vim/vim#10156)
            Remove the argument from may_trigger_winscrolled().
d58862d18f
2022-04-12 19:16:47 +08:00
dbd5242d8e Merge pull request #18075 from zeertzjq/vim-8.2.4713
vim-patch:8.2.4713: plugins cannot track text scrolling
2022-04-12 05:48:23 +08:00
6be4fd888c test: properly test WinScrolled event 2022-04-12 05:02:05 +08:00
53668a5815 vim-patch:8.2.4713: plugins cannot track text scrolling
Problem:    Plugins cannot track text scrolling.
Solution:   Add the WinScrolled event. (closes vim/vim#10102)
0937182d49

Skip User event in autocmd.txt, not needed unless #10689 is reverted.
2022-04-12 05:02:05 +08:00
10b40440dd test(old): fix mistakes in porting Vim patches 8.1.1362 and 8.1.1585 (#18080) 2022-04-12 04:56:15 +08:00
85b33fc042 vim-patch:8.2.4737: // in JavaScript string recognized as comment (#18083)
Problem:    // in JavaScript string recognized as comment.
Solution:   Only check for linecomment if 'cindent' is set. (closes vim/vim#10151)
1655619717
2022-04-11 22:50:17 +02:00
392cb7ac0c fix(lsp): pass offset_encoding in formatexpr() (#18084) 2022-04-11 12:44:31 -07:00
da31e953b6 docs(term.txt): add documentation about TUI input (#18072) 2022-04-11 23:22:04 +08:00
96b461a000 refactor(packaging): Windows: improve MSI, remove NSIS #18069
- Removed NSIS installer.
  - Prevents undefined behaviour when two installations are performed to the same directory (NSIS + MSI).
  - Reduced cost of maintaining two installers that do the same thing.
  - Chose Wix MSI due to its better integration with Windows.
- Added Wix patch file to add neovim binaries to the system path during installation.
- Replaced neovim installer icons with better looking versions.
- Renamed neovim installer icons from logo.ico -> neovim.ico for all
  icons to better reflect contents.
2022-04-11 07:58:46 -07:00
356cff78ec vim-patch:8.2.4734: getcharpos() may change a mark position (#18077)
Problem:    getcharpos() may change a mark position.
Solution:   Copy the mark position. (closes vim/vim#10148)
3caf1cce2b
2022-04-11 21:29:18 +08:00
f0d07dcb74 Merge pull request #18067 from zeertzjq/vim-8.2.4714
vim-patch:8.2.{4714,4733}
2022-04-11 19:30:42 +08:00
2dc86ef3b2 vim-patch:8.2.4733: HEEx and Surface do need a separate filetype
Problem:    HEEx and Surface do need a separate filetype.
Solution:   Revert 8.2.4729. (closes vim/vim#10147)
4232dff815
2022-04-11 18:40:46 +08:00
18ed556bbd vim-patch:8.2.4714: using g:filetype_dat and g:filetype_src not tested
Problem:    Using g:filetype_dat and g:filetype_src not tested.
Solution:   Add a test. (Patrick Meiser-Knosowski, closes vim/vim#10117)
a8034a4886
2022-04-11 18:38:42 +08:00
8f95f3ea06 fix(vim-patch.sh): fix N/A files patterns (#18073) 2022-04-11 14:41:26 +08:00
f89ca7194f fix(events): make v:event readonly in more events (#18070)
This makes v:event readonly in these four events:
- ChanInfo
- ChanOpen
- RecordingLeave
- TermClose
2022-04-11 11:32:15 +08:00
cdfb045ea0 Merge pull request #18071 from gpanders/create_uc
refactor!: Rename nvim_add_user_command to nvim_create_user_command
2022-04-10 20:46:02 -06:00
379067d038 docs: update dev-api to include "create" 2022-04-10 20:45:17 -06:00
a2f157233f fix(tui)!: remove ESC NUL forced escape (#17198)
This make Nvim recognize `ESC NUL` as <M-C-Space>, as many terminal
emulators (including libvterm) send <M-C-Space> as `ESC NUL`.

There is already another unambiguous way to encode a `ESC` key supported
by libtermkey: `ESC [ 2 7 u`, which is a `CSI u` sequence.

If one still wants to use `ESC NUL` as `ESC`, they can just map
<M-C-Space> to <Esc>.
2022-04-11 10:23:33 +08:00
f94f75dc05 refactor!: rename nvim_add_user_command to nvim_create_user_command 2022-04-10 20:18:41 -06:00
9da0023a66 feat(keymap): add F38-F63 keys (#17893) 2022-04-11 09:54:59 +08:00
b2cb05b53e feat(events): support SIGWINCH for Signal event #18029
closes #15411
2022-04-10 15:56:08 -07:00
8bdcd832ae refactor(globals.h): avoid confusing comment placement (#18066)
These comments were indented in Vim, but their indent was removed in
Nvim, causing them to be placed in a confusing place.
2022-04-10 21:22:22 +08:00
8f3845cdb7 docs: remove mentions of removed flag '#' in 'cpoptions' (#18064) 2022-04-10 14:58:01 +02:00
b438bb4343 vim-patch:8.2.4729: HEEx and Surface templates do not need a separate filetype (#18065)
Problem:    HEEx and Surface templates do not need a separate filetype.
Solution:   Use Eelixir for the similar filetypes. (Aaron Tinio, closes vim/vim#10124)
fa76a24109
2022-04-10 13:53:33 +02:00
b531e4ea33 Merge pull request #18062 from zeertzjq/vim-8.2.4723
vim-patch:8.2.{4723,4728}: the ModeChanged autocmd event is inefficient
2022-04-10 19:14:29 +08:00
381f8f86da vim-patch:8.2.4728: no test that v:event cannot be modified
Problem:    No test that v:event cannot be modified.
Solution:   Add a test. (closes vim/vim#10139)
021996ffaa
2022-04-10 18:45:16 +08:00
263a7fde35 vim-patch:8.2.4723: the ModeChanged autocmd event is inefficient
Problem:    The ModeChanged autocmd event is inefficient.
Solution:   Avoid allocating memory. (closes vim/vim#10134)  Rename
            trigger_modechanged() to may_trigger_modechanged().
2bf52dd065

Make v:event readonly for ModeChanged.
2022-04-10 08:02:22 +08:00
ff726cc569 vim-patch:8.2.4719: ">" marker sometimes not displayed in the jumplist (#18056)
Problem:    ">" marker sometimes not displayed in the jumplist.
Solution:   If the buffer no longer exists show "-invalid-". (Christian
            Brabandt, closes vim/vim#10131, closes vim/vim#10100)
a0f659c76e

Add a modeline to test_jumplist.vim
2022-04-10 07:13:22 +08:00
12662ac0c4 vim-patch:8.2.4722: ending recording with mapping records too much (#18060)
Problem:    When a recording is ended with a mapped key that key is also
            recorded.
Solution:   Remember the previous last_recorded_len. (closes vim/vim#10122)
81b46a6ccd
2022-04-10 06:45:27 +08:00
2a2c4e191f vim-patch:8.2.4718: @@@ in the last line sometimes drawn in the wrong place (#18055)
Problem:    @@@ in the last line sometimes drawn in the wrong place.
Solution:   Make sure the column is valid. (closes vim/vim#10130)
cee9c844f2
2022-04-10 04:50:49 +08:00
61bd5426f4 vim-patch:8.2.4721: cooklang files are not recognized (#18058)
Problem:    Cooklang files are not recognized.
Solution:   recognize *.cook files. (Goc Dundar, closes vim/vim#10120)
36951ed1da
2022-04-09 17:43:33 +02:00
3280dc2b60 vim-patch:8.2.4720: ABB Rapid files are not recognized properly (#18057)
Problem:    ABB Rapid files are not recognized properly.
Solution:   Add checks for ABB Rapid files. (Patrick Meiser-Knosowski,
            closes #10104)
b09c320039
2022-04-09 17:42:46 +02:00
f3183a4d7c Merge pull request #18023 from tom-anders/vim-8.2.4702
vim-patch:8.2.{4702,4703}: C++ scope labels are hard-coded
2022-04-09 22:13:34 +08:00