Problem: 'listchars' should be window-local.
Solution: Make 'listchars' global-local. (Yegappan Lakshmanan, Marco Hinz,
closesvim/vim#5206, closesvim/vim#7850)
eed9d46293
Nvim already has this feature, but it implements :set listchars the same
as :setglobal listchars, which is incorrect. Vim's implementation of
:set listchars is correct: using :set listchars clears local value.
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>
while there is some controversy, stdpath('cache') looks like a better fit for logs than stdpath('data'): you can remove logs without preventing nvim to work which fits the XDG_CACHE_HOME definition of `user specific non-essential data files`.
- Windows environment variables are semicolon-separated, but some logic
was assuming colon (:). This broke initialization and parsing of
XDG_CONFIG_DIRS, XDG_DATA_DIRS, 'runtimepath', stdpath(), etc.
- test/defaults_spec: enable tests on Windows
ref #12793
Problem: 'shortmess' flag "n" not used in two places.
Solution: Make use of the "n" flag consistent. (Nick Jensen, closesvim/vim#6245,
closesvim/vim#6244)
722e505d1a
These options were previously global. A global-local window option
behaves closer to a global option "per default" (i e with :set),
but still supports local behavior via :setl
Also this restores back-compat for nvim_set_option("fcs", ...)
which are currently broken on 0.4.x but worked in earlier versions
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.
This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).
Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
The test.functional.helpers and test.unit.helpers modules now include
all of the public functions from test.helpers, so there is no need to
separately require('test.helpers').
On Windows we store non-config data in "$XDG_DATA_HOME/nvim-data". But
the "…/site" items in 'runtimepath' did not correctly point to that
location, they used "…/nvim/site".
Fix the init logic to use "…/nvim-data/site".
closes#9910
Problem: ":if 0|syntax {on,off}|endif" skips the default of "syntax on"
because the executor was setting the `did_syntax_onoff` flag even though
"syntax {on,off}" is not actually executed.
closes#8728
Update vim_diff.txt with :lmap differences, update documentation on
'keymap', and add tests.
The tests added are to demonstrate the behaviour specified in the
documentation of :loadkeymap.
This means that the major way that :lmap mappings are applied works as
one would expect with macros.
This also means that having a translation with 'keymap' does not
preclude using mappings in insert mode with :imap.
There is some behaviour that we keep with the recent changes, and some
behaviour that we change.
Instetad of having one failing test covering all behaviour, we split
the test into two.
Until now, the default `:filetype ...` setup was skipped if the user
config touched `:filetype` in any way (including implicitly via `:syntax
on`). No one needs that, and it's very confusing.
Instead, proceed with `:filetype ... on` unless the user explicitly
called `:filetype ... off`.
closes#7765
If if the resolved $NVIM_LOG_FILE *and* stdpath("data")/log cannot be
created (e.g. because the XDG data directory does not exist), fall back
to .nvimlog in the current direcrtory.
Reverts commit 337b6179dfCloses#6716 at the expense of not being able to use a
multi-key 'pastetoggle' manually.
Multi-key 'pastetoggle' can still be used when inserting the entire
option into the typebuffer at once (though the use here is
questionable).
Also remove those tests to do with waiting for the completion of
'pastetoggle' and mention in the documentation that 'pastetoggle'
doesn't wait for timeout.
Hope this will make people using feed_command less likely: this hides bugs.
Already found at least two:
1. msgpackparse() will show internal error: hash_add() in case of duplicate
keys, though it will still work correctly. Currently silenced.
2. ttimeoutlen was spelled incorrectly, resulting in option not being set when
expected. Test was still functioning somehow though. Currently fixed.
If we `set pastetoggle=abcde`, and manually type it, then `vgetorpeek()`
sees part of the option before it has all been inserted into the
typebuffer.
To signify this it sets `keylen = KEYLEN_PART_KEY`, but the condition
about whether to return the current key from `vgetorpeek()` only checks
for `keylen = KEYLEN_PART_MAP`.
Add a check for `KEYLEN_PART_KEY` to account for the `'pastetoggle'`
option.
- Vim "unix default" of 'noshowcmd' is serving few users. And it's
inconsistent.
- 'ruler' and 'belloff=all' improve the out-of-the-box experience.
- Continue to use 'noshowcmd' and 'noruler' by default in the functional
tests to keep them fast.
TODO: Add a "disable slow stuff" command or mapping to address the
use-case of a very slow terminal connection.
This allows executables to be found by :!, system(), and executable() if
they live next to ("sibling" to) nvim.exe. This is what gvim on Windows
does, and also matches the behavior of Win32 SearchPath().
c4a249a736/src/os_win32.c (L354-L370)
After #4964 environment variables in the XDG "fallback" table are no
longer expanded.
Fallback to correctly expanded $LOCALAPPDATA, $TEMP. If that fails
(unlikely), fallback to hard-coded paths (e.g. ~/AppData/Local).
Closes#5255
As noted in “:help 'packpath'”, the default value is supposed to be the
same as that for 'runtimepath'. This was missed in the original port of
the packages functionality from Vim.
Closes#5193
It is a wrong thing to do, this makes valid variable values be treated
incorrectly: in
XDG_DATA_HOME='/home/$foo/.local/share'
`$foo` should be treated literally and not expanded to `foo` environment
variable value.
Also makes option_expand not try to expand too long strings even if these too
long strings are default values. Previously it thought that default values
should always be expanded. Also does not try to expand NULL should it be the
default value just in case.
Fixes#4961
It is otherwise impossible to determine which test failed sanitizer/valgrind
check. test/functional/helpers.lua module return was changed so that tests which
do not provide after_each function to get new check will automatically fail.