Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

fix calculation of variable

thanks to Alexander Demidenko
  • Loading branch information...
commit 8071fde6f55056ef75b9b9836a6d75afa7e92ea2 1 parent 0b032d0
@proxyles proxyles authored HansN committed
Showing with 1 addition and 1 deletion.
  1. +1 −1  lib/ssh/src/ssh_cli.erl
View
2  lib/ssh/src/ssh_cli.erl
@@ -358,7 +358,7 @@ delete_chars(N, {Buf, BufTail, Col}, Tty) when N > 0 ->
{Buf, NewBufTail, Col}};
delete_chars(N, {Buf, BufTail, Col}, Tty) -> % N < 0
NewBuf = nthtail(-N, Buf),
- NewCol = Col + N,
+ NewCol = case Col + N of V when V >= 0 -> V; _ -> 0 end,
M1 = move_cursor(Col, NewCol, Tty),
M2 = move_cursor(NewCol + length(BufTail) - N, NewCol, Tty),
{[M1, BufTail, lists:duplicate(-N, $ ) | M2],
Please sign in to comment.
Something went wrong with that request. Please try again.