emacs-pretest-bug
[Top][All Lists]
Advanced

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

M-x term off-by-one problem in ESC[xM processing?


From: Mark Plaksin
Subject: M-x term off-by-one problem in ESC[xM processing?
Date: Mon, 12 Jun 2006 22:20:13 -0400
User-agent: Gnus/5.110006 (No Gnus v0.6) Emacs/22.0.51 (gnu/linux)

Hiho:

- Save the attached file as 'testfile'
- Create a 125x23 M-x term window (same problem with 80x23) .
- At the shell prompt, run 'vi testfile' with the attached file 
- Type C-d to tell vi to scroll down
- The first line will contain "12" and you'll see that the line for "22" is
blank.  That blank line is the problem.

The problem seems to be in term-delete-lines (or the argument passed to it
from the `M' case of term-handle-ansi-escape).  In edebug these lines from
term-delete-lines move point down one too few lines and then insert a
newline which wipes out "22":

    (term-down (- term-scroll-end save-current-row lines))
    (term-insert-char ?\n lines)

I'm using Debian GNU/Linux unstable.

Here's a snippet of M-xterm log (from term-start-output-log); I replaced
ESC characters with '^[' and Ctrl-M with '^M'.  It seems like the
processing of '^[[11M' is the problem:

^[[1;22r^[[1;1H^[[11M^[[1;23r^[[12;1H23^M
24^M
25^M
26^M
27^M
28^M
29^M
30^M
31^M
32^M
33^[[1;1H

Thanks!

Attachment: vim.how.to.break.vim
Description: Text document


reply via email to

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