mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-24 01:46:31 +00:00
Fix chunk_iterator with empty spans after hard-stop
This commit is contained in:
parent
b5651e3ac4
commit
e7a813b383
@ -96,8 +96,8 @@ where
|
|||||||
|
|
||||||
// We need to check if the last segment ended with a space.
|
// We need to check if the last segment ended with a space.
|
||||||
// TODO: skip empty spans when going back
|
// TODO: skip empty spans when going back
|
||||||
let prev_span =
|
let prev_span_id = segments.last().unwrap().span_id;
|
||||||
self.source.spans()[self.current_span - 1].as_ref();
|
let prev_span = self.source.spans()[prev_span_id].as_ref();
|
||||||
let prev_text = prev_span.resolve(self.source.source());
|
let prev_text = prev_span.resolve(self.source.source());
|
||||||
|
|
||||||
if hard_stop {
|
if hard_stop {
|
||||||
|
Loading…
Reference in New Issue
Block a user