adium 5298:1ed591fb982c: Patch from Detmud: fix "add link" when ...
commits at adium.im
commits at adium.im
Tue Feb 5 21:53:07 UTC 2013
details: http://hg.adium.im/adium/rev/1ed591fb982c
revision: 5298:1ed591fb982c
branch: adium-1.6
author: Thijs Alkemade <me at thijsalkema.de>
date: Tue Feb 05 22:52:53 2013 +0100
Patch from Detmud: fix "add link" when the cursor is at the end of the line.
Fixes #16200
diffs (14 lines):
diff -r cc307652df5c -r 1ed591fb982c Plugins/Link Management/SHLinkEditorWindowController.m
--- a/Plugins/Link Management/SHLinkEditorWindowController.m Tue Feb 05 15:04:40 2013 +0100
+++ b/Plugins/Link Management/SHLinkEditorWindowController.m Tue Feb 05 22:52:53 2013 +0100
@@ -90,8 +90,8 @@
NSString *linkText;
id linkURL = nil;
- // Get the selected link (We have to be careful when the selection is at the very end of our text view)
- if ([[textView textStorage] length] > 0 && selectedRange.location != NSNotFound && NSMaxRange(selectedRange) <= [[textView textStorage] length]) {
+ // Text is selected if the selected range is greater than 0!
+ if (selectedRange.length > 0) {
linkURL = [[textView textStorage] attribute:NSLinkAttributeName
atIndex:selectedRange.location
effectiveRange:&rangeOfLinkAttribute];
More information about the commits
mailing list