mirror of
https://github.com/Rockbox/rockbox.git
synced 2026-07-10 13:29:52 -04:00
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:
parent
74905f4796
commit
7517674513
1 changed files with 5 additions and 3 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue