Problem: A popup created with "cursorline" will ignore "firstline".
Solution: When both "cursorline" and "firstline" are present put the cursor
on "firstline". (closesvim/vim#7000) Add the "winid" argument to
getcurpos().
99ca9c4868
Skip popup window related code.
Cherry-pick all of Test_getcurpos_setpos() from patch 8.2.0610.
Problem: Crash when using garbagecollect() in between rand().
Solution: Redesign the rand() and srand() implementation. (Yasuhiro
Matsumoto, closesvim/vim#5587, closesvim/vim#5588)
4f645c54ef
Omit test_srand_seed.
Unmacroify SHUFFLE_XOSHIRO128STARSTAR and SPLITMIX32 while we're at it (leave
ROTL alone as it's fairly innocent).
Problem: Random number generator in Vim script is slow.
Solution: Add rand() and srand(). (Yasuhiro Matsumoto, closesvim/vim#1277)
06b0b4bc27
Add missing method call usage to builtin.txt.
vim_time and test_settime is N/A.
Add a modeline to test_random.vim.
Use typval_T* over listitem_T* vars so we don't need to use TV_LIST_ITEM_TV all
over the place...
Remove NULL list checks (tv_list_len covers this).
Problem: Not easy to recognize the system Vim runs on.
Solution: Add more items to the features list. (Ozaki Kiichi, closesvim/vim#3855)
39536dd557
Some doc changes have already been applied. Some others are N/A.
"moon" was removed in patch 8.2.0427 so I did not add it.
Problem: The eval.txt help file is way too big.
Solution: Move the builtin function details to a separate file.
1cae5a0a03
Note: Neovim-specific references to |functions| were changed to
|builtin-functions|. This included updates to:
1. test/functional/vimscript/functions_spec.lua
2. test/functional/vimscript/eval_spec.lua
3. runtime/doc/lua.txt
These versions of python has reached End-of-life. getting rid
of python2 support removes a lot of logic to support two
incompatible python versions in the same version.
An extra backtick was explicitly written to show what a backtick looked
like, but it interferes with the syntax highlighting which thinks that
it's a part of a concealed group and couples it with the wrong backtick.
Problem: Cannot change the register used for Select mode delete.
Solution: Make CTRL-R set the register to be used when deleting text for
Select mode. (Shougo Matsushita, closesvim/vim#9531)
4ede01f188
Problem: "verbose set efm" reports the location of the :compiler command.
(Gary Johnson)
Solution: Add the "-keepscript" argument to :command and use it when
defining CompilerSet.
58ef8a31d7
This is a follow-on to #17040. The real benefit of #17040 was ensuring
that the ftplugin FileType autocommand was defined first and thus always
fired first. A side effect of the implementation in #17040 was that
setting variables that modified the state of filetype detection (such as
g:did_load_filetypes or g:do_filetype_lua) could no longer be set in the
user's init file. Filetype detection can also no longer be prevented
from loading by using `:filetype off`.
This PR addresses both of those side effects by unconditionally sourcing
ftplugin.vim and indent.vim before the user's init file (which ensures
that these autocommands run first) and sourcing filetype.vim *after* the
user's init file (thus allowing it to be blocked or modified).
This includes a partial port of Vim patch 8.2.2569 and some changes to
nvim_eval_statusline() to allow a multibyte fillchar. Literally every
line of C code touched by that patch has been refactored in Nvim, and
that patch contains some irrelevant foldcolumn tests I'm not sure how to
port (as Nvim's foldcolumn behavior has diverged from Vim's).
Problem: 'virtualedit' can only be set globally.
Solution: Make 'virtualedit' global-local. (Gary Johnson, closesvim/vim#8638)
53ba05b090
I changed some macros to unsigned integer literals to avoid compiler warnings.
Co-authored-by: Sean Dewar <seandewar@users.noreply.github.com>
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: Sebastian Volland <seb@baunz.net>
Co-authored-by: Lewis Russell <lewis6991@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
This introduces two new functions `vim.keymap.set` & `vim.keymap.del`
differences compared to regular set_keymap:
- remap is used as opposite of noremap. By default it's true for <Plug> keymaps and false for others.
- rhs can be lua function.
- mode can be a list of modes.
- replace_keycodes option for lua function expr maps. (Default: true)
- handles buffer specific keymaps
Examples:
```lua
vim.keymap.set('n', 'asdf', function() print("real lua function") end)
vim.keymap.set({'n', 'v'}, '<leader>lr', vim.lsp.buf.references, {buffer=true})
vim.keymap.set('n', '<leader>w', "<cmd>w<cr>", {silent = true, buffer = 5 })
vim.keymap.set('i', '<Tab>', function()
return vim.fn.pumvisible() == 1 and "<C-n>" or "<Tab>"
end, {expr = true})
vim.keymap.set('n', '[%', '<Plug>(MatchitNormalMultiBackward)')
vim.keymap.del('n', 'asdf')
vim.keymap.del({'n', 'i', 'v'}, '<leader>w', {buffer = 5 })
```
Other refs to 05.3 don't need to be updated as they refer to the simple mappings
section anyway. Seems they weren't updated when the defaults.vim section was
added as 05.3 instead.