if we can't delete, keep position, as before
This commit is contained in:
		
							
								
								
									
										6
									
								
								edit.c
									
									
									
									
									
								
							
							
						
						
									
										6
									
								
								edit.c
									
									
									
									
									
								
							| @@ -5,7 +5,7 @@ | |||||||
|  |  | ||||||
| #include "sh.h" | #include "sh.h" | ||||||
|  |  | ||||||
| __RCSID("$MirOS: src/bin/mksh/edit.c,v 1.43 2006/11/05 16:43:57 tg Exp $"); | __RCSID("$MirOS: src/bin/mksh/edit.c,v 1.44 2006/11/05 16:48:17 tg Exp $"); | ||||||
|  |  | ||||||
| /* tty driver characters we are interested in */ | /* tty driver characters we are interested in */ | ||||||
| typedef struct { | typedef struct { | ||||||
| @@ -1691,11 +1691,13 @@ static int | |||||||
| x_del_back(int c __attribute__((unused))) | x_del_back(int c __attribute__((unused))) | ||||||
| { | { | ||||||
| 	int i = x_arg; | 	int i = x_arg; | ||||||
|  | 	char *cp = xcp; | ||||||
|  |  | ||||||
| 	while (i--) { | 	while (i--) { | ||||||
| 		if (xcp == xbuf) { | 		if (xcp == xbuf) { | ||||||
|  | 			x_goto(cp); | ||||||
| 			x_e_putc2(7); | 			x_e_putc2(7); | ||||||
| 			return KSTD; | 			return (KSTD); | ||||||
| 		} | 		} | ||||||
| 		x_goto(xcp - 1); | 		x_goto(xcp - 1); | ||||||
| 	} | 	} | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user