Skip to content
Snippets Groups Projects
Commit 4faebdab authored by chiles's avatar chiles
Browse files

Deleted unused function TTY-FIND-BIGGEST-HUNK.

Modified TTY-DELETE-WINDOW to be consistent with TTY-MAKE-WINDOW's creation
policy; that is, if the latter makes window by putting the new one after some
hunk it shrunk to make room, then the former should prefer to grow the previous
hunk, not the next.  This was the intended behavior.
parent f60b9da0
No related branches found
No related tags found
No related merge requests found
......@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;;
(ext:file-comment
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/tty-screen.lisp,v 1.6 1991/09/26 09:16:20 wlott Exp $")
"$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/hemlock/tty-screen.lisp,v 1.7 1991/10/08 14:45:37 chiles Exp $")
;;;
;;; **********************************************************************
;;;
......@@ -285,19 +285,6 @@
(setf *screen-image-trashed* t)
new-window))))
(defun tty-find-biggest-hunk (device)
(let* ((top-hunk (device-hunks device))
(hunk (device-hunk-next top-hunk))
(max-size 0)
biggest)
(declare (fixnum max-size))
(loop
(when (> (the fixnum (device-hunk-height hunk)) max-size)
(setf max-size (device-hunk-height hunk))
(setf biggest hunk))
(when (eq hunk top-hunk) (return biggest))
(setf hunk (device-hunk-next hunk)))))
;;;; Deleting a window
......@@ -313,17 +300,17 @@
(setf (buffer-windows buffer) (delq window (buffer-windows buffer))))
(let ((new-lines (device-hunk-height hunk)))
(declare (fixnum new-lines))
(cond ((eq next (device-hunks (device-hunk-device next)))
(cond ((eq hunk (device-hunks (device-hunk-device next)))
(incf (device-hunk-height next) new-lines)
(incf (tty-hunk-text-height next) new-lines)
(let ((w (device-hunk-window next)))
(change-window-image-height w (+ new-lines (window-height w)))))
(t
(incf (device-hunk-height prev) new-lines)
(incf (device-hunk-position prev) new-lines)
(incf (tty-hunk-text-height prev) new-lines)
(incf (tty-hunk-text-position prev) new-lines)
(let ((w (device-hunk-window prev)))
(change-window-image-height w (+ new-lines (window-height w)))))
(t
(incf (device-hunk-height next) new-lines)
(incf (tty-hunk-text-height next) new-lines)
(let ((w (device-hunk-window next)))
(change-window-image-height w (+ new-lines (window-height w)))))))
(when (eq hunk (device-hunks device))
(setf (device-hunks device) next)))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment