diff options
author | Henrik Nord <[email protected]> | 2013-11-21 11:00:39 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2014-01-10 11:41:49 +0100 |
commit | 2a0a8447390c0de8e4729cf6e27b11f90211b955 (patch) | |
tree | 4df45a19d7f29b5eeaf34ff1458f2e6ee3c10f9c /lib/ssh/src/ssh_cli.erl | |
parent | 039ea3a6ed5dc147478f294910ba042850db2383 (diff) | |
download | otp-2a0a8447390c0de8e4729cf6e27b11f90211b955.tar.gz otp-2a0a8447390c0de8e4729cf6e27b11f90211b955.tar.bz2 otp-2a0a8447390c0de8e4729cf6e27b11f90211b955.zip |
fix calculation of variable
thanks to Alexander Demidenko
Diffstat (limited to 'lib/ssh/src/ssh_cli.erl')
-rw-r--r-- | lib/ssh/src/ssh_cli.erl | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/ssh/src/ssh_cli.erl b/lib/ssh/src/ssh_cli.erl index 2c8e515a14..41febf9707 100644 --- a/lib/ssh/src/ssh_cli.erl +++ b/lib/ssh/src/ssh_cli.erl @@ -349,7 +349,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], |