Skip to content

Commit

Permalink
Merge pull request #3382 from IsaacWeiss/up-down-arrows-in-text
Browse files Browse the repository at this point in the history
Fix #268197: Up/down arrow keys in first/last line of text don't go to beginning/end
  • Loading branch information
lasconic committed Jan 31, 2018
2 parents 9c17edd + 74713f6 commit a5b92dd
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions libmscore/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3179,12 +3179,22 @@ bool TextBase::edit(EditData& ed)
break;

case Qt::Key_Up:
#if defined(Q_OS_MAC)
if (!_cursor->movePosition(QTextCursor::Up, mm))
_cursor->movePosition(QTextCursor::StartOfLine, mm);
#else
_cursor->movePosition(QTextCursor::Up, mm);
#endif
s.clear();
break;

case Qt::Key_Down:
#if defined(Q_OS_MAC)
if (!_cursor->movePosition(QTextCursor::Down, mm))
_cursor->movePosition(QTextCursor::EndOfLine, mm);
#else
_cursor->movePosition(QTextCursor::Down, mm);
#endif
s.clear();
break;

Expand Down

0 comments on commit a5b92dd

Please sign in to comment.