mirror of
https://github.com/rizinorg/cutter.git
synced 2025-01-19 02:48:49 +00:00
Fix blank lines when scrolling up Hexdump
This commit is contained in:
parent
2af51a1af0
commit
d3b8bcb62a
@ -779,12 +779,11 @@ void HexdumpWidget::removeTopLinesWithoutScroll(QTextEdit *textEdit, int lines)
|
||||
int height_before = textEdit->document()->size().height();
|
||||
|
||||
QTextBlock block = textEdit->document()->firstBlock();
|
||||
QTextCursor textCursor = textEdit->textCursor();
|
||||
for (int i = 0; i < lines; i++) {
|
||||
QTextCursor cursor(block);
|
||||
cursor.select(QTextCursor::BlockUnderCursor);
|
||||
cursor.removeSelectedText();
|
||||
block = block.next();
|
||||
cursor.movePosition(QTextCursor::NextBlock, QTextCursor::KeepAnchor);
|
||||
cursor.removeSelectedText();
|
||||
}
|
||||
|
||||
int height_after = textEdit->document()->size().height();
|
||||
|
Loading…
Reference in New Issue
Block a user