From 7517674513eb69cfacdbf93fe3c72b30f658d005 Mon Sep 17 00:00:00 2001 From: William Wilgus Date: Fri, 5 Jun 2026 02:17:38 -0400 Subject: [PATCH] FS#13920 text_editor.c plugin do not terminate last line with \n you can still add a \n by inserting a blank line Change-Id: Ic3e69fce83ccc9c050857a03877545a7452ce8a2 --- apps/plugins/text_editor.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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)