Commit 5487551c authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

history: save the positions file also when a record was deleted

When a file is closed with the cursor on line 1, column 1, this
position is not recorded in file-positions history file -- if a
record for the file existed, it is deleted.  In the latter case
the history file needs to be saved, so that other instances of
nano will know about the deletion.

This fixes https://savannah.gnu.org/bugs/?52505.
parent 763bf2ed
Showing with 1 addition and 0 deletions
+1 -0
......@@ -548,6 +548,7 @@ void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos)
posprev->next = posptr->next;
free(posptr->filename);
free(posptr);
save_poshistory();
}
free(fullpath);
return;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment