input: Fix the panic issue in end_of_line (#922)
This commit is contained in:
parent
74de042b60
commit
936ee27a2c
1 changed files with 1 additions and 1 deletions
|
|
@ -1057,7 +1057,7 @@ impl InputState {
|
||||||
// ignore if offset is "\n"
|
// ignore if offset is "\n"
|
||||||
if self
|
if self
|
||||||
.text_for_range(
|
.text_for_range(
|
||||||
self.range_to_utf16(&(offset - 1..offset)),
|
self.range_to_utf16(&(offset.saturating_sub(1)..offset)),
|
||||||
&mut None,
|
&mut None,
|
||||||
window,
|
window,
|
||||||
cx,
|
cx,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue