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

Add an advanced pref to tweak the height of the underline cursor

parent 7c1f0d6b
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -180,5 +180,6 @@
+ (BOOL)useGCDUpdateTimer;
+ (BOOL)fullHeightCursor;
+ (BOOL)drawOutlineAroundCursor;
+ (double)underlineCursorOffset;
 
@end
Loading
Loading
@@ -128,6 +128,7 @@ DEFINE_BOOL(focusReportingEnabled, YES, @"Terminal: Apps may turn on Focus Repor
DEFINE_BOOL(useColorfgbgFallback, YES, @"Terminal: Use fallback for COLORFGBG if no exact match found?\nThe COLORFGBG variable indicates the ANSI colors that match the foreground and background colors. If no colors match and this setting is enabled, then the variable will be set to 15;0 to indicate a dark background or 0;15 to indicate a light background.");
DEFINE_BOOL(zeroWidthSpaceAdvancesCursor, YES, @"Terminal: Zero-Width Space (U+200B) advances cursor?\nWhile a zero-width space should not advance the cursor per the Unicode spec, both Terminal.app and Konsole do this, and Weechat depends on it. You must restart iTerm2 after changing this setting.");
DEFINE_BOOL(fullHeightCursor, NO, @"Terminal: Cursor occupies line spacing area.\nIf lines have more than 100% vertical spacing and this setting is enabled the bottom of the cursor will be aligned to the bottom of the spacing area.");
DEFINE_FLOAT(underlineCursorOffset, 0, @"Terminal: Vertical offset for underline cursor.\nPositive values move it up, negative values move it down.");
 
#pragma mark Hotkey
DEFINE_FLOAT(hotkeyTermAnimationDuration, 0.25, @"Hotkey: Duration in seconds of the hotkey window animation.\nWarning: reducing this value may cause problems if you have multiple displays.");
Loading
Loading
Loading
Loading
@@ -76,7 +76,7 @@
outline:(BOOL)outline {
const CGFloat height = 2;
NSRect cursorRect = NSMakeRect(rect.origin.x,
rect.origin.y + rect.size.height - height,
rect.origin.y + rect.size.height - height - [iTermAdvancedSettingsModel underlineCursorOffset],
ceil(rect.size.width),
height);
if (outline) {
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