Improve the built-in editor (input mode) #4

Closed
opened 2020-10-21 20:37:08 +02:00 by p · 1 comment
Owner

Make at least the minimal Emacs/Readline bindings work: C-a C-e C-b C-f Left Right Home End C-u C-k Delete

This requires us to keep the cursor's position. Beware that because of combining marks, iteration needs to be done in terms of graphemes, which is best approximated by considering zero-width wide characters a single unit with the first preceding non-zero-width wide character.

C-v should also be supported ("Add the next character that you type to the line verbatim."). The simplest way to do it is by setting a toggle and skipping g_input_actions.find(), forcing ACTION_NONE. We should also invoke raw() and end it with halfdelay(1) in order to catch C-c, C-q.

There is no increased need to handle the case of overflowing input lines. Keep it exactly as broken as it is now.

Make at least the minimal Emacs/Readline bindings work: C-a C-e C-b C-f Left Right Home End C-u C-k Delete This requires us to keep the cursor's position. Beware that because of combining marks, iteration needs to be done in terms of graphemes, which is best approximated by considering zero-width wide characters a single unit with the first preceding non-zero-width wide character. C-v should also be supported ("*Add the next character that you type to the line verbatim.*"). The simplest way to do it is by setting a toggle and skipping `g_input_actions.find()`, forcing `ACTION_NONE`. We should also invoke `raw()` and end it with `halfdelay(1)` in order to catch C-c, C-q. There is no increased need to handle the case of overflowing input lines. Keep it exactly as broken as it is now.
p self-assigned this 2020-10-21 20:37:08 +02:00
p changed title from Improve the built-in editor (input mode) to Improve the built-in editor (input mode) #easy 2020-10-21 21:15:59 +02:00
Author
Owner

With the last commits, the remaining basic bindings are: C-u C-k C-v

With the last commits, the remaining basic bindings are: C-u C-k C-v
p closed this issue 2020-10-23 01:37:44 +02:00
p changed title from Improve the built-in editor (input mode) #easy to Improve the built-in editor (input mode) 2020-10-24 06:59:44 +02:00
p added the
easy
label 2020-10-24 06:59:52 +02:00
Sign in to join this conversation.
No Label
WIP
easy
priority
No Milestone
No Assignees
1 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: p/sdn#4
No description provided.