Skip to content

Commit

Permalink
Github Issue #156: Adding parameter to track which blocks are current…
Browse files Browse the repository at this point in the history
…ly borrowed from raw texts to front text
  • Loading branch information
AngryFender committed Apr 12, 2024
1 parent 16062aa commit 7e18ac0
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 4 deletions.
2 changes: 0 additions & 2 deletions mkedit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -909,8 +909,6 @@ void MkEdit::cursorPositionChangedHandle()

selectRange.selectionEndBlock = selectRange.selectionFirstStartBlock;
selectRange.selectionEndPosInBlock = selectRange.selectionFirstStartPosInBlock;


}else{
selectRange.hasSelection = true;
selectRange.selectionEndBlock = cursor.blockNumber();
Expand Down
9 changes: 7 additions & 2 deletions mktextdocument.h
Original file line number Diff line number Diff line change
Expand Up @@ -75,6 +75,11 @@ struct SelectRange{
bool isFirstMousePress = false;
};

struct RawBlockInfo{
int rawFirstBlock = NO_SELECTION_POS;
int rawEndBlock = NO_SELECTION_POS;
};

class MkTextDocument : public QTextDocument
{
Q_OBJECT
Expand Down Expand Up @@ -149,8 +154,8 @@ public slots:
int blockNo;
int characterNo;
SelectRange selectRange;
int selectStart;
int selectEnd;
RawBlockInfo rawBlockInfo;

FormatLocation locBoldA;
FormatLocation locBoldU;
FormatLocation locItalicA;
Expand Down

0 comments on commit 7e18ac0

Please sign in to comment.