mirror of
				https://github.com/neovim/neovim.git
				synced 2025-11-03 17:24:29 +00:00 
			
		
		
		
	fix(tohtml): support ranges again
This commit is contained in:
		
				
					committed by
					
						
						Christian Clason
					
				
			
			
				
	
			
			
			
						parent
						
							a5d4e3467d
						
					
				
				
					commit
					118ae7e5ed
				
			@@ -5,8 +5,8 @@ vim.g.loaded_2html_plugin = true
 | 
			
		||||
 | 
			
		||||
vim.api.nvim_create_user_command('TOhtml', function(args)
 | 
			
		||||
  local outfile = args.args ~= '' and args.args or vim.fn.tempname() .. '.html'
 | 
			
		||||
  local html = require('tohtml').tohtml()
 | 
			
		||||
  local html = require('tohtml').tohtml(0, { range = { args.line1, args.line2 } })
 | 
			
		||||
  vim.fn.writefile(html, outfile)
 | 
			
		||||
  vim.cmd.split(outfile)
 | 
			
		||||
  vim.bo.filetype = 'html'
 | 
			
		||||
end, { bar = true, nargs = '?' })
 | 
			
		||||
end, { bar = true, nargs = '?', range = '%' })
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user