mirror of
https://github.com/getcompanion-ai/co-mono.git
synced 2026-04-16 19:04:37 +00:00
feat: add editorPaddingX setting for input editor horizontal padding
This commit is contained in:
parent
5d3e7d5aaa
commit
fe52ff00d2
6 changed files with 46 additions and 2 deletions
|
|
@ -300,6 +300,18 @@ export class Editor implements Component, Focusable {
|
|||
this.paddingX = Number.isFinite(paddingX) ? Math.max(0, Math.floor(paddingX)) : 0;
|
||||
}
|
||||
|
||||
getPaddingX(): number {
|
||||
return this.paddingX;
|
||||
}
|
||||
|
||||
setPaddingX(padding: number): void {
|
||||
const newPadding = Number.isFinite(padding) ? Math.max(0, Math.floor(padding)) : 0;
|
||||
if (this.paddingX !== newPadding) {
|
||||
this.paddingX = newPadding;
|
||||
this.tui.requestRender();
|
||||
}
|
||||
}
|
||||
|
||||
setAutocompleteProvider(provider: AutocompleteProvider): void {
|
||||
this.autocompleteProvider = provider;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue