mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-21 14:05:11 +00:00
Merge pull request #936 from Perlence/fix/extension-editor-padding-x
fix(coding-agent): propagate paddingX to custom editors
This commit is contained in:
commit
79ded84d46
2 changed files with 9 additions and 0 deletions
|
|
@ -1555,6 +1555,9 @@ export class InteractiveMode {
|
||||||
if (newEditor.borderColor !== undefined) {
|
if (newEditor.borderColor !== undefined) {
|
||||||
newEditor.borderColor = this.defaultEditor.borderColor;
|
newEditor.borderColor = this.defaultEditor.borderColor;
|
||||||
}
|
}
|
||||||
|
if (newEditor.setPaddingX !== undefined) {
|
||||||
|
newEditor.setPaddingX(this.defaultEditor.getPaddingX());
|
||||||
|
}
|
||||||
|
|
||||||
// Set autocomplete if supported
|
// Set autocomplete if supported
|
||||||
if (newEditor.setAutocompleteProvider && this.autocompleteProvider) {
|
if (newEditor.setAutocompleteProvider && this.autocompleteProvider) {
|
||||||
|
|
@ -3030,6 +3033,9 @@ export class InteractiveMode {
|
||||||
onEditorPaddingXChange: (padding) => {
|
onEditorPaddingXChange: (padding) => {
|
||||||
this.settingsManager.setEditorPaddingX(padding);
|
this.settingsManager.setEditorPaddingX(padding);
|
||||||
this.defaultEditor.setPaddingX(padding);
|
this.defaultEditor.setPaddingX(padding);
|
||||||
|
if (this.editor !== this.defaultEditor && this.editor.setPaddingX !== undefined) {
|
||||||
|
this.editor.setPaddingX(padding);
|
||||||
|
}
|
||||||
},
|
},
|
||||||
onCancel: () => {
|
onCancel: () => {
|
||||||
done();
|
done();
|
||||||
|
|
|
||||||
|
|
@ -62,4 +62,7 @@ export interface EditorComponent extends Component {
|
||||||
|
|
||||||
/** Border color function */
|
/** Border color function */
|
||||||
borderColor?: (str: string) => string;
|
borderColor?: (str: string) => string;
|
||||||
|
|
||||||
|
/** Set horizontal padding */
|
||||||
|
setPaddingX?(padding: number): void;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue