mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-15 18:01:22 +00:00
feat: add autocompleteMaxVisible setting for configurable dropdown height
This commit is contained in:
parent
06a7fedda5
commit
b212314f45
8 changed files with 63 additions and 4 deletions
|
|
@ -265,7 +265,11 @@ export class InteractiveMode {
|
|||
this.widgetContainerBelow = new Container();
|
||||
this.keybindings = KeybindingsManager.create();
|
||||
const editorPaddingX = this.settingsManager.getEditorPaddingX();
|
||||
this.defaultEditor = new CustomEditor(this.ui, getEditorTheme(), this.keybindings, { paddingX: editorPaddingX });
|
||||
const autocompleteMaxVisible = this.settingsManager.getAutocompleteMaxVisible();
|
||||
this.defaultEditor = new CustomEditor(this.ui, getEditorTheme(), this.keybindings, {
|
||||
paddingX: editorPaddingX,
|
||||
autocompleteMaxVisible,
|
||||
});
|
||||
this.editor = this.defaultEditor;
|
||||
this.editorContainer = new Container();
|
||||
this.editorContainer.addChild(this.editor as Component);
|
||||
|
|
@ -2978,6 +2982,7 @@ export class InteractiveMode {
|
|||
doubleEscapeAction: this.settingsManager.getDoubleEscapeAction(),
|
||||
showHardwareCursor: this.settingsManager.getShowHardwareCursor(),
|
||||
editorPaddingX: this.settingsManager.getEditorPaddingX(),
|
||||
autocompleteMaxVisible: this.settingsManager.getAutocompleteMaxVisible(),
|
||||
quietStartup: this.settingsManager.getQuietStartup(),
|
||||
},
|
||||
{
|
||||
|
|
@ -3060,6 +3065,13 @@ export class InteractiveMode {
|
|||
this.editor.setPaddingX(padding);
|
||||
}
|
||||
},
|
||||
onAutocompleteMaxVisibleChange: (maxVisible) => {
|
||||
this.settingsManager.setAutocompleteMaxVisible(maxVisible);
|
||||
this.defaultEditor.setAutocompleteMaxVisible(maxVisible);
|
||||
if (this.editor !== this.defaultEditor && this.editor.setAutocompleteMaxVisible !== undefined) {
|
||||
this.editor.setAutocompleteMaxVisible(maxVisible);
|
||||
}
|
||||
},
|
||||
onCancel: () => {
|
||||
done();
|
||||
this.ui.requestRender();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue