Commit Graph

96 Commits

Author SHA1 Message Date
Björn Linse
050f3975f6 options: remove 'maxcombine` option (always use 6) 2018-06-13 10:11:35 +02:00
Justin M. Keyes
26d5a981eb do not pass NULL to os_getenv
closes #8393
2018-05-18 19:04:37 +02:00
Justin M. Keyes
2aa308c685
Merge #5658 'Apply :lmap in macros' 2018-05-17 02:13:31 +02:00
James McCoy
ec459965f5
test/options: Fix stdpath() failures on Windows 2018-04-01 22:40:20 -04:00
Christian Höltje
868b84199e eval: Add stdpath() method (#5297)
Adds the :stdpath method for fetching XDG standard directories.

Fixes #5297
2018-03-29 10:41:04 -04:00
James McCoy
79f9c2d9c6
Merge branch 'master' into yagebu/option-fixes 2018-03-28 21:54:39 -04:00
Matthew Malcomson
cc58ec9a80 Update documentation
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.
2018-03-14 10:39:14 +00:00
Matthew Malcomson
3b304fc04a 'keymap' now uses :lmap instead of :lnoremap
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.
2018-03-14 10:39:14 +00:00
Matthew Malcomson
d989051220 Split :lnoremap test into done and pending
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.
2018-03-14 10:39:14 +00:00
Matthew Malcomson
e01f35c4bb :lnoremap mappings should not be remapped when replaying a recording 2018-03-14 10:39:14 +00:00
Matthew Malcomson
20bfe0f2a3 Account for :lmap in macros
close #5652
Start by adding some tests
2018-03-14 10:39:14 +00:00
Matthieu Coudron
384a39479a 'fillchars': fix defaults logic; handle ambiwidth=double #7986
Update tests.
2018-02-23 00:48:35 +01:00
Justin M. Keyes
4fedad6c5b Merge #7753 'win: enable more functional tests' 2018-01-06 17:52:14 +01:00
Jan Edmund Lazo
7311fb7cad win: enable more functional tests
- plugin/shada_spec.lua: Use \r\n as Windows EOL for tests on
  BufWriteCmd, FileWriteCmd, FileAppendCmd. Alternative is 'set
  fileformat=unix'.
2018-01-06 17:47:00 +01:00
Justin M. Keyes
7c4bb23ff3 defaults: do :filetype stuff unless explicitly "off"
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
2018-01-04 10:32:09 +01:00
Justin M. Keyes
a3134bc480 test: tabstop=<big-number> #2838 2017-10-22 14:11:09 +02:00
Jakob Schnitzer
4403864da3 update tests 2017-06-28 20:23:03 +02:00
Jakob Schnitzer
e8829710bc Merge branch 'master' into option-fixes 2017-06-28 16:52:04 +02:00
Justin M. Keyes
d07661b9a3 log: Fall back to CWD-relative .nvimlog
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.
2017-06-07 00:27:26 +02:00
Justin M. Keyes
bb96b8219d log: set $NVIM_LOG_FILE; fallback to $XDG_DATA_HOME/nvim/log 2017-06-07 00:26:56 +02:00
Matthew Malcomson
033b1cb7d9 'pastetoggle': Revert support for multi-key value (#6724)
Reverts commit 337b6179df

Closes #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.
2017-05-31 13:20:06 +02:00
James McCoy
e20691ccb4
defaults_spec: Test changing :filetype/:syntax in -c, after defaults 2017-04-27 09:20:03 -04:00
Jakob Schnitzer
ff8b2eb435 Merge branch 'master' into option-fixes 2017-04-24 11:35:10 +02:00
ZyX
65fb622000 functests: Replace execute with either command or feed_command
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.
2017-04-09 03:24:08 +03:00
ZyX
9158cc171f functests: Refactor options/pastetoggle
Note: typo, ttimeoutlen not set ever.

Mention @hardenedapple
2017-04-08 23:48:22 +03:00
Matthew Malcomson
337b6179df 'pastetoggle': support value >1 char (#6421)
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.
2017-04-01 21:50:29 +02:00
Jakob Schnitzer
4049492b6d also test set_option 2017-04-01 12:26:58 +02:00
Jakob Schnitzer
8a55f9b1c8 update for changes in master; fix 'window'; tests 2017-03-31 18:30:06 +02:00
Jakob Schnitzer
db095f6563 options: more tests; check first set later; stricter validation 2017-03-30 23:04:54 +02:00
Jakob Schnitzer
44f039a1c8 options: fix setglobal for buf-local number options 2017-03-30 23:04:54 +02:00
Jakob Schnitzer
628d0335b8 options: add some tests 2017-03-30 23:04:54 +02:00
Jakob Schnitzer
e47622f26b options: setlocal should only set local value
For 'iminsert' and 'imsearch' the global value was always changed.
2017-03-30 23:04:54 +02:00
Justin M. Keyes
a90beeadbb defaults: 'showcmd', 'belloff', 'ruler'
- 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.
2017-03-16 18:44:10 +01:00
Justin M. Keyes
224f99b85d win: Append process dir to $PATH
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)
2017-02-04 11:07:49 +01:00
Rui Abreu Ferreira
32156f06f7 XDG: Windows: resolve $LOCALAPPDATA, $TEMP (#5278)
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
2017-01-08 03:18:00 +01:00
Rui Abreu Ferreira
39c628d031 Mark some functional tests as pending in Windows 2016-08-26 08:21:41 +01:00
James McCoy
84bf53b803
Set the default value for 'packpath'
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
2016-08-08 18:19:26 -04:00
ZyX
9767b9f00f functests: Also make sure that set all& does not expand 2016-07-10 02:04:27 +03:00
ZyX
3878626c05 functests: Add tests for XDG defaults 2016-07-10 02:04:27 +03:00
ZyX
895f712df8 option: Do not expand options, obtained from XDG vars
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
2016-07-10 02:04:27 +03:00
Justin M. Keyes
173d366a5b test: TUI colors ('t_Co') 2016-07-03 01:29:00 -04:00
Marco Hinz
0d9593ff14 Tests: check 'autochdir' on startup 2016-07-02 01:03:05 +02:00
ZyX
ff470bb853 functests: Check logs in lua code
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.
2016-06-10 21:50:49 +03:00
KillTheMule
360d0513d1 Satisfy testlint.
For that, make luatest ignore the preload.lua files.
2016-04-28 19:30:17 +02:00
Justin M. Keyes
523ff9c55c test: defaults_spec.lua 2016-04-15 02:23:27 -04:00
Justin M. Keyes
5a9d3be54c test: minor changes 2016-03-17 00:21:48 -04:00