Commit Graph

1059 Commits

Author SHA1 Message Date
Justin M. Keyes
395ef5642e shell_escape: rename; refactor
- rename to shell_xescape_xquote
- move to os/shell.c
- disallow NULL argument
- eliminate casts, nesting
- test: empty shellxquote/shellxescape
2016-09-11 03:04:57 +02:00
Zhaosheng Pan
0991041ae7 system(): Respect 'sxe' and 'sxq' #2789
Fixes #2773
2016-09-10 22:21:40 +02:00
Justin M. Keyes
522b885a0d Merge #5295 'health.vim' 2016-09-05 19:34:00 -04:00
Justin M. Keyes
3c24704ac8 health.vim: Show results incrementally.
Also:

- improve precision of "No healthcheck found"
- fix SUGGESTIONS syntax group definition
- fix indentation of SUGGESTIONS
2016-09-05 19:22:01 -04:00
ZyX
6127eaef05 shada: Fix non-writeable ShaDa directory handling
Before this change,

    nvim -i /etc/shada

segfaults on exit if the file does not exist and user does not have
permissions to create the file at /etc/shada.

Closes #5296
Reported in #5277
https://github.com/neovim/neovim/issues/5277#issuecomment-243937255
2016-09-04 21:45:48 -04:00
HiPhish
cd321b7d0f getcwd(): Return empty string if CWD is invalid. #5292
Closes #5291

Restores behaviour identical to Vim. If the user calls the VimScript
function 'getcwd()' and the working directory cannot be found (for
example because the directory has been deleted since the last time it
was used) an empty string needs to be returned instead of throwing an
error.
2016-09-04 08:01:31 -04:00
Kalle Ranki
e75e9c10dc test: Add unittest spec for option.c (#5289)
Move typedef expand_T to types.h for tests
Fix lint error for old style comments

Describe 'check_ff_value' valid values as an initial test.

Fix 'get_sts_value' comment inaccuracy and add unit test for it
2016-09-04 09:54:41 +02:00
Alejandro Sanchez
626065d385 tchdir: New tab should inherit CWD. (#5227)
When a new tabpage gets created it will copy the local working directory
of the previous one, if there is any.
2016-09-04 03:40:01 +02:00
Björn Linse
acb7c826b3 api: fix leak when a api function is incorrectly called with a list.
This applies both to msgpack-rpc and eval.
2016-08-31 21:57:06 +02:00
Björn Linse
98a08c3e5a api: add tests for calling the api from vimscript 2016-08-31 21:57:06 +02:00
Björn Linse
1c22cab2fd api: consistently use nvim_ prefix and update documentation 2016-08-31 21:57:06 +02:00
Björn Linse
a2d25b7bf8 api: unify buffer numbers and window ids with handles
also allow handle==0 meaning curbuf/curwin/curtab
2016-08-31 21:40:20 +02:00
Björn Linse
0ade1bb706 Merge pull request #5225 from equalsraf/windows-functionaltests
Enable functional tests in Appveyor
2016-08-31 21:39:42 +02:00
Rui Abreu Ferreira
9ce81f7b2b functionaltest: Create lua helper for os.tmpname()
In Windows Lua's os.tmpname() returns relative paths starting with \s,
prepend them with $TEMP to generate a valid path.

In OS X os.tmpname() returns paths in '/tmp' but they should be in
'/private/tmp'. We cannot use os_name() for platform detection because
some tests use tempname() before nvim is spawned, instead use one of the
following:

1. Set SYSTEM_NAME environment variable before calling the tests, it
   is set from CMAKE_SYSTEM_NAME(i.e. uname -s or 'Windows')
2. Call uname -s
3. Assume windows
2016-08-31 11:32:28 +01:00
Björn Linse
c41bacc67c api/ui: add tests for popupmenu_external events
update screen.lua to use new style nvim_ui_attach
2016-08-29 10:17:31 +02:00
Rui Abreu Ferreira
39c628d031 Mark some functional tests as pending in Windows 2016-08-26 08:21:41 +01:00
Justin M. Keyes
2f2e729899 Merge commit 'refs/pull/upstream/5156' 2016-08-22 02:47:10 -04:00
Justin M. Keyes
ed49d9d866 CheckHealth: Accept [plugin1 [, plugin2 [, ...]]] args.
To healthcheck the "foo" plugin:
    :CheckHealth foo
To healthcheck the "foo" and "bar" plugins:
    :CheckHealth foo bar
To run all auto-discovered healthchecks:
    :CheckHealth
2016-08-21 22:03:28 -04:00
Justin M. Keyes
545e7a4163 CheckHealth
- Overlay markdown syntax/filetype, don't invent new filetypes/syntaxes.
- migrate s:check_ruby()
- s:indent_after_line1
- Less-verbose output
2016-08-21 21:25:33 -04:00
TJ DeVries
2cc523c3af CheckHealth
- Use execute() instead of redir
- Fixed logic on suboptimal pyenv/virtualenv checks.
- Move system calls from strings to lists. Fixes #5218
- Add highlighting
- Automatically discover health checkers
- Add tests

Helped-by: Shougo Matsushita <Shougo.Matsu@gmail.com>
Helped-by: Tommy Allen <tommy@esdf.io>

Closes #4932
2016-08-21 21:25:33 -04:00
Björn Linse
2d60a15e25 job control: reuse common job code for rpc jobs
This makes stderr and exit callbacks work for rpc jobs
2016-08-20 12:55:35 +02:00
Tommy Allen
605e74327a highlight: Added QuickFixLine highlight group
- Links to Search by default

screen.c: Combine CursorLine with QuickFixLine

- HLF_QFL takes priority over HLF_CUL

docs: Updated to mention QuickFixLine
runtime: Added QuickFixLine to nvimHLGroup
tests: QuickFixLine highlight
2016-08-17 17:48:15 -04:00
Tommy Allen
966f1abd8b tests: Set env variables in RunTests.cmake
- NVIM_RPLUGIN_MANIFEST
- XDG_CONFIG_HOME
- XDG_DATA_HOME
2016-08-17 16:22:21 -04:00
Björn Linse
57ac9b0934 api: handle null string in buffer_add_highlight 2016-08-17 09:34:01 +02:00
Björn Linse
725074aafc tests: add note to expect() message about snapshot_util() 2016-08-14 21:53:02 +02:00
Björn Linse
f332eba16c tests: don't ignore highlights in terminal tests 2016-08-14 21:53:02 +02:00
Björn Linse
4de10d43aa tests: don't ignore highlights in completion_spec 2016-08-14 21:53:02 +02:00
Björn Linse
f282b8ecac tests: don't ignore highlights in various tests 2016-08-14 21:53:02 +02:00
Björn Linse
0a882b4818 tests: don't ignore highlights in screen_basic_spec 2016-08-14 21:53:02 +02:00
Björn Linse
82b434dd51 tests: don't ignore highlights in mouse_spec 2016-08-14 21:53:02 +02:00
Björn Linse
a63f770bcb tests: don't ignore highlights in syntax_conceal_spec 2016-08-14 21:53:02 +02:00
Björn Linse
cc657951a9 tests: don't ignore highlights in highlight_spec 2016-08-14 21:53:02 +02:00
Björn Linse
7b29fdd200 tests: don't ignore highlights in searchhl_spec 2016-08-14 21:53:02 +02:00
Björn Linse
35b47890dd tests: don't ignore highlights in bufhl_spec 2016-08-14 21:53:02 +02:00
Björn Linse
9c4a94f964 tests: remove deprecated hl_colors 2016-08-14 21:53:02 +02:00
James McCoy
d0c0930acf Restore ":browse oldfiles" behavior from Vim
In 3b12bb225a, ":oldfiles" was taught to
behave like Vim's ":browse oldfiles" if ":oldfiles!" was used.  However,
this conflates the use of ! for abandoning a modified buffer with
choosing one file out of a list of oldfiles.

Now that ":browse" is supported again, ":browse oldfiles" will allow the
user to select an old file, while still complaining if that would cause
a modified buffer to be abandoned.  ":browse oldfiles!" will just
abandon the buffer, as expected.
2016-08-11 13:37:42 -04:00
Björn Linse
0a51d26b33 timers: do not crash after processing events in the handler 2016-08-10 11:22:28 +02:00
Justin M. Keyes
3b785b32f9 Merge #5188 from justinmk/travis-test-hack
Disable test on Travis macOS/OSX.
2016-08-09 21:31:30 -04:00
Justin M. Keyes
348fcee5fb test: Fix os_name() call. 2016-08-09 15:17:46 -04:00
Justin M. Keyes
68d9198501 XXX: CI: Disable hanging test on Travis OSX.
Temporary change to avoid frequent hangs on Travis macOS/OSX builds.
Hang does not occur on Quickbuild OSX (Yosemite) build.
Reverting e9061117a5 avoids the hang, but causes
more serious regressions on many more systems.

Note that the job_spec hang only happens with the gcc-4.9 Travis OSX build.

References #5002
References #5029
2016-08-09 15:17:46 -04: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
Justin M. Keyes
6da7d6890c Merge #5025 'input.c: Restore double click' 2016-08-07 23:52:27 -04:00
Justin M. Keyes
d69194ca8c test: mouse_spec
- Use the default buffer text provided by before_each (avoids extra steps and
  makes the tests more consistent with each other)
- Indent
- Adjust help doc
2016-08-07 23:50:40 -04:00
Justin M. Keyes
f1eb303187 Merge #5130 from equalsraf/tb-appveyor
Enable MSYS/MinGW builds in Appveyor
2016-08-07 17:35:10 -04:00
Rui Abreu Ferreira
25ec29d4e1 Windows: Fix functionaltest fixtures 2016-08-07 21:57:29 +01:00
sach1t
08a5f91481 test: Add tests for double, triple, and quadruple click 2016-08-07 13:21:03 -04:00
Justin M. Keyes
fe6ec75725 Merge #4964 from ZyX-I/no-xdg-expand
option: Do not expand options, obtained from XDG vars
2016-08-04 20:59:51 -04:00
Michael Ennen
6fe8c1d051 vim-patch:7.4.1305 #5094
Problem:    "\%1l^#.*" does not match on a line starting with "#".
Solution:   Do not clear the start-of-line flag. (Christian Brabandt)

7c29f38781

Helped-by: jamessan
Helped-by: mhinz
2016-08-01 03:59:04 -04:00
Justin M. Keyes
aa2c439940 eval.c: rename capture() to execute() (#5132) 2016-07-31 13:23:29 -04:00
KillTheMule
bd8ef4ea24 test: fix 2016-07-29 08:58:27 -04:00