| Commit message (Collapse) | Author | Age |
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem: Cannot detect overstrike mode in Cmdline mode
Solution: Make mode() return "cr" for overstrike
closes: vim/vim#13569
https://github.com/vim/vim/commit/d1c3ef1f47c87d1da056c56564e1985fe6f2931d
|
| |
|
| |
|
|
|
|
|
|
|
| |
We already have an extensive suite of static analysis tools we use,
which causes a fair bit of redundancy as we get duplicate warnings. PVS
is also prone to give false warnings which creates a lot of work to
identify and disable.
|
| |
|
|
|
|
|
|
| |
Problem: With lots of events, UI flush may be delayed for too long.
Solution: Flush UI when no input is available. This still flushes less
frequently than before #25629, when a flush also happens when
typeahead buffer is empty but input is available.
|
|
|
|
|
|
| |
- Move vimoption_T to option.h
- option_defs.h is for option-related types
- option_vars.h corresponds to Vim's option.h
- option_defs.h and option_vars.h don't include each other
|
| |
|
|
|
|
|
|
|
|
|
| |
Problem: SafeState autocommand interferes with debugging.
Solution: Do not trigger SafeState while debugging. (closes vim/vim#9697)
https://github.com/vim/vim/commit/46f3080e5cd4cd1bae23e72a429a8195eb1ded7a
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: SafeStateAgain not triggered if callback uses feedkeys().
Solution: Check for safe state in the input loop. Make log messages easier
to find. Add 'S' flag to state().
https://github.com/vim/vim/commit/d103ee78432f9036d243b18dd5aac1263d3b7dc9
Include misc1.c change from patch 8.1.2062.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
| |
Problem: Not clear why SafeState and SafeStateAgain are not triggered.
Solution: Add log statements.
https://github.com/vim/vim/commit/37d1807a801d5296f00b3ac85a38b26cfe6de55c
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: SafeState may be triggered at the wrong moment.
Solution: Move it up higher to after where messages are processed. Add a
SafeStateAgain event to tigger there.
https://github.com/vim/vim/commit/69198cb8c08f124729c41a4681f2d142228a9139
SafeStateAgain is N/A.
Move SafeState functions to state.c.
Co-authored-by: Bram Moolenaar <Bram@vim.org>
|
|
|
|
| |
Notable changes: replace all infinite loops to `while(true)` and remove
`int` from `unsigned int`.
|
|
|
| |
Closes https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
drawscreen.c vs screen.c makes absolutely no sense.
The screen exists only to draw upon it, therefore helper functions
are distributed randomly between screen.c and the file that
does the redrawing. In addition screen.c does a lot of drawing on the
screen.
It made more sense for vim/vim as our grid.c is their screen.c
Not sure if we want to dump all the code for option chars into
optionstr.c, so keep these in a optionchar.c for now.
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Allow Include What You Use to remove unnecessary includes and only
include what is necessary. This helps with reducing compilation times
and makes it easier to visualise which dependencies are actually
required.
Work on https://github.com/neovim/neovim/issues/549, but doesn't close
it since this only works fully for .c files and not headers.
|
|
|
|
|
|
|
|
|
|
| |
CTRL-C (#20722)
Problem: ModeChanged autocmd not executed when Visual mode is ended with
CTRL-C.
Solution: Do not trigger the autocmd when got_int is set. (closes vim/vim#11394)
https://github.com/vim/vim/commit/61c4b04799bf114cadc3bbf212ae8b2ad22a6980
Cherry-pick removal of cmdwin feature check from patch 9.0.0663.
|
|
|
|
|
|
|
|
|
|
| |
This was used in the past with assumption that curwin/curbuf
is "special" but this has not been true since basically forever
at this point.
Reduce NOT_VALID/CLEAR panic in options.lua . These should not
be set if an effect of the option is causing something
which by itself invokes redraw_later().
|
|
|
|
| |
It's confusing to mix vendored dependencies with neovim source code. A
clean separation is simpler to keep track of and simpler to document.
|
| |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: The screen.c file is much too big.
Solution: Split it in three parts. (Yegappan Lakshmanan, closes vim/vim#4943)
https://github.com/vim/vim/commit/7528d1f6b5422750eb778dfb550cfd0b0e540964
This is an approximation vim-patch 8.1.2057. Applying the patch directly
isn't feasible since our version of screen.c has diverged too much,
however we still introduce drawscreen.c and drawline.c:
- screen.c is now a much smaller file used for low level screen functions
- drawline.c contains everything needed for win_line()
- drawscreen.c contains everything needed for update_screen()
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
| |
this works similar to <c-o> or <c-\><c-o> in insert mode
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: File for Insert mode is much too big.
Solution: Split off the code for Insert completion. (Yegappan Lakshmanan,
closes vim/vim#4044)
https://github.com/vim/vim/commit/7591bb39d58ece38a5fef984a08ea9012616c1f9
Cherry-pick ins_compl_len() -> get_compl_len() from patch 8.2.4001.
Revert a71c5e9eb98fbb2ca88510269935cdcda37369fc: ctrl_x_mode is no
longer a global variable, so l_ctrl_x_mode is no longer needed.
|
|
|
|
|
|
|
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Dan Sully <dan+github@sully.org>
Co-authored-by: saher <msaher.shair@gmail.com>
Co-authored-by: Stephan Seitz <stephan.seitz@fau.de>
Co-authored-by: Benedikt Müller <d12bb@posteo.de>
Co-authored-by: Andrey Mishchenko <mishchea@gmail.com>
Co-authored-by: Famiu Haque <famiuhaque@protonmail.com>
Co-authored-by: Oliver Marriott <hello@omarriott.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem:
1. The main log routine does not protect itself against recursion.
log_lock() doesn't guard against recursion, it would deadlock...
2. 22b52dd462e5 (#11501) regressed 6f27f5ef91b3 (#10172), because
set_init_1..process_spawn tries to log (see backtrace below), but the
mutex isn't initialized yet. Even if the mutex were valid, we don't
want early logging to fallback to stderr because that can break
embedders when stdio is used for RPC.
frame 1: 0x00000001001d54f4 nvim`open_log_file at log.c:205:7
frame 2: 0x00000001001d5390 nvim`logmsg(log_level=1, context="UI: ", func_name=0x0000000000000000, line_num=-1, eol=true, fmt="win_viewport") at log.c:150:20
frame : 0x000000010039aea2 nvim`ui_call_win_viewport(grid=2, win=1000, topline=0, botline=1, curline=0, curcol=0, line_count=1) at ui_events_call.generated.h:321:3
frame 4: 0x00000001003dfefc nvim`ui_ext_win_viewport(wp=0x0000000101816400) at window.c:939:5
frame 5: 0x00000001003ec5b4 nvim`win_ui_flush at window.c:7303:7
frame 6: 0x00000001003a04c0 nvim`ui_flush at ui.c:508:3
frame 7: 0x00000001002966ba nvim`do_os_system(argv=0x0000600000c0c000, input=0x0000000000000000, len=0, output=0x0000000000000000, nread=0x00007ff7bfefe830, silent=false, forward_output=false) at shell.c:894:3
frame 8: 0x0000000100295f68 nvim`os_call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_args=0x0000000000000000) at shell.c:663:18
frame 9: 0x0000000100295845 nvim`call_shell(cmd="unset nonomatch; vimglob() { while [ $# -ge 1 ]; do echo \"$1\"; shift; done }; vimglob >/var/folders/gk/3tttv_md06987tlwpyp62jrw0000gn/T/nvimwwvwfD/0 ~foo", opts=kShellOptExpand | kShellOptSilent | kShellOptHideMess, extra_shell_arg=0x0000000000000000) at shell.c:712:14
frame 10: 0x0000000100294c6f nvim`os_expand_wildcards(num_pat=1, pat=0x00007ff7bfefeb20, num_file=0x00007ff7bfefee58, file=0x00007ff7bfefee60, flags=43) at shell.c:328:7
...
frame 23: 0x000000010028ccef nvim`expand_env_esc(srcp=",~foo", dst="~foo", dstlen=4094, esc=false, one=false, prefix=0x0000000000000000) at env.c:673:17
frame 24: 0x000000010026fdd5 nvim`option_expand(opt_idx=29, val=",~foo") at option.c:1950:3
frame 25: 0x000000010026f129 nvim`set_init_1(clean_arg=false) at option.c:558:19
frame 26: 0x00000001001ea25e nvim`early_init(paramp=0x00007ff7bfeff5f0) at main.c:198:3
frame 27: 0x00000001001ea6bf nvim`main(argc=1, argv=0x00007ff7bfeff848) at main.c:255:3
Solution:
1. Check for recursion, show "internal error" message.
- FUTURE: when "remote TUI" is merged, can we remove log_lock()?
2. Skip logging if log_init wasn't called yet.
|
| |
|
|
|
|
| |
Work on https://github.com/neovim/neovim/issues/459
|
|
|
|
|
|
|
|
| |
Problem: The mode #defines are not clearly named.
Solution: Prepend MODE_. Renumber them to put the mapped modes first.
https://github.com/vim/vim/commit/249591057b4840785c50e41dd850efb8a8faf435
A hunk from the patch depends on patch 8.2.4861, which hasn't been
ported yet, but that should be easy to notice.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Duplicate code.
Solution: Move code below if/else. (closes vim/vim#10314)
https://github.com/vim/vim/commit/590f365f91511c164253c5b5812d4d0fc4a238d6
N/A patches for version.c:
vim-patch:8.2.4844: <C-S-I> is simplified to <S-Tab>
Problem: <C-S-I> is simplified to <S-Tab>.
Solution: Do not simplify CTRL if there is also SHIFT. (closes vim/vim#10313)
https://github.com/vim/vim/commit/758a8d199988b5b25566b2820db60dc2c9de3e58
vim-patch:8.2.4846: termcodes test fails
Problem: Termcodes test fails.
Solution: use CTRL-SHIFT-V to insert an unsimplified key. (closes vim/vim#10316)
https://github.com/vim/vim/commit/bad8a013c238595aa206690210eb1367fbc878f9
|
|
|
|
|
|
|
|
|
| |
Problem: The ModeChanged autocmd event is inefficient.
Solution: Avoid allocating memory. (closes vim/vim#10134) Rename
trigger_modechanged() to may_trigger_modechanged().
https://github.com/vim/vim/commit/2bf52dd065495cbf28e28792f2c2d50d44546d9f
Make v:event readonly for ModeChanged.
|
| |
|
| |
|
|
|
|
| |
Expand mappings first by calling `vpeekc()` directly.
|
|
|
|
|
|
|
|
| |
Problem: 'virtualedit' can only be set globally.
Solution: Make 'virtualedit' global-local. (Gary Johnson, closes vim/vim#8638)
https://github.com/vim/vim/commit/53ba05b09075f14227f9be831a22ed16f7cc26b2
I changed some macros to unsigned integer literals to avoid compiler warnings.
|
|
|
|
|
|
|
|
|
| |
When the user is in ex mode, a call to mode(1) is documented to return
"cv". However, it does not currently do so, because the check which
checks for ex mode is nested inside a conditional which is never reached
in ex mode. Vim uses an explicit check for exmode_active, so let's do
the same thing here. Add some tests for this case both with a TTY and
in silent mode.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: No generic way to trigger an autocommand on mode change.
Solution: Add the ModeChanged autocommand event. (Magnus Gross, closes vim/vim#8856)
https://github.com/vim/vim/commit/f1e8876fa2359b572d262772747405d3616db670
N/A patches for version.c:
vim-patch:8.2.3434: function prototype for trigger_modechanged() is incomplete
Problem: Function prototype for trigger_modechanged() is incomplete.
Solution: Add "void".
https://github.com/vim/vim/commit/28e591dd5080bbcd0f468f9d9597cedb716e28c9
Fixes #4399.
Fixes #7416.
|
|
|
|
|
| |
Problem: Cannot distinguish Normal and Terminal-Normal mode.
Solution: Make mode() return "nt" for Terminal-Normal mode. (issue vim/vim#8856)
https://github.com/vim/vim/commit/72406a4bd2896915b6f541e26d41521a59b1f846
|
|
|
|
|
|
|
| |
(#15886)
Problem: Completion submode not indicated for virtual replace.
Solution: Add submode to "Rv". (closes vim/vim#8945)
https://github.com/vim/vim/commit/cc8cd4453332276d55b4a1109eace5785a4f319d
|
|
|
| |
* fixup: force exactly one whitespace between type and variable
|
|
|
|
|
|
| |
Problem: mode() does not indicate using CTRL-O in Select mode.
Solution: Use "vs" and similar. (closes vim/vim#8640)
https://github.com/vim/vim/commit/eaf3f36168f85c8e0ab7083cd996b9fbe937045d
|
| |
|
|
|
|
|
|
|
| |
before, calling vim.schedule() from inside an event would execute
the scheduled callback immediately after this event without
checking for user input in between. Break event processing
whenever user input or an interrupt is available.
|
|
|
|
| |
- nvim_buf_get_extmarks: rename "amount" => "limit"
- rename `set_extmark_index_from_obj`
|
| |
|
| |
|