1
0
mirror of https://github.com/gryf/pentadactyl-pm.git synced 2026-03-26 23:13:32 +01:00

Dont save empty history strings

This commit is contained in:
Kris Maglione
2008-12-08 10:00:23 -05:00
parent 9fe3e53ce0
commit d1c6283bc1

View File

@@ -91,6 +91,8 @@ function CommandLine() //{{{
save: function () save: function ()
{ {
let str = this.input.value; let str = this.input.value;
if (/^\s*$/.test(str))
return;
this.store.mutate('filter', function (line) line != str); this.store.mutate('filter', function (line) line != str);
this.store.push(str); this.store.push(str);
this.store.truncate(options["history"], true); this.store.truncate(options["history"], true);
@@ -946,8 +948,6 @@ function CommandLine() //{{{
highlightGroup = highlightGroup || this.HL_NORMAL; highlightGroup = highlightGroup || this.HL_NORMAL;
// liberator.dump(String(str));
// try { liberator.dump(str.toXMLString()) } catch(e) {};
if (flags & this.APPEND_TO_MESSAGES) if (flags & this.APPEND_TO_MESSAGES)
messageHistory.add({ str: str, highlight: highlightGroup }); messageHistory.add({ str: str, highlight: highlightGroup });