mirror of
https://github.com/Maks1mS/bubbles.git
synced 2024-12-23 14:22:58 +03:00
fix(textarea): account for base styling frame when calculating width
This commit is contained in:
parent
588393fbf8
commit
2a2fb10f5f
@ -673,6 +673,10 @@ func (m *Model) SetWidth(w int) {
|
||||
if m.ShowLineNumbers {
|
||||
inputWidth -= rw.StringWidth(fmt.Sprintf(m.lineNumberFormat, 0))
|
||||
}
|
||||
|
||||
// Account for base style borders and padding.
|
||||
inputWidth -= m.style.Base.GetHorizontalFrameSize()
|
||||
|
||||
inputWidth -= rw.StringWidth(m.Prompt)
|
||||
m.width = clamp(inputWidth, minWidth, maxWidth)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user