]> git.wh0rd.org Git - nano.git/commitdiff
Updating position history only when 'positionlog' is set.
authorBenno Schulenberg <bensberg@justemail.net>
Fri, 29 Jan 2016 20:43:54 +0000 (20:43 +0000)
committerBenno Schulenberg <bensberg@justemail.net>
Fri, 29 Jan 2016 20:43:54 +0000 (20:43 +0000)
git-svn-id: svn://svn.savannah.gnu.org/nano/trunk/nano@5601 35c25a1d-7b9e-4130-9fde-d3aeb78583b8

ChangeLog
src/files.c

index 60c9fd0ed65049acf4606dc35e5d4f42a3c1cd1d..e3db565b5a86270b4bd77e9f49be34cb1568c714 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -5,6 +5,8 @@
        is set.  This fixes a bug unconsciously reported by Mike Frysinger.
        * src/files.c (do_lockfile): Plug a couple of memory leaks.
        * src/files.c (update_poshistory): Plug another memory leak.
+       * src/files.c (close_buffer): Update position history only when
+       the option 'positionlog' is set.
 
 2016-01-26  Benno Schulenberg  <bensberg@justemail.net>
        * src/files.c (update_poshistory): Do not add directories to the
index c6b2339408dee11432898b8c3c3e8019f08be9da..604c77381d749d6aea1753815430265ad8bf6d73 100644 (file)
@@ -588,7 +588,9 @@ bool close_buffer(bool quiet)
        return FALSE;
 
 #ifndef DISABLE_HISTORIES
-    update_poshistory(openfile->filename, openfile->current->lineno, xplustabs() + 1);
+    if (ISSET(POS_HISTORY))
+       update_poshistory(openfile->filename,
+                       openfile->current->lineno, xplustabs() + 1);
 #endif
 
     /* Switch to the next file buffer. */