mirror of
https://github.com/nadrad/h-m-m.git
synced 2024-05-17 22:46:32 +02:00
fixed ctrl+bs in the beginning of lines
This commit is contained in:
parent
e4ef78bbf9
commit
ab1f4d5ba1
3
h-m-m
3
h-m-m
|
@ -1148,8 +1148,7 @@ function magic_readline(&$mm, $title)
|
|||
// ctrl+backspace
|
||||
elseif ($in=="\010")
|
||||
{
|
||||
$from = mb_strrpos($title, ' ', min(1,$cursor-mb_strlen($title)-3));
|
||||
if ($from === false) $from=1;
|
||||
$from = max(0, mb_strrpos($title, ' ', max(0,min(1,$cursor-mb_strlen($title)-3))));
|
||||
$title = mb_substr($title, 0, $from) . mb_substr($title,$cursor-1);
|
||||
$cursor = $from+1;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue