int get_position();

Retrieves the current cursor position.

The cursor is displayed before the character with the given (base 0) index in the widget. The value will be less than or equal to the number of characters in the widget. Note that this position is in characters, not in bytes.

See also: set_position()