[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Few enhancements to ansi-term

From: John Shahid
Subject: Few enhancements to ansi-term
Date: Tue, 30 Apr 2019 13:21:06 -0400
User-agent: mu4e 1.1.0; emacs 27.0.50

This is a follow up to this thread [1] where I proposed some changes to
ansi-term to get rid of `term-suppress-hard-newline'.

In that thread Stefan proposed adding an assertion to ensure the code
only removes line-wrap newlines.  This assertion I think is useful but
turned out to be problematic for me.  I would accidentally insert a
character in the term buffer.  For example, I would sometimes type `p'
instead of `C-p' to go up a line, which ends up adding a `p' to the
buffer.  The inserted character would inherit the text property and
generate assertion error when I resize the terminal window.  I attached
a patch to make the line-wrap newlines have the `rear-nonsticky' to
prevent it from extending to nearby characters.

The other issue I ran into is having `term-scroll-with-delete' randomly
getting set to `t'.  This causes the terminal to truncate text that grow
past of the top of the terminal, as opposed to letting it accumulate in
the buffer.  For example assuming the terminal is 3 lines high and I cat
a 5 lines file, normally the terminal buffer will keep all 5 lines while
showing the last 3.  When `term-scroll-with-delete' gets turned on, the
terminal buffer will be limited to the last 3 lines and the first 2
lines will get deleted, as in gone from the history.

[1]: https://lists.gnu.org/archive/html/emacs-devel/2019-02/msg00766.html

reply via email to

[Prev in Thread] Current Thread [Next in Thread]