aboutsummaryrefslogtreecommitdiff
path: root/keybind.c
diff options
context:
space:
mode:
authorRiley Beckett <rbeckettvt@gmail.com>2025-10-27 19:40:08 -0400
committerRiley Beckett <rbeckettvt@gmail.com>2025-10-27 19:40:08 -0400
commite42d9bb1834678fb0275dbcdfc84bc80b1ca27a8 (patch)
tree206311382255c1bb04169b08aea9839fb95dc7f4 /keybind.c
parent2033b55f91876c8fc0d4cd3cdf9c67972ad5490c (diff)
add prompt
Diffstat (limited to 'keybind.c')
-rw-r--r--keybind.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/keybind.c b/keybind.c
index a24e00c..c9b875a 100644
--- a/keybind.c
+++ b/keybind.c
@@ -101,9 +101,9 @@ key_repeat_t delete_char(client_state* state) {
if (state->cursor_index != array_size(state->input_buffer)) {
array_erase(state->input_buffer, state->cursor_index);
update_text_buffer(state);
- return KEY_NO_REPEAT;
+ return KEY_REPEAT;
}
- return KEY_REPEAT;
+ return KEY_NO_REPEAT;
}
key_repeat_t delete_char_backward(client_state* state) {
@@ -122,3 +122,10 @@ key_repeat_t clear_input(client_state* state) {
update_text_buffer(state);
return KEY_NO_REPEAT;
}
+
+key_repeat_t paste_from_clipboard(client_state* state) {
+ array_insert_many(state->input_buffer, state->cursor_index, state->clipboard, state->clipboard_size);
+ state->cursor_index += state->clipboard_size;
+ update_text_buffer(state);
+ return KEY_REPEAT;
+}