Skip to content
Snippets Groups Projects
Commit ee4a6b90 authored by George Nachman's avatar George Nachman
Browse files

Draw underline and vertical line cursor behind text to improve readability.

parent 711b0b53
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -247,8 +247,6 @@ typedef struct iTermTextColorContext {
 
[self drawRanges:ranges count:numRowsInRect origin:boundingCoordRange.start boundingRect:[self rectForCoordRange:boundingCoordRange]];
[self drawCursor];
if (_showDropTargets) {
[self drawDropTargets];
}
Loading
Loading
@@ -371,6 +369,11 @@ typedef struct iTermTextColorContext {
// Draw other background-like stuff that goes behind text.
[self drawAccessoriesInRect:boundingRect];
 
const BOOL drawCursorBeforeText = (_cursorType == CURSOR_UNDERLINE || _cursorType == CURSOR_VERTICAL);
if (drawCursorBeforeText) {
[self drawCursor];
}
// Now iterate over the lines and paint the characters.
CGContextRef ctx = (CGContextRef)[[NSGraphicsContext currentContext] graphicsPort];
iTermBackgroundColorRunsInLine *representativeRunArray = nil;
Loading
Loading
@@ -407,6 +410,9 @@ typedef struct iTermTextColorContext {
cursorHeight:_cellSizeWithoutSpacing.height
ctx:ctx];
_blinkingFound |= self.cursorBlinking;
if (!drawCursorBeforeText) {
[self drawCursor];
}
}
 
#pragma mark - Drawing: Background
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment