| Commit message (Collapse) | Author | Age |
|
|
|
|
|
|
|
|
|
|
|
| |
item (#31988)
Problem: Popup menu internal error with some abbr in completion item.
Solution: Don't compute attributes when there is no corresponding text.
Reduce indent in pum_redraw() while at it (zeertzjq).
fixes: vim/vim#16427
closes: vim/vim#16435
https://github.com/vim/vim/commit/3a0cc36c69744a7727ce34311d39d2d9d8ddc6f9
|
|
|
|
|
|
|
|
| |
Problem: when popup preview buffer has filetype like markdown and ts
is enabled, the extmark clean and update not correct, if add the extmark
sync there has lots of duplicate codes like nvim_buf_set_lines.
Solution: use nvim_buf_set_lines api internally to set info to popup
preview buffer.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
preview window
Problem: completion may crash, completion highlight wrong with preview
window (after v9.1.0954)
Solution: correctly calculate scroll offset, check for preview window
when adding extra highlighting
(glepnir)
when there have a preview window prepare_tagpreview
will change curwin to preview window and this may cause
ComplMatchIns check condition not correct. check wp is curwin
and also the type of wp is not a preview or poup info
fixes: https://github.com/vim/vim/issues/16284
closes: https://github.com/vim/vim/pull/16283
https://github.com/vim/vim/commit/8d0bb6dc9f2e5d94ebb59671d592c1b7fa325ca6
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: popupmenu.c can be improved
Solution: slightly refactor the logic
(glepnir)
closes: vim/vim#16271
Replace some if blocks and combine user attr abstract to an inline
function.
https://github.com/vim/vim/commit/89a107efd141d5a1fed850af80a74900077666cf
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
| |
Result of `make iwyu` (after some "fixups").
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: wrong MIN macro in popupmenu.c (after v9.1.0921)
(zeertzjq)
Solution: change it to MAX()
https://github.com/vim/vim/commit/618c4d36ca92a62212a37e787c202229ceff8537
Co-authored-by: Christian Brabandt <cb@256bit.org>
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: popupmenu logic is a bit convoluted
Solution: slightly refactor logic and use MIN/MAX() macros to simplify
(glepnir)
Define the MAX/MIN macros. Since we support some older platforms, C
compilers may not be as smart. This helps reduce unnecessary if
statements and redundant ternary expressions. Pre-calculate some
expressions by defining variables. Remove unnecessary parentheses.
Adjust certain lines to avoid exceeding 80 columns.
closes: vim/vim#16205
https://github.com/vim/vim/commit/c942f84aadffd0c8969ecf81e3e9103722b2714f
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
| |
Problem: Float preview window still exist when back at original.
Or no info item is selected.
Solution: if selected is -1 or no info is selected, if float preview
window exist close it first.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Option metadata like list of valid values for an option and
option flags are not listed in the `options.lua` file and are instead
manually defined in C, which means option metadata is split between
several places.
Solution: Put metadata such as list of valid values for an option and
option flags in `options.lua`, and autogenerate the corresponding C
variables and enums.
Supersedes #28659
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
| |
Co-authored-by: zeertzjq <zeertzjq@outlook.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#31054)
Problem: using wrong highlight group for spaces for popupmenu
Solution: use original attribute instead of combined attributed
(glepnir)
closes: vim/vim#15978
https://github.com/vim/vim/commit/bc10be7a4060748ed1876ab91cf53a2a8701ac13
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
| |
Problem: Selecting an item in the right-click menu when clicking to the
left/right of it is confusing, especially in a UI that doesn't
support 'mousemoveevent'.
Solution: Don't select an item when clicking to the left/right of the
right-click menu.
|
|
|
|
| |
- `PmenuSel` and `PmenuMatch` inherit from `Pmenu`
- `PmenuMatchSel` inherits from both `PmenuSel` and `PmenuMatch`
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: some missing changes from v9.1.0771
Solution: use correct highlighting attribute and adjust comments
(glepnir)
closes: vim/vim#15836
https://github.com/vim/vim/commit/7baa014d0f73c3b2c6831471d047220633651238
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Currently completion attribute hl_group is combined with
all items, which is redundant and confusing with kind_hlgroup
Solution: Renamed to abbr_hlgroup and combine it only with the abbr item
(glepnir).
closes: vim/vim#15818
https://github.com/vim/vim/commit/0fe17f8ffbd2588ecd2bf42dced556897bc64f89
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
| |
Problem: missing change from patch v9.1.0754
Solution: use correct width for the actual item
in pum_redraw() (glepnir)
closes: vim/vim#15786
https://github.com/vim/vim/commit/a6d9e3c4e07f73f6523699961d8b7b54bdb80cf6
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: fixed order of items in insert-mode completion menu
Solution: Introduce the 'completeitemalign' option with default
value "abbr,kind,menu" (glepnir).
Adding an new option `completeitemalign` abbr is `cia` to custom
the complete-item order in popupmenu.
closes: vim/vim#14006
closes: vim/vim#15760
https://github.com/vim/vim/commit/6a89c94a9eeee53481ced1a1260a177bffde4c0f
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: cannot set special highlight kind in popupmenu
Solution: add kind_hlgroup item to complete function
(glepnir)
closes: vim/vim#15561
https://github.com/vim/vim/commit/38f99a1f0d61e9bde3f4a3d0cbe2d06185c4a57f
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Rename of pum hl_group is incomplete in source.
Solution: Also rename the test function. Rename to user_hlattr in code
to avoid confusion with pum_extra. Add test with matched text
highlighting (zeertzjq).
closes: vim/vim#15348
https://github.com/vim/vim/commit/4100852e099133a0c9603e1087e5dc6d82001ce7
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: tests: test_popup fails
(after v9.1.0618)
Solution: Correct test, move combining extra attributes to
pum_compute_text_attrs() (glepnir)
closes: vim/vim#15353
https://github.com/vim/vim/commit/8754efe437fcb17ad2c64192f8722e08d68e032e
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: cannot mark deprecated attributes in completion menu
Solution: add hl_group to the Dictionary of supported completion fields
(glepnir)
closes: vim/vim#15314
https://github.com/vim/vim/commit/508e7856ec4afc9d6038b14bb6893668268dccab
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
(#29568)
Problem: Right release selects immediately when pum is truncated.
Solution: Use pum_height instead of pum_size when checking click row.
Don't place it above mouse row when there is more space below.
(zeertzjq)
fixes: vim/vim#15101
closes: vim/vim#15102
https://github.com/vim/vim/commit/761a420c66402545acd8ee3ffa17c3a1fc3110e4
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: matched text is highlighted case-sensitively
Solution: use MB_STRNICMP, update highlighting when the base changes
(glepnir)
fixes: vim/vim#15021
closes: vim/vim#15023
https://github.com/vim/vim/commit/f189138b39a11ed5cf3adea6610469b478841aba
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Matched text isn't highlighted in cmdline pum.
Solution: Use cmdline completion pattern in cmdline mode.
(zeertzjq)
closes: vim/vim#15029
https://github.com/vim/vim/commit/d8c9340fc67ca19f82ec3e77ec38296424e758cf
Cherry-pick syntax.txt change from runtime update.
|
|
|
|
|
|
|
|
|
|
|
| |
(#29371)
Problem: Wrong matched text highlighted in pum with 'rightleft'.
Solution: Match using the original text instead of the reversed text.
(zeertzjq)
closes: vim/vim#15020
https://github.com/vim/vim/commit/63901e89638d683ecbc8e3323170dd485657fd1d
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cmdline pum doesn't work properly with 'rightleft'.
Solution: Don't use curwin->w_p_rl in cmdline mode in pum_redraw(). Use
a static variable since pum_may_redraw() may be called in any
mode. Also correct position of other popups with 'rightleft'.
(zeertzjq)
closes: vim/vim#15005
https://github.com/vim/vim/commit/883018feff43413813770dd1e13d4f950aa38524
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Wrong padding for pum "kind" with 'rightleft'.
Solution: Fix off-by-one error (zeertzjq).
The screen_fill() above is end-exclusive, and
- With 'rightleft' it fills `pum_col - pum_base_width - n + 1` to `col`,
so the next `col` should be `pum_col - pum_base_width - n`.
- With 'norightleft' it fills `col` to `pum_col - pum_base_width + n - 1`,
so the next `col` should be `pum_col - pum_base_width + n`.
closes: vim/vim#15004
https://github.com/vim/vim/commit/a2324373eb1c3f1777bc40cb6dcd5e895a15fe10
|
|
|
|
|
|
|
|
|
|
| |
Problem: Matched text shouldn't be highlighted in "kind" and "menu".
Solution: Pass hlf_T instead of the attribute. Fix indent.
(zeertzjq)
closes: vim/vim#14996
https://github.com/vim/vim/commit/afbe5359e981e5d19ad23c394aefe60395c3648e
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: fuzzy string matching executed when not needed
Solution: when no leader is available, can skip fuzzy logic, so return
early (glepnir)
closes: vim/vim#14986
https://github.com/vim/vim/commit/1c296026627d7ac8195e803b4c2393c21ae659b4
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: fuzzy_match_str_with_pos() does unnecessary list operations.
Solution: Use fuzzy_match() directly (zeertzjq).
closes: vim/vim#14987
https://github.com/vim/vim/commit/2f95ca9fcef8495d60e298ac2cd6d702b90bfb18
N/A patch:
vim-patch:9.1.0478: potential deref of NULL pointer in fuzzy_match_str_with_pos
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot see matched text in popup menu
Solution: Introduce 2 new highlighting groups: PmenuMatch and
PmenuMatchSel (glepnir)
closes: vim/vim#14694
https://github.com/vim/vim/commit/40c1c3317d92f8c2adadf744fab72e4458e2a9fa
Co-authored-by: glepnir <glephunter@gmail.com>
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: Cannot have buffer-local value for 'completeopt'
(Nick Jensen).
Solution: Make 'completeopt' global-local (zeertzjq).
Also for some reason test Test_ColonEight_MultiByte seems to be failing
sporadically now. Let's mark it as flaky.
fixes: vim/vim#5487
closes: vim/vim#14922
https://github.com/vim/vim/commit/529b9ad62a0e843ee56ef609aef7e51b7dc8a4c8
|
| |
|
| |
|
|
|
|
|
|
|
|
| |
Problem:
nvim_complete_set was added in 5ed55ff14c8b7e346811cb6228bf63fb5106bae9
but needs more bake time.
Solution:
Rename it, mark it as experimental.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
Problem: noautocmd is confusing; despite its name, it doesn't block all
autocommands (instead it blocks only those related to setting the buffer), and
is commonly used by plugins to open windows while producing minimal
side-effects.
Solution: be consistent and block all autocommands when noautocmd is set.
This includes WinNew (again), plus autocommands from entering the window (if
enter is set) like WinEnter, WinLeave, TabEnter, .etc.
See the discussion at https://github.com/neovim/neovim/pull/14659#issuecomment-2040029517
for more information.
Remove win_set_buf's noautocmd argument, as it's no longer needed.
NOTE: pum_create_float_preview sets noautocmd for win_set_buf, but all its
callers already use block_autocmds.
Despite that, pum_create_float_preview doesn't actually properly handle
autocommands (it has no checks for whether those from win_enter or
nvim_create_buf free the window).
For now, ensure autocommands are blocked within it for correctness (in case it's
ever called outside of a block_autocmds context; the function seems to have been
refactored in #26739 anyway).
|
|
|
|
|
|
| |
Problem: `set_string_option_direct()` contains a separate codepath specifically for setting string options. Not only is that unnecessary code duplication, but it's also limited to only string options.
Solution: Replace `set_string_option_direct()` with `set_option_direct()` which calls `set_option()` under the hood. This reduces code duplication and allows directly setting an option of any type.
|
|
|
|
|
|
|
|
|
|
|
| |
A lot of functions in move.c only worked for curwin, alternatively
took a `wp` arg but still only work if that happens to be curwin.
Refactor those that are needed for update_topline(wp) to work
for any window.
fixes #27723
fixes #27720
|
|
|
| |
Follows up on rename of `FloatConfig` to `WinConfig` in #27397.
|
|\
| |
| | |
refactor(api): use arena for more stuff
|
| |
| |
| |
| |
| | |
In the context a String inside an Object/Dictionary etc is consumed,
it is considered to be read-only.
|
|/
|
|
|
| |
`FloatConfig` is no longer used only for floats, so the name is counterintuitive.
Followup to #25550
|
|
|
|
|
|
| |
Remove `export` pramgas from defs headers as it causes IWYU to believe
that the definitions from the defs headers comes from main header, which
is not what we really want.
|
| |
|
|
|
|
|
|
| |
Problem: `OPT_FREE` macro doesn't seem to do anything as `P_ALLOCED`
already handles allocations.
Solution: Remove `OPT_FREE`.
|
|
|
|
|
|
|
|
|
|
|
| |
A bit big, but practically it was a lot simpler to change over all
fillchars and all listchars at once, to not need to maintain two
parallel implementations.
This is mostly an internal refactor, but it also removes an arbitrary
limitation: that 'fillchars' and 'listchars' values can only be
single-codepoint characters. Now any character which fits into a single
screen cell can be used.
|
| |
|
|
|
|
| |
Co-authored-by: Gregory Anders <greg@gpanders.com>
Co-authored-by: WillLillis <wlillis@umass.edu>
|
|
|
|
| |
Reference: https://github.com/neovim/neovim/issues/6371.
|