mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 04:17:01 +00:00 
			
		
		
		
	fix(float): ensure floating window width can fit title
This commit is contained in:
		 Maria José Solano
					Maria José Solano
				
			
				
					committed by
					
						 Lewis Russell
						Lewis Russell
					
				
			
			
				
	
			
			
			 Lewis Russell
						Lewis Russell
					
				
			
						parent
						
							f932c7852e
						
					
				
				
					commit
					d2cca606a1
				
			| @@ -1417,6 +1417,11 @@ function M._make_floating_popup_size(contents, opts) | ||||
|   -- make sure borders are always inside the screen | ||||
|   width = math.min(width, screen_width - border_width) | ||||
|  | ||||
|   -- Make sure that the width is large enough to fit the title. | ||||
|   if opts.title then | ||||
|     width = math.max(width, vim.fn.strdisplaywidth(opts.title)) | ||||
|   end | ||||
|  | ||||
|   if wrap_at then | ||||
|     wrap_at = math.min(wrap_at, width) | ||||
|   end | ||||
|   | ||||
		Reference in New Issue
	
	Block a user