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
This commit is contained in:
William Wilgus 2026-06-05 02:17:38 -04:00
parent 74905f4796
commit 7517674513

View file

@ -203,14 +203,16 @@ static bool save_changes(int overwrite)
}
rb->lcd_clear_display();
cpuboost(1);
for (i=0;i<line_count;i++)
cpuboost(1);
for (i=0;i<line_count - 1;i++)
{
rb->fdprintf(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)