1
0
mirror of https://github.com/vlang/v.git synced 2023-08-10 21:13:21 +03:00

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

This commit is contained in:
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

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)