Changeset 796


Ignore:
Timestamp:
Apr 30, 2004, 5:52:46 PM (21 years ago)
Author:
Gary Byers
Message:

Get rid of some (very) old code. CENTER-TEXT-PANE via Cocoa.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ccl/hemlock/src/command.lisp

    r774 r796  
    6464  With prefix argument, insert the character that many times."
    6565  "Reads a key-event from *editor-input* and inserts it at the point."
    66   (hi::add-one-shot-event-mode-function
    67    #'(lambda (key-event)
    68             (let* ((char (hemlock-ext:key-event-char key-event))
    69                    (point (current-point)))
    70               (unless char (editor-error "Can't insert that character."))
    71               (if (and p (> p 1))
    72                 (insert-string point (make-string p :initial-element char))
    73                 (insert-character point char))))))
     66  (let ((char (hemlock-ext:key-event-char (get-key-event *editor-input* t)))
     67        (point (current-point)))
     68    (unless char (editor-error "Can't insert that character."))
     69    (if (and p (> p 1))
     70        (insert-string point (make-string p :initial-element char))
     71        (insert-character point char))))
    7472
    7573(defcommand "Forward Character" (p)
     
    352350;;;
    353351(defcommand "Refresh Screen" (p)
    354   "Refreshes everything in the window, centering current line.
    355    Given an argument, scroll that many lines."
    356   "Refreshes everything in the window, centering current line.
    357    Given an argument, scroll that many lines."
    358   (let ((window (current-window)))
    359     (cond ((not p) (center-window window (current-point)))
    360           ((zerop p) (line-to-top-of-window-command nil))
    361           ((line-offset (window-display-start window)
    362                         (if (plusp p) (1- p) (1+ p))
    363                         0))
    364           (t (editor-error "Not enough lines."))))
    365   (unless p (redisplay-all)))
     352  "Refreshes everything in the window, centering current line."
     353  "Refreshes everything in the window, centering current line."
     354  (declare (ignore p))
     355  (center-text-pane (current-window)))
    366356
    367357
Note: See TracChangeset for help on using the changeset viewer.