mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix(lsp): handle using array as open_floating_preview title (#33016)
This commit is contained in:
		@@ -3529,7 +3529,7 @@ describe('LSP', function()
 | 
			
		||||
      )
 | 
			
		||||
    end)
 | 
			
		||||
 | 
			
		||||
    it('considers title when computing width', function()
 | 
			
		||||
    it('considers string title when computing width', function()
 | 
			
		||||
      eq(
 | 
			
		||||
        { 17, 2 },
 | 
			
		||||
        exec_lua(function()
 | 
			
		||||
@@ -3542,6 +3542,20 @@ describe('LSP', function()
 | 
			
		||||
        end)
 | 
			
		||||
      )
 | 
			
		||||
    end)
 | 
			
		||||
 | 
			
		||||
    it('considers [string,string][] title when computing width', function()
 | 
			
		||||
      eq(
 | 
			
		||||
        { 17, 2 },
 | 
			
		||||
        exec_lua(function()
 | 
			
		||||
          return {
 | 
			
		||||
            vim.lsp.util._make_floating_popup_size(
 | 
			
		||||
              { 'foo', 'bar' },
 | 
			
		||||
              { title = { { 'A very ', 'Normal' }, { 'long title', 'Normal' } } }
 | 
			
		||||
            ),
 | 
			
		||||
          }
 | 
			
		||||
        end)
 | 
			
		||||
      )
 | 
			
		||||
    end)
 | 
			
		||||
  end)
 | 
			
		||||
 | 
			
		||||
  describe('lsp.util.trim.trim_empty_lines', function()
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user