v.readline: fix key delete panic'king on linux (#11204)

pull/11208/head
Leo Developer 2021-08-16 11:28:40 +02:00 committed by GitHub
parent d235de63e2
commit b417d3c043
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -424,7 +424,7 @@ fn (mut r Readline) delete_character() {
// suppr_character removes (suppresses) the character in front of the cursor.
fn (mut r Readline) suppr_character() {
if r.cursor > r.current.len {
if r.cursor >= r.current.len {
return
}
r.current.delete(r.cursor)