Commit Graph

14483 Commits

Author SHA1 Message Date
erw7
704151c8a2
ci: fix build failure in Travis [skip appveyor] (#12678) 2020-08-02 22:20:17 -04:00
James McCoy
e4629f203f
main.c: fix hang issue with recoverymode (#12496) (#12520)
In the case of recoverymode, the headlessmode was true, causing the UI
to hang without starting. Fix this problem by setting headlessmode to
true for List swap files only.

Co-authored-by: erw7 <erw7.github@gmail.com>
2020-06-23 12:15:32 +02:00
James McCoy
ce3db4648a
Merge pull request #12352 from jamessan/fix/hang-headless-mode 2020-05-21 07:39:22 -04:00
Kei Kamikawa
f558af8b18
fixed hang issue with --headless and -r option specified (#12209)
* fixed hang issue with --headless and -r option specified

Calling the do_more_prompt function in headless mode will freeze neovim because it is eventally in the input-accepting state (the same as waiting for --more--).

* fixed "Press ENTER or type command to continue" to be suppressed

If in headless mode, we need to exit at this point. If we continue, we will enter the normal mode and the message "Press ENTER or type command to continue" will be displayed and we will be in the input waiting state.

* fixed functional ex_cmds tests

* Revert "fixed "Press ENTER or type command to continue" to be suppressed"

This reverts commit a02dc40e3b.

* Revert "fixed functional ex_cmds tests"

This reverts commit 3bdb8da20a.

* fixed conditional again

* added test for fixed hang issue with --headless (#11386)

(cherry picked from commit c6dc397801)
2020-05-20 22:32:50 -04:00
Kei Kamikawa
cda119055a TUI: block signals on suspend #12180
fix #8075
2020-04-25 18:24:46 -07:00
James McCoy
8399f73574
Merge pull request #12142 from jamessan/gcc-10-fixes 2020-04-17 15:24:52 -04:00
Andreas Schneider
faaf83a49e
[release-0.4] cmake: Check for -fno-common and use it if available 2020-04-17 13:02:40 -04:00
Andreas Schneider
0493fa00fa
[release-0.4] nvim: Correctly setup global channels
As gcc10 uses -fno-common by default, global variables declared with the
same name more than once is not allowed anymore revealing this issue.

We need to define it as extern to access it.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
2020-04-17 13:02:37 -04:00
Andreas Schneider
6b38b9e4c6
[release-0.4] nvim:msgpack: Correctly set up global ch_before_blocking_events
gcc10 builds with -fno-common by default. This mean you can't define
a global variable with the same name twice.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
2020-04-17 13:02:34 -04:00
Andreas Schneider
047e36695f
[release-0.4] nvim: Fix enum declaration of RemapValues
Instead of declaring an enum, this creates a global variable. As gcc10
uses -fno-common by default, global variables declared with the same
name more than once is not allowed anymore revealing this issue.

Each time this header is included, we define the enum name as a global
variable.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
2020-04-17 13:02:28 -04:00
Andreas Schneider
e1cc8e8e09
[release-0.4] nvim:viml: Fix enum declaration of ExprParserFlags
Instead of declaring an enum, this creates a global variable. As gcc10
uses -fno-common by default, global variables declared with the same
name more than once is not allowed anymore revealing this issue.

Each time this header is included, we define the enum name as a global
variable.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
2020-04-17 13:02:26 -04:00
Andreas Schneider
49469ec6b9
[release-0.4] nvim:eval: Fix enum declaration for ListLenSpecials
Instead of declaring an enum, this creates a global variable. As gcc10
uses -fno-common by default, global variables declared with the same
name more than once is not allowed anymore revealing this issue.

Each time this header is included, we define the enum name as a global
variable.

See also https://bugzilla.redhat.com/show_bug.cgi?id=1799680
2020-04-17 13:02:14 -04:00
Justin M. Keyes
5e47cf27b4 netrw.vim: do not save +/* registers
netrw shouldn't be touching these in the first place.

fix #11089
ref #6892
ref #6695
2020-02-29 18:34:19 -08:00
Justin M. Keyes
dd0a3cd22f CI/travis: workaround broken homebrew
6.70s$ rvm $brew_ruby do brew bundle --verbose --global
    /usr/local/bin/brew tap homebrew/bundle
    ==> Tapping homebrew/bundle
    Cloning into '/usr/local/Homebrew/Library/Taps/homebrew/homebrew-bundle'...
    Tapped (102 files, 251.1KB).
    Error: Unknown command: bundle

https://travis-ci.community/t/macos-build-fails-because-of-homebrew-bundle-unknown-command/7296/10
https://twitter.com/AJenbo/status/1175976531480457216
2020-02-22 14:16:57 -08:00
Justin M. Keyes
10590e4b20
Merge #11901 "options: global-local 'fillchars', 'listchars'" 2020-02-22 13:09:58 -08:00
Justin M. Keyes
b4a10dd9b2 vim-patch:8.1.2060: "precedes" in 'listchars' not used properly
(Credit: Zach Wegner, https://github.com/neovim/neovim/pull/11034)

Problem:    "precedes" in 'listchars' not used properly.
Solution:   Correctly handle the "precedes" char in list mode for long lines.
bffba7f704
2020-02-22 12:53:21 -08:00
Zach Wegner
dd7206af37 Fix "precedes" listchar behavior in wrap mode
Previously, the "precedes" character would be rendered on every row
when w_skipcol > 0 (i.e., when viewing a single line longer than the
entire screen), instead of just on the first row. Make sure to only
render it on the first row in this case.

Add a test for this behavior.

Fix documentation for the "precedes" character, which erroneously
stated that it was only active when wrap mode was off.
2020-02-21 14:21:11 -08:00
Björn Linse
92e80f18a8 options: make 'fillchars' and 'listchars' global-local
These options were previously global. A global-local window option
behaves closer to a global option "per default" (i e with :set),
but still supports local behavior via :setl

Also this restores back-compat for nvim_set_option("fcs", ...)
which are currently broken on 0.4.x but worked in earlier versions
2020-02-21 14:14:15 -08:00
cballam
5d41bfccec quickfix.c: Fix vimgrep regression #11907
Fix ex_vimgrep to properly ignore filetype when running vimgrep.
This restores vimgrep to behaviour before function refactoring.

fix #9842
fix #11856
2020-02-19 22:55:11 -08:00
Björn Linse
641e229132
Merge pull request #11903 from bfredl/backport-qf_msg
[release-0.4] screen: add missing redraws after a message
2020-02-19 19:32:38 +01:00
Björn Linse
f225028a0d [release-0.4] screen: add missing redraws after a message 2020-02-19 15:13:21 +01:00
Björn Linse
02dae63bf7
Merge pull request #11905 from bfredl/backport-patch-8.2.0235
[release-0.4] vim-patch:8.2.0235
2020-02-19 13:54:02 +01:00
Björn Linse
6274f06aba [release-0.4] vim-patch:8.2.0235: draw error when an empty group is removed from 'statusline'
Problem:    Draw error when an empty group is removed from 'statusline'.
Solution:   Do not use highlighting from a removed group.
dbe5d361fe
2020-02-19 10:32:18 +01:00
Justin M. Keyes
47bd62c15c loop_close: close all handles
- Move uv_stop(), it still causes a "leak" on exit somehow.
- Tenatively restore `UV_RUN_DEFAULT`.  It shouldn't hang since we
  clobber the handles via `uv_walk((h)=>uv_close(h))`. Although this
  still "leaks" on exit, it's faster than the 2-second timeout.

fix #11820
fix #7376
2020-02-18 16:05:38 -08:00
Justin M. Keyes
d2730365ef loop_close: call uv_stop(), fix bug
- Call uv_stop().
- Restore `uv_loop_close` condition (braindead cosmetic change from
  a2efc9cf8b that caused uv_loop_close *not* to be called if
  wait=false, sorry).

Not doing `uv_walk(() => uv_close)`: see source comment for explanation.

fix #11820
fix #7376

Q: Should we restore use of `UV_RUN_DEFAULT`/`UV_RUN_ONCE` (removed in
   a2efc9cf8b)?
A: The while-loop (hopefully) achieves the same purpose while avoiding
   a hang.
2020-02-18 16:05:38 -08:00
Justin M. Keyes
284b398eb9 loop_close: timout after 2 seconds #11821
never UV_RUN_DEFAULT
ref #11820
ref #7376
2020-02-18 16:05:38 -08:00
Justin M. Keyes
2645669c89
Merge pull request #11779 from justinmk/release-0.4
build/MSVC: fix gettext multibyte issue #11774
2020-01-28 10:42:50 -08:00
Justin M. Keyes
b5cee56757 test: skip nodejs_spec on 0.4.x branch 2020-01-28 02:43:09 -08:00
erw7
d56f6fed9c build/MSVC: fix gettext multibyte issue #11774
Problem:  On Windows with the MSVC build, gettext-translation
          "Questa è già la" displays as "Questa <e8> gi<e0> la".
Solution: Fix iconv detection iconv when building gettext.
          So HAVE_ICONV is correctly defined when building nvim.

* fix gettext mb chars on MSVC
* fix libintl detection failure on MSVC

fixes #11749
2020-01-28 01:58:40 -08:00
Justin M. Keyes
910cdac22c
Merge #11770 from justinmk/release-0.4 2020-01-26 18:53:52 -08:00
Daniel Hahler
23a64c95d8 test: cherry-pick improvements from master branch
Partial cherry-pick of b3686b1597.

* test/functional/provider: display reason from missing_provider
* provider#node#Detect: skip / handle non-existing node executable
2020-01-26 18:32:11 -08:00
Björn Linse
1b2666cd21 messages: echo "line1\r\nline2" should not clear line1 2020-01-26 17:18:51 -08:00
Ghjuvan Lacambre
1bf90bf9d3 API: fix crash on copy_object(kObjectTypeWindow) #11651
Closes #11646
2020-01-02 02:02:26 -08:00
James McCoy
fafd636267
[release-0.4] libcallnr: Use int, not int64_t, as the return t… (#11566)
[release-0.4] libcallnr: Use int, not int64_t, as the return type for Vim compat
2019-12-16 10:04:51 -05:00
James McCoy
ef71c89129
Merge remote-tracking branch 'upstream/release-0.4' into release-0.4.x/libcall 2019-12-16 07:32:31 -05:00
James McCoy
9c4223215f
libcallnr: Use int, not int64_t, as the return type for Vim compat
Vim's documentation simply states that libcallnr() should be used "for a
function that returns an int".  Based on the tests, code, and common
syscall interfaces, this should likely be taken literally instead of
trying to apply some well-defined type lipstick.

Notably, this change fixes Test_libcall_libcallnr on hppa (a 32-bit
big-endian system).
2019-12-15 21:17:00 -05:00
erw7
972dd758cb win_line: Fix crash with 'rightleft' in :terminal #11460
fixes #11438

Backtrace:

    0  schar_from_ascii ( p=0x801cc9e112c3 <error: Cannot access memory at address 0x801cc9e112c3>, c=32 ' ') at ../src/nvim/screen.c:5263
    1  0x00007f31460eccc5 in win_line (wp=wp@entry=0x7fffc9df6230, lnum=lnum@entry=11, startrow=startrow@entry=10, endrow=41, nochange=false, number_only=number_only@entry=false) at ../src/nvim/screen.c:4025
    2  0x00007f31460eed8e in win_update (wp=wp@entry=0x7fffc9df6230) at ../src/nvim/screen.c:1403
    3  0x00007f31460f011f in update_screen (type=<optimized out>) at ../src/nvim/screen.c:502
    4  0x00007f3146138ef4 in normal_redraw (s=s@entry=0x7fffd0a5f700) at ../src/nvim/normal.c:1247
    5  0x00007f314613b159 in normal_check (state=0x7fffd0a5f700) at ../src/nvim/normal.c:1324
    6  0x00007f31460accfe in state_enter (s=0x7fffd0a5f700) at ../src/nvim/state.c:28
    7  0x00007f3146143099 in normal_enter (cmdwin=<optimized out>, noexmode=<optimized out>) at ../src/nvim/normal.c:463
    8  0x00007f314618b541 in main (argc=<optimized out>, argv=<optimized out>) at ../src/nvim/main.c:580

(cherry picked from commit 1bb7ea189e)
2019-11-29 05:34:32 +01:00
James McCoy
d379db428b
Merge pull request #11392 from jamessan/get-setenv-bug
[release-0.4] f_getenv/setenv: Access v_special when v_type is VAR_SPECIAL
2019-11-14 09:09:27 -05:00
James McCoy
4c48cf3020
f_getenv/setenv: Access v_special when v_type is VAR_SPECIAL
Multiple Debian builds were failing these tests:

    Failures:
    	From test_environ.vim:
    	Found errors in Test_external_env():
    	function RunTheTest[37]..Test_external_env line 16: Expected '' but got 'FOO=null\n'
    	Found errors in Test_getenv():
    	function RunTheTest[37]..Test_getenv line 2: Expected v:null but got v:false
    	Found errors in Test_setenv():
    	function RunTheTest[37]..Test_setenv line 5: Expected v:null but got 'null'

This is because nvim has a separate tag (`v_special`) in `typval_T` for
special variables, whereas vim re-uses the `v_number` tag.

On little-endian architectures, using the incorrect tag is not an issue
because the byte representation is the same.  However, on big-endian
systems this caused the `v_number == kSpecialVarNull` checks to fail,
and the non-special code to execute.
2019-11-13 22:31:02 -05:00
Justin M. Keyes
2cd1ff762e paste: Select-mode, Visual-mode #11360
fix #11344
2019-11-09 21:27:48 -08:00
Justin M. Keyes
941dc1b0ca version bump 2019-11-06 01:59:54 -08:00
Justin M. Keyes
b99dad7b4c NVIM v0.4.3
Maintenance release for the v0.4.x series.

FIXES:

599ad5d3b8 Windows: nvim-qt v0.2.15 (fix "invalid font" error on startup)
1def94597b #11332 autocmd: Fix event name casing
b678d33dd3 #11315 test: delete duplicate highlight group
924fa143cc #11225 ex_echo: fix check for got_int
327e8ddb18 #11138 deps: pass LDFLAGS+=-static
a1f557690f #11222 mac: fix "tags file not sorted" bug on Catalina
f2f37712a4 #11187 recovery mode (-r/-L): use headless_mode
4f452a6744 #11190 Remove "highbright bold" conversion.
9571a87d3d #11177 third-party: upgrade libvterm to 0.1.2
3817518ab4 #11074 terminfo_start: flush buffer
56d9412999 win_line: update `w_last_cursorline` always
ddd3363a42 #11132 patch_terminfo_bugs: TERM=xterm with non-xterm: ignore smglr
d453d2c484 Fix redraw regression with w_p_cole in visual mode
e0622b4c65 screen: missing redraw/highlight for ruler in message area
b781f2b072 cmdline: wildmenumode() should be true with wildoptions+=pum
eef3809067 #11027 win_update: fix redraw regression
43f4955f70 #11069 Merge pull request from bfredl/virtualcol
6f693be1ee #11050 env: use putenv_s for LC_ALL, LANG, etc.
36e2846b49 #11094 paste: fix handling of "<" in cmdline
60b56ed458 #11126 Merge pull request from bfredl/invalidcell-0.4
8250d6795b screen: don't crash on invalid grid cells being recomposed
2019-11-06 01:54:45 -08:00
lacygoill
1def94597b autocmd: Fix event name casing #11332
Affects getcompletion()
2019-11-04 00:25:20 -08:00
Björn Linse
b678d33dd3
Merge pull request #11315 from bfredl/termtestfix
[release-0.4] test: delete duplicate highlight group
2019-10-29 21:49:56 +01:00
Björn Linse
a012387074 [release-0.4] test: delete duplicate highlight group
Depending on the lua version, 6 might get used instead of
2 here, which causes test failures in upstream builds.
This was fixed as part of #11206 on master
2019-10-29 19:44:47 +01:00
Justin M. Keyes
599ad5d3b8 win/dist: nvim-qt v0.2.15 2019-10-26 13:18:59 -07:00
Daniel Hahler
924fa143cc [release-0.4] ex_echo: fix check for got_int #11225
It needs to return to not output any remaining parts.

Followup to https://github.com/neovim/neovim/pull/10926
Ref: https://github.com/neovim/neovim/issues/10923

(cherry picked from commit 93fe30593b)
2019-10-20 00:54:07 +02:00
Daniel Hahler
327e8ddb18 [release-0.4] deps: pass LDFLAGS+=-static (#11138)
This is required when `build_old_libs=no` is used in `libtool`.

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

(cherry picked from commit 2e14dffbb4)
2019-10-14 15:17:47 +02:00
dm1try
a1f557690f [release-0.4] mac: fix "tags file not sorted" bug on Catalina (#11222)
I/O in Catalina is currently known to be broken. This commit works
around a pesky bug and also makes the code more consistent by removing
the mix of C file and standard I/O.

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

(cherry picked from commit d0efc1c906)
2019-10-14 14:05:58 +02:00
Daniel Hahler
f2f37712a4 [release-0.4] recovery mode (-r/-L): use headless_mode (#11187)
Fixes https://github.com/neovim/neovim/issues/11181.

(cherry picked from commit 9af0fe529d)
2019-10-11 19:17:29 +02:00