diff options
author | Glauber Campinho <[email protected]> | 2017-08-29 01:22:54 +0200 |
---|---|---|
committer | Glauber Campinho <[email protected]> | 2017-09-01 22:50:00 +0200 |
commit | 1e57f7471d60d60d9c837051d4625a35d779c520 (patch) | |
tree | a4d318c5dd5e14bf797b49ba830b69c7053be9d7 /lib/compiler/src | |
parent | 145f2e9cc5ce4970ca82bb517d0b0a9860db5afd (diff) | |
download | otp-1e57f7471d60d60d9c837051d4625a35d779c520.tar.gz otp-1e57f7471d60d60d9c837051d4625a35d779c520.tar.bz2 otp-1e57f7471d60d60d9c837051d4625a35d779c520.zip |
Make cp_pos_to_col function aware of the ANSI escape codes
This fixes the issue with the function `move_cursor` described in #1536 and that causes the bug described in https://github.com/elixir-lang/elixir/issues/6504.
The function `cp_pos_to_col` maps the current position in the buffer to the correct column on the screen, but it didn't handle ANSI escape codes. Since the ANSI escape codes aren't visible, the `cp_pos_to_col` now skips them when executing the calculations using `ansi_escape_width`. This new function only considers color escape codes, but also handles invalid codes.
Diffstat (limited to 'lib/compiler/src')
0 files changed, 0 insertions, 0 deletions