summaryrefslogtreecommitdiff
path: root/lib/readline.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/readline.js')
-rw-r--r--lib/readline.js6
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/readline.js b/lib/readline.js
index e55507416b..8d03cd6e33 100644
--- a/lib/readline.js
+++ b/lib/readline.js
@@ -357,9 +357,9 @@ Interface.prototype.undoHistory = function() {
// If it's a multiline code, then add history
// accordingly.
-Interface.prototype.multilineHistory = function(clearBuffer) {
- // if not clear buffer, add multiline history
- if (!clearBuffer && this.terminal) {
+Interface.prototype.multilineHistory = function() {
+ // check if we got a multiline code
+ if (this.multiline !== '' && this.terminal) {
const dupIndex = this.history.indexOf(this.multiline);
if (dupIndex !== -1) this.history.splice(dupIndex, 1);
// Remove the last entered line as multiline