Skip to content

Commit 727307e

Browse files
committed
New fix
1 parent 391ae76 commit 727307e

2 files changed

Lines changed: 4 additions & 1 deletion

File tree

demo/screen/inputwidgetdemo.go

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,8 @@ func NewInputWidgetDemo() *InputWidgetDemo {
2424
s := new(InputWidgetDemo)
2525

2626
s.tiDemo = textinput.New()
27+
s.tiDemo.Prompt = ">"
28+
s.tiDemo.Placeholder = "Amazing placeholder"
2729
//s.tiDemo.Placeholder = "Placeholder"
2830

2931
s.taDemo = textarea.New()

widget/textinput/textinput.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,11 @@ func (w *Widget) Resize(size orvyn.Size) {
6969

7070
// 22.04.2026 - Fixed the "space" padding in the bubble textinput
7171
contentSize := w.GetContentSize()
72-
w.Model.Width = contentSize.Width - len(w.Model.Prompt)
72+
w.Model.Width = contentSize.Width
7373

7474
if len(w.Model.Value()) > 0 || len(w.Model.Placeholder) == 0 {
7575
w.Model.Width--
76+
w.Model.Width -= len(w.Model.Prompt)
7677
}
7778

7879
// For the Bubbles textinput to process the update

0 commit comments

Comments
 (0)