Skip to content

Commit

Permalink
Fixed|Client|libshell: Minor issues with word jump behavior
Browse files Browse the repository at this point in the history
  • Loading branch information
skyjake committed Jul 25, 2013
1 parent b111a67 commit 5087b9b
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
7 changes: 7 additions & 0 deletions doomsday/client/src/ui/widgets/lineeditwidget.cpp
Expand Up @@ -383,6 +383,13 @@ bool LineEditWidget::handleEvent(Event const &event)
{
KeyEvent const &key = event.as<KeyEvent>();

if(key.qtKey() == Qt::Key_Control || key.qtKey() == Qt::Key_Alt ||
key.qtKey() == Qt::Key_Meta)
{
// Modifier keys alone will be eaten when focused.
return true;
}

// Control character.
if(handleControlKey(key.qtKey(), modifiersFromKeyEvent(key.modifiers())))
{
Expand Down
5 changes: 4 additions & 1 deletion doomsday/libshell/src/abstractlineeditor.cpp
Expand Up @@ -230,7 +230,10 @@ DENG2_PIMPL(AbstractLineEditor)
}

// Jump over any non-word chars.
while(cursor < last && !text[cursor].isLetterOrNumber()) cursor++;
while(cursor <= last && !text[de::min(last, cursor)].isLetterOrNumber())
{
cursor++;
}

self.cursorMoved();
}
Expand Down

0 comments on commit 5087b9b

Please sign in to comment.