mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-28 16:24:27 +02:00
Fix extra background colors on printing due to Change History
Patch ref: https://sourceforge.net/p/scintilla/bugs/2358/#a3e3 Fix #12281
This commit is contained in:
parent
49e5a17377
commit
9bec8f5460
@ -2769,6 +2769,14 @@ Sci::Position EditView::FormatRange(bool draw, CharacterRangeFull chrg, Rectangl
|
|||||||
vsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars); // Recalculate fixedColumnWidth
|
vsPrint.Refresh(*surfaceMeasure, model.pdoc->tabInChars); // Recalculate fixedColumnWidth
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Turn off change history marker backgrounds
|
||||||
|
constexpr unsigned int changeMarkers =
|
||||||
|
1u << static_cast<unsigned int>(MarkerOutline::HistoryRevertedToOrigin) |
|
||||||
|
1u << static_cast<unsigned int>(MarkerOutline::HistorySaved) |
|
||||||
|
1u << static_cast<unsigned int>(MarkerOutline::HistoryModified) |
|
||||||
|
1u << static_cast<unsigned int>(MarkerOutline::HistoryRevertedToModified);
|
||||||
|
vsPrint.maskInLine &= ~changeMarkers;
|
||||||
|
|
||||||
const Sci::Line linePrintStart = model.pdoc->SciLineFromPosition(chrg.cpMin);
|
const Sci::Line linePrintStart = model.pdoc->SciLineFromPosition(chrg.cpMin);
|
||||||
Sci::Line linePrintLast = linePrintStart + (rc.bottom - rc.top) / vsPrint.lineHeight - 1;
|
Sci::Line linePrintLast = linePrintStart + (rc.bottom - rc.top) / vsPrint.lineHeight - 1;
|
||||||
if (linePrintLast < linePrintStart)
|
if (linePrintLast < linePrintStart)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user