home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Simtel MSDOS 1992 September
/
Simtel20_Sept92.cdr
/
msdos
/
editor
/
me_cd.arc
/
WSCROLL.MUT
< prev
next >
Wrap
Text File
|
1988-03-01
|
1KB
|
42 lines
;; wscroll.mut : horzontal window scrolling
;; scroll-right, scroll-left
;; Manually scroll the current window horizontally.
;; Trys to keep the cursor on screen to prevent the update routines
;; from undoing the scroll.
;; cursor-is-right, cursor-is-left
;; Shift the window so that the cursor is at the right or left
;; margin (if possible).
;; C Durland
(defun
scroll-right
{
(int n)(n (window-ledge -1))
(if (== (- (current-column) n)(screen-width))
(previous-character))
(window-ledge -1 (if (> n 0)(- n 1)(0)))
}
scroll-left
{
(int n)(n (+ (window-ledge -1) 1))
(if (== (current-column) n)(next-character))
(window-ledge -1 n)
}
cursor-is-left
{
(int n)
(if (< (n (- (current-column) 2)) 0) (n 0))
(window-ledge -1 n)
}
cursor-is-right
{
(int n)
(n (- (current-column)(screen-width) -1)) ; screen column
(if (< n 0) (n 0))
(window-ledge -1 n)
}
)
;(bind-to-key "cursor-is-left" "^X<")
;(bind-to-key "cursor-is-right" "^X>")