summaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2023-08-05 12:18:52 -0400
committerpommicket <pommicket@gmail.com>2023-08-05 12:18:52 -0400
commit601c081d62e0cd9c0e6750b424ecc5baa9a45b5f (patch)
tree0852f1fcbcebc31a05ec97c77e2634cc90237de7 /main.c
parentef84bb759becde98318011652c6c5b8a52433359 (diff)
more plugin preparation
Diffstat (limited to 'main.c')
-rw-r--r--main.c11
1 files changed, 2 insertions, 9 deletions
diff --git a/main.c b/main.c
index 4547a54..1a53346 100644
--- a/main.c
+++ b/main.c
@@ -733,19 +733,12 @@ int main(int argc, char **argv) {
ted_press_key(ted, keycode, modifier);
} break;
case SDL_TEXTINPUT: {
- char *text = event.text.text;
+ const char *text = event.text.text;
if (buffer
// unfortunately, some key combinations like ctrl+minus still register as a "-" text input event
&& (key_modifier & ~KEY_MODIFIER_SHIFT) == 0) {
// insert the text
- {
- CommandContext ctx = {0};
- CommandArgument arg = {
- .number = 0,
- .string = text
- };
- command_execute_ex(ted, CMD_INSERT_TEXT, arg, ctx);
- }
+ command_execute_string_argument(ted, CMD_INSERT_TEXT, text);
// check for trigger character
LSP *lsp = buffer_lsp(buffer);
Settings *settings = buffer_settings(buffer);