|
205 | 205 | static NSString *const SESSION_ARRANGEMENT_DIRECTORIES = @"Directories"; // Array of strings |
206 | 206 | static NSString *const SESSION_ARRANGEMENT_HOSTS = @"Hosts"; // Array of VT100RemoteHost |
207 | 207 | static NSString *const SESSION_ARRANGEMENT_CURSOR_GUIDE = @"Cursor Guide"; // BOOL |
| 208 | +static NSString *const SESSION_ARRANGEMENT_VCURSOR_GUIDE = @"Vertical Cursor Guide"; // BOOL |
208 | 209 | static NSString *const SESSION_ARRANGEMENT_LAST_DIRECTORY = @"Last Directory"; // NSString |
209 | 210 | static NSString *const SESSION_ARRANGEMENT_LAST_DIRECTORY_IS_UNSUITABLE_FOR_OLD_PWD = @"Last Directory Is Remote"; // BOOL |
210 | 211 | static NSString *const SESSION_ARRANGEMENT_SELECTION = @"Selection"; // Dictionary for iTermSelection. |
@@ -1175,6 +1176,9 @@ + (void)finishInitializingArrangementOriginatedSession:(PTYSession *)aSession |
1175 | 1176 | if (arrangement[SESSION_ARRANGEMENT_CURSOR_GUIDE]) { |
1176 | 1177 | aSession.textview.highlightCursorLine = [arrangement[SESSION_ARRANGEMENT_CURSOR_GUIDE] boolValue]; |
1177 | 1178 | } |
| 1179 | + if (arrangement[SESSION_ARRANGEMENT_VCURSOR_GUIDE]) { |
| 1180 | + aSession.textview.highlightCursorLine = [arrangement[SESSION_ARRANGEMENT_VCURSOR_GUIDE] boolValue]; |
| 1181 | + } |
1178 | 1182 | aSession->_lastMark = [aSession.screen.lastMark retain]; |
1179 | 1183 | aSession.lastRemoteHost = aSession.screen.lastRemoteHost; |
1180 | 1184 | if (arrangement[SESSION_ARRANGEMENT_LAST_DIRECTORY]) { |
@@ -3463,6 +3467,8 @@ - (void)loadInitialColorTable |
3463 | 3467 | } |
3464 | 3468 | _textview.highlightCursorLine = [iTermProfilePreferences boolForKey:KEY_USE_CURSOR_GUIDE |
3465 | 3469 | inProfile:_profile]; |
| 3470 | + _textview.highlightCursorCol = [iTermProfilePreferences boolForKey:KEY_USE_VERT_CURSOR_GUIDE |
| 3471 | + inProfile:_profile]; |
3466 | 3472 | } |
3467 | 3473 |
|
3468 | 3474 | - (NSColor *)tabColorInProfile:(NSDictionary *)profile |
@@ -3645,6 +3651,8 @@ - (void)setPreferencesFromAddressBookEntry:(NSDictionary *)aePrefs { |
3645 | 3651 | if (!_cursorGuideSettingHasChanged) { |
3646 | 3652 | _textview.highlightCursorLine = [iTermProfilePreferences boolForKey:KEY_USE_CURSOR_GUIDE |
3647 | 3653 | inProfile:aDict]; |
| 3654 | + _textview.highlightCursorCol = [iTermProfilePreferences boolForKey:KEY_USE_VERT_CURSOR_GUIDE |
| 3655 | + inProfile:aDict]; |
3648 | 3656 | } |
3649 | 3657 |
|
3650 | 3658 | for (i = 0; i < 16; i++) { |
@@ -4371,6 +4379,7 @@ - (NSDictionary *)arrangementWithContents:(BOOL)includeContents { |
4371 | 4379 | [NSDictionary dictionaryWithGridCoordRange:range]; |
4372 | 4380 | result[SESSION_ARRANGEMENT_ALERT_ON_NEXT_MARK] = @(_alertOnNextMark); |
4373 | 4381 | result[SESSION_ARRANGEMENT_CURSOR_GUIDE] = @(_textview.highlightCursorLine); |
| 4382 | + result[SESSION_ARRANGEMENT_VCURSOR_GUIDE] = @(_textview.highlightCursorCol); |
4374 | 4383 | if (self.lastDirectory) { |
4375 | 4384 | result[SESSION_ARRANGEMENT_LAST_DIRECTORY] = self.lastDirectory; |
4376 | 4385 | result[SESSION_ARRANGEMENT_LAST_DIRECTORY_IS_UNSUITABLE_FOR_OLD_PWD] = @(self.lastDirectoryIsUnsuitableForOldPWD); |
@@ -8298,6 +8307,8 @@ - (void)screenDidReset { |
8298 | 8307 | _cursorGuideSettingHasChanged = NO; |
8299 | 8308 | _textview.highlightCursorLine = [iTermProfilePreferences boolForKey:KEY_USE_CURSOR_GUIDE |
8300 | 8309 | inProfile:_profile]; |
| 8310 | + _textview.highlightCursorCol = [iTermProfilePreferences boolForKey:KEY_USE_VERT_CURSOR_GUIDE |
| 8311 | + inProfile:_profile]; |
8301 | 8312 | [_textview setNeedsDisplay:YES]; |
8302 | 8313 | _screen.trackCursorLineMovement = NO; |
8303 | 8314 | } |
@@ -8570,6 +8581,28 @@ - (BOOL)highlightCursorLine { |
8570 | 8581 | return _textview.highlightCursorLine; |
8571 | 8582 | } |
8572 | 8583 |
|
| 8584 | +- (void)screenCursorDidMoveToCol:(int)col { |
| 8585 | + if (_textview.cursorVisible) { |
| 8586 | + [_textview setNeedsDisplayOnCol:col]; |
| 8587 | + } |
| 8588 | +} |
| 8589 | + |
| 8590 | +- (void)screenSetHighlightCursorCol:(BOOL)highlight { |
| 8591 | + _cursorGuideSettingHasChanged = YES; |
| 8592 | + self.highlightCursorCol = highlight; |
| 8593 | +} |
| 8594 | + |
| 8595 | +- (void)setHighlightCursorCol:(BOOL)highlight { |
| 8596 | + _cursorGuideSettingHasChanged = YES; |
| 8597 | + _textview.highlightCursorCol = highlight; |
| 8598 | + [_textview setNeedsDisplay:YES]; |
| 8599 | + _screen.trackCursorColMovement = highlight; |
| 8600 | +} |
| 8601 | + |
| 8602 | +- (BOOL)highlightCursorCol { |
| 8603 | + return _textview.highlightCursorCol; |
| 8604 | +} |
| 8605 | + |
8573 | 8606 | - (BOOL)screenHasView { |
8574 | 8607 | return _textview != nil; |
8575 | 8608 | } |
|
0 commit comments