Commit Graph
12703 Commits
Author SHA1 Message Date
Marco Hinz 98391cd6ab api: refactor FloatAnchor usage 2019-03-16 12:35:57 +01:00
Marco Hinz cfed9a4123 api: add nvim_win_get_config() 2019-03-16 12:35:52 +01:00
Björn Linse 175398f216 Merge pull request #9616 from chemzqm/completechange
add MenuPopupChanged autocmd
2019-03-16 10:36:54 +01:00
Justin M. Keyes b90256e6cc test: simplify TUI bg-detection test
Previous approach skipped the test if the expected value matched the
default value ("dark"). New approach always checks, but uses retry() to
ignore potentially wrong 'background' before the terminal response is
handled.
2019-03-15 05:26:41 +01:00
Justin M. Keyes 1baf4edbd9 Merge #9728 from justinmk/autocmd-once 2019-03-15 12:38:53 +01:00
Jan Edmund Lazo 680252aa15 vim-patch:8.1.0728: avoid breaking after single space #9733
Problem:    Cannot avoid breaking after a single space.
Solution:   Add the 'p' flag to 'formatoptions'. (Tom Ryder)
https://github.com/vim/vim/commit/c3c3158756ae074052b0db2a3e3a7ba192df5330
2019-03-15 12:14:42 +01:00
chemzqm 6c375d71c3 autocmd: add MenuPopupChanged autocmd
Update src/nvim/auevents.lua

Co-Authored-By: chemzqm <chemzqm@gmail.com>
2019-03-15 04:24:41 +08:00
Björn Linse ced980ff17 Merge pull request #9730 from bfredl/pumfloat
compositor: fix rendering issues with floats opened after popupmenu
2019-03-14 12:22:46 +01:00
Jan Edmund Lazo cbe4377fde vim-patch:8.1.0671: cursor in wrong column after auto-format #9729
Problem:    Cursor in the wrong column after auto-formatting.
Solution:   Check for deleting more spaces than adding. (closes vim/vim#3748)
https://github.com/vim/vim/commit/e1e714ef0d1f4bb8b1712795e9106e3b4ff4c7bd
2019-03-14 11:23:05 +01:00
Björn Linse ca5f919965 compositor: fix rendering issues with floats opened after popupmenu 2019-03-14 10:43:49 +01:00
Justin M. Keyes b1f25ea187 autocmd: do not show empty section after ++once handlers expire
Problem: If autocmd pattern only contained `++once` handlers, and
         all of them completed, then there would be an empty group
         displayed by `:autocmd Foo`.
Solution: Delete the pattern if all of its commands were deleted.
2019-03-14 01:30:11 +01:00
Justin M. Keyes 3259e45f92 autocmd: rename: "++nested", "++once"
Based on feedback from upstream:
https://github.com/vim/vim/pull/4100
2019-03-14 01:30:11 +01:00
Jan Edmund Lazo 907b480350 vim-patch:8.0.1447: still too many old style tests (#9725)
Problem:    Still too many old style tests.
Solution:   Turn a few tests into new style. (Yegappan Lakshmanan,
            closes vim/vim#2509)
https://github.com/vim/vim/commit/cada78975eebc47f9b12de1a471639b5afd9ad2f

Exclude test_shortpathname.vim.
nvim does not support 8.3 filenames on Windows.
2019-03-14 00:43:11 +01:00
demiurg337 9d207fd876 dictwatcheradd(): support b:changedtick #9693
fixes #6635
closes #9693
2019-03-14 00:38:56 +01:00
Justin M. Keyes 7fcf2f926f TextYankPost: add v:event["inclusive"] #9717 2019-03-13 03:24:09 +01:00
Jan Edmund Lazo 2af1e23278 vim-patch:8.1.0170: invalid memory use with complicated pattern #9724
Problem:    Invalid memory use with complicated pattern. (Andy Massimino)
Solution:   Reallocate the list of listids when needed. (closes vim/vim#3175)
            Remove unnecessary function prototypes.
https://github.com/vim/vim/commit/2338c32b53d20dc18540b1a20845bcd8a6371bff
2019-03-13 03:16:22 +01:00
Justin M. Keyes 4f5e378124 test/CI: skip "throttles output" test on Travis macOS #9721
Travis macOS is not fast enough to run this test reliably. The test
depends on the system producing output faster than the Nvim TUI can
handle it.
2019-03-12 19:26:24 +01:00
Björn Linse 8760816d46 Merge pull request #9722 from bfredl/float-doc2
Float docs and defaults.
2019-03-12 17:37:43 +01:00
Björn Linse dec3e027d9 docs: adjust the generated nvim_open_win docs
The format here is not meant to be ideal, just a backstop until
auto-generation has been fixed.
2019-03-12 17:17:58 +01:00
Björn Linse f9d3e69cc9 docs: update generated API docs 2019-03-12 17:17:58 +01:00
Björn Linse 4ab0dcc4a9 docs: floating windows introduction 2019-03-12 17:17:58 +01:00
Björn Linse 81e84f2aae floats: add NormalFloat highlight and 'nonumber' default 2019-03-12 17:17:54 +01:00
Björn Linse af966afaa4 window: simplify logic for entering new float 2019-03-12 12:49:11 +01:00
Justin M. Keyes 9312e2d06a autocmd: rename "once" => "-once" #9713
- Rename "nested" to "-nested", but continue to support "nested" for
  backwards-compatibility.
- Allow any order: "-once -nested" or "-nested -once".

ref https://github.com/neovim/neovim/pull/9706#issuecomment-471295747
2019-03-11 21:01:47 +01:00
Marco Hinz 3b63374b33 Dist: make icon a proper square (#9716)
The canvas was resized from 128x104 to 128x128 and centered via Gimp and further
optimized via optipng.

Fixes https://github.com/neovim/neovim/issues/9715
2019-03-11 21:00:12 +01:00
Justin M. Keyes c0a29c3656 Merge #9708 from justinmk/tui-bg-detect 2019-03-11 09:25:39 +01:00
Justin M. Keyes 43184566aa TUI/background detection: hook into VimEnter event
If terminal response is received during startup, set 'background' from
a nested "one-shot" (once) VimEnter autocmd.

The previous not-so-clever "self-rescheduling" approach could cause
a long delay at startup (event-loop does not make forward progress).

fixes #9675
ref #9509
2019-03-11 08:43:27 +01:00
Petter Wahlman c99bff5f56 cleanup: rename menu_nable_recurse() #9707 2019-03-10 19:05:48 +01:00
Justin M. Keyes ef5037e7f6 Merge #9706 from justinmk/aucmd-once 2019-03-10 13:10:09 +01:00
Justin M. Keyes c12cf5bde7 autocmd: introduce "once" feature
Adds a new feature to :autocmd which sets the handler to be executed at
most one times.

Before:

    augroup FooGroup
      autocmd!
      autocmd FileType foo call Foo() | autocmd! FooGroup * <buffer>
    augroup END

After:

    autocmd FileType foo once call Foo()
2019-03-10 04:58:30 +01:00
Jan Edmund Lazo 95ce1e5408 vim-patch:8.1.1002: "gf" on URL with port number #9705
Problem:    "gf" does not always work when URL has a port number. (Jakob
            Schöttl)
Solution:   When a URL is recognized also accept ":". (closes vim/vim#4082)
https://github.com/vim/vim/commit/cbef8e1aa1f260ffde16491b1678eae53a36cf68
2019-03-10 04:53:51 +01:00
Justin M. Keyes 092e7e6c60 Merge #9703 from erw7/fix-executable-on-unix 2019-03-09 23:23:20 +01:00
erw7 7757ce1cb8 executable(): return false if user is not owner #9703
S_IXUSR does not check ownership.  Test case:

    touch test.txt
    chmod 744 test.txt
    sudo chown root:root test.txt
    nvim -u NORC
    :echo executable('./test.txt')
2019-03-09 23:18:03 +01:00
Justin M. Keyes 3cb89cafe3 vim-patch:8.1.0994: fix relative cursor position #9676
Problem:    Relative cursor position is not calculated correctly.
Solution:   Always set topline, also when window is one line only.
            (Robert Webb) Add more info to getwininfo() for testing.
https://github.com/vim/vim/commit/8fcb60f961bdd134599fb016c6537fd496e800f5
2019-03-09 23:12:33 +01:00
Justin M. Keyes 6eca56c6c5 Merge #9003 'vim-patch:8.0.1372' 2019-03-09 14:12:54 +01:00
erw7 f719247118 floating-window: fix crash setting cmdheight #9685
fixes #9680
2019-03-09 14:10:56 +01:00
Jan Edmund Lazo c1ee5e0694 vim-patch:8.0.1372: profile log may be truncated halfway a character
Problem:    Profile log may be truncated halfway a character.
Solution:   Find the start of the character. (Ozaki Kiichi, closes vim/vim#2385)
https://github.com/vim/vim/commit/ac112f01a6930c9d15cf0360b657373699916bfd

nvim does not support "--clean" yet but "-es" should suffice for the test.
2019-03-08 21:35:03 -05:00
Justin M. Keyes 4352d41db0 Merge #9662 'vim-patch:8.0.{0643-0646}' 2019-03-08 13:21:11 +01:00
Justin M. Keyes 0355c1ed9c Merge #9695 'vim-patch:8.1.{739,826,998}' 2019-03-08 12:23:53 +01:00
Jan Edmund Lazo e3d9945f7f vim-patch:8.1.0826: too many #ifdefs
Problem:    Too many #ifdefs.
Solution:   Graduate FEAT_VIRTUALEDIT.  Adds about 10Kbyte to the code.
https://github.com/vim/vim/commit/29ddebef4038d2d2b3bc9d8d3b0109f4046d6fbf
2019-03-08 03:12:57 -05:00
Jan Edmund Lazo 8bd194f98a oldtests: set shellslash in Test_true_false_arg() 2019-03-08 02:30:22 -05:00
Jan Edmund Lazo e428fc4b52 oldtests: set shellslash in Test_shellescape()
Value of "&shell" does not affect "shellescape()".
2019-03-08 02:12:12 -05:00
Jan Edmund Lazo aa985f4a7c vim-patch:8.1.0739: text objects in not sufficiently tested
Problem:    Text objects in not sufficiently tested.
Solution:   Add a few more test cases. (Dominique Pelle, closes vim/vim#3795)
https://github.com/vim/vim/commit/81b1ba4be57b4bfd7e53a6709b4f98758612ef5f
2019-03-07 23:30:12 -05:00
Jan Edmund Lazo 72e304c349 vim-patch:8.1.0998: getcurpos() unexpectedly changes "curswant"
Problem:    getcurpos() unexpectedly changes "curswant".
Solution:   Save and restore "curswant". (closes vim/vim#4069)
https://github.com/vim/vim/commit/19a66858a5e3fedadc371321834507c34e2dfb18
2019-03-07 22:28:30 -05:00
Billy Su 96e2c3945f lint: fix coding style 2019-03-08 00:08:16 +08:00
Billy Su 0a471e009a vim-patch:8.0.0646: the hlsearch test fails on fast systems
Problem:    The hlsearch test fails on fast systems.
Solution:   Make the search pattern slower.  Fix that the old regexp engine
            doesn't timeout properly.
https://github.com/vim/vim/commit/0946326580e6f034fe2c88d041407ea0fde980ab
2019-03-08 00:06:28 +08:00
Billy Su fbd8209286 vim-patch:8.0.0645: no error for illegal back reference in NFA engine
Problem:    The new regexp engine does not give an error for using a back
            reference where it is not allowed. (Dominique Pelle)
Solution:   Check the back reference like the old engine. (closes vim/vim#1774)
https://github.com/vim/vim/commit/1ef9bbe215e13a273e74fccaddd8fc5a42c76b6e
2019-03-07 23:48:53 +08:00
Billy Su 570e41fc08 vim-patch:8.0.0644: the timeout for 'hlsearch' is not tested
Problem:    There is no test for 'hlsearch' timing out.
Solution:   Add a test.
https://github.com/vim/vim/commit/5b1affefd0e96154517ec6f71300086ae6d22d24
2019-03-07 23:48:53 +08:00
Billy Su 241b905b13 vim-patch:8.0.0643: when a pattern search is slow Vim becomes unusable
Problem:    When 'hlsearch' is set and matching with the last search pattern
            is very slow, Vim becomes unusable.  Cannot quit search by
            pressing CTRL-C.
Solution:   When the search times out set a flag and don't try again.  Check
            for timeout and CTRL-C in NFA loop that adds states.
https://github.com/vim/vim/commit/fbd0b0af6800f6ff89857863d6a07ea03f09ff6c
2019-03-07 23:27:19 +08:00
Jan Edmund Lazo 5f84b1dc41 vim-patch:8.1.0935: old regexp engine may use invalid buffer #9692
Problem:    Old regexp engine may use invalid buffer for 'iskeyword' or
            uninitialized buffer pointer. (Kuang-che Wu)
Solution:   Set rex.reg_buf when compiling the pattern. (closes vim/vim#3972)
https://github.com/vim/vim/commit/8bfd9469cef536f171e6666f9d9217192e09d161
2019-03-07 12:05:22 +01:00