From 4faebdab5883d5b708b88c58674e8008c1ac158e Mon Sep 17 00:00:00 2001 From: chiles <chiles> Date: Tue, 8 Oct 1991 14:45:37 +0000 Subject: [PATCH] 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. --- hemlock/tty-screen.lisp | 27 +++++++-------------------- 1 file changed, 7 insertions(+), 20 deletions(-) diff --git a/hemlock/tty-screen.lisp b/hemlock/tty-screen.lisp index 240f32bd8..896e6f449 100644 --- a/hemlock/tty-screen.lisp +++ b/hemlock/tty-screen.lisp @@ -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))) -- GitLab