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

A single click on the key icon (shown when at a password prompt on localhost)...

A single click on the key icon (shown when at a password prompt on localhost) opens the password manager
parent 623612b1
No related branches found
No related tags found
No related merge requests found
Loading
Loading
@@ -6741,6 +6741,12 @@ ITERM_WEAKLY_REFERENCEABLE
return _passwordInput;
}
 
- (void)textViewDidSelectPasswordPrompt {
iTermApplicationDelegate *delegate = [iTermApplication.sharedApplication delegate];
[delegate openPasswordManagerToAccountName:nil
inSession:self];
}
- (void)textViewDidSelectRangeForFindOnPage:(VT100GridCoordRange)range {
if (_copyMode) {
_copyModeState.coord = range.start;
Loading
Loading
Loading
Loading
@@ -192,6 +192,7 @@ typedef NS_ENUM(NSInteger, PTYTextViewSelectionExtensionUnit) {
- (VT100GridCoord)textViewCopyModeCursorCoord;
- (BOOL)textViewPasswordInput;
- (void)textViewDidSelectRangeForFindOnPage:(VT100GridCoordRange)range;
- (void)textViewDidSelectPasswordPrompt;
 
@end
 
Loading
Loading
Loading
Loading
@@ -2344,6 +2344,15 @@ static double EuclideanDistance(NSPoint p1, NSPoint p2) {
[_findOnPageHelper setStartPoint:VT100GridAbsCoordMake(clickPoint.x,
[_dataSource totalScrollbackOverflow] + clickPoint.y)];
}
if (_delegate.textViewPasswordInput && !altPressed && !cmdPressed) {
NSPoint clickPoint = [self clickPoint:event allowRightMarginOverflow:NO];
VT100GridCoord clickCoord = VT100GridCoordMake(clickPoint.x, clickPoint.y);
VT100GridCoord cursorCoord = VT100GridCoordMake([_dataSource cursorX] - 1,
[_dataSource numberOfLines] - [_dataSource height] + [_dataSource cursorY] - 1);
if (VT100GridCoordEquals(clickCoord, cursorCoord)) {
[_delegate textViewDidSelectPasswordPrompt];
}
}
} else if (isShiftedSingleClick && _findOnPageHelper.haveFindCursor && ![_selection hasSelection]) {
VT100GridAbsCoord absCursor = [_findOnPageHelper findCursorAbsCoord];
VT100GridCoord cursor = VT100GridCoordMake(absCursor.x,
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