Commit Graph

11073 Commits

Author SHA1 Message Date
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
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
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
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
Justin M. Keyes
2a274cbe30 gen_events.lua: define NUM_EVENTS as an enum value
Fix PVS warnings:

    fileio.c:7293   Medium  V547    Expression is always true.
    fileio.c:7351   Medium  V547    Expression 'event == 100' is always false.

event_name2nr returns event_T, so PVS infers that nothing outside of
that range could possibly be returned.
2018-06-16 01:57:30 +02:00
Justin M. Keyes
c990d65c37 get_maphash: fix off-by-one
Patch-by: oni-link <knil.ino@gmail.com>

ref: https://github.com/neovim/neovim/pull/6236#discussion_r195113807
2018-06-14 19:00:37 +02:00
Björn Linse
c46997aa87
Merge pull request #8546 from bfredl/eob
Add fillchar for EndOfBuffer and check for invalid UTF-8
2018-06-14 18:00:59 +02:00
James McCoy
f27a665e05
Merge pull request #8549 from jamessan/output_spec-printf
functionaltest: Use octal escapes for printf
2018-06-14 08:06:38 -04:00
Björn Linse
5442f0b622 fillchars: make checks more strict and improve tests 2018-06-14 14:00:09 +02:00
James McCoy
6c0f1903e6
functionaltest: Use octal escapes for printf
According to POSIX[0], only octal escapes are supported by the printf
command.  GNU coreutils' printf and some shells' builtin printf versions
which support hex escapes, but dash and non-GNU printf do not.

[0]: http://pubs.opengroup.org/onlinepubs/9699919799/utilities/printf.html
2018-06-13 23:03:37 -04:00
Jack Bracewell
a7bb63c55d Add ‘eob’ option to fillchars
This option allows configuring what character is shown on the empty
lines at the end of a buffer, previously hardcoded to ‘~’
2018-06-13 17:54:16 +02:00
Jan Edmund Lazo
3462acbbff lint 2018-06-13 07:10:17 -04:00
Björn Linse
463da84806
Merge pull request #7992 from bfredl/mbscreen
Represent Screen state as UTF-8
2018-06-13 11:11:12 +02:00