mirror of
				https://github.com/tmux/tmux.git
				synced 2025-10-26 12:27:15 +00:00 
			
		
		
		
	Sync OpenBSD patchset 994:
Add CNL and CPL escape sequences.
This commit is contained in:
		
							
								
								
									
										12
									
								
								input.c
									
									
									
									
									
								
							
							
						
						
									
										12
									
								
								input.c
									
									
									
									
									
								
							| @@ -119,6 +119,8 @@ const struct input_table_entry input_esc_table[] = { | |||||||
| /* Control (CSI) commands. */ | /* Control (CSI) commands. */ | ||||||
| enum input_csi_type { | enum input_csi_type { | ||||||
| 	INPUT_CSI_CBT, | 	INPUT_CSI_CBT, | ||||||
|  | 	INPUT_CSI_CNL, | ||||||
|  | 	INPUT_CSI_CPL, | ||||||
| 	INPUT_CSI_CUB, | 	INPUT_CSI_CUB, | ||||||
| 	INPUT_CSI_CUD, | 	INPUT_CSI_CUD, | ||||||
| 	INPUT_CSI_CUF, | 	INPUT_CSI_CUF, | ||||||
| @@ -153,6 +155,8 @@ const struct input_table_entry input_csi_table[] = { | |||||||
| 	{ 'B', "",  INPUT_CSI_CUD }, | 	{ 'B', "",  INPUT_CSI_CUD }, | ||||||
| 	{ 'C', "",  INPUT_CSI_CUF }, | 	{ 'C', "",  INPUT_CSI_CUF }, | ||||||
| 	{ 'D', "",  INPUT_CSI_CUB }, | 	{ 'D', "",  INPUT_CSI_CUB }, | ||||||
|  | 	{ 'E', "",  INPUT_CSI_CNL }, | ||||||
|  | 	{ 'F', "",  INPUT_CSI_CPL }, | ||||||
| 	{ 'G', "",  INPUT_CSI_HPA }, | 	{ 'G', "",  INPUT_CSI_HPA }, | ||||||
| 	{ 'H', "",  INPUT_CSI_CUP }, | 	{ 'H', "",  INPUT_CSI_CUP }, | ||||||
| 	{ 'J', "",  INPUT_CSI_ED }, | 	{ 'J', "",  INPUT_CSI_ED }, | ||||||
| @@ -1085,6 +1089,14 @@ input_csi_dispatch(struct input_ctx *ictx) | |||||||
| 	case INPUT_CSI_CUU: | 	case INPUT_CSI_CUU: | ||||||
| 		screen_write_cursorup(sctx, input_get(ictx, 0, 1, 1)); | 		screen_write_cursorup(sctx, input_get(ictx, 0, 1, 1)); | ||||||
| 		break; | 		break; | ||||||
|  | 	case INPUT_CSI_CNL: | ||||||
|  | 		screen_write_carriagereturn(sctx); | ||||||
|  | 		screen_write_cursordown(sctx, input_get(ictx, 0, 1, 1)); | ||||||
|  | 		break; | ||||||
|  | 	case INPUT_CSI_CPL: | ||||||
|  | 		screen_write_carriagereturn(sctx); | ||||||
|  | 		screen_write_cursorup(sctx, input_get(ictx, 0, 1, 1)); | ||||||
|  | 		break; | ||||||
| 	case INPUT_CSI_DA: | 	case INPUT_CSI_DA: | ||||||
| 		switch (input_get(ictx, 0, 0, 0)) { | 		switch (input_get(ictx, 0, 0, 0)) { | ||||||
| 		case 0: | 		case 0: | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Tiago Cunha
					Tiago Cunha