Commit Graph

9738 Commits

Author SHA1 Message Date
ZyX
03a129aacf Merge branch 'master' into expression-parser 2017-11-19 22:05:22 +03:00
ZyX
6ea3a08fdb syntax: Fix duplicate group definitions 2017-11-19 22:01:19 +03:00
ZyX
7c20f60b88 unittests: Avoid infinite cycle somewhere because of init failure 2017-11-19 22:01:14 +03:00
ZyX
ebb33eddd9 tests: Stabilize float format and %e in format_luav and format_string 2017-11-19 22:00:59 +03:00
ZyX
731dc82f8c ex_getln: Fix memory leak in color_expr_cmdline 2017-11-19 21:21:45 +03:00
ZyX
f20f97c936 *: Fix linter errors 2017-11-19 21:13:27 +03:00
ZyX
a94255a7ac tests: Use single test file for unit and functional parser tests 2017-11-19 20:20:06 +03:00
ZyX
53fa435a1f functests: Fix ui/cmdline test 2017-11-19 19:34:15 +03:00
ZyX
764cf3251d charset: Add missing include needed for vim_str2nr 2017-11-19 19:27:21 +03:00
ZyX
c287893225 viml/parser/expressions,unittests: Do better testing, fix found issues 2017-11-19 19:22:54 +03:00
Justin M. Keyes
de8b1fd1de Merge #7587 'vim-patch:8.0.0283' 2017-11-19 13:47:37 +01:00
ckelsel
540ed64635 vim-patch:8.0.0283
Problem:    The return value of mode() does not indicate that completion is
            active in Replace and Insert mode. (Zhen-Huan (Kenny) Hu)
Solution:   Add "c" or "x" for two kinds of completion. (Yegappan Lakshmanan,
            closes vim/vim#1397)  Test some more modes.

e90858d022
2017-11-19 19:53:47 +08:00
Justin M. Keyes
d6f9d1df04 version bump 2017-11-18 12:46:38 +01:00
Justin M. Keyes
6d2c30daf3 NVIM v0.2.2
FEATURES:
a6de144c3e 'viewoptions': add "curdir" flag #7447
b6a603fe51 node.js remote-plugin support #7458
f5d4da0144 :checkhealth : validate 'runtimepath' #7526

FIXES:
e6beb60da5 :terminal : fix crash on resize #7547
f19e5d6530 work around gnome-terminal memory leak #7573
07931ed1c8 'guicursor': use DECSCUSR for xterm-likes #7576
f185c739bc 'os_open: UV_EINVAL on NULL filename' #7561
e8af34dc63 win: provider: Detect(): return *.cmd path #7577
eacd788cf5 :checkhealth : fix check for npm and yarn #7569
a43a573ad5 health.vim: normalize slashes for script path #7525
69e3308771 cmake: install runtime/rgb.txt
d0b05e3c36 runtime: syntax error in `runtime/syntax/tex.vim` #7518
55d8967147 tutor: some fixes #7510

CHANGES:
9837a9c401 remove legacy alias to `v:count` #7407
c5f001a46a runtime: revert netrw update #7557
67e4529292 defaults: scrollback=10000 #7556
881f9e42d1 process_close(): uv_unref() detached processes #7539
2017-11-18 12:39:14 +01:00
Justin M. Keyes
f19e5d6530 tui: setrgbf/setrgbb: emit semicolons for VTE
Severe memory leak observed on gnome-terminal 3.26.2 VTE 0.50.2 when
colon-delimited RGB sequences are used.

closes #7573
2017-11-18 12:26:09 +01:00
Eric Roberts
a6de144c3e 'viewoptions': add "curdir" flag #7447
The flag enables the current local directory set by ":lcd" to be saved
to views which is the current default behaviour. The option can be
removed to disable this behaviour.

closes #7435

vim-patch:8.0.1289
2017-11-18 12:02:15 +01:00
Justin M. Keyes
f185c739bc
Merge #7561 'os_open: UV_EINVAL on NULL filename' 2017-11-18 01:01:25 +01:00
Jan Edmund Lazo
e8af34dc63 win: provider: Detect(): return *.cmd path (#7577)
neovim-ruby-host is a ruby script.
neovim-node-host is a shell script.
Both don't work in cmd.exe so gem and npm provide batchfile shims.

Return the full path of these shims, cmd.exe knows better what to do with these files.
2017-11-17 23:52:51 +01:00
Justin M. Keyes
bf3f0efb3a os_nodetype: rework
Make the Windows impl closer to Vim os_win32.c, and the Unix impl closer
to Vim os_unix.c.

Outcomes:
- Do not send negative fd to close(). ref #4806 #4772 #6860
- Fallback return-value is now correct in (hopefully) all cases.
- unix: check S_ISXXX instead of relying on os_open (which can fail for
  irrelevant reasons). buf_write() expects NODE_WRITABLE for character
  devices such as /dev/stderr. 96f834a842
2017-11-17 23:26:51 +01:00
Justin M. Keyes
d135ba99b2 os_open, os_stat: UV_EINVAL on NULL filename
EINVAL (instead of EFAULT) because that's what glibc does:
https://github.com/bminor/glibc/blob/master/io/open.c#L35

os_nodetype: check for UV_EINVAL explicitly.

ref #4370
ref https://github.com/neovim/neovim/issues/4370#issuecomment-344366571
ref ac055d677a

ref #4772
2017-11-17 22:30:38 +01:00
Justin M. Keyes
07931ed1c8
tui: 'guicursor': use DECSCUSR for xterm-likes (#7576)
Anything claiming to be an xterm gets DECSCUSR. This is the only
reasonable choice unless/until we get more reliable detection (#7490).

ref #6997
closes #7550
2017-11-17 22:24:01 +01:00
Sewoong Park
ee031eb525 lint #7562 2017-11-17 00:57:36 +01:00
Billy Vong
eacd788cf5 :checkhealth: fix check for npm and yarn (#7569)
Fix bug that checked for npm AND yarn, where we wanted npm OR yarn.
But since we call `npm` exclusively, and it's highly unlikely you have
yarn installed without npm, let's just remove the yarn check altogether.

Addresses https://github.com/neovim/node-client/issues/41
2017-11-16 23:43:50 +01:00
Drew Neil
59b0d9f62d doc: Fix pathshorten() example (#7571) 2017-11-16 23:41:16 +01:00
zandrmartin
f8d40e7d53 health.vim: define highlights as default (#7560) 2017-11-14 22:08:50 +01:00
Justin M. Keyes
c5f001a46a
runtime: revert netrw update (#7557)
fixes #7527
fixes #7536
2017-11-14 20:56:00 +01:00
Justin M. Keyes
67e4529292
defaults: scrollback=10000 (#7556) 2017-11-14 20:55:25 +01:00
nateozem
30a21830d0 doc: test/README.md: migrate wiki info (#7552) 2017-11-14 01:43:52 +01:00
Justin M. Keyes
8fff2ef74a
vim-patch:8.0.0227 (#7548)
Problem:    Crash when 'fileformat' is forced to "dos" and the first line in
            the file is empty and does not have a CR character.
Solution:   Don't check for CR before the start of the buffer.

2aa5f696b9
2017-11-13 08:30:25 +01:00
James McCoy
8d8212d384
Merge pull request #7545 from jamessan/test-fixes
Fix test failures found in Debian builds, closes #7522
2017-11-12 21:09:44 -05:00
Marco Hinz
d5b7f28b44 test/unit/path_spec: expect correct buffer size (#7514)
Fixed-size buffers and lfs.currentdir().. does not compute. The tests would fail
if the current working directory was longer than expected.
2017-11-13 02:28:07 +01:00
Jan Edmund Lazo
a43a573ad5 health.vim: normalize slashes for script path (#7525)
:checkhealth reports that remote plugins are unregistered
after running :UpdateRemotePlugins because of the backslashes in filepath.
Normalize them to forward slashes because the paths in rplugin.vim are normalized in autoload/remote/host.vim.
2017-11-13 02:10:06 +01:00
Justin M. Keyes
e6beb60da5
:terminal : fix crash on resize (#7547)
closes #7538
Fix wrong window references from #7440

Remove some eager resizing. Still mostly doesn't address #4997.
2017-11-13 02:06:32 +01:00
Justin M. Keyes
20c672a460 Merge #7530 'vim-patch:8.0.0226 vim-patch:8.0.0224' 2017-11-13 01:26:22 +01:00
KunMing Xie
6b8c34137c vim-patch: NA
* vim-patch:8.0.0245

Problem:    The generated zh_CN.cp936.po message file is not encoded properly.
Solution:   Instead of using zh_CN.po as input, use zh_CN.UTF-8.po.

16038d50c4

* vim-patch:8.0.0248

Problem:    vim_strcat() cannot handle overlapping arguments.
Solution:   Use mch_memmove() instead of strcpy(). (Justin M Keyes,
            closes vim/vim#1415)

45600ce8f2
2017-11-12 23:27:08 +01:00
ZyX
342239a9c5 unittests,viml/parser/expressions: Start adding asgn parsing tests 2017-11-13 01:11:13 +03:00
ZyX
39c75d31be unittests: Fix automatic test case generation 2017-11-13 01:11:13 +03:00
ZyX
556451a7f2 unittests,syntax: Check for sanity of highlight_init_cmdline
Also fixes some errors found.
2017-11-13 01:11:13 +03:00
James McCoy
b63cde97f4
tests: terminal: Assert for SIGWINCH handling before continuing
Fixes test failures like

    test/functional/terminal/cursor_spec.lua @ 62: terminal cursor with number column is positioned correctly when focused
    ./test/functional/ui/screen.lua:302: Row 2 did not match.
    Expected:
      |{7:  1 }tty ready                                     |
      |*{7:  2 }{1: }                                             |
      |{7:  3 }                                              |
      |{7:  4 }                                              |
      |{7:  5 }                                              |
      |{7:  6 }                                              |
      |{3:-- TERMINAL --}                                    |
    Actual:
      |{7:  1 }tty ready                                     |
      |*{7:  2 }rows: 6, cols: 46                             |
      |{7:  3 }{1: }                                             |
      |{7:  4 }                                              |
      |{7:  5 }                                              |
      |{7:  6 }                                              |
      |{3:-- TERMINAL --}                                    |
2017-11-12 16:45:39 -05:00
James McCoy
0407ddb364
Use PRId64 to format Integer when calling api_set_error
Integer is a 64-bit type so using %d can produce incorrect results.

    test/functional/api/highlight_spec.lua @ 35: highlight api nvim_get_hl_by_id
    ...W7Xi/neovim-0.2.1/test/functional/api/highlight_spec.lua:46: Expected objects to be the same.
    Passed in:
    (string) 'Invalid highlight id: 7671724'
    Expected:
    (string) 'Invalid highlight id: 30000'
2017-11-12 16:45:39 -05:00
James McCoy
cf75de710c
tui_spec: Convert nil to "" before formatting it
This fixes an apparent difference in behavior between Lua and LuaJIT.
Lua fails to format nil:

    test/functional/terminal/tui_spec.lua:381: bad argument #2 to 'format' (string expected, got nil)
2017-11-12 16:45:39 -05:00
Justin M. Keyes
69e3308771 cmake: install runtime/rgb.txt
closes #6682
2017-11-12 15:52:21 +01:00
Justin M. Keyes
881f9e42d1
process_close(): uv_unref() detached processes (#7539)
Doc for UV_PROCESS_DETACHED in uv.h mentions:
> child process will still keep the parent's event loop alive unless
> the parent process calls uv_unref() on the child's process handle.

ref #3944
2017-11-12 15:34:04 +01:00
ZyX
45445e2e03 unittests: Add some more edge test cases 2017-11-12 03:52:26 +03:00
ZyX
c7495ebcc0 viml/parser/expressions: Add support for parsing assignments 2017-11-12 02:18:43 +03:00
ZyX
1aa6276c29 viml/parser/expressions: Replace lambda-specific WantedNode entries
This way code will be easier to adapt to handling (partially) non-expressions 
like :let lvalue part or :function definitions, and that would be needed in the 
future both for proper completion support and for the Ex commands parser.
2017-11-12 00:03:45 +03:00
ZyX
bbb21e5dd3 unittests: Add a way to show some custom messages only when crashed 2017-11-11 23:50:37 +03:00
ckelsel
ea020f2e26 fix lint error 2017-11-11 09:04:48 +08:00
Justin M. Keyes
b6a603fe51
Merge #7458 'remote: add node host' 2017-11-11 01:54:32 +01:00
KunMing Xie
a2fdd0a72f vim-patch:8.0.0237 (#7531)
Problem:    When setting wildoptions=tagfile the completion context is not set
            correctly. (desjardins)
Solution:   Check for EXPAND_TAGS_LISTFILES. (Christian Brabandt, closes vim/vim#1399)

ba47b51ff8
2017-11-11 01:26:55 +01:00