mirror of
https://gitee.com/vnotex/vnote.git
synced 2025-07-05 13:59:52 +08:00
do not indent empty lines when pressing tab
This commit is contained in:
parent
b7737aff61
commit
fc6aefc66f
@ -374,12 +374,15 @@ bool VMdEditOperations::handleKeyTab(QKeyEvent *p_event)
|
||||
int endBlockNum = endBlock.blockNumber();
|
||||
while (true) {
|
||||
Q_ASSERT(block.isValid());
|
||||
QTextCursor blockCursor(block);
|
||||
blockCursor.insertText(text);
|
||||
if (!block.text().isEmpty()) {
|
||||
QTextCursor blockCursor(block);
|
||||
blockCursor.insertText(text);
|
||||
}
|
||||
|
||||
if (block.blockNumber() == endBlockNum) {
|
||||
break;
|
||||
}
|
||||
|
||||
block = block.next();
|
||||
}
|
||||
cursor.endEditBlock();
|
||||
|
Loading…
x
Reference in New Issue
Block a user