Commit Graph

11285 Commits

Author SHA1 Message Date
Jan Edmund Lazo
b479f89979 vim-patch:8.0.0617: hardcopy test hangs on MS-Windows
Problem:    Hardcopy test hangs on MS-Windows.
Solution:   Check the postscript feature is supported.
763209c57b
2018-06-19 15:10:17 -04:00
Jan Edmund Lazo
6d4d271694 vim-patch:8.0.0615: using % with :hardcopy wrongly escapes spaces
Problem:    Using % with :hardcopy wrongly escapes spaces. (Alexey Muranov)
Solution:   Expand % differently. (Christian Brabandt, closes vim/vim#1682)
bf15b8d78b
2018-06-19 15:08:43 -04:00
Justin M. Keyes
74d19f685f
Merge #8576 from justinmk/startup-empty-stdin 2018-06-19 21:04:08 +02:00
Jan Edmund Lazo
a10938ae31 vim-patch:8.0.0537: illegal memory access with :z and large count (#8592)
Problem:    Illegal memory access with :z and large count.
Solution:   Check for number overflow, using long instead of int. (Dominique
            Pelle, closes vim/vim#1612)
fa0ad0bb0b
2018-06-19 20:35:37 +02:00
James McCoy
943e607442
Merge pull request #8593 from jamessan/vim-patch-printf-fix
vim-patch: Replace shell variables in printf with formatted args
2018-06-19 11:05:28 -04:00
James McCoy
c8af12d0fa vim-patch: Replace shell variables in printf with formatted args
This ensures that special characters in the variables are not
interpreted as escapes/format characters in the printf string, as was
seen with upstream patch 8.0.0615.

    $ ./scripts/vim-patch.sh -p 8.0.0615
    Updating Vim sources: /$HOME/src/neovim/.vim-src
    ✔ Updated Vim sources.
    ✔ Found Vim revision 'bf15b8d78b22661db8b19d662b62bb9a061cdd37'.
    Creating patch...
    Pre-processing patch...
    ✔ Saved patch to '/$HOME/src/neovim/vim-8.0.0615.patch'.

    Fetching 'origin/master'.
    ✔ From https://github.com/neovim/neovim
     * branch                master     -> FETCH_HEAD

    Creating new branch 'vim-8.0.0615' based on 'origin/master'.
    ✔ Switched to a new branch 'vim-8.0.0615'
    Branch 'vim-8.0.0615' set up to track remote branch 'master' from 'origin'.

    Creating empty commit with correct commit message.
    ./scripts/vim-patch.sh: line 40: printf: `w': invalid format character
    ✔ [vim-8.0.0615 db7fbb016] vim-patch:8.0.0615: using ./scripts/vim-patch.sh: line 44: printf: `w': invalid format character
    ✘ [vim-8.0.0615 db7fbb016] vim-patch:8.0.0615: using

[ci-skip]
2018-06-19 10:20:48 -04:00
Jan Edmund Lazo
63b5f05d47 vim-patch:8.0.0455: the mode test may hang (#8577)
Problem:    The mode test may hang in Test_mode(). (Michael Soyka)
Solution:   Set 'complete' to only search the current buffer (as suggested by
            Michael)
ffea8c99d9
2018-06-19 10:51:51 +02:00
Jan Edmund Lazo
3c24a6c317 vim-patch:8.0.0542: getpos() can return a negative line number (#8580)
Problem:    getpos() can return a negative line number. (haya14busa)
Solution:   Handle a zero topline and botline. (closes vim/vim#1613)
a1d5fa65bc
2018-06-19 10:50:52 +02:00
Jan Edmund Lazo
b148213366 vim-patch:8.0.0598: building with gcc 7.1 yields new warnings (#8585)
Problem:    Building with gcc 7.1 yields new warnings.
Solution:   Initialize result. (John Marriott)
9e0f6ec076
2018-06-19 10:48:25 +02:00
Justin M. Keyes
9500448220
Merge #8584 from janlazo/vim-8.0.0467 2018-06-19 10:46:47 +02:00
Justin M. Keyes
9625e9da75 startup: delete empty stdin buffer if other files were opened
DWIM: avoid empty buffer 1 when stdin was empty. If other files were
specified at startup, we assume that stdin is only accidentally
not-a-TTY: user did not intend to send text from it.

ref #8560
ref #8561
2018-06-18 21:51:42 +02:00
Justin M. Keyes
37675c6a87
Merge #8558 from jamessan/gnucxx-compiler-for-gnu-source
cmake: Check for GNU compiler, not Linux, to set -D_GNU_SOURCE
2018-06-18 20:37:39 +02:00
Matt Kline
09cd4d0a43 use wchar_t instead of WCHAR #6998
wchar_t has better cross-platform support and seems to fix an issue
on MinGW when building with `-std=c99`.
2018-06-18 19:24:34 +02:00
Justin M. Keyes
d44ed79ccc startup: go to buffer 2 if stdin is empty
If stdin is not a TTY we read it into buffer 1, as text. But if the
stdin pipe is empty, Nvim was most likely invoked for some other reason.
DWIM: select buffer 2 (if it exists). Example:

    echo file1 | xargs nvim

closes #8560
closes #8561
ref https://github.com/equalsraf/neovim-qt/issues/417
2018-06-18 17:51:38 +02:00
Jan Edmund Lazo
84970bafd4 vim-patch:8.0.0547: extra line break in verbosefile
Problem:    Extra line break in verbosefile when using ":echomsg". (Ingo
            Karkat)
Solution:   Don't call msg_start(). (closes vim/vim#1618)
52604f2454
2018-06-18 08:38:29 -04:00
Jan Edmund Lazo
5d8594f636 vim-patch:8.0.0467: using g< after :for does not show the right output
Problem:    Using g< after :for does not show the right output. (Marcin
            Szamotulski)
Solution:   Call msg_sb_eol() in :echomsg.
57002ad70c
2018-06-18 08:37:05 -04:00
James McCoy
a26fd8a888
cmake: Prefer add_definitions() for setting preprocessor defines 2018-06-18 08:01:16 -04:00
James McCoy
863a87d5f3
cmake: Comply with new CMP0054 policy 2018-06-18 08:01:16 -04:00
James McCoy
23c9e3ec1e
Raise minimum CMake version to 2.8.12 and remove compat code
2.8.12 is supported by our main CI targets and [repology] confirms that
this is broadly supported.

[repology]: https://repology.org/metapackage/cmake/information
2018-06-18 08:00:30 -04:00
James McCoy
25435a4bad
cmake: Consolidate enabling of "undefined symbol" errors 2018-06-18 07:58:18 -04:00
James McCoy
33952c48bc
cmake: Explicitly declare C as the project language
There's a mix of CXX and C related variables being set/referenced in our
CMake files.  Since we only use C, use an explicit language list of "C"
instead of the implicit "C CXX" and replace all uses of CXX variables
with their C counterparts
2018-06-18 07:58:18 -04:00
James McCoy
4938ee08e8
cmake: Check for GNU compiler, not Linux, to set -D_GNU_SOURCE
The Debian hurd-i386 [build] failed (partly) due to -D_GNU_SOURCE not be
defined:

    [215/286] /usr/bin/cc -DINCLUDE_GENERATED_DECLARATIONS -Iconfig -I../src -Isrc/nvim/auto -Iinclude -I/usr/include/luajit-2.1 -g -O2 -fdebug-prefix-map=/<<PKGBUILDDIR>>=. -fstack-protector-strong -Wformat -Werror=format-security -Wdate-time -D_FORTIFY_SOURCE=2 -DDISABLE_LOG -Wdate-time -D_FORTIFY_SOURCE=2 -Wconversion -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 -DNVIM_MSGPACK_HAS_FLOAT32 -DNVIM_UNIBI_HAS_VAR_FROM -O2 -g  -DMIN_LOG_LEVEL=3 -Og -g   -Wall -Wextra -pedantic -Wno-unused-parameter -Wstrict-prototypes -std=gnu99 -Wimplicit-fallthrough -Wvla -fstack-protector-strong -fdiagnostics-color=auto -Wno-array-bounds -MD -MT src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o -MF src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o.d -o src/nvim/CMakeFiles/nvim.dir/os/pty_process_unix.c.o   -c ../src/nvim/os/pty_process_unix.c
    ../src/nvim/os/pty_process_unix.c: In function 'pty_process_tty_name':
    ../src/nvim/os/pty_process_unix.c:121:10: warning: implicit declaration of function 'ptsname'; did you mean 'ttyname'? [-Wimplicit-function-declaration]
       return ptsname(ptyproc->tty_fd);

Hurd is obviously not Linux, but it is using a GNU compiler and glibc so
it needs -D_GNU_SOURCE for the ptsname() definition to be visible.

[build]: https://buildd.debian.org/status/fetch.php?pkg=neovim&arch=hurd-i386&ver=0.3.0-2&stamp=1528981349&raw=0
2018-06-18 07:58:18 -04:00
Justin M. Keyes
66a39fce6c
Merge #8502 from janlazo/vim-8.0.0481 2018-06-17 23:52:55 +02:00
Justin M. Keyes
c1c14faad9
Merge #8520 'Ex mode: always "improved" (gQ)' 2018-06-17 23:19:59 +02:00
b-r-o-c-k
7097aba6be cmake: Organize targets into folders
Enabling CMake's USE_FOLDERS option and adding the FOLDER property to
targets allows some IDEs to list the targets in an organized
hierarchy of folders.
2018-06-17 07:54:39 -05:00
Justin M. Keyes
487cf98c0b startup: fix -E/-Es without -u NONE
Before this change, -E/-Es without `-u NONE` reads stdin as Ex commands.
It should always read stdin as text (into buffer 1), like this:

    echo foo | nvim -Es +'%p'
    foo
    echo foo | nvim -Es -u NORC +'%p'
    foo
2018-06-17 14:50:53 +02:00
Justin M. Keyes
9c2099d585 Ex mode: use getexline() instead of getexmodeline()
This changes Ex mode (Q, -e) to work like Vim's "improved Ex mode"
(gQ, -E).  That brings some small behavior differences, but should not
impact most Ex scripts (unless, for example, they depend on mappings
being disabled--but that can be solved for -e by skipping user config).

Before this change:
* the screen test hangs.

After this change:
* Q acts like gQ.
* -e/-es differs from -E/-Es only in its treatment of stdin.

This moves towards potentially removing getexmodeline().
(HINT: That does NOT mean "removing Ex mode", it means removing the
Vi-compatible Ex mode, which differs from Vim's "improved Ex mode" only
in some minor details (e.g. mappings are disabled).)

ref #1089 :-)~
2018-06-17 14:50:53 +02:00
Ahmed El Gabri
3cc3506965 checkhealth: node.js: also search yarn #8528
- "neovim" package may be installed with yarn. Check yarn if npm fails.
- Use filereadable() instead of glob(). closes #8552
2018-06-17 13:05:55 +02:00
Jan Edmund Lazo
8192267dea vim-patch:8.0.0609: some people still don't know how to quit (#8571)
Problem:    For some people the hint about quitting is not sufficient.
Solution:   Put <Enter> separately.  Also use ":qa!" to get out even when
            there are changes.
28a8193e31
2018-06-17 12:51:03 +02:00
Jan Edmund Lazo
367343ae6e vim-patch:8.0.0625: shellescape() always escapes a newline (#8573)
Problem:    shellescape() always escapes a newline, which does not work with
            some shells. (Harm te Hennepe)
Solution:   Only escape a newline when the "special" argument is non-zero.
            (Christian Brabandt, closes vim/vim#1590)
206155280d
2018-06-17 12:20:42 +02:00
Justin M. Keyes
b006771cba
Merge #8570 'gen_events.lua: define NUM_EVENTS as enum' 2018-06-16 19:57:28 +02:00
Justin M. Keyes
a503349e20
Merge #8569 from janlazo/vim-8.0.0602 2018-06-16 18:24:54 +02:00
Justin M. Keyes
26dc628ab3
Merge #8567 from ckelsel/vim-8.0.0530 2018-06-16 18:21:14 +02:00
Jan Edmund Lazo
de022d2570 vim-patch:8.0.0604: gF test fails still on MS-Windows
Problem:    gF test fails still on MS-Windows.
Solution:   Use : before the line number and remove it from 'isfname'.
712598f210
2018-06-16 11:37:13 -04:00
Jan Edmund Lazo
0d3557ad72 vim-patch:8.0.0603: gF test fails on MS-Windows
Problem:    gF test fails on MS-Windows.
Solution:   Use @ instead of : before the line number
d7aca7a71c
2018-06-16 11:37:13 -04:00
Jan Edmund Lazo
440c33343d vim-patch:8.0.0602: when gF fails to edit the file the cursor still moves
Problem:    When gF fails to edit the file the cursor still moves to the found
            line number.
Solution:   Check the return value of do_ecmd(). (Michael Hwang)
2a79ed293c
2018-06-16 11:37:12 -04:00
Jan Edmund Lazo
dd2e1e9445 syntax: refactor syn_finish_line to return bool 2018-06-16 10:22:20 -04:00
Jan Edmund Lazo
2add88eedc vim-patch:8.0.0481: unnecessary if statement
Problem:    Unnecessary if statement.
Solution:   Remove the statement.  Fix "it's" vs "its" mistakes. (Dominique
            Pelle, closes vim/vim#1568)
aab93b12cb
2018-06-16 10:20:18 -04:00
ckelsel
33596d5d07 fix lint 2018-06-16 19:46:41 +08:00
ckelsel
bbf00120f7 vim-patch:8.0.0545: edit test may fail on some systems
Problem:    Edit test may fail on some systems.
Solution:   If creating a directory with a very long path fails, bail out.
15ecbd6f3d
2018-06-16 19:43:01 +08:00
ckelsel
3ff1907593 vim-patch:8.0.0543: test_edit causes older xfce4-terminal to close
Problem:    Test_edit causes older xfce4-terminal to close. (Dominique Pelle)
Solution:   Reduce number of columns to 2000.  Try to restore the window
            position.
ba6ec18297
2018-06-16 19:41:58 +08:00
ckelsel
264725c25f vim-patch:8.0.0532: test with long directory name fails on Mac
Problem:    Test with long directory name fails on Mac.
Solution:   Skip the test on Mac systems.
c77d675747
2018-06-16 19:41:18 +08:00
ckelsel
9a1234e57f vim-patch:8.0.0531: test with long directory name fails on non-unix systems
Problem:    Test with long directory name fails on non-unix systems.
Solution:   Skip the test on non-unix systems.
9b81079ddd
2018-06-16 19:40:46 +08:00
ckelsel
ebc7f69d92 vim-patch:8.0.0530: buffer overflow when 'columns' is very big
Problem:    Buffer overflow when 'columns' is very big. (Nikolai Pavlov)
Solution:   Correctly compute where to truncate.  Fix translation.
            (closes vim/vim#1600)
658a3a2caf
2018-06-16 19:39:40 +08:00
Justin M. Keyes
eeeaf04c5e
Merge #8565 from janlazo/vim-8.0.0575 2018-06-16 12:42:05 +02:00
Justin M. Keyes
4bb039e225
Merge #8543 from janlazo/vim-8.0.0596 2018-06-16 12:01:09 +02:00
Justin M. Keyes
4c3c04d03c
Merge #8526 from janlazo/vim-8.0.0451 2018-06-16 11:55:40 +02:00
Jan Edmund Lazo
f4dffe7181 vim-patch:8.0.0577: warning for uninitialized variable
Problem:    Warning for uninitialized variable. (John Marriott)
Solution:   Initialize "indent".
97db5541a6
2018-06-16 00:37:37 -04:00
Jan Edmund Lazo
9ab6fe4fed vim-patch:8.0.0575: using freed memory when resetting 'indentexpr'
Problem:    Using freed memory when resetting 'indentexpr' while evaluating
            it. (Dominique Pelle)
Solution:   Make a copy of 'indentexpr'.
a701b3b6f0
2018-06-16 00:37:37 -04:00
Justin M. Keyes
1cc3b32f4c build/test: skip empty TEST_TAG, TEST_FILTER
- Empty "--tags=", "--filter=" prevents TEST_FILE from running.
- Fix another bug: TEST_FILTER overwrote TEST_TAG.
2018-06-16 02:12:35 +02:00