[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Scroll to line
- To: firstname.lastname@example.org
- Subject: Re: Scroll to line
- From: email@example.com
- Date: Thu, 9 Jan 1992 22:13:21 -0500
- Cc: info-mcl
>Can anyone send me any code that could implement scrolling to a
>particular line within a fred-window buffer? I have had no luck
>in hacking out my own version of this function, and it is pretty
>critical to the success of my current application.
> -- Luke
Here's some code that will put a specified character position at
the top of the display. It won't stay there for long unless the
insertion point is visible (e.g. you will probably want to move the
insertion point as well).
; Make the first displayed character be at position POS in the buffer.
; Redisplay right away if UPDATE? is true.
(defobfun (set-display-mark *fred-window*) (pos &optional update?)
(prog1 (set-mark (ccl::wpos-mark (objvar ccl::edwin)) pos)
(when update? (ccl::edwin-update (objvar ccl::edwin)))))