summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorpommicket <pommicket@gmail.com>2022-11-02 20:12:30 -0400
committerpommicket <pommicket@gmail.com>2022-11-02 20:12:30 -0400
commit760526ec4071f9392e5bfca77b19cb20f98c588e (patch)
treeaba49319680f0ddd430a85f743050d3529afcd10 /command.c
parent9d0433ba028792f5a468507dba28d406b9f758e7 (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.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/command.c b/command.c
index 58a6004..51c5c24 100644
--- a/command.c
+++ b/command.c
@@ -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);