From 1efb0c395dfc84ee899897d3ebd7f61d2edc2cd3 Mon Sep 17 00:00:00 2001 From: Dominique Fournier Date: Wed, 13 Jun 2018 12:14:30 +0000 Subject: [PATCH] console : Delete is now working for first char git-svn-id: https://svn.fournier38.fr/svn/ProgSVN/trunk@4240 bf3deb0d-5f1a-0410-827f-c0cc1f45334c --- console.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/console.php b/console.php index 1ffa55a..b7b4fac 100644 --- a/console.php +++ b/console.php @@ -496,7 +496,7 @@ private $usleep = 0; // Remove the char under the cursor (Delete) // {{{ { - if ($cursorPos >= mb_strlen ($prompt.$string)) + if ($cursorPos > mb_strlen ($prompt.$string)) continue; $strArr = $this->mb_str_split ($string); unset ($strArr[$cursorPos - $minLength]);