-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Make sure undo/redo restores the text correctly and simplify logic
- Loading branch information
Showing
14 changed files
with
16 additions
and
77 deletions.
There are no files selected for viewing
4 changes: 0 additions & 4 deletions
4
...s/RichTextEditing-Core.package/RichTextEditor.class/class/redoTextStructureMessageFor..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
...s/RichTextEditing-Core.package/RichTextEditor.class/class/undoTextStructureMessageFor..st
This file was deleted.
Oops, something went wrong.
10 changes: 0 additions & 10 deletions
10
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/addAttribute.from.to..st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/historyStart.st
This file was deleted.
Oops, something went wrong.
4 changes: 0 additions & 4 deletions
4
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/historyStop.st
This file was deleted.
Oops, something went wrong.
6 changes: 6 additions & 0 deletions
6
packages/RichTextEditing-Core.package/RichTextEditor.class/instance/openStructureTypeIn.st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
undo/redo | ||
openStructureTypeIn | ||
|
||
"Close previous typeIn to store edited text and allow undo/redo of only the structure" | ||
self closeTypeIn. | ||
self openTypeIn |
10 changes: 0 additions & 10 deletions
10
...es/RichTextEditing-Core.package/RichTextEditor.class/instance/removeAttribute.from.to..st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...s/RichTextEditing-Core.package/RichTextEditor.class/instance/reselectAndRedoStructure..st
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
...s/RichTextEditing-Core.package/RichTextEditor.class/instance/reselectAndUndoStructure..st
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
3 changes: 2 additions & 1 deletion
3
packages/RichTextEditing-Core.package/RichTextEditorModel.class/instance/addAttribute..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,8 @@ | ||
text structure | ||
addAttribute: aTextAttribute | ||
|
||
self | ||
self setTextFromView. | ||
self bufferDocument | ||
addAttribute: aTextAttribute | ||
from: self selectionStart | ||
to: self selectionStop |
8 changes: 0 additions & 8 deletions
8
.../RichTextEditing-Core.package/RichTextEditorModel.class/instance/addAttribute.from.to..st
This file was deleted.
Oops, something went wrong.
10 changes: 4 additions & 6 deletions
10
...hTextEditing-Core.package/RichTextEditorModel.class/instance/changeAttributesFor.with..st
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,8 @@ | ||
text structure | ||
changeAttributesFor: aBoolean with: targetStructure | ||
|
||
self editor openStructureTypeIn. | ||
aBoolean | ||
ifTrue: [self addAttribute: targetStructure. | ||
self editor | ||
addAttribute: targetStructure from: self selectionStart to: self selectionStop] | ||
ifFalse: [self removeTextAttribute: targetStructure. | ||
self editor | ||
removeAttribute: targetStructure from: self selectionStart to: self selectionStop] | ||
ifTrue: [self addAttribute: targetStructure] | ||
ifFalse: [self removeTextAttribute: targetStructure]. | ||
self editor closeTypeIn |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters