selectall argument to run():
* renders cursor selection
* is reset when anything but typing occurs
* is now independent from cur_pos == 1
Signed-off-by: koniu <gkusnierz@gmail.com>
Adds a trailing space after text if cursor position < text length to
prevent width of the widget changing particularly useful when using
'text' and 'selectall' to do eg. in-place renaming.
Sample textbox content (# space, _ cursor).
Before:
textbox before prompt: #term#
selectall prompt textbox : #_erm <- shorter than other cases
after pressing end : #term_
After:
textbox before prompt: #term#
selectall prompt textbox : #_erm#
after pressing end : #term_
Signed-off-by: koniu <gkusnierz@gmail.com>
If set along with 'text' (prefilled content) it will position the cursor at
the beginning of the line and and on text input (and not control keys,
arrows, etc.) will overwrite the prefilled content with the new input.
Signed-off-by: koniu <gkusnierz@gmail.com>