feat: add editorPaddingX setting for input editor horizontal padding

This commit is contained in:
Mario Zechner 2026-01-16 23:50:00 +01:00
parent 5d3e7d5aaa
commit fe52ff00d2
6 changed files with 46 additions and 2 deletions

View file

@ -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;
}