zeertzjq
06a53ab2cb
vim-patch:8.2.4334: command line popup menu not positioned correctly
...
Problem: Command line popup menu not positioned correctly.
Solution: Also use vim_strsize() on the existing text. (Naruhiko Nishino,
closes vim/vim#9727 )
68cc2b8a37
2022-08-22 09:08:47 +08:00
zeertzjq
99bd895956
vim-patch:8.2.4328: command line complete matches cleard when typing character
...
Problem: Command line complete matches cleard when typing character.
(Dominique Pellé)
Solution: Only remove a popup menu if there is one.
73a16c22a4
2022-08-22 08:55:54 +08:00
zeertzjq
e3eb6967bc
vim-patch:8.2.4325: 'wildmenu' only shows few matches ( #19876 )
...
Problem: 'wildmenu' only shows few matches.
Solution: Add the "pum" option: use a popup menu to show the matches.
(Yegappan Lakshmanan et al., closes vim/vim#9707 )
3908ef5017
Omit p_wmnu check in cmdline_pum_active() as it can cause problems.
Omit vim_strchr() flags as that isn't really better than bitmasks.
Omit key translations and document it in vim_diff.txt.
2022-08-21 21:31:25 +08:00
matveyt
eb9b93b5e0
feat(defaults): mouse=nvi #19290
...
Problem:
Since right-click can now show a popup menu, we can provide messaging to
guide users who expect 'mouse' to be disabled by default. So 'mouse' can
now be enabled by default.
Solution:
Do it.
Closes #15521
2022-07-17 04:14:04 -07:00
zeertzjq
33da7d83e8
fix(pum): make right drag in anchor grid to select work in multigrid UI ( #19382 )
2022-07-16 08:26:40 +08:00
zeertzjq
5a62ad605e
feat(ui): make right-click menu work properly with ext_multigrid
...
Add tests both with and without ext_multigrid.
2022-07-01 10:28:07 +08:00
Famiu Haque
bbf58e6bbc
refactor(ui)!: link VertSplit
to Normal
by default
...
Avoids using `gui=reverse` on `VertSplit` and makes window separators
look much nicer by default.
2022-05-15 22:37:35 +06:00
dundargoc
e63e5d1dbd
docs: typo fixes ( #17859 )
...
Co-authored-by: Elias Alves Moura <eliamoura.alves@gmail.com>
Co-authored-by: venkatesh <shariharanvenkatesh@gmail.com>
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
Co-authored-by: Vikas Raj <24727447+numToStr@users.noreply.github.com>
Co-authored-by: Steve Vermeulen <sfvermeulen@gmail.com>
Co-authored-by: Evgeni Chasnovski <evgeni.chasnovski@gmail.com>
Co-authored-by: rwxd <rwxd@pm.me>
Co-authored-by: casswedson <58050969+casswedson@users.noreply.github.com>
2022-04-15 12:35:06 +02:00
zeertzjq
c41e75039f
test: move completion :stopinsert test to completion_spec.lua ( #17992 )
2022-04-04 14:53:47 +08:00
bfredl
5ecb2cb539
fix(test): only use buffer completion in popupmenu timer test
2022-03-02 09:15:49 +01:00
zeertzjq
69f37197c0
fix(completion): update submode message when selecting from API ( #17022 )
2022-01-28 07:55:10 +08:00
zeertzjq
8e945c2524
vim-patch:8.2.1762: when a timer uses :stopinsert completion isn't stopped
...
Problem: When a timer uses :stopinsert Insert mode completion isn't
stopped. (Stanley Chan)
Solution: Call ins_compl_prep(ESC).
d0e1b7103c
2022-01-15 22:33:16 +08:00
zeertzjq
c7aa64631d
feat(completion): support selecting item via API from Lua mapping
2022-01-11 13:59:39 +08:00
zeertzjq
e6d35b9e40
fix(pum_redraw): use grid_puts_len() to truncate the text
...
Nvim already resizes grid to the required width, so there is no need to
truncate the text in pum_redraw(). What's more, truncation is currently
done incorrectly because Vim patch 8.2.1995 was ported incorrectly.
This nearly reverts the truncation part of Vim patch 8.2.1995, but not
the part that reduces unnecessary calls to pum_redraw(). The original PR
https://github.com/vim/vim/pull/7306 didn't explain much about which
part of it actually reduces redraws.
2021-12-24 08:06:27 +08:00
Justin M. Keyes
6751d6254b
refactor(tests): use assert_alive() #15546
2021-09-01 09:42:53 -07:00
Jan Edmund Lazo
d8c69adbab
Merge pull request #12698 from erw7/fix-popupmenu-with-rl
...
ui: fix problem with the popupmenu when rightleft is set
2020-11-13 23:09:57 -05:00
erw7
f5c9065f3e
Fix popupmenu position issue
2020-10-23 12:36:32 +09:00
erw7
f1bd2c1dd9
ui: fix problem with the popupmenu when rightleft is set
...
fixes #12032
2020-07-31 02:11:50 +09:00
Yatao Li
e34684b2ad
api/ui: simplify popup menu position get/set logic; fix test
2020-04-28 01:54:16 +08:00
Yatao Li
d372c804aa
api/ui: allow set bounds row and col to be less than 0; ui_pum_get_pos: return first extui bounds information instead of reducing
2020-04-28 01:52:01 +08:00
Yatao Li
ed6230434b
gen_api_dispatch.lua: allow msgpack int for Float args; test: add ui_pum_set_bounds and tv_dict_add_float tests
2020-04-28 01:53:43 +08:00
Björn Linse
4dabbc19d4
popupmenu: don't use 'rightleft' option in cmdline mode
...
Cmdline is always drawn from the left to right, so using rightleft
popupmenu is not useful here
2020-03-23 19:14:33 +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
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
Jan Edmund Lazo
1f4c9da9c6
test: fix screen assertions
2019-10-01 22:27:44 -04:00
Björn Linse
0636b25f28
cmdline: wildmenumode() should be true with wildoptions+=pum
2019-09-28 21:00:27 +02:00
glacambre
958ca938b4
ex_getln.c: fix <S-Tab> not triggering pum when wildoptions=pum ( #10042 )
...
Some of the logic that was present for <Tab> was missing from <S-Tab>.
Closes https://github.com/neovim/neovim/issues/10042 .
2019-09-08 20:47:22 +02:00
erw7
55b1126a22
Add nvim_ui_pum_set_height to api
2019-09-08 12:25:49 +09:00
Björn Linse
e04b9e7c78
test/ui: update tests for new msg_grid implementation
2019-09-01 15:55:10 +02:00
Björn Linse
628f8f3dfd
ui: transmit "blend=" property of highlight attributes
2019-08-18 13:52:32 +02:00
Björn Linse
51a451570d
screen: disable redrawing inside VimResized
...
Note: test doesn't fail on master. I cannot reproduce the glitches with
-u NONE, probably it requires interfering events. But add some coverage
for these checks at least.
2019-07-05 16:58:53 +02:00
Björn Linse
b98d1cf68b
cmdline: correct the column position of wildoptions=pum popupmenu
...
- position might get invalid with "longest" match
- position might be wrong when completed pattern ends in "/"
2019-07-01 18:24:00 +02:00
Björn Linse
4c4d964eeb
ui: add 'winblend' to support blending of floating windows
...
Also add `hi blend=` attribute to override transparency of indiviual attributes.
2019-06-25 18:08:21 +02:00
Björn Linse
be8ebba325
Allow using internal popupmenu or ext_popupmenu for wildmenu
...
Deprecate ext_wildmenu. ext_popupmenu already contains more state (anchor
position), and will allow further expansion (info about items).
2019-03-16 19:53:21 +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.
8fcb60f961
2019-03-09 23:12:33 +01:00
Justin M. Keyes
e50d0b6fc1
UI: change implementation of hl_rgb2cterm_color()
...
Replace the implementation cargo-culted from Vim's source with something
simpler which "seems to look better" with 'pumblend'.
2019-02-12 10:11:30 +01:00
Björn Linse
af51ae944e
highlight: handle blending with gui=reverse and guisp attributes
2019-02-11 19:38:02 +01:00
Björn Linse
37f8df8824
UI: implement 'pumblend' option for semi-transparent popupmenu
...
Why?
- Because we can.
- Because the TUI is just another GUI™
- Because it looks kinda nice, and provides useful context like 1 out of 100
times
Complies with "don't pay for what you don't use".
Some crashes for resizing were unfolded, add tests for those.
2019-02-07 16:43:51 +01:00
Björn Linse
81ac8e9015
popupmenu: fix alignment of kind and extra after #9530
2019-02-03 20:43:23 +01:00
Björn Linse
bfe2435459
tests/ui: add test for popupmenu redrawing in various situations
...
Many of these are handled by the compositor. Check that it causes
no glitches.
2019-02-02 16:31:49 +01:00
Björn Linse
ae218c108f
api: select items in popupmenu
2019-01-09 10:17:48 +01:00
Björn Linse
cdfa395ad8
popupmenu: fix positioning with vsplits
2019-01-01 15:20:37 +01:00
Ronan Pigott
9ed46a77e6
vim-patch:8.1.0355 Incorrect adjusting the popup menu ( #8996 )
...
Problem: Incorrect adjusting the popup menu for the preview window.
Solution: Compute position and height properl. (Ronan Pigott) Also show at
least ten items. (closes vim/vim#3414 )
2018-09-16 11:15:46 +02:00
rpigott
59c5c4f006
test: popupmenu placement
2018-09-13 00:27:42 +02:00
Björn Linse
3d88287e30
tests: introduce screen:expect{...} form
2018-08-27 15:15:49 +02:00