Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fixes #210 <http://hunch.lighthouseapp.com/projects/66522-kod/tickets…

  • Loading branch information...
commit 6c615d7662e327f2bd4a9d019800471157e73c7a 1 parent 1622dc0
@rsms authored
Showing with 1 addition and 7 deletions.
  1. +1 −7 src/KToolbarController.mm
View
8 src/KToolbarController.mm
@@ -114,13 +114,7 @@ - (void)updateURLFromCurrentContents {
if (!url) {
[locationBarTextField_ setStringValue:@""];
} else if ([url isFileURL]) {
- NSString *path = [url path];
- NSString *homePath = NSHomeDirectory();
- NSRange prefixRange = NSMakeRange(0, homePath.length);
- path = [path stringByReplacingOccurrencesOfString:homePath
- withString:@"~"
- options:NSLiteralSearch
- range:prefixRange];
+ NSString *path = [[url path] stringByAbbreviatingWithTildeInPath];
[locationBarTextField_ setStringValue:path];
} else {
[locationBarTextField_ setStringValue:[url description]];
Please sign in to comment.
Something went wrong with that request. Please try again.