1 NEdit*text.translations: #override \
2 Alt Shift Ctrl<KeyPress>osfLeft: backward_word("extend", "tail")\n\
3 Meta Shift Ctrl<KeyPress>osfLeft: backward_word("extend", "tail")\n\
4 Alt Ctrl<KeyPress>osfLeft: backward_word("tail")\n\
5 Meta Ctrl<KeyPress>osfLeft: backward_word("tail")\n\
6 Alt Shift Ctrl<KeyPress>osfRight: forward_word("extend", "tail")\n\
7 Meta Shift Ctrl<KeyPress>osfRight: forward_word("extend", "tail")\n\
8 Alt Ctrl<KeyPress>osfRight: forward_word("tail")\n\
9 Meta Ctrl<KeyPress>osfRight: forward_word("tail")\n\
14 doc/help.etx | 5 +++--
15 source/text.c | 21 +++++++++++++++++----
16 2 files changed, 20 insertions(+), 6 deletions(-)
18 diff --quilt old/source/text.c new/source/text.c
21 @@ -2689,15 +2689,28 @@ static void backwardWordAP(Widget w, XEv
24 ringIfNecessary(silent, w);
28 pos = max(insertPos - 1, 0);
29 - while (strchr(delimiters, BufGetCharacter(buf, pos)) != NULL && pos > 0)
31 - pos = startOfWord((TextWidget)w, pos);
33 + if (hasKey("tail", args, nArgs)) {
34 + pos = max(startOfWord((TextWidget)w, pos) - 1, 0);
36 + if (strchr(delimiters, BufGetCharacter(buf, pos)) == NULL)
44 + while (strchr(delimiters, BufGetCharacter(buf, pos)) != NULL && pos > 0)
46 + pos = startOfWord((TextWidget)w, pos);
49 TextDSetInsertPosition(textD, pos);
50 checkMoveSelectionChange(w, event, insertPos, args, nArgs);
51 checkAutoShowInsertPos(w);
52 callCursorMovementCBs(w, event);
54 diff --quilt old/doc/help.etx new/doc/help.etx
57 @@ -3310,15 +3310,16 @@ Action Routines
58 Moves the cursor to the beginning of the paragraph, or
59 if the cursor is already at the beginning of a paragraph, moves the cursor to
60 the beginning of the previous paragraph. Paragraphs are defined as regions
61 of text delimited by one or more blank lines.
63 -**backward_word( ["nobell"] )**
64 +**backward_word( ["tail"] ["nobell"] )**
65 Moves the cursor to the beginning of a word, or, if the
66 cursor is already at the beginning of a word, moves the cursor to the
67 beginning of the previous word. Word delimiters are user-settable, and
68 - defined by the X resource wordDelimiters.
69 + defined by the X resource wordDelimiters. If the "tail" argument is supplied
70 + the cursor is moved to the end of the next previous word.
72 **beginning_of_file( ["scrollbar"] )**
73 Moves the cursor to the beginning of the file.
75 **beginning_of_line( ["absolute"] )**