Commit Graph

11204 Commits

Author SHA1 Message Date
Justin M. Keyes
44b4f8c6e9
Merge #8679 from justinmk/doc 2018-07-18 13:42:07 +02:00
Justin M. Keyes
0615450688 gen_api_vimdoc.py: add whitespace before "~" 2018-07-18 13:38:06 +02:00
Justin M. Keyes
1999919c31 doc 2018-07-18 13:38:06 +02:00
James McCoy
cd6e7e8cf3
Merge pull request #8743 from dimbleby/multiple-children
Check all child processes for exit in SIGCHLD handler
2018-07-16 10:26:24 -04:00
Björn Linse
dfe79b67a5
Merge pull request #8651 from MichaHoffmann/feature_refactor_channel
channel.c: refactor spaghetti code
2018-07-15 19:55:53 +02:00
Björn Linse
c230ef24a2
Merge pull request #8746 from oni-link/fix.rpcstart2
Fix crash in channel_job_start() in combination with rpc and unknown command
2018-07-15 19:48:40 +02:00
micha
099718ae6d dispatch.c: changed api_set_error_call 2018-07-15 12:12:03 +02:00
oni-link
c180741189 channel.c: Prevent channel_destroy_early() from freeing uninitialized rpc stuff
Without this patch the following commands would crash:
    :call rpcstart('unknown_command')

    :set sh=unknown_command
    :call jobstart('ls',{'rpc':1})
2018-07-15 09:30:47 +02:00
David Hotham
dee2bf7b52 Check all child processes for exit in SIGCHLD handler
If a second and third child exit while we are already in the handler, we
will only see a single additional SIGCHLD.  Therefore the handler must
not stop after processing a single child but should check all children.

Fixes #8740
2018-07-14 14:18:34 +01:00
micha
ed02278e42 channel.c: refactor spaghetti code
channel.c: WIP remove redundant method check and added FUNC_ATTR_NONNULL_ALL macro

channel.c channel_defs.h helpers.c: added Error field to RequestEvent, added no_op handler func

channel.c: use const char* instead of string and cleanup

channel.c; channel_defs.h; helpers.c: removed error from event again; send errors directly to the channel without using handlers and events

channel.c: fixed memory leak and lint errors

api/private/dispatch.c; api/vim.c; msgpack_rpc/channel.c msgpack_rpc/helpers.c added Error* field to msgpack_get_handler_for; further refactored channel.c

channel.c:323 changed order of evaluation in if statement

channel.c: removed superflous whitespace

dispatch.c: review comment
2018-07-14 11:47:18 +02:00
James McCoy
4874214139
Merge pull request #8737 from dimbleby/overly-general-waitpid
Only waitpid() for processes that we care about
2018-07-13 19:59:09 -04:00
David Hotham
fe913d7838 Only waitpid() for processes that we care about
It seems as though in an AppImage there's an extra child process that
dies at some early point, before we have set up a SIGCHLD handler.  So
when we later get a SIGCHLD from a child that we do care about,
waitpid(-1, ...) tells us about the extra child - and we don't notice
that the interesting child has exited.

Or something like that!

See also:

* https://patchwork.kernel.org/patch/9949491/ in which perf hit
something similar
* discussion at the AppImage repository:
https://github.com/AppImage/AppImageKit/issues/812#issuecomment-404662110.

Fix is to be explicit about which process we are waitpid()'ing for, so
we never need be distracted by children that we don't know about.

Fixes #8104
2018-07-13 20:56:04 +01:00
Jan Edmund Lazo
392817c2da vim-patch:8.0.0630: it is not easy to work on lines without a match (#8734)
Problem:    The :global command does not work recursively, which makes it
            difficult to execute a command on a line where one pattern matches
            and another does not match. (Miles Cranmer)
Solution:   Allow for recursion if it is for only one line. (closes vim/vim#1760)
f84b122a99
2018-07-13 21:14:46 +02:00
Justin M. Keyes
fc45c97829 Merge #8736 'vim-patch:8.0.0697: stable keymap.h' 2018-07-13 20:54:52 +02:00
Jan Edmund Lazo
eaf54132f9 keymap: add commented events to match 8.0.0697
KE_MOUSEMOVE, KE_CANCEL are added in later patches.
2018-07-13 11:43:05 -04:00
Jan Edmund Lazo
175297a23a tests: <SNR> is represented as 'R' (ASCII) 2018-07-12 20:26:54 -04:00
Marco Hinz
01570f1ff3
terminal: handle &confirm and :confirm on unloading (#8726)
Show a proper confirmation dialog when trying to unload a terminal buffer while
the confirm option is set or when :confirm is used.

Fixes https://github.com/neovim/neovim/issues/4651
2018-07-12 14:57:20 +02:00
Björn Linse
56065bbdc6
Merge pull request #8721 from bfredl/quickresize
Fix redrawing issues with narrow screen and remove extra wait in resize tests
2018-07-12 12:21:11 +02:00
Björn Linse
e51bffefa5 screen: truncate showmode messages
Before this, bottom of screen got messed up when modemsg (+ one extra
space to not force terminal scroll) didn't fit on one line.
2018-07-12 10:27:23 +02:00
Jan Edmund Lazo
798f05876c vim-patch:8.0.0{474,475,492,633,1251} (#8725)
* vim-patch:8.0.0474: the client-server feature is not tested

Problem:    The client-server feature is not tested.
Solution:   Add a test.
15bf76d40b

* vim-patch:8.0.0475: not enough testing for the client-server feature

Problem:    Not enough testing for the client-server feature.
Solution:   Add more tests.  Add the remote_startserver() function.  Fix that
            a locally evaluated expression uses function-local variables.
7416f3e73a

* vim-patch:8.0.0492: a failing client-server request can make Vim hang

Problem:    A failing client-server request can make Vim hang.
Solution:   Add a timeout argument to functions that wait.
81b9d0bd5c

Include src/nvim/testdir/test_clientserver.vim changes from
patches 8.0.0477, 8.0.0479.

* vim-patch:8.0.0633: the client-server test is still a bit flaky

Problem:    The client-server test is still a bit flaky.
Solution:   Wait a bit for the GUI to start.  Check that the version number
            can be obtained.
60964f6874

Include src/nvim/testdir/test_clientserver.vim changes
from patches 8.0.0507, 8.0.0511.

* vim-patch:8.0.1251: invalid expressin passed to WaitFor()

Problem:    Invalid expressin passed to WaitFor().
Solution:   Check if the variable exists.
d97fbf171e
2018-07-12 06:22:55 +02:00
Justin M. Keyes
671b244e6c
Merge #8701 from janlazo/vim-8.0.1140 2018-07-12 05:24:21 +02:00
Synray
07499a842b man.vim: C highlighting for EXAMPLES section #8709 2018-07-12 01:13:52 +02:00
James McCoy
9adb6ed74a
Merge pull request #8719 from jamessan/libuv-errno
test: Rename includes/pre/uv-errno.h to includes/pre/uv.h
2018-07-11 08:27:46 -04:00
Björn Linse
38f0ac07b5 tests/screen.lua: treat "resize" like any other event
Saves ~10 seconds in UI tests
2018-07-11 12:57:01 +02:00
James McCoy
9f8bd77d7b
test/includes: Use ${gen_cdefs} when pre-processing headers
Now that uv.h is directly being included, pre-processing of
test/includes/pre/uv.h fails on Linux with

    In file included from «SRCDIR»/neovim/test/includes/pre/uv.h:1:
    In file included from /usr/include/uv.h:62:
    /usr/include/uv/unix.h:72:11: fatal error: 'uv/pthread-barrier.h' file not found
    # include "uv/pthread-barrier.h"
              ^~~~~~~~~~~~~~~~~~~~~~
    1 error generated.

This happens because we're missing -D_GNU_SOURCE (part of ${gen_cdefs}),
which makes the pthread_barrier_* functionality visible.
2018-07-11 00:26:28 -04:00
James McCoy
ba7704ab4e
test: Rename includes/pre/uv-errno.h to includes/pre/uv.h
libuv users are only supposed to directly include uv.h.  In v1.21.0, all
the uv-*.h headers were renamed to uv/*.h, which caused the unit tests
to fail with

    [123/125] Generating post/uv-errno.h
    FAILED: test/includes/post/uv-errno.h
    cd «SRCDIR»/src/neovim/build/test/includes && /usr/bin/clang -std=c99 -E -P «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h -I/usr/include -I/usr/include -o «SRCDIR»/neovim/build/test/includes/post/uv-errno.h
    «SRCDIR»/src/neovim/test/includes/pre/uv-errno.h:1:10: error: 'uv-errno.h' file not found with <angled> include; use "quotes" instead
    #include <uv-errno.h>
             ^~~~~~~~~~~~
             "uv-errno.h"

The intention of the file is to extend libuv's error constants with more
values used by the unit tests.  This can just as easily be achieved
without poking into pseudo-private header files.
2018-07-11 00:26:07 -04:00
Jan Edmund Lazo
0fb695df8a vim-patch:8.0.0697: recorded key sequences may become invalid
Problem:    Recorded key sequences may become invalid.
Solution:   Add back KE_SNIFF removed in 7.4.1433. Use fixed numbers for the
            key_extra enum.
8858498516
2018-07-10 21:52:11 -04:00
James McCoy
ec6e78e77c
Merge pull request #8716 from mhinz/vim-patch/wrapped-lines
[RFC] vim-patch.sh: handle wrapped commit messages
2018-07-10 20:12:14 -04:00
James McCoy
35b269f51f
vim-patch.sh: Unwrap commit messages when reviewing PRs
Longer summary lines for commits may be wrapped when downloading the
commit from GitHub.  Unwrapping the lines ensures they can be compared
with the raw Vim commits.

The difference before and after this patch using:

  ./scripts/vim-patch.sh -r 8684

Before:

  ✘ Wrong commit message.
    Expected:
  vim-patch:8.0.1464: completing directory after :find does not add slash

  Problem:    Completing directory after :find does not add slash.
  Solution:   Adjust the flags for globpath(). (Genki Sky)
  vim/vim@8a37b03
    Actual:
  vim-patch:8.0.1464: completing directory after :find does not
   add slash

  Problem:    Completing directory after :find does not add slash.
  Solution:   Adjust the flags for globpath(). (Genki Sky)

After:

  ✔ Found expected commit message.

[ci skip]
2018-07-10 19:54:44 -04:00
Jan Edmund Lazo
a315026dc2 vim-patch:8.0.0522: Win32: clipboard=unnamed in :global (#8717)
Problem:    MS-Windows: when 'clipboard' is "unnamed" yyp does not work in a
            :global command.
Solution:   When setting the clipboard was postponed, do not clear the
            register.
3fcfa35f82
2018-07-11 00:15:09 +02:00
Michael Hoffmann
0ed8b12a07 transstr_buf: fix length comparison #8681
closes #8466
closes #8664
Regression by 0d7daaad98.

- Fix length comparison.
- Fix loop(s) which iterated over all fields of array `pcc` even if it
  was not filled up (try unicode 0x9f as statusline character).

Note about the tests:
- To input unicode with more than two hex digits you can use <C-v>U...:
  a + U+fe20: a︠
  a + U+fe20 + U+fe21: a︠︡
2018-07-10 21:57:26 +02:00
ZviRackover
627cc1b3d8 test: build_stl_str_hl (#8703)
Improve coverage of `build_stl_str_hl`.
Minor removal of dead code in the tested function.
2018-07-10 20:46:40 +02:00
Jan Edmund Lazo
2574f299e5 vim-patch:8.0.1464: add slash when completing directory #8684
Problem:    Completing directory after :find does not add slash.
Solution:   Adjust the flags for globpath(). (Genki Sky)
8a37b03289
2018-07-10 19:33:18 +02:00
James McCoy
d241f278d3
Merge pull request #8708 from blueyed/fix-standout
Fix standout mode
2018-07-10 11:32:27 -04:00
James McCoy
13bdc21faf
Merge pull request #8712 from jamessan/unicode-11
Update unicode files
2018-07-10 06:53:48 -04:00
James McCoy
7b2f6a7e5f
Update unicode files 2018-07-10 06:53:11 -04:00
James McCoy
44a284d71c vim-patch.sh: review_commit: Fix regex for vim version
067bb1e9f changed the commit format to include a brief description in
the summary line of the commit.
2018-07-09 13:55:21 -04:00
James McCoy
56af2f8c5f vim-patch.sh: Use single quotes to avoid doubling backslashes 2018-07-09 13:51:13 -04:00
Brayden Banks
9afed40ea6 man.vim: fix for mandoc (#8698)
When giving a section, the first candidate selection was not performed.

followup/fixup #8341
2018-07-08 17:31:10 +02:00
Daniel Hahler
07f82ad1be TUI: urxvt: also send xterm focus-reporting seqs #8699
urxvt supports the xterm sequence for focus reporting in master / CVS
since 2016 [1].

This has not been released yet, but is expected to be in 9.23.

In 3d0ee17 a special case for rxvt was added, which requires a custom
urxvt extension, see #7578.

Since urxvt 9.23 is not released still, and extensions for handling this
manually appear to be in use, this sends both escape sequences for rxvt.

Fixes https://github.com/neovim/neovim/issues/8695.

1: 75264fa544 (diff-2c8f5590ce4fa7495edcf7572c89c77b)
2018-07-08 17:27:09 +02:00
Daniel Hahler
813563365c [WIP/RFC] Fix standout mode
It was not working for me in different terminals.

This patch makes it work in the same way like reverse.

Test:

    :hi jediUsage cterm=standout | hi jediUsage
2018-07-08 17:26:17 +02:00
Jan Edmund Lazo
21879247e7 vim-patch:8.0.1387: wordcount test is old style
Problem:    Wordcount test is old style.
Solution:   Change into a new style test. (Yegappan Lakshmanan, closes vim/vim#2434)
a703aaee4d
2018-07-07 23:36:03 -04:00
Jan Edmund Lazo
9836283c49 vim-patch:8.0.1022: test 80 is old style
Problem:    Test 80 is old style.
Solution:   Turn it into a new style test. (Yegappan Lakshmanan)
1a333bc44a
2018-07-07 22:59:30 -04:00
Justin M. Keyes
57fafcea23
Merge #8702 from janlazo/nvim-8.0.0654 2018-07-08 00:08:21 +02:00
Daniel Hahler
378d5f0fa3 clint: use stdout for normal/expected output (#8700) 2018-07-08 00:02:27 +02:00
Jan Edmund Lazo
a5ed460241 tests: endfunc allows uncommented bar 2018-07-07 13:31:55 -04:00
Jan Edmund Lazo
0ac67853b9 vim-patch: finish port of 8.0.0{654,663,667}
Fix ex_function so that :endfunction passes the test.
Remove variables, added in 60c0252672.
2018-07-07 10:17:13 -04:00
Jan Edmund Lazo
b5c0031d4e oldtests: fix func Test_echo_and_string() 2018-07-07 07:14:06 -04:00
Jan Edmund Lazo
37757b4f09 vim-patch:8.0.1253: still too many old style tests
Problem:    Still too many old style tests.
Solution:   Convert a few more tests to new style. (Yegappan Lakshmanan,
            closes vim/vim#2272)
430dc5d360

Skip Test_tag_file_encoding.
083_tag_search_with_file_encoding_spec.lua handles the same test case.
2018-07-06 23:51:46 -04:00
Jan Edmund Lazo
41ccdb1ef2 vim-patch:8.0.1140: still old style tests
Problem:    Still old style tests.
Solution:   Convert two tests to new style. (Yegappan Lakshmanan)
bb3e6416f1
2018-07-06 22:32:45 -04:00