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
Ref: #9342
Adds the option to have a single global statusline for the current window at the bottom of the screen instead of a statusline at the bottom of every window. Enabled by setting `laststatus = 3`.
Due to the fact that statuslines at the bottom of windows are removed when global statusline is enabled, horizontal separators are used instead to separate horizontal splits. The horizontal separator character is configurable through the`horiz` item in `'fillchars'`. Separator connector characters are also used to connect the horizontal and vertical separators together, which are also configurable through the `horizup`, `horizdown`, `vertleft`, `vertright` and `verthoriz` items in `fillchars`.
The window separators are highlighted using the `WinSeparator` highlight group, which supersedes `VertSplit` and is linked to `VertSplit` by default in order to maintain backwards compatibility.
`:verbose` didn't work properly with lua configs (For example:
options or keymaps are set from lua, just say that they were set
from lua, doesn't say where they were set at.
This fixes that issue. Now `:verbose` will provide filename and line no
when option/keymap is set from lua.
Changes:
- compiles lua/vim/keymap.lua as vim/keymap.lua
- When souring a lua file current_sctx.sc_sid is set to SID_LUA
- Moved finding scripts SID out of `do_source()` to `get_current_script_id()`.
So it can be reused for lua files.
- Added new function `nlua_get_sctx` that extracts current lua scripts
name and line no with debug library. And creates a sctx for it.
NOTE: This function ignores C functions and blacklist which
currently contains only vim/_meta.lua so vim.o/opt wrappers aren't
targeted.
- Added function `nlua_set_sctx` that changes provided sctx to current
lua scripts sctx if a lua file is being executed.
- Added tests in tests/functional/lua/verbose_spec.lua
- add primary support for additional types (:autocmd, :function, :syntax) to lua verbose
Note: These can't yet be directly set from lua but once that's possible
:verbose should work for them hopefully :D
- add :verbose support for nvim_exec & nvim_command within lua
Currently auto commands/commands/functions ... can only be defined
by nvim_exec/nvim_command this adds support for them. Means if those
Are defined within lua with vim.cmd/nvim_exec :verbose will show their
location . Though note it'll show the line no on which nvim_exec call was made.
Update runtime files
944697ae19
Doc changes:
Include remote_*() (even though +clientserver and remote.txt isn't ported yet)
Omit screenpos() (need v8.2.4389)
Other changes are N/A or cannot be directly applied
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.
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.
docs(reg_recorded): add links to relevant docs
docs(Recording): update docs to match implementation
docs(Q) update references of Q to be gQ
docs(autocmd) add description about state of reg_record{ing,ed} for RecordingLeave
docs(vim_diff) add Recording{Enter,Leave} to features
docs(index) removed duplicate gQ
docs(options) removed line about gQ erroring in visual mode
Update runtime/doc/vim_diff.txt
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
docs(vim_diff) removed double mention of Q
Problem: OS/2 and MS-DOS are still mentioned, even though support was
removed long ago.
Solution: Update documentation. (Yegappan Lakshmanan, closesvim/vim#5368)
6f345a1458
Now remove the addition of "start/*" packages in 'packpath' as
explicit items in 'runtimepath'. This avoids 'runtimepath' from becoming
very long when using a lot of plugins as packages.
To get the effective search path as a list, use |nvim_list_runtime_paths()|
Problem: 'showbreak' cannot be set for one window.
Solution: Make 'showbreak' global-local.
ee85702c10
Change in oneleft() is N/A as the relevant condition was removed
(has_mbyte is always true for Nvim, so the condition was always false;
see commit 73dc9e9).
Use wp over curwin for curs_columns().
Required for v8.2.2903 (otherwise test fails as it'll leave the global
option set).
N/A patches for version.c:
vim-patch:8.1.2283: missed on use of p_sbr
Problem: Missed on use of p_sbr.
Solution: Add missing p_sbr change.
91e22eb6e0
Already ported in commit 43a874a.
Problem: Cannot disable modeline for an individual file.
Solution: Recognize "nomodeline" in a modeline. (Hu Jialun, closesvim/vim#8798)
9dcd349ca8
Cherry-pick missing modeline for test_modeline.vim (heh) from v8.2.1432.
Copy the behavior of 'undodir' and create the last specified directory
in the 'backupdir' option if it doesn't exist.
Use trailing slashes for 'backupdir' as well as 'viewdir' and 'undodir'
by default. Note that 'undodir' always behaves as though it has the
trailing slashes, regardless of whether or not they are present. They
are added to the default option value to minimize surprise.
The '.' value in 'backupdir' is kept because the default behavior for
backups is solely to have a backup if the save of the main file to disk
fails. As soon as that save is completed the backup file is removed, so
generally there is no need to put them in a central location.
Co-authored by: murphy66 <murphy66@gmail.com>