Commit Graph

14507 Commits

Author SHA1 Message Date
Daniel Hahler
0a2a1e241f
cmake: use LibFindMacros for utf8proc (#11114)
Also update doc.
2019-09-29 04:44:02 +02:00
Daniel Hahler
34d55f8607
terminfo_start: keep first flushing of ui buffer (#11118)
Initially done in 3626d2107 (#11074, for #11062), it was reverted then
in 445f2f409 (#11083, which added flushing later).

But it is still required here to avoid the reporting of the background
response with urxvt/kitty (`nvim -u NONE -cq`).
Apparently I've tested this not enough with 445f2f409 (probably only within tmux).
2019-09-29 03:06:36 +02:00
Björn Linse
e933426299
Merge pull request #10124 from bfredl/tree-sitter-api
Tree-sitter step 1: vendor runtime lib + add lua API
2019-09-28 18:35:02 +02:00
Björn Linse
9fa850991d tree-sitter: improve and cleanup tests 2019-09-28 17:46:25 +02:00
Björn Linse
c844f986d4 tree-sitter: use "module" pattern in lua source 2019-09-28 17:46:25 +02:00
Björn Linse
d5a69eb076 tree-sitter: handle node equality 2019-09-28 17:46:25 +02:00
Björn Linse
3ffcb477ef tree-sitter: start docs 2019-09-28 17:46:25 +02:00
Björn Linse
e0d6228978 tree-sitter: use "range" instead of "point_range" consistently in lua API 2019-09-28 17:46:25 +02:00
Björn Linse
f86a2c33a2 tree-sitter: simplify editing using the new old_byte_size parameter 2019-09-28 17:46:25 +02:00
Björn Linse
06ee45b9b1 tree-sitter: fix lint, delete "demo" plugin (replaced by functional tests) 2019-09-28 17:46:25 +02:00
Björn Linse
167a1cfdef tree-sitter: improve parser API (shared parser between plugins) 2019-09-28 14:55:43 +02:00
Björn Linse
d697841a9d tree-sitter: cleanup tree refcounting 2019-09-28 14:55:43 +02:00
Björn Linse
d24dec596c tree-sitter: inspect language 2019-09-28 14:55:43 +02:00
Björn Linse
a88a9f128e tree-sitter: add some more API 2019-09-28 14:55:43 +02:00
Björn Linse
c1dc1bedba tree-sitter: style 2019-09-28 14:55:43 +02:00
Björn Linse
a361e09cc5 tree-sitter: use standard luaL_newmetatable and luaL_checkudata pattern 2019-09-28 14:55:43 +02:00
Björn Linse
c8f861b739 tree-sitter: rename tree_sitter => treesitter for consistency 2019-09-28 14:55:43 +02:00
Björn Linse
4ea5e63aa8 tree-sitter: add basic testing on ci
build tree-sitter c parser on ci for testing purposes
2019-09-28 14:55:43 +02:00
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