Commit Graph

11160 Commits

Author SHA1 Message Date
Daniel Hahler
bf6048e81d checkhealth: Python: fix VIRTUAL_ENV check (#8628)
Compare `$VIRTUAL_ENV` to `python_bin`.
This is necessary when `g:python_host_prog` is set to an absolute path,
and looking up `pyname` in `$PATH` yields another result.
2018-06-24 10:28:21 +02:00
KunMing Xie
ddde747644 vim-patch:8.0.0544: cppcheck warnings (#8627)
Problem:    Cppcheck warnings.
Solution:   Use temp variable. Change NUL to NULL. Swap conditions. (Dominique
            Pelle)
866c688610
2018-06-23 12:45:10 +02:00
John Dallahan
7f7802e643 main: fix FALLTHROUGH hints (#8623)
GCC (Clang also?) does not recognize FALLTHROUGH comments when the
case is wrapped in braces.
2018-06-22 10:49:54 +02:00
Björn Linse
bf2460e2f9
Merge pull request #7551 from bfredl/setl_bufwin
fix copying setl options for buffer currently displayed in another window
2018-06-22 09:53:46 +02:00
Justin M. Keyes
e1c6109e62 Merge #8618 'Replace b_changedtick with always-inline functions' 2018-06-22 08:35:28 +02:00
Justin M. Keyes
b7514493a0
defaults: shortmess+=F (#8619)
Because we default to laststatus=2 (statusline is always visible), the
:edit message is not useful.

ref #6289
2018-06-22 08:18:02 +02:00
ZyX
eaf2a25f12 *: Replace b_changedtick with new always-inline functions
Ref #8474
2018-06-22 00:44:31 +03:00
Justin M. Keyes
cf659a1926
Merge #8612 from janlazo/vim-8.0.0621 2018-06-21 22:54:08 +02:00
Björn Linse
8917e0c301 buffer: fix copying setl options for buffer currently displayed in another window
vim-patch:8.0.1836: buffer-local window options may not be recent
Problem:    Buffer-local window options may not be recent if the buffer is
            still open in another window.
Solution:   Copy the options from the window instead of the outdated window
            options. (Bjorn Linse, closes vim/vim#2336)
25782a7ff4
2018-06-21 22:41:15 +02:00
Jan Edmund Lazo
10083ec4cc vim-patch:8.0.0648: possible use of NULL pointer
Problem:    Possible use of NULL pointer if buflist_new() returns NULL.
            (Coverity)
Solution:   Check for NULL pointer in set_bufref().
fadacf01d0
2018-06-21 12:50:31 -04:00
Jan Edmund Lazo
bf61885cb4 vim-patch:8.0.0621: :stag does not respect 'switchbuf'
Problem:    The ":stag" command does not respect 'switchbuf'.
Solution:   Check 'switchbuf' for tag commands that may open a new window.
            (Ingo Karkat, closes vim/vim#1681)  Define macros for the return values
            of getfile().
8ad80dea08
2018-06-21 12:50:30 -04:00
KunMing Xie
7ae7da8fb9 vim-patch:8.0.0468: g< after aborting an Ex command (#7941)
Problem:    After aborting an Ex command g< does not work. (Marcin
            Szamotulski)
Solution:   Postpone clearing scrollback messages to until the command line
            has been entered.  Also fix that the screen isn't redrawn if after
            g< the command line is cancelled.
f2405ed232
2018-06-21 11:36:26 +02:00
Jan Edmund Lazo
b92d6f490d vim-patch:8.0.{0632,1536} (#8609)
vim-patch:8.0.0632: the quotestar test is still a bit flaky
Problem:    The quotestar test is still a bit flaky.
Solution:   Kill any existing server to make the retry work.  Wait for the
            register to be filled.
1c13c0fe3e

vim-patch:8.0.1536: quotestar test is flaky when using the GUI
Problem:    Quotestar test is flaky when using the GUI.
Solution:   Add check that the star register arrived at the server.  Increase
            timeouts.
791010e648
2018-06-21 11:27:24 +02:00
Jan Edmund Lazo
52ebe34eeb vim-patch:8.0.0616: not always setting 'background' correctly after :hi Normal (#8606)
Problem:    When setting the cterm background with ":hi Normal" the value of
            'background' may be set wrongly.
Solution:   Check that the color is less than 16.  Don't set 'background' when
            it was set explicitly. (Lemonboy, closes vim/vim#1710)
1615b36b91

Restore reset_option_was_set(), removed in 419da839e0

ref #8595
ref #8597
2018-06-21 11:15:11 +02:00
Jan Edmund Lazo
8794a551bd vim-patch:8.0.0{469,581,583} (#8601)
vim-patch:8.0.0469: compiler warnings on MS-Windows
Problem:    Compiler warnings on MS-Windows.
Solution:   Add type casts. (Christian Brabandt)
0c0d4eca4d

vim-patch:8.0.0581: moving folded text is sometimes not correct
Problem:    Moving folded text is sometimes not correct.
Solution:   Bail out when "move_end" is zero. (Matthew Malcomson)
94be619e30

vim-patch:8.0.0583: fold test hangs on MS-Windows
Problem:    Fold test hangs on MS-Windows.
Solution:   Avoid overflow in compare.
b11c826ddc
2018-06-20 10:29:09 +02:00
Jan Edmund Lazo
b454d24e04 vim-patch:8.0.0669: CTRL-N at start of the buffer does not work correctly (#8600)
Problem:    In Insert mode, CTRL-N at start of the buffer does not work
            correctly. (zuloloxi)
Solution:   Wrap around the start of the buffer. (Christian Brabandt)
24a9e348aa
2018-06-20 08:17:00 +02:00
Jan Edmund Lazo
6e55c5997e vim-patch:8.0.0636: when reading the undo file fails may use uninitialized data (#8599)
Problem:    When reading the undo file fails may use uninitialized data.
Solution:   Always clear the buffer on failure.
56f2db562d
2018-06-20 02:29:51 +02:00
Justin M. Keyes
6294a807d3
Merge #8579 win: cmake: Improvements for building with IDEs 2018-06-20 02:19:42 +02:00
Justin M. Keyes
18710e7720
Merge #8596 from janlazo/vim-8.0.0615 2018-06-20 00:58:33 +02:00
Jan Edmund Lazo
b36aba9840 vim-patch:8.0.0551: the typeahead buffer is reallocated too often (#8598)
Problem:    The typeahead buffer is reallocated too often.
Solution:   Re-use the existing buffer if possible.
d34f9b1155
2018-06-20 00:56:55 +02:00
Justin M. Keyes
f389fea8fa
Merge #8503 from janlazo/vim-8.0.0549 2018-06-20 00:54:25 +02:00
Jan Edmund Lazo
141df73930 vim-patch:8.0.0568: 1gd may hang
Problem:    "1gd" may hang.
Solution:   Don't get stuck in one position. (Christian Brabandt, closes vim/vim#1643)
60402d68da
2018-06-19 16:57:29 -04:00
Jan Edmund Lazo
14e70878c5 lint 2018-06-19 16:12:55 -04:00
Jan Edmund Lazo
3cc7462a0c vim-patch:8.0.0546: swap file exists briefly when opening the command window (#8588)
Problem:    Swap file exists briefly when opening the command window.
Solution:   Set the noswapfile command modifier before splitting the window.
            (James McCoy, closes vim/vim#1620)
3bab93998d
2018-06-19 21:22:34 +02:00
Jan Edmund Lazo
c1d7a28093 vim-patch:8.0.0549: no test for the 8g8 command
Problem:    No test for the 8g8 command.
Solution:   Add a test. (Dominique Pelle, closes vim/vim#1615)
395b6bab33
2018-06-19 15:16:44 -04:00
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