|
@@ -50,7 +50,8 @@ export default {
|
|
|
})
|
|
|
this.instance.onDidChangeModelContent((e) => {
|
|
|
this.$emit('update:value', this.instance.getValue())
|
|
|
- this.$emit('change')
|
|
|
+ this.$emit('change', e)
|
|
|
+
|
|
|
})
|
|
|
this.instance.addAction({
|
|
|
id: 'editor.action.triggerSuggest.extension',
|
|
@@ -60,7 +61,15 @@ export default {
|
|
|
this.instance.trigger(null, 'editor.action.triggerSuggest', {})
|
|
|
}
|
|
|
})
|
|
|
- CommandsRegistry.registerCommand('editor.action.scrollUp1Line', () => {
|
|
|
+ CommandsRegistry.registerCommand('editor.action.appendHead', (_c, text) => {
|
|
|
+ if(this.value?.indexOf(text) > -1){
|
|
|
+ return
|
|
|
+ }
|
|
|
+ this.instance.executeEdits('command', [{
|
|
|
+ forceMoveMarkers: true,
|
|
|
+ text,
|
|
|
+ range: new monaco.Range(1, 0, 1, 0)
|
|
|
+ }])
|
|
|
this.instance.setScrollTop(this.instance.getScrollTop() - 22)
|
|
|
})
|
|
|
this.instance.addCommand(monaco.KeyMod.Alt | monaco.KeyCode.US_SLASH, () => {
|
|
@@ -177,7 +186,6 @@ export default {
|
|
|
if(newVal !== this.instance.getValue()){
|
|
|
this.instance.setValue(newVal || '')
|
|
|
this.match()
|
|
|
- this.$emit('change')
|
|
|
}
|
|
|
},
|
|
|
matches(){
|