--- 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 @@
+ * Fixed "Add Link..." when the cursor is at the end of the line. (#16200) * Updated Spanish translation. (#16291)
--- 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 @@
- // 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];