Changeset 12406


Ignore:
Timestamp:
Jul 14, 2009, 4:02:03 AM (10 years ago)
Author:
mikel
Message:

Fixed bug reported in the new Listener code:

Text copied down to the input from previous inputs or output no longer evaluates immediately, but is instead simply copied to input, and point is moved to the end of it. The complaint was that immediatel eval foreclosed the possibility of editing the previous input.

Still working on fixing scrolling bug and spurious insertion of newlines.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/cocoa-ide/hemlock/src/listener.lisp

    r12401 r12406  
    248248          (hemlock-ext:send-string-to-listener (current-buffer) string))))))
    249249
    250 (defun send-region-to-lisp (region)
     250(defun copy-region-to-input (region)
    251251  (let* ((region-string (when region (region-to-string region))))
    252252    (with-mark ((input-mark (value buffer-input-mark)))
    253253      (move-mark (current-point) input-mark)
    254254      (insert-string (current-point) region-string)
    255       (send-input-region-to-lisp))))
     255      (buffer-end (current-point)))))
    256256
    257257(defun find-backward-form (mark)
     
    300300        forward-region)))
    301301
    302 (defun send-expression-at-point-to-lisp ()
     302(defun copy-expression-at-point-to-input ()
    303303  (let* ((nearest-form-region (mark-nearest-form (current-point))))
    304304    (if nearest-form-region
    305         (send-region-to-lisp nearest-form-region)
     305        (copy-region-to-input nearest-form-region)
    306306        (beep))))
    307307
     
    314314      (if (region-active-p)
    315315          (let ((selected-region (current-region nil nil)))
    316             (send-region-to-lisp selected-region))
     316            (copy-region-to-input selected-region))
    317317          (let ((prior-region (input-region-containing-mark (current-point) (value input-regions))))
    318318            (if prior-region
    319                 (send-region-to-lisp prior-region)
    320                 (send-expression-at-point-to-lisp))))))
     319                (copy-region-to-input prior-region)
     320                (copy-expression-at-point-to-input))))))
    321321
    322322
Note: See TracChangeset for help on using the changeset viewer.