* Re: C-p on second line in shell-mode moves to beginning of buffer
[not found] <43456064.4090505@gmx.de>
@ 2005-10-17 4:33 ` Richard M. Stallman
2005-10-18 12:22 ` Sven Joachim
0 siblings, 1 reply; 2+ messages in thread
From: Richard M. Stallman @ 2005-10-17 4:33 UTC (permalink / raw)
Cc: emacs-devel
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.
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: C-p on second line in shell-mode moves to beginning of buffer
2005-10-17 4:33 ` C-p on second line in shell-mode moves to beginning of buffer Richard M. Stallman
@ 2005-10-18 12:22 ` Sven Joachim
0 siblings, 0 replies; 2+ messages in thread
From: Sven Joachim @ 2005-10-18 12:22 UTC (permalink / raw)
Cc: emacs-devel
Richard M. Stallman wrote:
> 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?
It seems so, yes. Thank you. :-)
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2005-10-18 12:22 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <43456064.4090505@gmx.de>
2005-10-17 4:33 ` C-p on second line in shell-mode moves to beginning of buffer Richard M. Stallman
2005-10-18 12:22 ` Sven Joachim
Code repositories for project(s) associated with this public inbox
https://git.savannah.gnu.org/cgit/emacs.git
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).