nano

nano with my custom patches
git clone git://bsandro.tech/nano
Log | Files | Refs | README | LICENSE

commit 7256b055b17ebbe0068f5816d0bfeb30f0a7721a
parent 33318286968a36962ccb3082b8bc8119636a767e
Author: Benno Schulenberg <bensberg@justemail.net>
Date:   Tue, 26 Jan 2016 09:06:31 +0000

Not adding directories to the list of file positions.
This fixes Savannah bug #46971.


git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5592 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

Diffstat:
MChangeLog | 4++++
Msrc/files.c | 2+-
2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/ChangeLog b/ChangeLog @@ -1,3 +1,7 @@ +2016-01-26 Benno Schulenberg <bensberg@justemail.net> + * src/files.c (update_poshistory): Do not add directories to the + list of file positions. This fixes Savannah bug #46971. + 2016-01-25 Benno Schulenberg <bensberg@justemail.net> * src/files.c (update_poshistory): Handle an update of the first element correctly. diff --git a/src/files.c b/src/files.c @@ -3186,7 +3186,7 @@ void update_poshistory(char *filename, ssize_t lineno, ssize_t xpos) poshiststruct *posptr, *theone, *posprev = NULL; char *fullpath = get_full_path(filename); - if (fullpath == NULL) + if (fullpath == NULL || fullpath[strlen(fullpath) - 1] == '/') return; /* Look for a matching filename in the list. */