1
1

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
Этот коммит содержится в:
Benno Schulenberg 2016-01-25 20:26:01 +00:00
родитель 87460b5998
Коммит ae42240c33
2 изменённых файлов: 8 добавлений и 1 удалений

Просмотреть файл

@ -1,3 +1,7 @@
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> 2016-01-24 Benno Schulenberg <bensberg@justemail.net>
* src/files.c (update_poshistory): Move an updated item to the end * 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 of the list, so that it won't be dropped any time soon. The problem

Просмотреть файл

@ -3208,7 +3208,10 @@ void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos)
else else
posprev->next = theone; posprev->next = theone;
} else if (posptr->next != NULL) { } else if (posptr->next != NULL) {
posprev->next = posptr->next; if (posprev == NULL)
position_history = posptr->next;
else
posprev->next = posptr->next;
while (posptr->next != NULL) while (posptr->next != NULL)
posptr = posptr->next; posptr = posptr->next;
posptr->next = theone; posptr->next = theone;