diff --git a/apps/plugins/text_editor.c b/apps/plugins/text_editor.c index 677b5afd56..2fcdb90b9a 100644 --- a/apps/plugins/text_editor.c +++ b/apps/plugins/text_editor.c @@ -203,14 +203,16 @@ static bool save_changes(int overwrite) } rb->lcd_clear_display(); - cpuboost(1); - for (i=0;ifdprintf(fd,"%s%s", do_action(ACTION_GET, 0, i), eol); } - + if (line_count > 0) /* No EOL for last item */ + rb->fdprintf(fd,"%s", do_action(ACTION_GET, 0, line_count - 1)); cpuboost(0); + rb->close(fd); if (newfile || !overwrite)