mirror of
				https://github.com/neovim/neovim.git
				synced 2025-10-26 12:27:24 +00:00 
			
		
		
		
	fix(terminal): send Shift-Home Shift-End Ctrl-Home Ctrl-End (#24418)
This commit is contained in:
		| @@ -17,6 +17,7 @@ local sleep = helpers.sleep | ||||
| local funcs = helpers.funcs | ||||
| local is_os = helpers.is_os | ||||
| local skip = helpers.skip | ||||
| local nvim_prog = helpers.nvim_prog | ||||
|  | ||||
| describe(':terminal buffer', function() | ||||
|   local screen | ||||
| @@ -455,6 +456,33 @@ describe('terminal input', function() | ||||
|   end) | ||||
| end) | ||||
|  | ||||
| describe('terminal input', function() | ||||
|   it('sends various special keys with modifiers', function() | ||||
|     clear() | ||||
|     local screen = thelpers.screen_setup(0, | ||||
|       string.format([=[["%s", "-u", "NONE", "-i", "NONE", "--cmd", "startinsert"]]=], nvim_prog)) | ||||
|     screen:expect{grid=[[ | ||||
|       {1: }                                                 | | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {4:~                                                 }| | ||||
|       {5:[No Name]                       0,1            All}| | ||||
|       {3:-- INSERT --}                                      | | ||||
|       {3:-- TERMINAL --}                                    | | ||||
|     ]]} | ||||
|     for _, key in ipairs({ | ||||
|       '<M-Tab>', '<M-CR>', '<M-Esc>', | ||||
|       '<BS>', '<S-Tab>', '<Insert>', '<Del>', '<PageUp>', '<PageDown>', | ||||
|       '<S-Up>', '<C-Up>', '<Up>', '<S-Down>', '<C-Down>', '<Down>', | ||||
|       '<S-Left>', '<C-Left>', '<Left>', '<S-Right>', '<C-Right>', '<Right>', | ||||
|       '<S-Home>', '<C-Home>', '<Home>', '<S-End>', '<C-End>', '<End>', | ||||
|     }) do | ||||
|       feed('<CR><C-V>' .. key) | ||||
|       retry(nil, nil, function() eq(key, meths.get_current_line()) end) | ||||
|     end | ||||
|   end) | ||||
| end) | ||||
|  | ||||
| if is_os('win') then | ||||
|   describe(':terminal in Windows', function() | ||||
|     local screen | ||||
|   | ||||
		Reference in New Issue
	
	Block a user
	 zeertzjq
					zeertzjq