equal
deleted
inserted
replaced
895 |
895 |
896 keyPressInLineEditMode:aKey |
896 keyPressInLineEditMode:aKey |
897 "readline alike line editing. |
897 "readline alike line editing. |
898 cursorUp/down select a previous line from the history (unix shell bahevior). |
898 cursorUp/down select a previous line from the history (unix shell bahevior). |
899 shift cursorUp selects a previous selected history line from the history (windows shell bahevior). |
899 shift cursorUp selects a previous selected history line from the history (windows shell bahevior). |
900 cursor left/right/backspace edit inside that line. |
900 cursor left/right/^A/^E/backspace position/edit inside that line. |
901 Return true, if the character was processed, |
901 Return true, if the character was processed, |
902 false if not. Then, the caller should proceed as usual." |
902 false if not. Then, the caller should proceed as usual." |
903 |
903 |
904 |clearLine| |
904 |clearLine| |
905 |
905 |
967 self deleteCharBeforeCursor. |
967 self deleteCharBeforeCursor. |
968 lineBufferCursorPosition := lineBufferCursorPosition - 1. |
968 lineBufferCursorPosition := lineBufferCursorPosition - 1. |
969 ^ true. |
969 ^ true. |
970 ]. |
970 ]. |
971 |
971 |
|
972 aKey == #Ctrla ifTrue:[ |
|
973 lineBufferCursorPosition > 1 ifFalse:[ |
|
974 self beep. |
|
975 ^ true |
|
976 ]. |
|
977 lineBufferCursorPosition := 1. |
|
978 self cursorToBeginOfLine. |
|
979 ^ true. |
|
980 ]. |
|
981 aKey == #Ctrle ifTrue:[ |
|
982 lineBufferCursorPosition := lineBuffer size. |
|
983 self cursorToEndOfLine. |
|
984 ^ true. |
|
985 ]. |
972 aKey == #CursorLeft ifTrue:[ |
986 aKey == #CursorLeft ifTrue:[ |
973 lineBufferCursorPosition > 1 ifFalse:[ |
987 lineBufferCursorPosition > 1 ifFalse:[ |
974 self beep. |
988 self beep. |
975 ^ true |
989 ^ true |
976 ]. |
990 ]. |