Commit Graph

12 Commits

Author SHA1 Message Date
zeertzjq
29c228dc10 vim-patch:8.2.3887: E1135 is used for two different errors
Problem:    E1135 is used for two different errors.
Solution:   Renumber one error.

806da5176e

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 01:12:09 +08:00
zeertzjq
a2b9117ca8 vim-patch:8.2.1978: making a mapping work in all modes is complicated
Problem:    Making a mapping work in all modes is complicated.
Solution:   Add the <Cmd> special key. (Yegappan Lakshmanan, closes vim/vim#7282,
            closes 4784, based on patch by Bjorn Linse)

957cf67d50

Change docs to match Vim if it's wording is better.
Change error numbers to match Vim.

Co-authored-by: Bram Moolenaar <Bram@vim.org>
2023-05-08 01:12:08 +08:00
zeertzjq
15602a7ce4 test: add more tests for K_SPECIAL escaping in <Cmd> mapping 2022-05-03 06:44:14 +08:00
zeertzjq
02e9a402ca test: add test for <Cmd> mapping with character containing K_SPECIAL byte 2022-04-30 06:06:11 +08:00
zeertzjq
98f62a2cfa feat(mappings): allow special keys and modifiers in <Cmd> mapping 2022-04-29 21:12:48 +08:00
Justin M. Keyes
72652cbc46
feat(test): use nvim_exec in helpers.source() #16064
helpers.source() was a hack to work around the lack of anonymous
:source. Its "create tempfile" behavior is not a required part of most
tests that use it.

Some tests still need the old "create tempfile" behavior either because
they test SID behavior, or because of missing nvim_exec features: #16071
2022-03-27 10:25:55 -07:00
Björn Linse
5a836d4767 screen: don't unconditionally clear messages on window scroll
In vim, scrolling a window might mess up the cmdline. To keep it simple,
cmdline was always cleared for any window scroll. In nvim, where safe scrolling
is implemented in the TUI layer, this problem doesn't exist.

Clearing the message on scrolling, when we not do it e.g when switching tabs
is a bit weird, as the former is a much smaller context change.

A vim patch introduced the possibility to avoid the cmdlline clear for
redraws caused by async events. This case will now trivially be covered,
as the redraw is always avoided.

vim-patch:8.0.0592: if a job writes to a buffer screen is not updated
2019-01-15 19:48:49 +01:00
Björn Linse
2271b10a8e insert: make <cmd> mapping work in completion (CTRL-X) mode 2018-12-01 10:37:46 +01:00
Björn Linse
5056d40b16 getchar: allow <SID> in <Cmd> mapping 2018-09-13 11:02:24 +02:00
Björn Linse
4a46ab8de9 cmdline: always use save_cmdline before command_line_enter
":normal :" might be invoked in various ways, so its safest to always
allow recursive invocation of cmdline mode
2018-08-17 10:48:48 +02:00
Björn Linse
98e7112390 msg: do not scroll entire screen (#8088) 2018-03-31 11:12:27 +02:00
Björn Linse
d407a48665 getchar: implement <Cmd> key to invoke command in any mode 2018-03-23 14:01:49 +01:00