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:
@@ -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 });
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user