mirror of
				https://github.com/vim/vim.git
				synced 2025-11-03 09:44:48 -05:00 
			
		
		
		
	patch 8.1.1902: cannot have an info popup without a border
Problem: Cannot have an info popup without a border. Solution: Add the "border" item to 'completepopup'.
This commit is contained in:
		@@ -935,7 +935,7 @@ add_popup_dicts(buf_T *buf, list_T *l)
 | 
			
		||||
/*
 | 
			
		||||
 * Get the padding plus border at the top, adjusted to 1 if there is a title.
 | 
			
		||||
 */
 | 
			
		||||
    static int
 | 
			
		||||
    int
 | 
			
		||||
popup_top_extra(win_T *wp)
 | 
			
		||||
{
 | 
			
		||||
    int	extra = wp->w_popup_border[0] + wp->w_popup_padding[0];
 | 
			
		||||
@@ -1350,6 +1350,24 @@ parse_popup_option(win_T *wp, int is_preview)
 | 
			
		||||
		*p = c;
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
	else if (STRNCMP(s, "border:", 7) == 0)
 | 
			
		||||
	{
 | 
			
		||||
	    char_u	*arg = s + 7;
 | 
			
		||||
	    int		on = STRNCMP(arg, "on", 2) == 0 && arg + 2 == p;
 | 
			
		||||
	    int		off = STRNCMP(arg, "off", 3) == 0 && arg + 3 == p;
 | 
			
		||||
	    int		i;
 | 
			
		||||
 | 
			
		||||
	    if (!on && !off)
 | 
			
		||||
		return FAIL;
 | 
			
		||||
	    if (wp != NULL)
 | 
			
		||||
	    {
 | 
			
		||||
		for (i = 0; i < 4; ++i)
 | 
			
		||||
		    wp->w_popup_border[i] = on ? 1 : 0;
 | 
			
		||||
		if (off)
 | 
			
		||||
		    // only show the X for close when there is a border
 | 
			
		||||
		    wp->w_popup_close = POPCLOSE_NONE;
 | 
			
		||||
	    }
 | 
			
		||||
	}
 | 
			
		||||
	else
 | 
			
		||||
	    return FAIL;
 | 
			
		||||
    }
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user