Skip to content

Commit e9c839f

Browse files
committed
sanitize history: Remove ':open', ':tabopen' and ':winopen' command-line history entries
According to the documentation (:help 'sanitizeitems'), when history items are sanitized :open, :tabopen and :winopen command-line history entries should be also removed. CommandLine.History.sanitize() function is responsible for this but it fails with errors. Make that function work properly.
1 parent 9e519de commit e9c839f

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

common/content/commandline.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1076,10 +1076,9 @@ const CommandLine = Module("commandline", {
10761076
if (liberator.has("sanitizer") && (timespan || options["sanitizetimespan"]))
10771077
range = sanitizer.getClearRange(timespan || options["sanitizetimespan"]);
10781078

1079-
const self = this;
10801079
this.store.mutate("filter", function (item) {
10811080
let timestamp = (item.timestamp || Date.now()/1000) * 1000;
1082-
return !line.privateData || timestamp < self.range[0] || timestamp > self.range[1];
1081+
return !item.privateData || timestamp < range[0] || timestamp > range[1];
10831082
});
10841083
},
10851084
/**

0 commit comments

Comments
 (0)