#UI_ENHANCEMENT by cg
authorClaus Gittinger <cg@exept.de>
Sun, 11 Sep 2016 15:41:51 +0200
changeset 5236 cd1625cfd882
parent 5234 a63a39bc4b18
child 5237 e532570a2549
child 5238 cebbdb8032de
#UI_ENHANCEMENT by cg class: TerminalView changed: #keyPressInLineEditMode: blank lines in history
TerminalView.st
--- a/TerminalView.st	Sat Sep 10 20:50:32 2016 +0200
+++ b/TerminalView.st	Sun Sep 11 15:41:51 2016 +0200
@@ -1117,8 +1117,7 @@
         "/ do not remember blank lines
         (lineBuffer notEmptyOrNil and:[lineBuffer isBlank not]) ifTrue:[
             "/ do not remember repetitions
-            (lineBufferHistory size > 0 and:[lineBufferHistory last = lineBuffer]) ifTrue:[
-            ] ifFalse:[
+            (lineBufferHistory size > 0 and:[lineBufferHistory last = lineBuffer]) ifFalse:[
                 lineBufferHistory addLast:lineBuffer.
             ].
             lineBufferHistoryPosition := lineBufferHistory size + 1.
@@ -1186,7 +1185,10 @@
         "/ remember the current lineBuffer (but only if it is the last)
         lineBufferHistoryPosition > lineBufferHistory size ifTrue:[
             (lineBuffer notEmptyOrNil and:[lineBuffer isBlank not]) ifTrue:[  
-                lineBufferHistory add:lineBuffer.
+                "/ do not remember repetitions
+                (lineBufferHistory size > 0 and:[lineBufferHistory last = lineBuffer]) ifFalse:[
+                    lineBufferHistory add:lineBuffer.
+                ].
             ].
         ].
         clearLine value.