You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This PR fixes two cases where provide_context panics even though
the previous call of `is_boundary` returns a PreContext error.
The primary cause is `provide_context` assumes its state as
Regional or Emoji; otherwise it gets panicked with 'invalid state!'
However:
- if the chunk starts with the cursor position, it requires
pre-context for `cat_before` (and that's necessary for some
cases indeed). so provide_context should fill `cat_before`
in such case.
- if both `cat_before` and `cat_after` are RIS and the boundary
is undecided by the chunk, it requires pre-context but it does
not set its state to Regional. This is done by setting state
within `handle_regional`.
0 commit comments