chat: set code toggle only at start of input

This commit is contained in:
Matilde Park 2020-04-21 14:30:28 -04:00
parent 55d2f555e9
commit de077ffb47

View File

@ -454,7 +454,9 @@ export class ChatInput extends Component {
? this.completePatp(state.selectedSuggestion)
: this.messageSubmit(),
'Shift-3': (cm) =>
this.toggleCode()
cm.getValue().length === 0
? this.toggleCode()
: CodeMirror.Pass
}
};