From b07ff100d1d7efc59c1a86659d52afb11ed668bf Mon Sep 17 00:00:00 2001 From: daboe01 Date: Sat, 18 Jun 2016 19:18:23 +0200 Subject: [PATCH] fixed: function is missing --- AppKit/CPTextView/CPTextView.j | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/AppKit/CPTextView/CPTextView.j b/AppKit/CPTextView/CPTextView.j index 81d6526eb..9a8cb4b12 100644 --- a/AppKit/CPTextView/CPTextView.j +++ b/AppKit/CPTextView/CPTextView.j @@ -77,6 +77,13 @@ _characterTripletFromStringAtIndex = function(string, index) return [string substringWithRange:tripletRange]; } +_regexMatchesStringAtIndex=function(regex, string, index) +{ + var triplet = _characterTripletFromStringAtIndex(string, index); + + return regex.exec(triplet) !== null; +} + /* CPSelectionGranularity */ @@ -1780,7 +1787,7 @@ var kDelegateRespondsTo_textShouldBeginEditing // FIXME if (!characterSet) croak! } - return characterSet.exec(_characterTripletFromStringAtIndex([_textStorage string], index)) !== null; + return _regexMatchesStringAtIndex(characterSet, [_textStorage string], index); } + (JSObject)_wordBoundaryRegex