Commit Graph

590 Commits

Author SHA1 Message Date
Björn Linse
70c212e480 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-09 09:42:26 +01:00
Björn Linse
459a362cc1 extmarks: fix crash due to invalid column values in inccommand preview
This used to use -1 and MAXCOL values. Make sure in range values are
used.
2020-02-02 10:50:48 +01:00
Björn Linse
bfe84adb5a options: winhighlight: fix incorrect string equality test 2020-01-28 19:10:41 +01:00
Björn Linse
687fc527de screen: add missing redraws after a message 2020-01-26 13:45:20 +01:00
akovaski
97dcc48c99 wildmode: fix wildmode=longest,full with pum #11690
With "wildmode=longest,full" + wildoptions=pum, wildmode should show
popupmenu after Tab-Tab, not the horizontal wildmenu.

Fixes #11622
2020-01-21 00:35:01 -08:00
Björn Linse
b4a92aadd2 messages: echo "line1\r\nline2" should not clear line1 2020-01-16 19:35:45 +01:00
Björn Linse
ca1a00edd6 extmarks/bufhl: reimplement using new marktree data structure
Add new "splice" interface for tracking buffer changes at the byte
level. This will later be reused for byte-resolution buffer updates.
(Implementation has been started, but using undocumented "_on_bytes"
option now as interface hasn't been finalized).

Use this interface to improve many edge cases of extmark adjustment.
Changed tests indicate previously incorrect behavior. Adding tests for
more edge cases will be follow-up work (overlaps on_bytes tests)

Don't consider creation/deletion of marks an undoable event by itself.
This behavior was never documented, and imposes  complexity for little gain.

Add nvim__buf_add_decoration temporary API for direct access to the new
implementation. This should be refactored into a proper API for
decorations, probably involving a huge dict.

fixes #11598
2020-01-16 12:36:10 +01:00
Jan Edmund Lazo
3c764aabb5
vim-patch:8.1.1308: the Normal highlight is not defined when compiled with GUI
Problem:    The Normal highlight is not defined when compiled with GUI.
Solution:   Always define Normal. (Christian Brabandt, closes vim/vim#4072)
f90b6e03a9
2020-01-06 00:18:02 -05:00
Jan Edmund Lazo
1836853955
ci: test powershell core on Linux 2019-12-31 15:11:08 -05:00
Jan Edmund Lazo
ebd5c2cdda
ui: add basic tests for pumheight,pumwidth 2019-12-29 23:16:52 -05:00
Jan Edmund Lazo
1d3d84fe81
vim-patch:8.1.0554: popup menu overlaps with preview window
Problem:    Popup menu overlaps with preview window.
Solution:   Adjust the height computation. (Hirohito Higashi, closes vim/vim#3414)
614ab8aa00

Cherry-picked "row -> pum_win_row" rename changes from patch 8.1.0062.
2019-12-29 18:34:04 -05:00
Jan Edmund Lazo
51c9e3c4d1
vim-patch:8.0.1538: popupmenu is too far left when completion is long
Problem:    Popupmenu is too far left when completion is long. (Linwei)
Solution:   Adjust column computations. (Hirohito Higashi, closes vim/vim#2661)
bb008dd323
2019-12-29 18:34:04 -05:00
Jan Edmund Lazo
703ed11c97
vim-patch:8.0.1491: the minimum width of the popup menu is hard coded
Problem:    The minimum width of the popup menu is hard coded.
Solution:   Add the 'pumwidth' option. (Christian Brabandt, James McCoy,
            closes vim/vim#2314)
a8f04aa275
2019-12-29 18:15:46 -05:00
Matthieu Coudron
bbad324b17 fillchars: adding foldopen, foldsep, foldclose
You can try it with
set fillchars+=foldopen:▾,foldsep:│,foldclose:▸
2019-12-25 14:28:36 +01:00
Matthieu Coudron
65aca4d857 TUI: can make the cursor transparent #11519
when setting 'guicursor' highlight blend=100.
2019-12-19 12:27:21 -08:00
Justin M. Keyes
c34130d13a API: deprecate nvim_command_output 2019-12-02 20:52:06 -08:00
Justin M. Keyes
a17ccb0d24
screen.lua: remove screen:_on_event #11488
Tests can redefine the handlers, so we don't need this extra hook.
2019-12-01 01:06:10 -08:00
Justin M. Keyes
f6e7857c54
floatwin: show error if window is closed immediately #11476
Autocmds may close window while it is being entered, then
win_set_minimal_style(wp) operates on an invalid pointer.

We could silently ignore this instead, but it is unlikely to be
intentional, so it is more useful to show an error.

fix #11383
2019-11-29 23:48:14 -08:00
Brian Wignall
001e69cd46 doc: fix typos
close #11459
2019-11-27 22:47:25 -08:00
Björn Linse
5f9209389b
Merge pull request #11445 from bfredl/fcslcs
options: make 'fillchars' and 'listchars' global-local instead of local-only
2019-11-26 22:10:13 +01:00
Björn Linse
49a40f425d 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
2019-11-26 19:14:54 +01:00
Justin M. Keyes
36d1335a66
UI: emit mouse_on/mouse_off on attach #11455
closes #11372
2019-11-25 08:56:42 -08:00
Björn Linse
7d5988feee tests: remove irrelevant timing info 2019-11-23 21:26:16 +01:00
Björn Linse
bdebe8516c bufhl: use extmark column adjustment for bufhl
NB: this is not the final implementation. Bufhl should be made a
part of the extmark tree, so that "start" adjustment just works
automatically. But "stop" will still need some ad-hoc trickery,
until extended marks natively support ranges (hopefully sooner than
forever).
2019-11-23 14:50:31 +01:00
Dennis B
d5f14b8372 Clear 'cc' in nvim_open_win 'minimal' style #11361 (#11427)
* Clear 'cc' in nvim_open_win 'minimal' style #11361

Add 'colorcolumn' to the list of options that should be cleared when creating
a 'minimal'-style floating window.
2019-11-22 10:55:04 +01:00
Björn Linse
dab40f43b1 Add v:lua.func() vimL syntax for calling lua
Also simplify error messages when calling lua from vimL.
2019-11-16 22:33:21 +01:00
Marco Hinz
1cb4674547
api: add nvim_buf_get_virtual_text() (#11354)
This adds the missing partner function of nvim_buf_set_virtual_text().
2019-11-10 16:38:04 +01:00
Justin M. Keyes
4abb67c027 test/Screen:expect: replace "{IGNORE}" with "{MATCH:…}"
ref #11004
2019-11-09 22:26:01 -08:00
Daniel Hahler
c0abaf9ca6 tests: Screen:expect: support "{MATCH:…}" 2019-11-09 21:58:28 -08:00
Justin M. Keyes
3e21d49836 Merge #11319 'inccommand: fix issues with modifiers and prompting' 2019-11-05 17:34:21 -08:00
Björn Linse
f707a7ef68 terminal: add tests for palette color forwarding 2019-11-03 10:14:58 +01:00
Björn Linse
33cdff1b5c test/screen: make snapshot_util() work properly in rgb_cterm mode 2019-11-02 11:01:58 +01:00
Rob Pilling
d04ab11f24 Prevent prompts during inccommand previews
For example, "Backwards range given, OK to swap (y/n)?" on each keypress.
2019-10-31 19:22:22 +00:00
Rob Pilling
d52d782389 Prevent :topleft, etc modifying the inccommand preview window 2019-10-31 19:16:52 +00:00
Rob Pilling
1c7aa11312 Allow multiple leading colons before and after modifiers for 'inccommand' 2019-10-31 19:16:52 +00:00
Rob Pilling
d4384cbbf3 Remove unnecessary expr in 'icm' test 2019-10-31 18:55:43 +00:00
Daniel Hahler
93fe30593b 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
2019-10-19 14:45:27 -07:00
Daniel Hahler
d89ec55c45 test/functional: retry/Screen: failure instead of error #11173
- Running out of retries, or unexpected screen state should make the
  test FAIL, not ERROR.
- Uses levels to report the location of the caller.
- Improve message with retry-failure (formatting).

Before:

    [ RUN      ] test: 103.53 ms ERR
    test/functional/helpers.lua:388:
    retry() attempts: 1
    test/functional/ui/screen.lua:587: Row 1 did not match.
    Expected:
      |*X^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    Actual:
      |*^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
            test/functional/helpers.lua:388: in function 'retry'
            test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>

After:

    [ RUN      ] test: 105.22 ms FAIL
    test/functional/test_spec.lua:24: stopping after 1 retry() attempts.
    test/functional/test_spec.lua:25: Row 1 did not match.
    Expected:
      |*X^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |
    Actual:
      |*^                         |
      |{0:~                        }|
      |{0:~                        }|
      |                         |

    To print the expect() call that would assert the current screen state, use
    screen:snapshot_util(). In case of non-deterministic failures, use
    screen:redraw_debug() to show all intermediate screen states.

    stack traceback:
            test/functional/helpers.lua:389: in function 'retry'
            test/functional/test_spec.lua:24: in function <test/functional/test_spec.lua:23>
2019-10-19 14:15:07 -07:00
Daniel Hahler
4bbad54817
tests: fix non-controversial misuse of pending (#11247)
Ref: https://github.com/neovim/neovim/pull/11184
2019-10-18 04:46:30 +02:00
Björn Linse
cc0d725230 tests/ui: completely delete "attr_ignore" feature
All existing usages are ad-hoc/random/lazyness. Generating attribute
specifications is not hard since four years, just do it always.
2019-10-13 22:10:42 +02:00
Björn Linse
4987311fb5 tests/ui: remove unnecessary screen:detach()
It is perfectly fine and expected to detach from the screen just by
the UI disconnecting from nvim or exiting nvim. Just keep detach() in
screen_basic_spec, to get some coverage of the detach method itself.

This avoids hang on failure in many situations (though one could argue
that detach() should be "fast", or at least "as fast as resize",
which works in press-return already).

Never use detach() just to change the size of the screen, try_resize()
method exists for that specifically.
2019-10-13 22:10:42 +02:00
Björn Linse
a330129a28 tests/ui: cleanup illegitimate usages of "attr_ignore"
"attr_ignore" is an anti-pattern, with snapshot_util()
just include all the highlights already.
2019-10-13 22:10:42 +02:00
Björn Linse
5a85699425 tests/ui: make screen.lua use "linegrid" representation internally
PR #8221 took a short-cut when implementing the tests: screen.lua would
translate the linegrid highlight ids back into the old per-cell
attribute description.

Apart from cleaning up technical debt, this enables to check both rgb
and cterm colors in the same expect(), which previously was needlessly
restricted to ext_hlstate tests only.
2019-10-13 22:10:42 +02:00
Jan Edmund Lazo
a7fc2f3f64 test: "!:&" works with powershell #11201
Removed 'echo' alias because it does not behave like POSIX echo.
2019-10-10 21:30:20 -07:00
Jan Edmund Lazo
51f2826f61 doc: update shellquote for powershell #11122
shellquote is not treated like shellxquote for non-quote values.
2019-10-10 01:16:02 -07:00
Daniel Hahler
a341eb6087 win_line: update w_last_cursorline always
Vim patch 8.1.0856 (54d9ea6) caused a performance regression in Neovim,
when `set conceallevel=1 nocursorline` was used, since then due to
refactoring in 23c71d5 `w_last_cursorline` would never get updated
anymore.

Adds/uses `redrawdebug+=nodelta` for testing this.

Fixes https://github.com/neovim/neovim/issues/11100.
Closes https://github.com/neovim/neovim/pull/11101.
2019-10-04 08:48:57 +02:00
Justin M. Keyes
30479417e8
Merge #11087 from janlazo/vim-8.1.0010
vim-patch:8.1.{10,230,315,330,514,517,518,1327,1347,1758,2072,2074,2091,2095,2103}
2019-10-02 22:43:59 -07:00
Jan Edmund Lazo
1f4c9da9c6
test: fix screen assertions 2019-10-01 22:27:44 -04:00
Daniel Hahler
b7d6caaa03 Fix redraw regression with w_p_cole in visual mode
Fixes https://github.com/neovim/neovim/issues/11024, regressed in 23c71d51.
Closes https://github.com/neovim/neovim/pull/11120.
2019-10-02 03:51:46 +02:00
Björn Linse
0636b25f28 cmdline: wildmenumode() should be true with wildoptions+=pum 2019-09-28 21:00:27 +02:00