mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	fix(diagnostic): allow floats to be focusable (#16093)
Setting focus_id allows the float to be focused by calling the function a second time (a feature of open_floating_preview).
This commit is contained in:
		@@ -1207,6 +1207,10 @@ function M.open_float(bufnr, opts)
 | 
			
		||||
    end
 | 
			
		||||
  end
 | 
			
		||||
 | 
			
		||||
  -- Used by open_floating_preview to allow the float to be focused
 | 
			
		||||
  if not opts.focus_id then
 | 
			
		||||
    opts.focus_id = scope
 | 
			
		||||
  end
 | 
			
		||||
  local float_bufnr, winnr = require('vim.lsp.util').open_floating_preview(lines, 'plaintext', opts)
 | 
			
		||||
  for i, hi in ipairs(highlights) do
 | 
			
		||||
    local prefixlen, hiname = unpack(hi)
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user