VSCode Insider's path:line:column Cmd-Click behavior is a NOP due to forgotten logic. Fix patch included.
Thanks for filing an issue! Please answer the questions below so I can help you.
-
iTerm2 version: db24c9c6
-
OS version: 14.2 23C5047e, Xcode 15.1 beta 3 (the pain... wasted my night trying to rebuild deps before just
tools/check-xcode-version && false
ing inrebuild-deps-if-needed
). Also changing the code signing team and Developer ID Application identifier is a big PITA to build it yourself. But I digress. -
Attach ~/Library/Preferences/com.googlecode.iterm2.plist here (drag-drop from finder into this window)
Yeah I'm just going to skip the rest of this because I fixed the issue, I'm tired, and want to go to bed now that I can finally cmd-click and open to the proper line.
Attach a debug log, if possible. Instructions at https://iterm2.com/debuglogAttach a screen capture video if it would make the reproduction steps clearer.Are you reporting a performance issue, excessive CPU usage, or a hang? Please attach a sample. Instructions at https://gitlab.com/gnachman/iterm2/wikis/HowToSampleAre you reporting a crash? Please attach the crash log. Instructions at https://gitlab.com/gnachman/iterm2/wikis/crash-logsAre you reporting excessive memory usage? Please attach a heap analysis: https://gitlab.com/gnachman/iterm2/wikis/heapshot
Detailed steps to reproduce the problem:
- Have VSCode Insiders build installed. Do not have stable version installed.
- Cmd-Click a nice highlighted path:file:column in an error expecting it to go straight to the line in question.
- Be perplexed as to why it either opens a new file at the top of the file or doesn't change the cursor in an already open file.
What happened:
I got sad and foolishly thought it would be a simple fix. Well it was, but the building to verify the fix wasn't.
What should have happened:
I should have been smacking my head on my desk after the offending line was jumped to and I saw my stupid bug.
Anyways, here is the fix. <3
diff --git a/sources/iTermSemanticHistoryController.m b/sources/iTermSemanticHistoryController.m
index 7f2ac11dd..6f4641cd9 100644
--- a/sources/iTermSemanticHistoryController.m
+++ b/sources/iTermSemanticHistoryController.m
@@ -251,7 +251,7 @@ NSString *const kSemanticHistoryColumnNumberKey = @"semanticHistory.columnNumber
// I don't expect this to ever happen.
return;
}
- NSArray<NSString *> *possibleIdentifiers = codium ? @[ kVSCodiumIdentifier1, kVSCodiumIdentifier2 ] : @[kVSCodeIdentifier];
+ NSArray<NSString *> *possibleIdentifiers = codium ? @[ kVSCodiumIdentifier1, kVSCodiumIdentifier2 ] : @[kVSCodeIdentifier, kVSCodeInsidersIdentifier];
NSString *identifier;
NSString *bundlePath = nil;
for (NSString *candidate in possibleIdentifiers) {
@@ -362,6 +362,7 @@ NSString *const kSemanticHistoryColumnNumberKey = @"semanticHistory.columnNumber
kVSCodeIdentifier,
kVSCodiumIdentifier1,
kVSCodiumIdentifier2,
+ kVSCodeInsidersIdentifier,
kSublimeText2Identifier,
kSublimeText3Identifier,
kSublimeText4Identifier,
@@ -397,7 +398,8 @@ NSString *const kSemanticHistoryColumnNumberKey = @"semanticHistory.columnNumber
}
if ([identifier isEqualToString:kVSCodeIdentifier] ||
[identifier isEqualToString:kVSCodiumIdentifier1] ||
- [identifier isEqualToString:kVSCodiumIdentifier2]) {
+ [identifier isEqualToString:kVSCodiumIdentifier2] ||
+ [identifier isEqualToString:kVSCodeInsidersIdentifier]) {
if (lineNumber != nil) {
path = [NSString stringWithFormat:@"%@:%@", path, lineNumber];
}
diff --git a/sources/iTermSemanticHistoryPrefsController.h b/sources/iTermSemanticHistoryPrefsController.h
index 2dc532740..69b4a98f7 100644
--- a/sources/iTermSemanticHistoryPrefsController.h
+++ b/sources/iTermSemanticHistoryPrefsController.h
@@ -20,6 +20,7 @@ extern NSString *kAtomIdentifier;
extern NSString *kVSCodeIdentifier;
extern NSString *kVSCodiumIdentifier1;
extern NSString *kVSCodiumIdentifier2;
+extern NSString *kVSCodeInsidersIdentifier;
extern NSString *kTextmateIdentifier;
extern NSString *kTextmate2Identifier;
extern NSString *kBBEditIdentifier;