Commit Graph

22850 Commits

Author SHA1 Message Date
zeertzjq
f4274d0f62
vim-patch:8.2.3102: test for crash fix does not fail without the fix (#20018)
Problem:    Test for crash fix does not fail without the fix.
Solution:   Adjust the test sequence. (closes vim/vim#8506)
3777d6e32b

Cherry-pick CheckUnix from patch 8.2.1432.
2022-08-31 09:41:00 +08:00
zeertzjq
5ff2ea6687
vim-patch:8.2.0301: insufficient testing for exception handling (#20016)
Problem:    Insufficient testing for exception handling and the "attention"
            prompt.
Solution:   Add test cases. (Yegappan Lakshmanan, closes vim/vim#5681)
b654103ad1

Fix memory leak from last char_u refactor.
2022-08-31 07:24:16 +08:00
zeertzjq
518b5c65b0
vim-patch:8.1.2037: can call win_gotoid() in cmdline window (#20015)
Problem:    Can call win_gotoid() in cmdline window.
Solution:   Disallow switching windows. (Yasuhiro Matsumoto, closes vim/vim#4940)
a046b37c22
2022-08-31 06:58:28 +08:00
zeertzjq
94a2bc5940
vim-patch:9.0.0332: overwrite check may block BufWriteCmd (#20014)
Problem:    Overwrite check may block BufWriteCmd.
Solution:   Do not use overwrite check when 'buftype' is "acwrite".
            (closes vim/vim#11011)
9c8f94636b
2022-08-31 06:27:39 +08:00
Sean Dewar
813476bf72
fix(exceptions): restore did_throw (#20000)
`!did_throw` doesn't exactly imply `!current_exception`, as `did_throw = false`
is sometimes used to defer exception handling for later (without forgetting the
exception). E.g: uncaught exception handling in `do_cmdline()` may be deferred
to a different call (e.g: when `try_level > 0`).

In #7881, `current_exception = NULL` in `do_cmdline()` is used as an analogue of
`did_throw = false`, but also causes the pending exception to be lost, which
also leaks as `discard_exception()` wasn't used.

It may be possible to fix this by saving/restoring `current_exception`, but
handling all of `did_throw`'s edge cases seems messier. Maybe not worth
diverging over.

This fix also uncovers a `man_spec.lua` bug on Windows: exceptions are thrown
due to Windows missing `man`, but they're lost; skip these tests if `man` isn't
executable.
2022-08-30 23:13:52 +01:00
Christian Clason
6b7eed1884
Vim 9.0.{0314,0319}: some filetypes are not recognized (#20005)
* vim-patch:9.0.0314: VDM files are not recognized

Problem:    VDM files are not recognized.
Solution:   Add patterns for VDM files. (Alessandro Pezzoni, closes vim/vim#11004)
bf26941f40

* vim-patch:9.0.0319: Godot shader files are not recognized

Problem:    Godot shader files are not recognized.
Solution:   Add patterns for "gdshader". (Maxim Kim, closes vim/vim#11006)
d5c8f11905
2022-08-30 21:16:03 +02:00
dundargoc
2828aae7b4
refactor: replace char_u with char 4 (#19987)
* refactor: replace char_u with char

Work on https://github.com/neovim/neovim/issues/459
2022-08-30 14:52:09 +02:00
Christian Clason
9397e70b9e
docs(lua): present vim.o as default and vim.opt as special-purpose #19982
Problem: People are confused about `vim.o` and `vim.opt`
Solution: Clarify that `vim.o` is the default interface, with `vim.opt`
          specifically meant for interacting with list-style options.
2022-08-30 05:46:38 -07:00
Mathias Fußenegger
981ae83fad
fix(docs): update lsp.rpc.start docs to match return value changes (#20003)
Follow up to https://github.com/neovim/neovim/pull/19916
2022-08-30 13:14:27 +02:00
Mathias Fußenegger
0368ca70c4
docs(lsp): replace formatting_sync example in lsp-faq (#19994)
`formatting_sync` is deprecated
2022-08-30 13:14:09 +02:00
bfredl
f9c183c0ca
Merge pull request #19897 from bfredl/statushl
fix(highlight): set the window namespace when redrawing statusline
2022-08-30 10:59:58 +02:00
bfredl
6ab2bf6819 fix(highlight): set the window namespace when redrawing statusline 2022-08-30 10:28:11 +02:00
zeertzjq
568737d5b3
feat(tui): recognize sidescroll events (#19992)
Ref https://invisible-island.net/xterm/ctlseqs/ctlseqs.html#h3-Other-buttons
This works in xterm and kitty.
CSI < 66 ; x ; y M sequence is for ScrollWheelLeft.
CSI < 67 ; x ; y M sequence is for ScrollWheelRight.
2022-08-30 10:55:00 +08:00
zeertzjq
7f20d61e00
Merge pull request #19999 from zeertzjq/vim-9.0.0320
vim-patch:9.0.0320: command line type of CmdlineChange differs from getcmdtype()
2022-08-30 07:07:50 +08:00
zeertzjq
e6e9879cb3 vim-patch:9.0.0320: command line type of CmdlineChange differs from getcmdtype()
Problem:    Command line type of CmdlineChange differs from getcmdtype().
Solution:   Use the same type. (closes vim/vim#11005)
54acb90d9e
2022-08-30 06:33:09 +08:00
zeertzjq
2c83d7b2dd refactor: move cmdline functions to ex_getln.c 2022-08-30 06:32:08 +08:00
zeertzjq
f58a979599
vim-patch:9.0.0318: clearing screen causes flicker (#19993)
Problem:    Clearing screen causes flicker.
Solution:   Do not clear but redraw in more cases.  Add () to "wait_return".
13608d851a

Only 2 lines of actual code change.
2022-08-30 06:26:06 +08:00
bfredl
e78e369a9d
Merge pull request #19997 from bfredl/lastsep
fix(redraw): handle switching to a tabpage with larger p_ch value
2022-08-29 23:52:47 +02:00
bfredl
8fd66ff5c5 fix(redraw): handle switching to a tabpage with larger p_ch value 2022-08-29 21:58:07 +02:00
Raphael
efacb6e974
fix(lsp): clean the diagnostic cache when buffer delete (#19449)
Co-authored-by: Gregory Anders <greg@gpanders.com>
2022-08-29 19:09:14 +02:00
bfredl
68efac3683
Merge pull request #19973 from dundargoc/refactor/char_u/3
refactor: replace char_u with char 3: revenge of the unsigned
2022-08-29 18:46:38 +02:00
Mathias Fußenegger
126fe7fbc9
Merge pull request #19916 from mfussenegger/lsp-tcp
Adds TCP support for lsp.
Usage example:

```
vim.lsp.start({ name = 'godot', cmd = vim.lsp.rpc.connect('127.0.0.1', 6008) })
```
2022-08-29 18:26:14 +02:00
Dundar Göc
58f30a326f refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-08-29 15:48:56 +02:00
zeertzjq
92bc11a891
vim-patch:9.0.0316: screen flickers when 'cmdheight' is zero (#19991)
Problem:    Screen flickers when 'cmdheight' is zero.
Solution:   Redraw over existing text instead of clearing.
f73e5ba56f
2022-08-29 20:22:15 +08:00
bfredl
e6af1cf250
Merge pull request #19971 from dundargoc/refactor/remove-casts
refactor: remove redundant casts
2022-08-29 13:23:43 +02:00
bfredl
5fe6bde296
Merge pull request #19961 from dundargoc/refactor/char_u/2
refactor: replace char_u with char 2: electric chaaralo
2022-08-29 12:50:22 +02:00
bfredl
f05cc672e3
Merge pull request #19975 from bfredl/chartabsize
refactor(plines): use a struct for chartabsize state
2022-08-29 12:48:51 +02:00
bfredl
ea4e9c71cc refactor(plines): use a struct for chartabsize state
This is a refactor extracted from vim-patch 9.0.0067: cannot show virtual text

The logic for inline virtual text is going to be different in nvim than
text property based text in vim, but this refactor is still useful,
as calculation of displayed linesize is going to be stateful in a
similar way.
2022-08-29 12:05:34 +02:00
Shougo
253f0ffd8d
vim-patch:9.0.0285: it is not easy to change the command line from a plugin (#19979)
vim-patch:9.0.0285: it is not easy to change the command line from a plugin

Problem:    It is not easy to change the command line from a plugin.
Solution:   Add setcmdline(). (Shougo Matsushita, closes vim/vim#10869)
07ea5f1509
2022-08-29 13:11:52 +08:00
zeertzjq
1dcaa75a65
fix(events): triggered WinScrolled when only skipcol changed (#19972)
fix(events): trigger WinScrolled when only skipcol changed

vim-patch:9.0.0304: WinScrolled is not triggered when only skipcol changes

Problem:    WinScrolled is not triggered when only skipcol changes.
Solution:   Add w_last_skipcol and use it. (closes vim/vim#10998)
670ab0334b
2022-08-29 06:16:20 +08:00
zeertzjq
b21980bd60
fix(keywordprg): default to :help if set to empty string (#19983) 2022-08-29 05:58:32 +08:00
Mathias Fussenegger
60ec6e34d5 feat(lsp): add tcp support 2022-08-28 14:07:53 +02:00
Mathias Fussenegger
46bb34e26b refactor(lsp): extract rpc client from rpc.start
Makes the previously inner functions re-usable for a TCP client
2022-08-28 14:07:53 +02:00
Mathias Fussenegger
7d3e4aee6a refactor(lsp): encapsulate rpc uv handle
To prepare for different transports like TCP where the handle won't have
a kill method.
2022-08-28 14:07:53 +02:00
Mathias Fussenegger
f9641d1ac6 refactor(lsp): factor out read_loop function 2022-08-28 14:07:53 +02:00
Raphael
88c32b5eba
fix(l10n): improve zh_CN and zh_TW translations (#19969) 2022-08-28 17:07:24 +08:00
zeertzjq
7a9b593796
vim-patch:8.2.3813: confusing error when using :cc without error list (#19978)
Problem:    confusing error when using :cc without error list. (Gary Johnson)
Solution:   Give the "no errors" error.
a5d78d1f11

Cherry-pick e_quickfix -> e_no_errors rename from patch 8.2.3190.
2022-08-28 07:22:27 +08:00
Dundar Göc
691f4715c0 refactor: replace char_u with char
Work on https://github.com/neovim/neovim/issues/459
2022-08-27 17:59:43 +02:00
Dundar Göc
20305494f8 refactor: remove redundant casts 2022-08-27 14:26:18 +02:00
dundargoc
09c6ce8c4e
docs: fix typos (#19798)
Co-authored-by: adrian5 <adrian5@users.noreply.github.com>
Co-authored-by: Eisuke Kawashima <e-kwsm@users.noreply.github.com>
2022-08-27 15:56:58 +08:00
zeertzjq
523600ea6c
vim-patch:8.2.1269: language and locale code spread out (#19964)
Problem:    Language and locale code spread out.
Solution:   Move relevant code to src/locale.c. (Yegappan Lakshmanan,
            closes vim/vim#6509)
054f14bbe5

Also remove redundant <locale.h> includes.
2022-08-27 11:26:47 +08:00
zeertzjq
814c173b9d
vim-patch:8.2.0660: the search.c file is a bit big (#19963)
Problem:    The search.c file is a bit big.
Solution:   Split off the text object code to a separate file. (Yegappan
            Lakshmanan, closes vim/vim#6007)
ed8ce057b7
2022-08-27 09:58:25 +08:00
zeertzjq
58b29e344c
Merge pull request #19962 from zeertzjq/vim-9.0.0278
vim-patch:9.0.{0278,0279,0283,0284}: cmdline completion patches
2022-08-27 07:33:29 +08:00
zeertzjq
608134794d vim-patch:9.0.0284: using static buffer for multiple completion functions
Problem:    Using static buffer for multiple completion functions.
Solution:   Use one buffer in expand_T.
5ff595d9db
2022-08-27 07:03:07 +08:00
zeertzjq
2676555b22 vim-patch:9.0.0283: cannot complete "syn list @cluster"
Problem:    Cannot complete "syn list @cluster".
Solution:   Recognize and handle "list @". (Björn Linse, closes vim/vim#10990)
af9a6002e0
2022-08-27 07:03:07 +08:00
zeertzjq
cc2c8be481 vim-patch:9.0.0279: the tiny version has the popup menu but not 'wildmenu'
Problem:    The tiny version has the popup menu but not 'wildmenu'.
Solution:   Graduate the wildmenu feature.
5416232707

N/A patches for version.c:

vim-patch:9.0.0281: build failure without the +eval feature

Problem:    Build failure without the +eval feature.
Solution:   Add #ifdef.
58dcbf1c65
2022-08-27 07:03:07 +08:00
zeertzjq
e70ef80f77 vim-patch:9.0.0278: the +wildignore feature is nearly always available
Problem:    The +wildignore feature is nearly always available.
Solution:   Graduate +wildignore for consistency.
074fbd4131
2022-08-27 07:03:06 +08:00
zeertzjq
d5e0883712
Merge pull request #19955 from zeertzjq/vim-9.0.0272
vim-patch:9.0.{0272,0274,0275,0276}: buffer loading fixes
2022-08-27 06:32:41 +08:00
zeertzjq
d813ef0097 vim-patch:9.0.0276: 'buftype' values not sufficiently tested
Problem:    'buftype' values not sufficiently tested.
Solution:   Add and extend tests with 'buftype' values. (closes vim/vim#10988)
93f72cc119

"terminal" and "popup" buffer types cannot be tested, and commenting
them out causes an error, so just remove them.
2022-08-27 06:12:52 +08:00
zeertzjq
45c23a757c vim-patch:9.0.0275: BufEnter not triggered when using ":edit" in "nofile" buffer
Problem:    BufEnter not triggered when using ":edit" in "nofile" buffer.
Solution:   Let readfile() return NOTDONE. (closes vim/vim#10986)
a9b5b85068
2022-08-27 06:12:52 +08:00