A menu item can have separate bindings for each Vim mode.
:emenu checks to see which binding it should execute. But, it assumes
it can only be called from Normal mode, so its mode detection is based
on some guesswork. For instance, it detects if you've just used C-O
and, if so, uses the Insert mode binding.
Now that :emenu can be called from any mode (via vim_command), this
commit has it check the actual mode we're in, and simply use the
binding for that mode if we aren't in Normal mode.
Neither setting the 'columns' and 'lines' options nor using the
`:winsize` command resized the terminal window, which caused display
glitches.
Re: #2863
The test is also split in several blocks and heavily modernized. This was
done to prevent the following quoting and escaping problems during migration:
- the vim command `put =...` treats double quotes as the start of a comment so
they have to be escaped with a backslash
- when inserting control characters on the command line they have to be
escaped with <C-V>
The parts one and two of the test are functional identical so they are wrapped
in a local function. The only difference was which letters where used to test
the same feature.
Part six did test a flag in 'cpoptions' that has been removed in neovim. It
has therefore been removed as well.
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
There are more terminals which have bracketed paste support and it
doesnt seem to do any harm with terminals that dont support it eg screen
Reviewed-by: Marco Hinz <mh.codebro@gmail.com>
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
"+1 Let's see what happens" Justin M. Keyes <justinkz@gmail.com>
glibc on i386 seems to have an optimization that makes it harder to call
some math functions indirectly from inside an inlined function, causing
compile-time errors with some versions of gcc. This removes inlining on
that platform.
Closes#3071
Reviewed-by: Felipe Morales <hel.sheep@gmail.com>
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Reviewed-by: Michael Reed <Pyrohh@users.noreply.github.com>
There's no way this isn't some long-running joke:
"Just as ':print'. Was apparently added to Vi for
people that keep the shift key pressed too long..."
Note: A user command can overrule this command.
Regarding ':X': the command has been removed for a while, but the
documentation must have been missed, so remove it here.
Reviewed-by: Justin M. Keyes <justinkz@gmail.com>
Helped-by: @jusga
os.remove() wasn't removing the temporary swap directory which leads to
problems when the test is run a second time.
That's also the reason why the CI never caught this.
os.remove() got replaced by helpers.rmdir().
- lfs.rmdir() only removes empty directories
- os.remove() supercedes lfs.rmdir(); removes files and empty directories
- helpers.rmdir() first removes all files within a directory, then the
directory itself
The main problem is that <c-c> is a default mapping but also sets got_int.
Because of the former, normal_cmd() is kicked off which eventually leads to
sourcing the clipboard provider. But due to the latter, do_source() throws an
error, because got_int is set.
This is a temporary workaround and sources the clipboard provider before
main_loop(), if &clipboard is set.
References #3023.
- CPO_ALL and CPO_VI are identical, so merge them
- No longer check for the environment variable 'VIM_POSIX'
- In vim_diff.txt, mention the removal of 'cpoptions' flags
Added: TermOpen autocmd
Added: terminal mode (un)map commands
Options and commands not available in neovim ('cp' and variants, termcap
options, :shell, :fixdel) are highlighted as errors. Previously deleted
entries were restored.
Co-authored-by: Felipe Morales <hel.sheep@gmail.com>
Remove legacy tests from the old makefile that were forgotten after the test
migration. The tests are:
- test 26 migrated in da3ade6a59 merged in #1420
- test 27 migrated in ac52d84f16 merged in #1328
- test 43 migrated in c9159586b8 merged in #1420
- test 46 migrated in 5ea94e14f0 merged in #1328
- test 63 migrated in a040aa95c1 merged in #1930
Additionally the tests 71 and 72 where removed in
85338fe1d5 together with the +cryptv feature.
This effectively reverts 585e5d32a3
The pinning was done at a time when `lua_cliargs` caused test failures,
so an older version which didn't was pinned. We're now using the latest
version (2.5-1), so the cause of those failures were presumably fixed.
In Vim, which doesn't true colors, synIDattr('Foo', 'fg') returns either
ctermfg or guifg depending on whether vim or gvim is running.
True colors naturally use GUI colors, so synIDattr() has to be adapted to
return guifg, if a TUI with enabled true colors is used.
The same error checking/recovery code was duplicated among the f_acos,
f_asin, f_atan, f_ceil, f_cos, f_cosh, f_exp, f_floor, f_log, f_log10,
f_round, f_sin, f_sinh, f_sqrt, f_tan, f_tanh and f_trunc functions.
This commit moves that code into a wrapper function.
`trunc` is not in C90, but it is in C99, which is what neovim targets,
so we use it here.