mirror of
				https://github.com/folke/lazy.nvim.git
				synced 2025-10-30 22:11:09 +00:00 
			
		
		
		
	fix(keys): don't escape pendig keys twice and only convert when number
This commit is contained in:
		
					parent
					
						
							
								9a2ecc8750
							
						
					
				
			
			
				commit
				
					
						46280a191b
					
				
			
		
					 1 changed files with 4 additions and 2 deletions
				
			
		|  | @ -16,13 +16,15 @@ local M = {} | |||
| function M.retrigger(keys) | ||||
|   local pending = "" | ||||
|   while true do | ||||
|     ---@type number|string | ||||
|     local c = vim.fn.getchar(0) | ||||
|     if c == 0 then | ||||
|       break | ||||
|     end | ||||
|     pending = pending .. vim.fn.nr2char(c) | ||||
|     c = type(c) == "number" and vim.fn.nr2char(c) or c | ||||
|     pending = pending .. c | ||||
|   end | ||||
|   local feed = vim.api.nvim_replace_termcodes(keys .. pending, true, true, true) | ||||
|   local feed = vim.api.nvim_replace_termcodes(keys, true, false, true) .. pending | ||||
|   vim.api.nvim_feedkeys(feed, "m", false) | ||||
| end | ||||
| 
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue