Commit Graph

14489 Commits

Author SHA1 Message Date
Björn Linse
afba23099f tree-sitter: support pre-registration of languages 2019-09-28 14:55:43 +02:00
Björn Linse
1e9e2451be tree-sitter: objectify API 2019-09-28 14:55:43 +02:00
Björn Linse
005b6d638c tree-sitter: split tree-sitter lua interface from demo code 2019-09-28 14:55:43 +02:00
Björn Linse
c07e1e8696 tree-sitter: cleanup build code 2019-09-28 14:55:43 +02:00
Björn Linse
b871100be7 Create BuildUtf8proc.cmake and FindUtf8proc.cmake
Using advanced search and replace technology
2019-09-28 14:31:03 +02:00
Björn Linse
0e0beef85e tree-sitter: load parsers as .so files 2019-09-28 14:31:03 +02:00
Björn Linse
cd10096386 tree-sitter: initial tree-sitter support 2019-09-28 14:31:03 +02:00
Björn Linse
8ff2f193bb tree-sitter: change vendored tree-sitter to use nvim memory management 2019-09-28 14:31:03 +02:00
Björn Linse
3bddf05023 tree-sitter: vendor tree-sitter runtime
tree-sitter/tree-sitter commit 7685b7861ca475664b6ef57e14d1da9acf741275

Included files are:
lib/include/tree-sitter/*.h
lib/src/*.[ch]
LICENSE
2019-09-28 14:30:48 +02:00
Daniel Hahler
0d9a3c86a1
vim-patch:8.1.2083: multi-byte chars do not work properly with "%.*S" in printf() (#11106)
Problem:    Multi-byte chars do not work properly with "%.*S" in printf().
Solution:   Use mb_ptr2cells(). Daniel Hahler, closes vim/vim#4989)
ce0fac2897
2019-09-28 00:32:22 +02:00
Daniel Hahler
fe9d54f418
doc: contrib/local.mk.example: include ENABLE_LTO (#11097)
Using it takes 30+ additional seconds for me with a ccache-enabled build
(43s vs. 12s).

While it certainly makes sense to use DEBUG during development,
bisecting etc, it should be made clearer what causes this.
2019-09-26 23:43:49 +02:00
John Szakmeister
298da52fdc
Merge pull request #10907 from jszakmeister/add-freebsd-sourcehut-support
build: add support for building for FreeBSD under Sourcehut
2019-09-26 05:35:12 -04:00
Daniel Hahler
54c66e636a
Fix two more flaky tests (#11095)
* mode_spec: retry with increasing matchtime

`matchtime=2` might still be too low (with luacov on AppVeyor).

    [  ERROR   ] test/functional\ui\mode_spec.lua @ 47: ui mode_change event works in insert mode
    test\functional\ui\screen.lua:587: mode
    Expected objects to be the same.
    Passed in:
    (string) 'insert'
    Expected:
    (string) 'showmatch'
    Hint: full state of "mode":
      "insert"

Followup to fe60013fb.
ref #10941
Initially regressed in 7ed2122622

``

* ui/screen_basic_spec: set timeoutlen=10000

This fixes the test on slow CI.

Ref: https://ci.appveyor.com/project/neovim/neovim/builds/27600387/job/t468h2b3w9lwtlm5#L10930
2019-09-26 07:37:51 +02:00
John Szakmeister
b52ae0e8ba build: add support for building for FreeBSD under Sourcehut [skip ci] 2019-09-25 19:55:49 -04:00
Daniel Hahler
cb25207171 vim-patch:8.0.0914: highlight attributes are always combined (#10256)
Problem:    Highlight attributes are always combined.
Solution:   Add the 'nocombine' value to replace attributes instead of
            combining them. (scauligi, closes vim/vim#1963)
0cd2a94a40

Closes https://github.com/neovim/neovim/pull/10256.
2019-09-26 00:50:54 +02:00
Daniel Hahler
2621f4455d
Merge pull request #10978 from blueyed/update-libuv
third-party: update libuv to v1.32.0
2019-09-25 11:52:41 +02:00
Daniel Hahler
0571145c40
paste: fix handling of "<" in cmdline (#11094)
Fixes https://github.com/neovim/neovim/issues/11088.
2019-09-25 09:15:33 +02:00
Daniel Hahler
70827ea1fa test/functional/preload.lua: _set_fmode for Windows 2019-09-25 05:47:15 +02:00
Daniel Hahler
bb6b1267e7 Revert "win/os_env_exists(): workaround libuv bug #10734"
This reverts commit 278c5d452c.
2019-09-25 05:47:12 +02:00
Daniel Hahler
227ef71621 third-party: update libuv to v1.31.0 2019-09-25 05:45:54 +02:00
Daniel Hahler
db6b4b677d
tests: busted: nvim handler: display durations always (#11075)
This shows them also with test failures/errors, where it is useful to
see how long the test took (for flaky failures running into timeout).
2019-09-25 02:20:32 +02:00
Daniel Hahler
81b19df5f2
cmake/GetCompileFlags: include CMAKE_C_COMPILER_ARG1 (#11091)
This is used internally (e.g. on Travis) for 32-bit builds (`-m32`).
2019-09-25 00:09:23 +02:00
Daniel Hahler
0ab7da8561
timer_spec: fix/harden flaky tests (#11080)
Those are flaky when using luacov (which causes reproducible slowness).

E.g.:

    [  ERROR   ] test/functional\eval\timer_spec.lua @ 105: timers can invoke redraw in blocking getchar() call
    test\functional\ui\screen.lua:587: Row 3 did not match.
    Expected:
      |ITEM 1                                  |
      |ITEM 2                                  |
      |*{1:~                                       }|
      |{1:~                                       }|
      |{1:~                                       }|
      |^                                        |
    Actual:
      |ITEM 1                                  |
      |ITEM 2                                  |
      |*ITEM 3                                  |
      |{1:~                                       }|
      |{1:~                                       }|
      |^                                        |
2019-09-24 08:55:27 +02:00
Daniel Hahler
2476a97ced
tui_spec: improve "TUI paste: exactly 64 bytes" (#11086)
Doing the screen test first might give insights about a possible
(flaky?) failure, where it looks like "feed_data" is processed out of
order:

    [  ERROR   ] test/functional/terminal/tui_spec.lua @ 561: TUI paste: exactly 64 bytes #10311
    test/functional/helpers.lua:388:
    retry() attempts: 490
    test/functional/terminal/tui_spec.lua:66: Expected objects to be the same.
    Passed in:
    (table: 0x44042de8) {
     *[1] = ' endzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz' }
    Expected:
    (table: 0x41d6e568) {
     *[1] = 'zzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzzz end' }
    stack traceback:
            test/functional/helpers.lua:388: in function 'retry'
            test/functional/terminal/tui_spec.lua:63: in function 'expect_child_buf_lines'
            test/functional/terminal/tui_spec.lua:569: in function <test/functional/terminal/tui_spec.lua:561>

Ref: https://github.com/neovim/neovim/pull/11083#issuecomment-534375201
Build log: https://travis-ci.org/neovim/neovim/jobs/588749739#L5597
2019-09-24 08:35:29 +02:00
Daniel Hahler
445f2f4096
tui: flush ui buffer in tui_terminal_after_startup (#11083)
This avoids having a dummy event to tickle the main loop.

Confirmed using `nvim -u NONE -c 'au FocusGained * q'` in tmux (with
`:set -g focus-events on`): without the flushing it would only exit
after pressing a key.

Moves the flushing done recently in 3626d2107.
`nvim -u NONE -cq` is still working (i.e. consuming the response for the
terminal background query itself), and the flickering mentioned in
3626d2107 is reduced again.

Reverts part of bfb21f3e0 (#7729).
2019-09-24 08:34:00 +02:00
Jan Edmund Lazo
6d213593ed vim-patch:8.0.1754: ex_helpgrep() is too long #11084
Problem:    ex_helpgrep() is too long.
Solution:   Refactor the function. (Yegappan Lakshmanan, closes vim/vim#2766)
2225ebb486
2019-09-23 22:28:04 -07:00
Jan Edmund Lazo
d9032308fb vim-patch:8.0.1812: refactor qf_jump_to_usable_window() #11078
Problem:    The qf_jump_to_usable_window() function is too long.
Solution:   Split it in parts. (Yegappan Lakshmanan, closes vim/vim#2891)
7a2b0e55e9
2019-09-22 18:56:31 -07:00
Daniel Hahler
3626d2107e terminfo_start: flush buffer #11074
This aligns with `terminfo_stop`, which also flushes the buffer
after disabling things.

This ensures Neovim gets the response to the terminal background query
before exiting (`nvim -u NONE -cq` with e.g. urxvt or kitty).

Caveats:
* With kitty this causes some "flickering", likely since the alternate
  screen is being setup with `nvim -u NONE -cq`, whereas it would not be
  processed otherwise before quitting (as with the background query).
* tmux after this patch may print ^[[I (CSI I / FocusGained) after
  `nvim -u NONE -cq`.

Fixes https://github.com/neovim/neovim/issues/11062
2019-09-22 12:51:55 -07:00
Justin M. Keyes
fb26c38434
Merge #11076 from blueyed/fix-fold-patches
Fix fold patches: vim-patch:8.1.2052, vim-patch:8.1.2059
fix #11002
2019-09-22 12:32:46 -07:00
Daniel Hahler
6c3d34e4df vim-patch:8.1.2059: fix for "x" deleting a fold has side effects
Problem:    Fix for "x" deleting a fold has side effects.
Solution:   Fix it where the fold is included.
56ebbabea1
2019-09-22 20:11:04 +02:00
Daniel Hahler
97b82553e0 vim-patch:8.1.2052: using "x" before a closed fold may delete that fold
Problem:    Using "x" before a closed fold may delete that fold.
Solution:   Do not translate 'x' do "dl". (Christian Brabandt, closes vim/vim#4927)
7a9bd7c1e0
2019-09-22 20:11:04 +02:00
Daniel Hahler
6807779c68
tests: make 'win_update redraws lines properly' more readable (#11068) 2019-09-22 14:58:38 +02:00
Daniel Hahler
ed11721b6b
tests: unit: fix preprocess: pass -m32 for 32bit ABI (#11073) 2019-09-22 14:57:44 +02:00
Björn Linse
bb90e41ee2
Merge pull request #11049 from bfredl/rulermsg
screen: missing redraw/highlight for ruler in message area
2019-09-22 12:14:07 +02:00
Björn Linse
f316916758 screen: missing redraw/highlight for ruler in message area 2019-09-22 09:38:52 +02:00
erw7
028d76e5d5 env: use putenv_s for LC_ALL, LANG, etc. #11050
Problem:  ":lang messages en_US.UTF-8" no longer overrides the language
          detected from the environment (at startup).
Solution: In os_setenv, special-case "LC_ALL", "LANG", et al. to use
          putenv_s instead of uv_os_setenv.

fixes #11045
2019-09-22 00:02:28 -07:00
Justin M. Keyes
c534ab8447
Merge #11034 from zwegner/precedes
Fix "precedes" listchar behavior in wrap mode
2019-09-21 23:48:08 -07:00
Justin M. Keyes
1654932498 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
2019-09-21 22:13:55 -07:00
Zach Wegner
18e5869f56 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.
2019-09-21 22:09:52 -07:00
Yoshio S
45447e3b64 checkhealth: skip python checks if intentionally disabled #11044
close #11040
2019-09-21 16:17:22 -07:00
Daniel Hahler
ad0f97f412 vim-patch:8.1.2055: profile: adjust line format #11058
Problem:    Not easy to jump to function line from profile.
Solution:   Use "file:99" instead of "file line 99" so that "gf" works.
            (Daniel Hahler, closes vim/vim#4951)
181d4f58cc
2019-09-21 14:18:56 -07:00
Justin M. Keyes
fd82ce4a3a
Merge #11060 from janlazo/vim-8.1.1783
vim-patch:8.0.{1109,1529,1539,1621,1733,1771,1776},8.1.{1783,2054,2058}
2019-09-21 14:07:50 -07:00
Jan Edmund Lazo
b3e56957f8 vim-patch:8.1.0460: assert_fails() message argument #11051
Problem:    assert_fails() does not take a message argument
Solution:   Add the argument.
1307d1c003
2019-09-21 14:03:46 -07:00
Jan Edmund Lazo
111d34849a
vim-patch:8.0.1621: using invalid default value for highlight attribute
Problem:    Using invalid default value for highlight attribute.
Solution:   Use zero instead of -1.
6185903e3d
2019-09-21 11:07:59 -04:00
Jan Edmund Lazo
eb3888a322
vim-patch:8.0.1529: assert_equalfile() does not close file descriptors
Problem:    Assert_equalfile() does not close file descriptors. (Coverity)
Solution:   Close the file descriptors.
3049418f3d
2019-09-21 08:43:08 -04:00
Jan Edmund Lazo
2a7ffc6567
vim-patch:8.0.1776: in tests, when WaitFor() fails it doesn't say why
Problem:    In tests, when WaitFor() fails it doesn't say why.
Solution:   Turn a few more WaitFor() into WaitForAssert().
0e9d1ae321
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
3878b0822e
vim-patch:8.0.1771: in tests, when WaitFor() fails it doesn't say why
Problem:    In tests, when WaitFor() fails it doesn't say why. (James McCoy)
Solution:   Add WaitForAssert(), which produces an assert error when it fails.
50182fa84e
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
7cffc87868
vim-patch:8.0.1733: incomplete testing for completion fix
Problem:    Incomplete testing for completion fix. (Lifepillar)
Solution:   Add a test with CTRL-P.
bad0ce7b26
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
ca11662515
vim-patch:8.0.1539: no test for the popup menu positioning
Problem:    No test for the popup menu positioning.
Solution:   Add a screendump test for the popup menu.
6bb2cdfe60
2019-09-21 08:43:07 -04:00
Jan Edmund Lazo
b853b6e4ea
vim-patch:8.0.1109: timer causes error on exit from Ex mode
Problem:    Timer causes error on exit from Ex mode. (xtal8)
Solution:   save and restore the ex_pressedreturn flag. (Christian Brabandt,
            closes vim/vim#2079)
f5291f301e
2019-09-21 08:43:07 -04:00