Additional cursor position validation required to avoid an assertion in Text::selectWord

This commit is contained in:
Stephan Witt 2022-08-11 22:35:58 +02:00
parent 04ada8e5fa
commit 7391ca961d

View File

@ -1719,6 +1719,8 @@ void BufferView::dispatch(FuncRequest const & cmd, DispatchResult & dr)
}
if (cur.selection())
pattern = cur.selectionAsString(false);
else if (!cur.inTexted())
break; // not suitable for selectWord at cursor
else {
pos_type spos = cur.pos();
cur.innerText()->selectWord(cur, WHOLE_WORD);