Skip to content

Commit

Permalink
FormattableEditText: exclude paragraphs spans
Browse files Browse the repository at this point in the history
  • Loading branch information
MCMrARM committed Dec 2, 2017
1 parent 0ddf8b2 commit a7b5b4b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion app/src/main/java/io/mrarm/irc/view/FormattableEditText.java
Expand Up @@ -44,7 +44,8 @@ public void beforeTextChanged(CharSequence s, int start, int count, int after) {
int selStart = getSelectionStart();
for (Object span : getText().getSpans(start, start + count, Object.class)) {
int flags = getText().getSpanFlags(span);
if (span instanceof NoCopySpan || (flags & Spanned.SPAN_COMPOSING) != 0)
if (span instanceof NoCopySpan || (flags & Spanned.SPAN_COMPOSING) != 0
|| (flags & Spanned.SPAN_PARAGRAPH) != 0)
continue;
SpanData data = new SpanData();
data.span = span;
Expand Down

0 comments on commit a7b5b4b

Please sign in to comment.