diff options
author | Henrik Nord <[email protected]> | 2014-01-14 14:33:53 +0100 |
---|---|---|
committer | Henrik Nord <[email protected]> | 2014-01-14 14:33:56 +0100 |
commit | e77f48d8278d037191ceec1ec5906081b815c408 (patch) | |
tree | db7e84b40724577d2f557db96a1010360172db21 /lib | |
parent | 46574af4f4c8c9c0b0e88fb2c7ce55247a0071fd (diff) | |
parent | 2a0a8447390c0de8e4729cf6e27b11f90211b955 (diff) | |
download | otp-e77f48d8278d037191ceec1ec5906081b815c408.tar.gz otp-e77f48d8278d037191ceec1ec5906081b815c408.tar.bz2 otp-e77f48d8278d037191ceec1ec5906081b815c408.zip |
Merge branch 'ad/ssh_expand_test'
* ad/ssh_expand_test:
fix calculation of variable thanks to Alexander Demidenko
OTP-11566
Diffstat (limited to 'lib')
-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], |