Commit Graph

4844 Commits

Author SHA1 Message Date
zeertzjq
db2e5f46f5
fix(lua): make ui_attach()/ui_detach() take effect immediately (#20037) 2022-09-01 16:37:29 +08:00
zeertzjq
0c6b39894f
feat(mapset): support restoring Lua callback (#20024)
vim-patch:9.0.0341: mapset() does not restore <Nop> mapping properly

Problem:    mapset() does not restore <Nop> mapping properly.
Solution:   Use an empty string for <Nop>. (closes vim/vim#11022)
92a3d20682
2022-09-01 06:19:49 +08:00
bfredl
c0050b71e5
Merge pull request #16396 from bfredl/luaevent
feat(lua): vim.ui_attach to get ui events from lua
2022-08-31 22:03:56 +02:00
bfredl
f31db30975 feat(lua): vim.ui_attach to get ui events from lua
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
2022-08-31 20:40:17 +02:00
zeertzjq
933c80e8f9
refactor(mappings)!: mapblock_fill_dict() use API Dictionary (#20020)
This introduces the following breaking changes:
- nvim_get_keymap now always returns a LuaRef object as "callback" for a
  Lua mapping regardless of how it is called. The LuaRef object can be
  called from Lua and Vim script, but is lost over RPC.
- maparg() now returns a Funcref instead of a ref number as "callback"
  for a Lua mapping. The Funcref can be called from Lua and Vim script,
  but is lost over RPC.

This may also make nvim_get_keymap faster, but make maparg() slower.
2022-08-31 21:14:14 +08:00
zeertzjq
fa747d004a
fix(api): nvim_set_hl bail out on invalid group name (#20021) 2022-08-31 19:47:10 +08:00
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
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
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
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
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
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
bfredl
b04ef7f6b9 fix(treesitter): make it get_captures_at_position 2022-08-26 13:57:31 +02:00
bfredl
030b422d1e feat(treesitter)!: use @foo.bar style highlight groups
This removes the support for defining links via
vim.treesitter.highlighter.hl_map (never documented, but plugins did
anyway), or the uppercase-only `@FooGroup.Bar` to `FooGroup` rule.

The fallback is now strictly `@foo.bar.lang` to `@foo.bar` to `@foo`,
and casing is irrelevant (as it already was outside of treesitter)

For compatibility, define default links to builting syntax groups
as defined by pre-existing color schemes
2022-08-26 13:57:31 +02:00
bfredl
73ee2b35d1 fix(tests): use pending_c_parser when needed 2022-08-25 20:49:27 +02:00
Quentin Rasmont
f57341a4b6 feat(treesitter): upstream node_length() as a node method
Util from the nvim-treesitter project.
2022-08-25 18:01:14 +02:00
Quentin Rasmont
baba43681e feat(treesitter): upstream get_root_for_node() as a node method
Util from the nvim-treesitter project.
2022-08-25 18:01:14 +02:00
Quentin Rasmont
a577fb778a feat(treesitter): upstream get_named_children() as a node method
Util from the nvim-treesitter project.
2022-08-25 18:01:14 +02:00
Quentin Rasmont
6b2d42eb03 feat(treesitter): add ability to retreive a tree/node given a range 2022-08-25 18:01:14 +02:00
Quentin Rasmont
3aba4ba378 feat(treesitter): upstream is_parent()
Util from the nvim-treesitter project.
Renamed is_parent to is_ancestor for clarity.
2022-08-25 18:01:14 +02:00
zeertzjq
4ecea0e001 vim-patch:8.2.0911: crash when opening a buffer for the cmdline window fails
Problem:    Crash when opening a buffer for the cmdline window fails. (Chris
            Barber)
Solution:   Check do_ecmd() succeeds.  Reset got_int if "q" was used at the
            more prompt. (closes vim/vim#6211)
9b7cce28d5

Make code match latest Vim instead.
2022-08-25 21:38:11 +08:00
zeertzjq
274e1122ad
fix(usercmd): also check for whitespace after escaped character (#19942) 2022-08-25 17:57:32 +08:00
Thomas Vigouroux
26ebf67c39
test(treesitter): make internal lang test pending when necessary 2022-08-24 16:59:13 +02:00
Lewis Russell
b1eaa2b9a3
feat(lua): add vim.iconv (#18286)
Co-authored-by: Justin M. Keyes <justinkz@gmail.com>
2022-08-24 14:41:31 +01:00
Thomas Vigouroux
9be4bfc5f4
Merge pull request #19496 from vigoux/ts_internal_lang
feat(treesitter): allow customizing language symbol name
2022-08-24 15:36:58 +02:00
zeertzjq
f91b1885dd
feat(eval)!: make Vim functions return inner window width and height (#19743)
In non-multigrid UI the only change is that the returned height now
excludes winbar, and this is compatible with Vim.

In multigrid UI this means the return value of these functions now
reflect the space available for buffer lines in a window.

No change in nvim_win_get_height() and nvim_win_get_width().
2022-08-24 21:02:45 +08:00
sigmaSd
a4e4609d62
fix(path): path_is_url returns false for "foo:/" #19797
Problem:
path_to_url() returns false for single-slash URIs ("foo:/" vs "foo://").
This is not compliant with the URI spec. https://url.spec.whatwg.org/#url-representation
LSP in particular allows single-slash URIs.

Solution:
Relax path_to_url() to accept single-slash URIs. This is not fully
compliant (only ":" is required by the spec), but it is hopefully good
enough without causing false-positives in typical text files.

ref https://url.spec.whatwg.org/#windows-drive-letter
ref https://github.com/neovim/neovim/pull/19773
ref https://github.com/neovim/neovim/pull/19773#issuecomment-1214763769
2022-08-23 23:38:06 -07:00
zeertzjq
9a100ee169
fix(cmdline): do not trigger completion at wrong time (#19920)
Cherry-picked from Vim patches 8.2.4339, 9.0.0238.
2022-08-24 10:28:32 +08:00
zeertzjq
6cc6e11929
vim-patch:9.0.0206: redraw flags are not named specifically (#19913)
Problem:    Redraw flags are not named specifically.
Solution:   Prefix "UPD_" to the flags, for UPDate_screen().
a4d158b3c8
2022-08-23 22:00:19 +08:00
zeertzjq
ffa1335047 vim-patch:8.2.4726: cannot use expand() to get the script name
Problem:    Cannot use expand() to get the script name.
Solution:   Support expand('<script>'). (closes vim/vim#10121)
6013d0045d

Use `.sn_name` instead of `->sn_name` as v8.2.0154 hasn't been ported.
Cherry-pick builtin.txt expand() doc from latest Vim.
2022-08-23 17:47:46 +08:00
zeertzjq
42e9fe7d95
test: add test for using :normal to stop Visual mode in cmdwin (#19904) 2022-08-23 11:39:25 +08:00
zeertzjq
63df91c10a
vim-patch:8.2.1046: insufficient tests for src/buffer.c (#19903)
Problem:    Insufficient tests for src/buffer.c.
Solution:   Add more tests.  Move comments related tests to a separate file.
            (Yegappan Lakshmanan, closes vim/vim#6325)
b7e2483655
2022-08-23 11:24:46 +08:00
zeertzjq
d5328ea408
vim-patch:8.2.0522: several errors are not tested for (#19901)
Problem:    Several errors are not tested for.
Solution:   Add tests. (Yegappan Lakshmanan, closes vim/vim#5892)
ee4e0c1e9a

Omit Test_range() change: reverted in patch 8.2.0615.
Cherry-pick Test_z_no_space_before_xxx() from patch 8.2.0195.
Cherry-pick Test_reverse_sort_uniq() change from patch 8.2.0183.
Make uniq() error behavior consistent with sort().
Cherry-pick Test_set_ttytype() change from patch 8.1.1826.
Cherry-pick quickfix checks from patch 8.1.2373 to test_preview.vim.
Test_viminfo_error() is applicable.
Cherry-pick E1058 from patch 8.2.0149 and port Test_deep_nest() to Lua.
2022-08-23 10:38:53 +08:00
zeertzjq
2fd25fb909
vim-patch:8.1.0832: confirm() is not tested (#19896)
Problem:    confirm() is not tested.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#3868)
2e05009218
2022-08-23 07:20:23 +08:00
Thomas Vigouroux
3c1d70f20b
feat(treesitter): allow customizing language symbol name 2022-08-22 15:34:10 +02:00
zeertzjq
15a768eeb0
fix(api): avoid side effects with nvim_parse_cmd (#19890)
Save and restore the cursor and last search pattern and do not change
search history.
2022-08-22 18:06:18 +08:00
Axel Forsman
d4d27c41b3
fix(edit.c): indentkeys double indent after "!" #12894
which is both unexpected and different from the Vim behaviour.

Indent was triggered once by the '!' check in insert_execute(), and
inserting the char was correctly skipped, but then triggered again in
insert_check() (provided that cindent was not being ignored after manual
indentation, i.e. `can_cindent == true`).

While this is the smallest fix, another solution would be to remove
VimState#check and instead move that to *_enter()/-_execute(), since the
control flow is pretty unnecessarily convoluted as is. That would also
have the benefit of differing less from the Vim source code.
2022-08-21 21:48:18 -07:00
zeertzjq
06a53ab2cb vim-patch:8.2.4334: command line popup menu not positioned correctly
Problem:    Command line popup menu not positioned correctly.
Solution:   Also use vim_strsize() on the existing text. (Naruhiko Nishino,
            closes vim/vim#9727)
68cc2b8a37
2022-08-22 09:08:47 +08:00
zeertzjq
99bd895956 vim-patch:8.2.4328: command line complete matches cleard when typing character
Problem:    Command line complete matches cleard when typing character.
            (Dominique Pellé)
Solution:   Only remove a popup menu if there is one.
73a16c22a4
2022-08-22 08:55:54 +08:00
zeertzjq
e3eb6967bc
vim-patch:8.2.4325: 'wildmenu' only shows few matches (#19876)
Problem:    'wildmenu' only shows few matches.
Solution:   Add the "pum" option: use a popup menu to show the matches.
            (Yegappan Lakshmanan et al., closes vim/vim#9707)
3908ef5017

Omit p_wmnu check in cmdline_pum_active() as it can cause problems.
Omit vim_strchr() flags as that isn't really better than bitmasks.
Omit key translations and document it in vim_diff.txt.
2022-08-21 21:31:25 +08:00
Javier Lopez
dde90f0ca4
fix(api/command): fargs behavior when no arguments are passed (#19862)
Problem: A command defined with `nargs="?"` returns `fargs={""}` to
a Lua callback when executed with no arguments, which is inconsistent
with how`nargs="*"` behaves.

Solution: Pass `fargs={}` for no argument with `nargs="?"` as well.
2022-08-21 15:19:29 +02:00
zeertzjq
ff5cfcdeab
vim-patch:8.1.2045: the option.c file is too big (#19854)
Problem:    The option.c file is too big.
Solution:   Split off the code dealing with strings. (Yegappan Lakshmanan,
            closes vim/vim#4937)
dac1347b4d

Cherry-pick set_string_option_direct_in_win() from patch 8.1.1405.
Cherry-pick shift_line() comment change from patch 8.1.2096.
Move 'clipboard' default parsing to didset_string_options().
Reorder option flags to put Nvim-only flags at the end.
2022-08-20 17:26:44 +08:00
zeertzjq
bffaf1e27e
fix(eval): check for v:lua when calling callback (#19855)
This makes callback_call() match call_vim_function() when calling a function.
2022-08-20 15:52:35 +08:00
bfredl
6adc2ae7e0 refactor: move statusline code from buffer.c and [draw]screen.c to new file
problem: code for drawing statusline is arbitrarily spreadout between drawscreen.c, screen.c and buffer.c
solution: move it to a new file statusline.c

- rename archaic internal name "status match" to public name "wildmenu"
- showruler() does not show the ruler. it show anything which displays
  info about the cursor. Rename it accordingy.
2022-08-19 22:48:03 +02:00
bfredl
3c545b9c62
Merge pull request #19360 from famiu/feat/multibuffer-inccommand
feat: multibuffer preview support for inccommand
2022-08-19 17:21:18 +02:00
zeertzjq
b7c86e24f7 vim-patch:8.2.0982: insufficient testing for reading/writing files
Problem:    Insufficient testing for reading/writing files.
Solution:   Add more tests. (Yegappan Lakshmanan, closes vim/vim#6257)
            Add "ui_delay" to test_override() and use it for the CTRL-O test.
b340baed9f

Omit test_override().
Reorder test_writefile.vim to match Vim.
2022-08-19 22:05:26 +08:00
zeertzjq
2af9be3db5
vim-patch:8.1.1966: some code in options.c fits better elsewhere (#19840)
Problem:    Some code in options.c fits better elsewhere.
Solution:   Move functions from options.c to other files. (Yegappan
            Lakshmanan, closes vim/vim#4889)
e677df8d93
2022-08-19 19:20:39 +08:00
Famiu Haque
c2f7a2a18d feat: multibuffer preview support for inccommand
Allows preview callbacks to modify multiple buffers in order to show the
preview. Previously, if multiple buffers were modified, only the current
buffer would have its state restored. After this change, all buffers
have their state restored after preview.

Closes #19103.
2022-08-19 09:27:52 +06:00
zeertzjq
36f0b508c5
revert: "jobstart(): Fix hang on non-executable cwd #9204" (#19826)
This reverts commit c4c74c3883.

LibUV already gives an error for this, so this isn't needed.
2022-08-18 22:09:50 +08:00
bfredl
700a6fb9d4
Merge pull request #19822 from bfredl/hldef
fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly
2022-08-18 12:16:27 +02:00
bfredl
e29156356b fix(api): make nvim_set_hl(ns=0, ...) redraw screen properly
fixes #18160
2022-08-18 10:57:46 +02:00
bfredl
21b2906c9c fix(winhl): do not crash when unsetting winhl in just opened window
fixes #19823
2022-08-18 09:43:07 +02:00
bfredl
068a998e60 fix(tests): remove irrelevant usage of display-=msgsep
These were just added to avoid churn when changing the default
of 'display'. To simplify message handling logic, we might want
to remove support for printing messages in default_grid later on.
This would allow things like printing error messages safely in the
middle of redraw, or a future graduation of the 'multigrid' feature.
2022-08-17 23:44:49 +02:00
bfredl
d879331b0d feat(ui): allow to set the highlight namespace per window
- reimplement 'winhl' in terms of highlight namespaces
- check for EOF in screen tests (to indicate a likely crash)
2022-08-17 16:20:39 +02:00
Famiu Haque
f5588ee896
feat: allow :wincmd to accept a count (#19815)
Let :wincmd command accept a count like what its documentation suggests.
Previously it could only accept a range, which led to some ambiguity on
which attribute should be used when executing :wincmd using nvim_cmd.

Closes #19662.

Also fix a typo in a related Vim test:

vim-patch:9.0.0223: typo in diffmode test

Problem:    Typo in diffmode test.
Solution:   Fix the typo. (closes vim/vim#10932)
5fd6ab820b
2022-08-17 19:50:40 +08:00
Shougo Matsushita
5977a96b3f vim-patch:9.0.0190: the way 'cmdheight' can be made zero is inconsistent
Problem:    The way 'cmdheight' can be made zero is inconsistent.
Solution:   Only make 'cmdheight' zero when setting it explicitly, not when
            resizing windows. (closes vim/vim#10890)
f797e309ca
2022-08-17 09:34:13 +08:00
zeertzjq
03fddfd928
fix(api): nvim_exec and nvim_cmd restore msg_col when capturing output (#19789)
This matches the code in execute_common(), preventing messages after the
API call from being printed at the wrong column.
2022-08-16 17:30:39 +08:00
zeertzjq
cf3b871fa9
test: use poke_eventloop() instead of sleep(10) where possible (#19794)
Using sleep(10) to wait for typeahead to finish is flaky, especially on
macOS, where legacy/global_spec.lua has failed several times.
2022-08-16 15:21:46 +08:00
zeertzjq
d1464d16d6 fix(source): fix expand('<sfile>') no longer works for Lua 2022-08-16 05:39:44 +08:00
zeertzjq
76b4b1977b vim-patch:8.2.1799: some Normal mode commands not fully tested
Problem:    Some Normal mode commands not fully tested.
Solution:   Add a few more tests. (Yegappan Lakshmanan, closes vim/vim#7073)
d1ad99b654

Cherry-pick test_registers.vim change from patch 8.2.0644.
2022-08-15 20:24:43 +08:00
zeertzjq
55da52963b vim-patch:8.2.5109: mode not updated after CTRL-O CTRL-C in Insert mode
Problem:    Mode not updated after CTRL-O CTRL-C in Insert mode.
Solution:   Set redraw_mode and use it. (closes vim/vim#10581)
7a1d32809b
2022-08-15 17:58:35 +08:00
zeertzjq
93ba821831 vim-patch:8.1.1192: mode is not cleared when leaving Insert mode with mapped Esc
Problem:    Mode is not cleared when leaving Insert mode with mapped Esc.
Solution:   Clear the mode when redraw_cmdline is set. (closes vim/vim#4269)
4c25bd785a
2022-08-15 17:58:35 +08:00
zeertzjq
53b0688ac0 vim-patch:8.1.1189: mode is not cleared when leaving Insert mode
Problem:    Mode is not cleared when leaving Insert mode.
Solution:   Clear the mode when got_int is set. (Ozaki Kiichi, closes vim/vim#4270)
abc7c7fc5a
2022-08-15 17:58:35 +08:00
zeertzjq
b47f313151 fix(getchar): flush screen before doing a blocking wait 2022-08-15 17:58:35 +08:00
zeertzjq
95b8e2c55f vim-patch:partial:8.1.0822: peeking and flushing output slows down execution
Problem:    Peeking and flushing output slows down execution.
Solution:   Do not update the mode message when global_busy is set.  Do not
            flush when only peeking for a character. (Ken Takata)
cb574f4154

Omit inchar() change: it breaks too many tests.

N/A patches for version.c:

vim-patch:8.2.5170: tiny issues

Problem:    Tiny issues.
Solution:   Tiny improvements.
944cc9ceba
2022-08-15 17:58:35 +08:00
zeertzjq
9ab9eb1220 fix(source): make changing 'shellslash' change expand() result 2022-08-15 10:14:53 +08:00
zeertzjq
02a4974418
vim-patch:7.4.1168 (#19645)
Problem:    This doesn't give the right result: eval(string(v:true)). (Nikolay
            Pavlov)
Solution:   Make the string "v:true" instead of "true".
f48aa160fd
2022-08-13 21:31:00 +08:00
bfredl
33f4ba7379 fix(winbar): do not always assume cursor is valid. fixes #19458 2022-08-13 10:45:21 +02:00
zeertzjq
0d9e09bf67
test: make Ex mode exit test test what it wants to test (#19728) 2022-08-12 09:04:08 +08:00
Lewis Russell
a27756cc24
fix(signs): priority of extmark signs (#19718) 2022-08-11 17:26:17 +01:00
Famiu Haque
78658ef383
fix(api): vim.cmd.make crashes when argument count isn't 1 (#19701)
Closes #19696
2022-08-10 18:37:59 +08:00
zeertzjq
3030b4d653
feat(tui): allow grid and host to disagree on ambiguous-width chars (#19686)
Note: This only applies to ambiguous-width characters.
2022-08-09 21:08:46 +08:00
zeertzjq
d31ee6664d
test: increse expect_exit() timeouts (#19680)
A timeout of 100 milliseconds is sometimes still too short for macOS.
Change it to 1000 milliseconds.
2022-08-08 22:04:21 +08:00
zeertzjq
603f7bd253 fix(fillchars): change fallback after setcellwidths() 2022-08-08 20:03:40 +08:00
zeertzjq
18766e742b
fix(folds): fix fold remains when :delete makes buffer empty (#19673) 2022-08-08 06:07:59 +08:00
zeertzjq
629169462a
fix(terminal): skip aucmd_win when checking terminal size (#19668) 2022-08-07 19:43:29 +08:00
zeertzjq
48051ed62c vim-patch:8.2.1281: the "trailing characters" error can be hard to understand
Problem:    The "trailing characters" error can be hard to understand.
Solution:   Add the trailing characters to the message.
2d06bfde29
2022-08-07 14:39:19 +08:00
zeertzjq
d0686540f5 vim-patch:8.2.1280: Ex command error cannot contain an argument
Problem:    Ex command error cannot contain an argument.
Solution:   Add ex_errmsg() and translate earlier.  Use e_trailing_arg where
            possible.
8930caaa1a

Remove duplicate test file 062_tab_pages_spec.lua
2022-08-07 14:38:57 +08:00
Lewis Russell
0fdf59ac9d
fix(api): nvim_cmd handle 0 range (#19655)
Fixes #19608
2022-08-06 13:53:37 +01:00
zeertzjq
a308f53525
fix(api): fix nvim_buf_set_text heap-use-after-free (#19644)
The line returned but ml_get_buf() may be freed by another call to
ml_get_buf(), so it is necessary to make a copy.
2022-08-06 06:22:01 +08:00
zeertzjq
a78606ec53
test(let_spec): increase expect_exit() timeout
Test ":unlet self-referencing node in a List graph #6070" feeds many characters into typeahead, so a timeout of only 100 milliseconds sometimes fails. Change that timeout to 1000 milliseconds.
2022-08-05 08:32:54 +08:00
Justin M. Keyes
43cd91a4f4
Merge #19626 build: cleanup old cmake files 2022-08-03 07:54:53 -07:00
zeertzjq
0a29267514
fix(completion): remove wrong FUNC_ATTR_NONNULL_ALL (#19627) 2022-08-03 21:50:14 +08:00
ii14
3df8d9b8c5
feat(lua): print source locations of lua callbacks (#19597)
Co-authored-by: ii14 <ii14@users.noreply.github.com>
2022-08-03 13:41:17 +01:00
zeertzjq
c57e133e50
fix(ui): set redraw_cmdline when setting window height (#19630) 2022-08-03 19:25:03 +08:00
Dundar Goc
6e2c6114f9 build: replace deprecated cmake features with their modern alternatives
- Use DIRECTORY instead of PATH in get_filename_component
- Use COMPILE_OPTIONS instead of COMPILE_FLAGS. COMPILE_FLAGS is treated
  as a single string while COMPILE_OPTIONS is a list, meaning that cmake
  will take care of any escaping and quoting automatically.
2022-08-03 09:52:05 +02:00
bfredl
0806c882cd
Merge pull request #19584 from bfredl/terminal_c_BSL_c_O
implement <c-\><c-o> key for terminal mode
2022-08-02 14:53:20 +02:00
zeertzjq
def0ced4c7
fix(tabpage): check if ROWS_AVAIL changed for resize (#19620)
N/A patches for version.c:

vim-patch:9.0.0135: comment about tabpage line above the wrong code

Problem:    Comment about tabpage line above the wrong code.
Solution:   Move the comment. (closes vim/vim#10836)
0b0ccbbfb0
2022-08-02 20:48:41 +08:00
bfredl
9092540315 feat(terminal): implement <c-\><c-o> for terminal mode
this works similar to <c-o> or <c-\><c-o> in insert mode
2022-08-02 13:54:41 +02:00
zeertzjq
0a049c322f
test: improve mapping tests and docs (#19619) 2022-08-02 11:13:22 +08:00
Mathias Fußenegger
e99de3f12f
fix(lsp): send didOpen if name changes on write (#19583)
`:saveas newName` changes the name of an existing buffer.
Due to the buffer re-use it skips the lsp attach phase and immediately
sends a `didSave` notification to the server.
Servers get confused about this, because they expect a `didOpen`
notification first.

Closes https://github.com/neovim/neovim/issues/18688
2022-08-01 22:32:53 +02:00
zeertzjq
d954e8da62 feat(mapset): support restoring "replace_keycodes" and "desc" 2022-08-01 21:54:18 +08:00
zeertzjq
cabb23ea4d test: fix api/keymap_spec.lua tests 2022-08-01 21:54:18 +08:00
zeertzjq
6963c2bdcd vim-patch:8.2.0815: maparg() does not provide enough information for mapset()
Problem:    maparg() does not provide enough information for mapset().
Solution:   Add "lhsraw" and "lhsrawalt" items.  Drop "simplified"
9c65253fe7

vim-patch:9.0.0127: unused variable

Problem:    Unused variable.
Solution:   Remove the variable. (closes vim/vim#10829)
e95f22f63a
2022-08-01 21:54:18 +08:00
ii14
db6e93c48d
feat(api): add replace_keycodes to nvim_set_keymap (#19598) 2022-08-01 21:35:08 +08:00
Gustavo Sampaio
ece0850b73
fix(session): respect sessionoptions=terminal #19497
fixes #13078

Co-authored-by: Yuta Katayama <8683947+yutkat@users.noreply.github.com>
2022-08-01 05:13:46 -07:00