session_save_hist_index renamed to session_save_buffer_access_order
authorJohn Foerch <jjfoerch@earthlink.net>
Tue, 17 Dec 2013 01:04:02 +0000 (16 20:04 -0500)
committerJohn Foerch <jjfoerch@earthlink.net>
Wed, 18 Dec 2013 02:13:30 +0000 (17 21:13 -0500)
'hist_index' property within sessions renamed to 'access_index'

modules/session.js

index 7318c19..fa1c882 100644 (file)
@@ -45,7 +45,7 @@
     define_variable("session_dir", _session_dir_default,
         "Default directory for save/load interactive commands.");
 
-    define_variable("session_save_hist_index", false,
+    define_variable("session_save_buffer_access_order", false,
         "Whether to store last-accessed order in the sessions file.");
 
     /**
             let buffers = [];
             w.buffers.for_each(function (b) {
                 if (b instanceof content_buffer) {
-                    if (session_save_hist_index) {
+                    if (session_save_buffer_access_order) {
                         buffers.push({
                             url: b.display_uri_string,
-                            hist_index: w.buffers.buffer_history.indexOf(b)
+                            access_index: w.buffers.buffer_history.indexOf(b)
                         });
                     } else {
                         buffers.push(b.display_uri_string);
             {
                 kill_buffer(b, true);
             }
-            if ('hist_index' in session[s][0]) {
+            if ('access_index' in session[s][0]) {
                 var ts = session[s].slice(0);
-                ts.sort(function (a, b) { return b.hist_index - a.hist_index; });
+                ts.sort(function (a, b) { return b.access_index - a.access_index; });
                 for (let i = 0, m = ts.length; i < m; ++i) {
                     for (let j = 0, n = window.buffers.count; j < n; j++) {
                         var b = window.buffers.get_buffer(j);
                                            $position = buffer_position_end);
                     create_buffer(window, c, OPEN_NEW_BUFFER_BACKGROUND);
                 }
-                if ('hist_index' in session[0]) {
+                if ('access_index' in session[0]) {
                     var ts = session.slice(0);
-                    ts.sort(function (a, b) { return b.hist_index - a.hist_index; });
+                    ts.sort(function (a, b) { return b.access_index - a.access_index; });
                     for (let i = 0, n = ts.length; i < n; ++i) {
                         for (let j = 0, m = window.buffers.count; j < m; j++) {
                             var b = window.buffers.get_buffer(j);