Subject: 23.1.50; term-previous-input and split windows

From: Stephen Berman <[email-masked]>
Date: Mon, 05 Oct 2009 00:07:02 +0200

1. emacs -Q
2. Type M-x term RET to bring up the *terminal* buffer in term-mode
   (/bin/bash here, if that's significant).
3. Type RET to put point on line 2 of the *terminal* buffer.
4. Type C-c 2 to make split windows (or any other command that makes
   split windows, e.g. C-c 3, C-c C-b, etc.).
5. Type M-p to insert previous input.
=> The cursor in the selected *terminal* buffer jumps to the beginning
   of the buffer instead of staying at the end of the inserted input.

This only happens if the *terminal* buffer has at least two displayed
lines (step 3).  Any further term-* command restores the cursor to the
correct position.  The cursor displacement also happens if the frame is
unsplit after step 5, i.e. C-c 1 followed by M-p (but not if the frame
is unsplit between steps 4 and 5).

This problem also happens with Emacs 22.

In GNU Emacs 23.1.50.2 (i686-pc-linux-gnu, GTK+ Version 2.14.4)
 of 2009-10-03 on escher
Windowing system distributor `The X.Org Foundation', version 11.0.10502000
Important settings:
  value of $LC_ALL: nil
  value of $LC_COLLATE: nil
  value of $LC_CTYPE: nil
  value of $LC_MESSAGES: nil
  value of $LC_MONETARY: nil
  value of $LC_NUMERIC: nil
  value of $LC_TIME: nil
  value of $LANG: en_US.UTF-8
  value of $XMODIFIERS: @im=local
  locale-coding-system: utf-8-unix
  default enable-multibyte-characters: t