Age | Commit message (Collapse) | Author |
|
Some programs (e.g. ncmpc) do not like receiving a terminal of unknown
size. Before we issue the resizepty method that would be the case. Since
there was no synchronisation between resizepty and execvp, a program
that starts quickly could run into this situation. Now we ensure that
resizepty is called before execvp using an extra pipe.
|
|
On FreeBSD, curses.tigetstr('acsc') will return None unless Python is
built against ncurses.
Reported-By: Klaus Aehlig <aehlig@linta.de>
|
|
Ansi is vague about the meaning of the OSC sequences (i.e.,
the control sequences starting with <esc> ]): the interpretation is
up to the operating system. Nevertheless, some programs send these
sequences, most prominently the one to set the terminal title (OSC 0;).
So make tcvt aware of those sequences and pass them through.
Signed-off-by: Helmut Grohne <helmut@subdivi.de>
|
|
|
|
This improves performance of output-heavy workloads (e.g. the time it
takes to run find on a large tree) by 10% on CPython 2.7.
|
|
When the number of columns wasn't exactly 2 (the default), adding a
character at the end of the window could fail at scrolling thus yielding
corrupted output.
|
|
One advantage of doing so is that the main function becomes simpler.
Another advantage is that the Terminal class has better knowledge of
when refreshes are actually needed. It also means that one more refresh
call can be coalesced into the logic. The major downside is that it
requires annotating all screen operations.
|
|
Wrap the management of the sub process in a new class ForkPty. This
reduces the length and number of variables in the main function. Turn it
into a context manager to allow closing the masterfd and actually
waiting for the forked child (rather than reparenting it to init on
exit). This also allows propagating the exit code. Document the new exit
semantics.
|
|
|
|
Reported-By: Alfredo Canziani <alfredo.canziani@gmail.com>
|
|
In this way, for long dialoges (e.g., shell, ed) the focus
is in the lower left corner of the screen---the same as for
one-column terminals. Therefore, users used to that focus
can use this option to avoid changing reading habits.
|
|
|
|
|
|
|
|
|
|
Implement terminfo capabilities as do_CAP on the Terminal class. This is
a bit more generic and might allow to pull the parsing from terminfo at
some point.
|
|
With bytearrays there is no need for hacks specific to the Python
version such as byte_sequence.
|
|
We don't gain anything here, because the emulated terminal does not
support these keys. Should we switch the emulated terminal, this
immediately helps.
|
|
Most applications do a full redraw on WINCH anyway. A shell doesn't and
looks ugly.
|
|
* The switch to single column on WINCH was a bad idea.
* The new window would get old dimensions, because we would
reinitialize windows before curses noticed the new dimensions.
|
|
|
|
|
|
|
|
|
|
We now get the characters from terminfo "acsc".
|
|
Thereby we avoid accidentally treating graphics chars as regular chars,
just because they were not yet implemented.
|
|
This makes aptitude work.
Reported-By: Axel Beckert
|
|
|
|
Most often this feature comes at an inconvenient time. If a key turns
out dysfunctional, export TCVT_DEVEL=1 to see the value of the key.
|
|
|
|
The TwoColumn class is renamed to Columns since it now has a
configurable number of columns. Note that this support is not to the
command line yet.
|
|
|
|
|
|
|
|
|
|
|
|
This enables running tcvt inside tcvt resulting in four non-linearly
ordered columns.
|
|
Previously it would refresh after at most 1024 bytes of output. With a
slow terminal and much output this can be very annoying. So now we only
refresh when there is no more output or a tenth of a second has passed
since the last output.
|
|
|
|
|
|
|
|
|
|
Executes tcvt iff the resulting width is at least 80 chars.
|
|
|
|
|
|
|
|
|