[Top][All Lists]

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

scrolling region error in term.el

From: Jim Mintha
Subject: scrolling region error in term.el
Date: Mon, 26 Dec 2005 16:16:28 +0100


I run mutt inside emacs using "ansi-term".  This has always worked
fine since emacs 20.  When I tried the current CVS for emacs 22 the
scrolling would mess up when I had a split screen (I use the mutt
option set pager_index_lines=10, which leaves an index at the top and
show the messages at the bottom)

I took some time to debug it and found the problem.  Basically mutt
creates a scrolling region at the top of the screen for the index.
Scrolling down work fine (cursor is placed at the bottom of the
scrolling region, a "scroll forward" (^[D) is sent, the region scrolls
and everything is good.  However moving up the list, mutt position the
cursor at the top of the scrolling region and a "scroll reversed" (^[M)
is sent.  Instead scrolling the lines in the region down, all the
lines on the screen are scrolled down.  

Comparing older versions of term.el the "scroll reversed" used to be:
(emacs 21.4 term.el line 2870:)
                           ((eq char ?M) ;; scroll reversed
                            (term-insert-lines 1)
                            (setq term-terminal-state 0))

and is now:
(emacs 22.0.50 term.el line 2895)
                         ((eq char ?M) ;; scroll reversed (terminfo: ri)
                          (term-down -1)
                          (setq term-terminal-state 0))

I changed the (term-down -1) back to (term-insert-lines 1) and then
everything works the way it should.  term-down has a third argument
"check-for-scroll", but setting that to true doesn't seem to help

Hopefully this helps.  I do have a test case (captured escape
sequences) that illustrate the problem if that is needed.


In GNU Emacs (i686-pc-linux-gnu, GTK+ Version 2.6.4)
 of 2005-12-22 on dimaggio
X server distributor `The XFree86 Project, Inc', version 11.0.40300001
configured using `configure '--with-x-toolkit=gtk''

Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: en_US
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: nil
  locale-coding-system: iso-8859-1
  default-enable-multibyte-characters: t

Major mode: Info

Minor modes in effect:
  display-time-mode: t
  tooltip-mode: t
  auto-compression-mode: t
  mouse-wheel-mode: t
  menu-bar-mode: t
  file-name-shadow-mode: t
  global-font-lock-mode: t
  font-lock-mode: t
  blink-cursor-mode: t
  unify-8859-on-encoding-mode: t
  utf-translate-cjk-mode: t
  size-indication-mode: t
  line-number-mode: t
  transient-mark-mode: t

Recent input:
<left> C-h <f1> C-h i C-s b u g s <backspace> <home> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <C-return> <right> <right> 
<return> / C-s b u g C-s C-a <right> <right> <C-return> 
<return> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <down> <down> <down> <down> <down> <down> <down> 
<down> <up> <right> <right> <down> <down> <down> <up> 
<up> <C-return> <return> ] <escape> x r e p o r t - 
e m a c s - b u g <return>

Recent messages:
Loading info...
Loading easymenu...done
Loading info...done
Composing main Info directory...done
Mark saved where search started
Mark set
Mark saved where search started
Loading emacsbug...
Loading regexp-opt...done
Loading emacsbug...done

reply via email to

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