summaryrefslogtreecommitdiff
path: root/command.c
diff options
context:
space:
mode:
Diffstat (limited to 'command.c')
-rw-r--r--command.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/command.c b/command.c
index b00e35b..78d5b24 100644
--- a/command.c
+++ b/command.c
@@ -118,16 +118,12 @@ void command_execute(Ted *ted, Command c, i64 argument) {
break;
case CMD_NEWLINE:
case CMD_NEWLINE_BACK:
- if (!buffer) {
- } else if (buffer->is_line_buffer) {
- ted->line_buffer_submitted = true;
- if (ted->find) {
- if (buffer == &ted->find_buffer || buffer == &ted->replace_buffer) {
- if (c == CMD_NEWLINE)
- find_next(ted);
- else
- find_prev(ted);
- }
+ if (ted->find) {
+ if (buffer == &ted->find_buffer || buffer == &ted->replace_buffer) {
+ if (c == CMD_NEWLINE)
+ find_next(ted);
+ else
+ find_prev(ted);
}
} else {
buffer_newline(buffer);