v.readline: fix key delete panic'king on linux (#11204)
parent
d235de63e2
commit
b417d3c043
|
@ -424,7 +424,7 @@ fn (mut r Readline) delete_character() {
|
||||||
|
|
||||||
// suppr_character removes (suppresses) the character in front of the cursor.
|
// suppr_character removes (suppresses) the character in front of the cursor.
|
||||||
fn (mut r Readline) suppr_character() {
|
fn (mut r Readline) suppr_character() {
|
||||||
if r.cursor > r.current.len {
|
if r.cursor >= r.current.len {
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
r.current.delete(r.cursor)
|
r.current.delete(r.cursor)
|
||||||
|
|
Loading…
Reference in New Issue