File tree Expand file tree Collapse file tree 3 files changed +596
-183
lines changed
Expand file tree Collapse file tree 3 files changed +596
-183
lines changed Original file line number Diff line number Diff line change @@ -934,16 +934,6 @@ func Test_Editor_ProcessKeyDown_CommentToggle(t *testing.T) {
934934 wantSelectionEnd : 48 , // before last added `// `s
935935 wantPrefentDefault : true ,
936936 })
937-
938- runKeyDownTest (t , testKeyDown {
939- name : `only blank lines` ,
940- code : "\n \n \n " ,
941- key : `/` ,
942- ctrl : true ,
943- selectionStart : 0 ,
944- selectionEnd : 3 ,
945- wantPrefentDefault : true ,
946- })
947937}
948938
949939func Test_Editor_ProcessKeyDown_Callback (t * testing.T ) {
Original file line number Diff line number Diff line change @@ -84,6 +84,10 @@ func (cba *codeBoxAssistant) SetCode(code string) { cba.setCode(code) }
8484func (cba * codeBoxAssistant ) EmitSave () { cba .onSave () }
8585func (cba * codeBoxAssistant ) EmitEscape () { cba .onEscape () }
8686
87+ // TODO(grantnelson-wf): Implement undo/redo stack since textarea
88+ // only handles undo/redo itself for non-programmatic changes but
89+ // doesn't handle undo/redo for when setCode is called.
90+
8791func (cba * codeBoxAssistant ) onInput (e * js.Object ) {
8892 cba .setCode (e .Get (`target` ).Get (`value` ).String ())
8993}
You can’t perform that action at this time.
0 commit comments