summaryrefslogtreecommitdiff
path: root/src/ui/inputwidget.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/ui/inputwidget.c')
-rw-r--r--src/ui/inputwidget.c9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/ui/inputwidget.c b/src/ui/inputwidget.c
index 8151b759..11098c80 100644
--- a/src/ui/inputwidget.c
+++ b/src/ui/inputwidget.c
@@ -23,6 +23,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
23#include "inputwidget.h" 23#include "inputwidget.h"
24#include "paint.h" 24#include "paint.h"
25#include "util.h" 25#include "util.h"
26#include "keys.h"
26#include "app.h" 27#include "app.h"
27 28
28#include <the_Foundation/array.h> 29#include <the_Foundation/array.h>
@@ -539,7 +540,7 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {
539 deleteMarked_InputWidget_(d); 540 deleteMarked_InputWidget_(d);
540 contentsWereChanged_InputWidget_(d); 541 contentsWereChanged_InputWidget_(d);
541 } 542 }
542 else if (mods & KMOD_ALT) { 543 else if (mods & byWord_KeyModifier) {
543 pushUndo_InputWidget_(d); 544 pushUndo_InputWidget_(d);
544 d->mark.start = d->cursor; 545 d->mark.start = d->cursor;
545 d->mark.end = skipWord_InputWidget_(d, d->cursor, -1); 546 d->mark.end = skipWord_InputWidget_(d, d->cursor, -1);
@@ -562,7 +563,7 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {
562 deleteMarked_InputWidget_(d); 563 deleteMarked_InputWidget_(d);
563 contentsWereChanged_InputWidget_(d); 564 contentsWereChanged_InputWidget_(d);
564 } 565 }
565 else if (mods & KMOD_ALT) { 566 else if (mods & byWord_KeyModifier) {
566 pushUndo_InputWidget_(d); 567 pushUndo_InputWidget_(d);
567 d->mark.start = d->cursor; 568 d->mark.start = d->cursor;
568 d->mark.end = skipWord_InputWidget_(d, d->cursor, +1); 569 d->mark.end = skipWord_InputWidget_(d, d->cursor, +1);
@@ -621,10 +622,10 @@ static iBool processEvent_InputWidget_(iInputWidget *d, const SDL_Event *ev) {
621 case SDLK_LEFT: 622 case SDLK_LEFT:
622 case SDLK_RIGHT: { 623 case SDLK_RIGHT: {
623 const int dir = (key == SDLK_LEFT ? -1 : +1); 624 const int dir = (key == SDLK_LEFT ? -1 : +1);
624 if (mods & KMOD_PRIMARY) { 625 if (mods & byLine_KeyModifier) {
625 setCursor_InputWidget(d, dir < 0 ? 0 : curMax); 626 setCursor_InputWidget(d, dir < 0 ? 0 : curMax);
626 } 627 }
627 else if (mods & KMOD_ALT) { 628 else if (mods & byWord_KeyModifier) {
628 setCursor_InputWidget(d, skipWord_InputWidget_(d, d->cursor, dir)); 629 setCursor_InputWidget(d, skipWord_InputWidget_(d, d->cursor, dir));
629 } 630 }
630 else if (!isMarking_() && !isEmpty_Range(&d->mark)) { 631 else if (!isMarking_() && !isEmpty_Range(&d->mark)) {