diff options
author | pommicket <pommicket@gmail.com> | 2023-08-05 12:18:52 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2023-08-05 12:18:52 -0400 |
commit | 601c081d62e0cd9c0e6750b424ecc5baa9a45b5f (patch) | |
tree | 0852f1fcbcebc31a05ec97c77e2634cc90237de7 /main.c | |
parent | ef84bb759becde98318011652c6c5b8a52433359 (diff) |
more plugin preparation
Diffstat (limited to 'main.c')
-rw-r--r-- | main.c | 11 |
1 files changed, 2 insertions, 9 deletions
@@ -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); |