kill_region appears to work
This commit is contained in:
7
main.c
7
main.c
@@ -11,8 +11,10 @@
|
|||||||
#include <sys/ioctl.h>
|
#include <sys/ioctl.h>
|
||||||
|
|
||||||
#include <assert.h>
|
#include <assert.h>
|
||||||
|
#include <ctype.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
#include <fcntl.h>
|
#include <fcntl.h>
|
||||||
|
#include <stdarg.h>
|
||||||
#include <stdint.h>
|
#include <stdint.h>
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@@ -727,6 +729,7 @@ kill_region(void)
|
|||||||
move_cursor(ARROW_RIGHT);
|
move_cursor(ARROW_RIGHT);
|
||||||
}
|
}
|
||||||
killring_append_char('\n');
|
killring_append_char('\n');
|
||||||
|
move_cursor(ARROW_RIGHT);
|
||||||
}
|
}
|
||||||
|
|
||||||
while (editor.curx != curx) {
|
while (editor.curx != curx) {
|
||||||
@@ -1398,6 +1401,8 @@ editor_prompt(char *prompt, void (*cb)(char *, int16_t))
|
|||||||
cb(buf, c);
|
cb(buf, c);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
free(buf);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
@@ -1700,6 +1705,7 @@ process_kcommand(int16_t c)
|
|||||||
break;
|
break;
|
||||||
case 'u':
|
case 'u':
|
||||||
editor_set_status("undo: todo");
|
editor_set_status("undo: todo");
|
||||||
|
break;
|
||||||
case 'y':
|
case 'y':
|
||||||
killring_yank();
|
killring_yank();
|
||||||
break;
|
break;
|
||||||
@@ -1797,6 +1803,7 @@ process_escape(int16_t c)
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
kill_region();
|
kill_region();
|
||||||
|
break;
|
||||||
case BACKSPACE:
|
case BACKSPACE:
|
||||||
delete_prev_word();
|
delete_prev_word();
|
||||||
break;
|
break;
|
||||||
|
|||||||
Reference in New Issue
Block a user