Commit ae42240c authored by Benno Schulenberg's avatar Benno Schulenberg
Browse files

Handling an update of the first element correctly.

git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5589 35c25a1d-7b9e-4130-9fde-d3aeb78583b8
No related merge requests found
Showing with 8 additions and 1 deletion
+8 -1
2016-01-25 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (update_poshistory): Handle an update of the first
element correctly.
2016-01-24 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (update_poshistory): Move an updated item to the end
of the list, so that it won't be dropped any time soon. The problem
......
......@@ -3208,6 +3208,9 @@ void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos)
else
posprev->next = theone;
} else if (posptr->next != NULL) {
if (posprev == NULL)
position_history = posptr->next;
else
posprev->next = posptr->next;
while (posptr->next != NULL)
posptr = posptr->next;
......
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