Fix occasional errors from jumping to an off-screen error location

This commit is contained in:
John Lorentzson 2025-07-31 11:37:38 +02:00
parent ff2d31d9ed
commit 5032ee73e8

View file

@ -293,7 +293,8 @@ serial connection the editor normally runs under.")
:do (error "No such line number ~D" line)
:when (eql line (line-number line-obj))
:return line-obj))
(setf (cursor-column cursor) column))
(setf (cursor-column cursor) column)
(update-buffer-cursor (buffer cursor)))
@ -807,16 +808,16 @@ Additionally ensures correct line numbers on the way, as a bonus."
(defun compile-fail-prompt (text line col)
(declare (optimize (debug 3)))
(clear-screen)
(move-cursor 1 0)
(format *eio* "~A~%~%RET: Go there.~%Anything else: Ignore." text)
(force-output *eio*)
(let ((key (get-input-sequence)))
(if (equal '(:C . #\j) key)
(cursor-go-to (cursor *editor*) line col)
(format t "~A~%" key)))
(clear-screen)
(redisplay-view (current-view *editor*)))
(if (and (integerp line) (integerp col)
(equal '(:C . #\j) key))
(cursor-go-to (cursor *editor*) line col)
(redisplay-view (current-view *editor*)))))
(defparameter *refresh-asm-functions-p* #+swank t #-swank nil
"If non-NIL, reload asm function addresses from listing before every compile.")