diff options
author | Pranjal Kole <pranjal.kole7@gmail.com> | 2022-01-11 16:05:24 +0530 |
---|---|---|
committer | Michael Drake <tlsa@netsurf-browser.org> | 2022-01-22 19:39:26 +0000 |
commit | 76ede0f7d6e24996a7b886389c57dd502a046454 (patch) | |
tree | 72b52753d167e888678bfcdb4ed0628db7191954 /include/netsurf | |
parent | 9f305e4c3ba211834b194e5fac98089866c13d82 (diff) | |
download | netsurf-76ede0f7d6e24996a7b886389c57dd502a046454.tar.gz netsurf-76ede0f7d6e24996a7b886389c57dd502a046454.tar.bz2 |
textarea: implement NS_KEY_DELETE_WORD_{LEFT,RIGHT}
NS_KEY_DELETE_WORD_{LEFT,RIGHT} have been added to
include/netsurf/keypress.h and implemented in desktop/textarea.c
An unsigned int, caret_copy, has been added since both of these require
a temporary variable to hold the original position of the caret.
The LEFT one deletes separators towards the left till it encounters a
non-separator and then deletes the non-separators until it encounters a
separator. The caret is moved towards the left by the number of
characters deleted.
The RIGHT one does the same towards the right, but the caret is kept at
its original position.
These are intended to be mapped to Ctrl+Backspace and Ctrl+Delete by
most frontends.
Additionally, some style and typo fixes have been made.
Diffstat (limited to 'include/netsurf')
-rw-r--r-- | include/netsurf/keypress.h | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/include/netsurf/keypress.h b/include/netsurf/keypress.h index 604d2dd9b..84d9d41c8 100644 --- a/include/netsurf/keypress.h +++ b/include/netsurf/keypress.h @@ -59,7 +59,9 @@ enum input_key { NS_KEY_TEXT_START, NS_KEY_TEXT_END, NS_KEY_WORD_LEFT, + NS_KEY_DELETE_WORD_LEFT, NS_KEY_WORD_RIGHT, + NS_KEY_DELETE_WORD_RIGHT, NS_KEY_PAGE_UP, NS_KEY_PAGE_DOWN, NS_KEY_DELETE_LINE_END, |