mirror of
https://github.com/vim/vim.git
synced 2025-10-29 09:37:35 -04:00
patch 9.1.1562: close button always visible in the 'tabline'
Problem: close button "X" is visible in the non-GUI 'tabline', even
when the mouse is disabled
Solution: only show the button when 'mouse' contains any of the flags
"anvi" (Girish Palya)
The tabline always displays an "X" (close) button, and the info popup
shows both a close button and a resize handle—even when the mouse is
disabled. These UI elements are only actionable with the mouse and serve
no purpose for keyboard users who disable the mouse. Displaying
non-functional, clickable elements in a non-GUI environment is
misleading and adds unnecessary visual clutter.
So remove the close button and resize handle when the mouse is disabled.
They appear again when mouse is enabled.
closes: #17765
Signed-off-by: Girish Palya <girishji@gmail.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
This commit is contained in:
committed by
Christian Brabandt
parent
b7fc24d3a3
commit
fb45809f01
@@ -2286,8 +2286,11 @@ popup_create(typval_T *argvars, typval_T *rettv, create_type_T type)
|
||||
if (type == TYPE_INFO)
|
||||
{
|
||||
wp->w_popup_pos = POPPOS_TOPLEFT;
|
||||
wp->w_popup_flags |= POPF_DRAG | POPF_RESIZE;
|
||||
wp->w_popup_close = POPCLOSE_BUTTON;
|
||||
if (mouse_has(MOUSE_INSERT))
|
||||
{
|
||||
wp->w_popup_flags |= POPF_DRAG | POPF_RESIZE;
|
||||
wp->w_popup_close = POPCLOSE_BUTTON;
|
||||
}
|
||||
add_border_left_right_padding(wp);
|
||||
parse_completepopup(wp);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user