Skip to content

Commit

Permalink
Fix #268197: Up/down arrow keys in first/last line of text don't go t…
Browse files Browse the repository at this point in the history
…o beginning/end
  • Loading branch information
IsaacWeiss committed Jan 5, 2018
1 parent c68c945 commit 4fdcc1b
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions libmscore/text.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3170,12 +3170,14 @@ bool TextBase::edit(EditData& ed)
break;

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

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

Expand Down

0 comments on commit 4fdcc1b

Please sign in to comment.