mirror of
https://github.com/urbit/shrub.git
synced 2025-01-01 17:16:47 +03:00
chat-js: revive # prefix for code messages
This commit is contained in:
parent
535cace962
commit
4d118ce6c4
BIN
pkg/arvo/app/chat/img/CodeEval.png
Normal file
BIN
pkg/arvo/app/chat/img/CodeEval.png
Normal file
Binary file not shown.
After Width: | Height: | Size: 498 B |
@ -397,6 +397,13 @@ export class ChatInput extends Component {
|
||||
this.editor.setOption('mode', null);
|
||||
this.editor.setOption('placeholder', "Code...");
|
||||
}
|
||||
const value = this.editor.getValue();
|
||||
|
||||
// Force redraw of placeholder
|
||||
if(value.length === 0) {
|
||||
this.editor.setValue(' ');
|
||||
this.editor.setValue('');
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
@ -445,7 +452,9 @@ export class ChatInput extends Component {
|
||||
'Enter': (cm) =>
|
||||
completeActive
|
||||
? this.completePatp(state.selectedSuggestion)
|
||||
: this.messageSubmit()
|
||||
: this.messageSubmit(),
|
||||
'Shift-3': (cm) =>
|
||||
this.toggleCode()
|
||||
}
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user