summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
authorLeo Tenenbaum <pommicket@gmail.com>2021-01-28 16:22:49 -0500
committerLeo Tenenbaum <pommicket@gmail.com>2021-01-28 16:22:49 -0500
commit238f3ecc526600d5c18fead7820469719027b07c (patch)
treed84cd6606be4a81e32f8f0634aeb924b0457e5f8 /command.c
parent5b90057859cd38b284573460460ab27bd108aa0e (diff)
got file selector to behave better
Diffstat (limited to 'command.c')
-rw-r--r--command.c8
1 files changed, 2 insertions, 6 deletions
diff --git a/command.c b/command.c
index eb2d0bf..beb4d9d 100644
--- a/command.c
+++ b/command.c
@@ -101,7 +101,8 @@ void command_execute(Ted *ted, Command c, i64 argument) {
buffer_insert_char_at_cursor(buffer, '\t');
break;
case CMD_NEWLINE:
- if (buffer->is_line_buffer) {
+ if (!buffer) {
+ } else if (buffer->is_line_buffer) {
switch (ted->menu) {
case MENU_NONE:
assert(0);
@@ -192,9 +193,4 @@ void command_execute(Ted *ted, Command c, i64 argument) {
}
break;
}
-
- if (buffer && buffer_haserr(buffer)) {
- ted_seterr_to_buferr(ted, buffer);
- buffer_clearerr(buffer);
- }
}