IDEA-166967 Extend selection doesn't surround comment words with apostrophes correctly

making it work for words with hyphen
This commit is contained in:
Dmitry Batrak
2017-02-15 21:36:23 +03:00
parent fc3c8434fa
commit 0f085fe5f9
@@ -140,6 +140,8 @@ public class NaturalLanguageTextSelectioner extends ExtendWordSelectionHandlerBa
private static void addWordRange(CharSequence editorText, int cursorOffset, ArrayList<TextRange> result) {
SelectWordUtil.addWordSelection(false, editorText, cursorOffset, result,
ch -> Character.isJavaIdentifierPart(ch) || ch == '\'');
SelectWordUtil.addWordSelection(false, editorText, cursorOffset, result,
ch -> Character.isJavaIdentifierPart(ch) || ch == '\'' || ch == '-');
}
@Nullable