summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2020-12-31 14:12:56 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2020-12-31 14:12:56 -0500
commite5ccfb4ee98da03ac5423c0570a4da33ef85b975 (patch)
treef8ea09370a84e13843d26f33fe7b3a5ebb24edef /command.c
parentd7ae78179cf18bc79703ac2199e0ae03e556430f (diff)
set ted err to buffer err
Diffstat (limited to 'command.c')
-rw-r--r--command.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/command.c b/command.c
index 69ce9ee..5d1a4d4 100644
--- a/command.c
+++ b/command.c
@@ -118,4 +118,8 @@ void command_execute(Ted *ted, Command c, i64 argument) {
buffer_redo(buffer, argument);
break;
}
+ if (buffer_haserr(buffer)) {
+ strncpy(ted->error, buffer_geterr(buffer), sizeof ted->error - 1);
+ buffer_clearerr(buffer);
+ }
}