mirror of
git://git.sv.gnu.org/nano.git
synced 2025-02-21 15:54:19 +03:00
tweaks: use a more effecient way to skip storing an empty file name
Position history refers only to actual files, so when the filename is blank... there is nothing that needs to be remembered.
This commit is contained in:
parent
ebd9eb346d
commit
48124fdba4
@ -528,7 +528,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 || fullpath[strlen(fullpath) - 1] == '/') {
|
||||
if (fullpath == NULL || *filename == '\0') {
|
||||
free(fullpath);
|
||||
return;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user