1
0
mirror of https://github.com/rivo/tview.git synced 2025-04-24 13:48:56 +08:00

Merge db2e247f91ec4186c81f62f4ca8d052736b1c8d9 into c76f7879f592d17e9e68a1d795a85faae6cb7414

This commit is contained in:
Chris 2024-11-13 20:41:42 +01:00 committed by GitHub
commit 6e2636db43
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -272,6 +272,17 @@ func (i *InputField) SetFormAttributes(labelWidth int, labelColor, bgColor, fiel
return i
}
// GetCursorPos gets the current offset for cursor from start of field.
func (i *InputField) GetCursorPos() (pos int) {
return i.cursorPos
}
// SetCursorPos sets the current offset for cursor from start of field.
func (i *InputField) SetCursorPos(pos int) *InputField {
i.cursorPos = pos
return i
}
// SetFieldWidth sets the screen width of the input area. A value of 0 means
// extend as much as possible.
func (i *InputField) SetFieldWidth(width int) *InputField {