diff options
author | pommicket <pommicket@gmail.com> | 2022-11-02 20:12:30 -0400 |
---|---|---|
committer | pommicket <pommicket@gmail.com> | 2022-11-02 20:12:30 -0400 |
commit | 760526ec4071f9392e5bfca77b19cb20f98c588e (patch) | |
tree | aba49319680f0ddd430a85f743050d3529afcd10 /command.c | |
parent | 9d0433ba028792f5a468507dba28d406b9f758e7 (diff) |
settings bugfixes, :insert-text, and a memory bugfix
the memory bug existed in the last release!
Diffstat (limited to 'command.c')
-rw-r--r-- | command.c | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -111,7 +111,14 @@ void command_execute(Ted *ted, Command c, i64 argument) { case CMD_SELECT_ALL: if (buffer) buffer_select_all(buffer); break; - + + case CMD_INSERT_TEXT: { + const char *str = arg_get_string(ted, argument); + if (str) { + buffer_insert_utf8_at_cursor(buffer, str); + } + } + break; case CMD_TAB: if (ted->replace && buffer == &ted->find_buffer) { ted_switch_to_buffer(ted, &ted->replace_buffer); |