adium 5315:1432212c1d40: Patch from Detmud: fix "add link" when ...
commits at adium.im
commits at adium.im
Wed Feb 13 18:05:08 UTC 2013
details: http://hg.adium.im/adium/rev/1432212c1d40
revision: 5315:1432212c1d40
branch: adium-1.5.5
author: Robert Vehse <robertvehse at fastmail.fm>
date: Wed Feb 13 19:04:57 2013 +0100
Patch from Detmud: fix "add link" when the cursor is at the end of the line. Fixes #16200.
diffs (25 lines):
diff -r 3379283a9336 -r 1432212c1d40 ChangeLogs/Changes.txt
--- a/ChangeLogs/Changes.txt Wed Feb 13 17:30:26 2013 +0100
+++ b/ChangeLogs/Changes.txt Wed Feb 13 19:04:57 2013 +0100
@@ -1,6 +1,7 @@
Adium Version History
-----------------------
Version 1.5.5 (X/X/X)
+ * Fixed "Add Link..." when the cursor is at the end of the line. (#16200)
* Updated Spanish translation. (#16291)
diff -r 3379283a9336 -r 1432212c1d40 Plugins/Link Management/SHLinkEditorWindowController.m
--- a/Plugins/Link Management/SHLinkEditorWindowController.m Wed Feb 13 17:30:26 2013 +0100
+++ b/Plugins/Link Management/SHLinkEditorWindowController.m Wed Feb 13 19:04:57 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