Christoph Thiede uploaded a new version of ST80 to project The Inbox:
http://source.squeak.org/inbox/ST80-ct.258.mcz ==================== Summary ==================== Name: ST80-ct.258 Author: ct Time: 5 September 2020, 1:20:54.682421 am UUID: db2a2f67-e818-ea46-b2f6-f4a9950577db Ancestors: ST80-mt.257 Fixes home and end keys in MVC editors if the text is empty =============== Diff against ST80-mt.257 =============== Item was changed: ----- Method: ParagraphEditor>>cursorEnd: (in category 'nonediting/nontyping keys') ----- cursorEnd: characterStream "Private - Move cursor end of current line." | string | self closeTypeIn: characterStream. string := paragraph text string. self moveCursor: [:position | Preferences wordStyleCursorMovement + ifTrue: [ + paragraph lines + at: (paragraph lineIndexOfCharacterIndex: position) + ifPresent: [:targetLine | targetLine last + (targetLine last = string size) asBit] + ifAbsent: [position]] + ifFalse: [ - ifTrue:[| targetLine | - targetLine := paragraph lines at:(paragraph lineIndexOfCharacterIndex: position). - targetLine = paragraph lines last - ifTrue:[targetLine last + 1] - ifFalse:[targetLine last]] - ifFalse:[ string indexOfAnyOf: CharacterSet crlf startingAt: position ifAbsent:[string size + 1]]] forward: true specialBlock:[:dummy | string size + 1]. ^true! Item was changed: ----- Method: ParagraphEditor>>cursorHome: (in category 'nonediting/nontyping keys') ----- cursorHome: characterStream "Private - Move cursor from position in current line to beginning of current line. If control key is pressed put cursor at beginning of text" | string | string := paragraph text string. self + moveCursor: [:position | Preferences wordStyleCursorMovement + ifTrue: [ + paragraph lines + at: (paragraph lineIndexOfCharacterIndex: position) + ifPresent: [:targetLine | targetLine first] ifAbsent: [position]] - moveCursor: [ :position | Preferences wordStyleCursorMovement - ifTrue:[ - (paragraph lines at:(paragraph lineIndexOfCharacterIndex: position)) first] ifFalse:[ (string lastIndexOfAnyOf: CharacterSet crlf startingAt: position - 1) + 1]] forward: false specialBlock: [:dummy | 1]. ^true! |
Von: Squeak-dev <[hidden email]> im Auftrag von [hidden email] <[hidden email]>
Gesendet: Samstag, 5. September 2020 01:20:57 An: [hidden email] Betreff: [squeak-dev] The Inbox: ST80-ct.258.mcz Christoph Thiede uploaded a new version of ST80 to project The Inbox:
http://source.squeak.org/inbox/ST80-ct.258.mcz ==================== Summary ==================== Name: ST80-ct.258 Author: ct Time: 5 September 2020, 1:20:54.682421 am UUID: db2a2f67-e818-ea46-b2f6-f4a9950577db Ancestors: ST80-mt.257 Fixes home and end keys in MVC editors if the text is empty =============== Diff against ST80-mt.257 =============== Item was changed: ----- Method: ParagraphEditor>>cursorEnd: (in category 'nonediting/nontyping keys') ----- cursorEnd: characterStream "Private - Move cursor end of current line." | string | self closeTypeIn: characterStream. string := paragraph text string. self moveCursor: [:position | Preferences wordStyleCursorMovement + ifTrue: [ + paragraph lines + at: (paragraph lineIndexOfCharacterIndex: position) + ifPresent: [:targetLine | targetLine last + (targetLine last = string size) asBit] + ifAbsent: [position]] + ifFalse: [ - ifTrue:[| targetLine | - targetLine := paragraph lines at:(paragraph lineIndexOfCharacterIndex: position). - targetLine = paragraph lines last - ifTrue:[targetLine last + 1] - ifFalse:[targetLine last]] - ifFalse:[ string indexOfAnyOf: CharacterSet crlf startingAt: position ifAbsent:[string size + 1]]] forward: true specialBlock:[:dummy | string size + 1]. ^true! Item was changed: ----- Method: ParagraphEditor>>cursorHome: (in category 'nonediting/nontyping keys') ----- cursorHome: characterStream "Private - Move cursor from position in current line to beginning of current line. If control key is pressed put cursor at beginning of text" | string | string := paragraph text string. self + moveCursor: [:position | Preferences wordStyleCursorMovement + ifTrue: [ + paragraph lines + at: (paragraph lineIndexOfCharacterIndex: position) + ifPresent: [:targetLine | targetLine first] ifAbsent: [position]] - moveCursor: [ :position | Preferences wordStyleCursorMovement - ifTrue:[ - (paragraph lines at:(paragraph lineIndexOfCharacterIndex: position)) first] ifFalse:[ (string lastIndexOfAnyOf: CharacterSet crlf startingAt: position - 1) + 1]] forward: false specialBlock: [:dummy | 1]. ^true!
Carpe Squeak!
|
Free forum by Nabble | Edit this page |