chat: set code toggle only at start of input
@@ -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
}
};
