reapack

Package manager for REAPER
Log | Files | Refs | Submodules | README | LICENSE

commit 3b10c9a838db95b4dc9256b6c05a9fc02f488ffc
parent fbc834a1531360e75a985d9c532629a6cc682443
Author: cfillion <cfillion@users.noreply.github.com>
Date:   Mon,  1 Feb 2016 01:14:04 -0500

richedit: auto-detect links on OS X too

Diffstat:
Msrc/richedit.mm | 9+++++++++
1 file changed, 9 insertions(+), 0 deletions(-)

diff --git a/src/richedit.mm b/src/richedit.mm @@ -34,4 +34,13 @@ void RichEdit::setRichText(const string &rtf) replaceCharactersInRange: NSMakeRange(0, [[textView string] length]) withRTF: [str dataUsingEncoding: NSUTF8StringEncoding] ]; + + const BOOL isEditable = textView.isEditable; + + // auto-detect links + // equivalent to Windows' EM_AUTOURLDETECT message + [textView setEditable:YES]; + [textView setEnabledTextCheckingTypes:NSTextCheckingTypeLink]; + [textView checkTextInDocument:nil]; + [textView setEditable:isEditable]; }