🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

1 total messages Started by Brian L. Kahn Tue, 22 Jun 1993 21:00
Stuck cursor mode - fix
#891
Author: Brian L. Kahn
Date: Tue, 22 Jun 1993 21:00
20 lines
1437 bytes
I finally fired up the debugger and tracked down a problem I have had
with "stuck cursor mode" in which the cursor gets stuck in at the left
hand edge of the window after breaking out of y-or-n-p with a ^G.

My problem was caused by the use of after-update-hook, but I suspect
the problem can also be triggered by other hooks, particularly the
after change hooks.  The hook gets invoked in the middle of the abort
(exiting y-or-n-p with ^G) which induces the bug.  Workaround follows:

;; ignore hook during y-or-n-p processing
(defvar real-y-or-n-p (symbol-function 'y-or-n-p))
(defun y-or-n-p (&rest args)
  "Protect y-or-n-p from after-update-hook"
  (let ((after-update-hook nil))
    (apply real-y-or-n-p args)
    ))

--
B<   Brian Kahn   blk@mitre.org   "may the farce be with you"
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads