diff options
| author | Riley Beckett <rbeckettvt@gmail.com> | 2025-10-27 19:40:08 -0400 |
|---|---|---|
| committer | Riley Beckett <rbeckettvt@gmail.com> | 2025-10-27 19:40:08 -0400 |
| commit | e42d9bb1834678fb0275dbcdfc84bc80b1ca27a8 (patch) | |
| tree | 206311382255c1bb04169b08aea9839fb95dc7f4 /keybind.c | |
| parent | 2033b55f91876c8fc0d4cd3cdf9c67972ad5490c (diff) | |
add prompt
Diffstat (limited to 'keybind.c')
| -rw-r--r-- | keybind.c | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -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; +} |
