Skip to content

Commit

Permalink
Github Issue #202: Added fix where the 0th position of the block wasn…
Browse files Browse the repository at this point in the history
…'t being set properly for formatted texts
  • Loading branch information
AngryFender committed Aug 9, 2024
1 parent f498690 commit e38b383
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions mkedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -303,6 +303,12 @@ void MkEdit::setPostArrowKeys(const bool isShiftPressed, const bool isLeftArrowP
arrowPosInBlock = (textCursor().block().text().length()==0)? 0 : arrowPosInBlock;
cursor.setPosition(this->textCursor().block().position() + arrowPosInBlock);
this->setTextCursor(cursor);
}else{
if(!isUpOrDownArrowPressed){
int arrowPosInBlock = selectRange.arrowPosInBlock = selectRange.selectionFirstStartPosInBlock;
cursor.setPosition(this->textCursor().block().position() + arrowPosInBlock);
this->setTextCursor(cursor);
}
}
}else{
selectRange.selectionEndBlock = selectRange.currentBlockNo = cursor.blockNumber();
Expand Down

0 comments on commit e38b383

Please sign in to comment.