jquast / blessed

Blessed is an easy, practical library for making python terminal apps

Home Page:http://pypi.python.org/pypi/blessed

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Sequences \x1b[0K and \x1b[2K not detected

jquast opened this issue · comments

From http://invisible-island.net/xterm/ctlseqs/ctlseqs.html

CSI Ps K  Erase in Line (EL).
            Ps = 0  -> Erase to Right (default).
            Ps = 1  -> Erase to Left.
            Ps = 2  -> Erase All.

Fail

In [7]: Sequence('\x1b[0K', blessed.Terminal()).length()
Out[7]: 3
In [9]: Sequence('\x1b[2K', blessed.Terminal()).length()
Out[9]: 3

Pass

In [8]: Sequence('\x1b[1K', blessed.Terminal()).length()
Out[8]: 0
In [10]: Sequence('\x1b[K', blessed.Terminal()).length()
Out[10]: 0

fixed in release 1.14.2.