mirror of
https://github.com/netsurf-browser/netsurf
synced 2025-02-14 21:44:48 +03:00
Cursor left/right keys plus modifier move caret to extrems.
This commit is contained in:
parent
de7361ca88
commit
21ce8800b8
@ -334,16 +334,25 @@ text_input(fbtk_widget_t *widget, fbtk_callback_info *cbi)
|
||||
break;
|
||||
|
||||
case NSFB_KEY_RIGHT:
|
||||
if (widget->u.text.idx < widget->u.text.len)
|
||||
widget->u.text.idx++;
|
||||
caret_moved = true;
|
||||
if (widget->u.text.idx < widget->u.text.len) {
|
||||
if (modifier == 0)
|
||||
widget->u.text.idx++;
|
||||
else
|
||||
widget->u.text.idx = widget->u.text.len;
|
||||
|
||||
caret_moved = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case NSFB_KEY_LEFT:
|
||||
if (widget->u.text.idx > 0)
|
||||
widget->u.text.idx--;
|
||||
if (widget->u.text.idx > 0) {
|
||||
if (modifier == 0)
|
||||
widget->u.text.idx--;
|
||||
else
|
||||
widget->u.text.idx = 0;
|
||||
|
||||
caret_moved = true;
|
||||
caret_moved = true;
|
||||
}
|
||||
break;
|
||||
|
||||
case NSFB_KEY_PAGEUP:
|
||||
|
Loading…
x
Reference in New Issue
Block a user