CE edit handle KB_HOME and KB_END
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m22s
All checks were successful
Build documentation / build-and-deploy (push) Successful in 2m22s
This commit is contained in:
@@ -195,6 +195,12 @@ void edit_start (const char* text) {
|
|||||||
editor.cursor.col = len;
|
editor.cursor.col = len;
|
||||||
}
|
}
|
||||||
} break;
|
} break;
|
||||||
|
case KB_HOME:
|
||||||
|
editor.cursor.col = 0;
|
||||||
|
break;
|
||||||
|
case KB_END:
|
||||||
|
editor.cursor.col = gapbuffer_length (&editor.current_line->gb);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
if (isprint (ch)) {
|
if (isprint (ch)) {
|
||||||
gapbuffer_insert (&wrealloc, NULL, &editor.current_line->gb, ch);
|
gapbuffer_insert (&wrealloc, NULL, &editor.current_line->gb, ch);
|
||||||
|
|||||||
Reference in New Issue
Block a user