Added rpl::event_stream for firing applied markdown tag to spellchecker.

This commit is contained in:
23rd 2019-12-30 16:58:53 +03:00
parent e6914d4649
commit 983d6be8d4
2 changed files with 8 additions and 0 deletions

View file

@ -3152,6 +3152,10 @@ bool InputField::commitMarkdownReplacement(
cursor.setCharFormat(_defaultCharFormat);
_inner->setTextCursor(cursor);
// Fire the tag to the spellchecker.
_markdownTagApplies.fire({ from, till, -1, -1, false, tag });
return true;
}

View file

@ -330,6 +330,9 @@ public:
auto documentContentsChanges() {
return _documentContentsChanges.events();
}
auto markdownTagApplies() {
return _markdownTagApplies.events();
}
~InputField();
@ -535,6 +538,7 @@ private:
bool _instantReplacesEnabled = true;
rpl::event_stream<DocumentChangeInfo> _documentContentsChanges;
rpl::event_stream<MarkdownTag> _markdownTagApplies;
};