mirror of
				https://github.com/troglobit/editline.git
				synced 2025-11-01 01:01:34 +08:00 
			
		
		
		
	Calling Ctrl-U should delete from cursor to beginning
Fixes #71 Signed-off-by: Joachim Wiberg <troglobit@gmail.com>
This commit is contained in:
		| @@ -1159,6 +1159,8 @@ static el_status_t emacs(int c) | |||||||
|  |  | ||||||
| static el_status_t tty_special(int c) | static el_status_t tty_special(int c) | ||||||
| { | { | ||||||
|  |     el_status_t rc; | ||||||
|  |  | ||||||
| #ifdef CONFIG_SIGINT | #ifdef CONFIG_SIGINT | ||||||
|     if (c == rl_intr) { |     if (c == rl_intr) { | ||||||
|         el_intr_pending = SIGINT; |         el_intr_pending = SIGINT; | ||||||
| @@ -1183,14 +1185,10 @@ static el_status_t tty_special(int c) | |||||||
|         return bk_del_char(); |         return bk_del_char(); | ||||||
|  |  | ||||||
|     if (c == rl_kill) { |     if (c == rl_kill) { | ||||||
|         if (rl_point != 0) { | 	Repeat = rl_point; | ||||||
|             old_point = rl_point; | 	rc = bk_del_char(); | ||||||
|             rl_point = 0; | 	Repeat = NO_ARG; | ||||||
|             reposition(c); | 	return rc; | ||||||
|         } |  | ||||||
|         Repeat = NO_ARG; |  | ||||||
|  |  | ||||||
|         return kill_line(); |  | ||||||
|     } |     } | ||||||
|  |  | ||||||
| #ifdef CONFIG_EOF | #ifdef CONFIG_EOF | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Joachim Wiberg
					Joachim Wiberg