[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: C-p on second line in shell-mode moves to beginning of buffer
From: |
Richard M. Stallman |
Subject: |
Re: C-p on second line in shell-mode moves to beginning of buffer |
Date: |
Mon, 17 Oct 2005 00:33:32 -0400 |
In shell-mode, when point is on the second line (no matter which
column), C-p (`previous-line') moves point to the beginning of the
buffer. How comes that?
Does this patch give good results?
*** simple.el 16 Oct 2005 10:41:23 -0400 1.755
--- simple.el 17 Oct 2005 00:17:41 -0400
***************
*** 3541,3550 ****
;; Compute the end of the line
;; ignoring effectively invisible newlines.
(save-excursion
! (end-of-line)
(while (and (not (eobp)) (line-move-invisible-p (point)))
(goto-char (next-char-property-change (point)))
! (end-of-line))
(point))))
;; Move to the desired column.
--- 3541,3551 ----
;; Compute the end of the line
;; ignoring effectively invisible newlines.
(save-excursion
! ;; Like end-of-line but ignores fields.
! (skip-chars-forward "^\n")
(while (and (not (eobp)) (line-move-invisible-p (point)))
(goto-char (next-char-property-change (point)))
! (skip-chars-forward "^\n"))
(point))))
;; Move to the desired column.
- Re: C-p on second line in shell-mode moves to beginning of buffer,
Richard M. Stallman <=