# HG changeset patch # User Claus Gittinger # Date 1440164421 -7200 # Node ID 7d46a1566c69deee1176e6eac49f25e84dfe5807 # Parent c5204a7261c1cfdef202bf34da8af0d17a35477a class: TerminalView changed: #keyPressInLineEditMode: ctrl-a and ctrl-e diff -r c5204a7261c1 -r 7d46a1566c69 TerminalView.st --- a/TerminalView.st Fri Aug 21 14:16:45 2015 +0200 +++ b/TerminalView.st Fri Aug 21 15:40:21 2015 +0200 @@ -897,7 +897,7 @@ "readline alike line editing. cursorUp/down select a previous line from the history (unix shell bahevior). shift cursorUp selects a previous selected history line from the history (windows shell bahevior). - cursor left/right/backspace edit inside that line. + cursor left/right/^A/^E/backspace position/edit inside that line. Return true, if the character was processed, false if not. Then, the caller should proceed as usual." @@ -969,6 +969,20 @@ ^ true. ]. + aKey == #Ctrla ifTrue:[ + lineBufferCursorPosition > 1 ifFalse:[ + self beep. + ^ true + ]. + lineBufferCursorPosition := 1. + self cursorToBeginOfLine. + ^ true. + ]. + aKey == #Ctrle ifTrue:[ + lineBufferCursorPosition := lineBuffer size. + self cursorToEndOfLine. + ^ true. + ]. aKey == #CursorLeft ifTrue:[ lineBufferCursorPosition > 1 ifFalse:[ self beep.