emacs-elpa-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[elpa] master 88e48d8 4/4: [gnugo] Fix bug: Don't clobber dead-group ind


From: Thien-Thi Nguyen
Subject: [elpa] master 88e48d8 4/4: [gnugo] Fix bug: Don't clobber dead-group indication on refresh.
Date: Sat, 11 Feb 2017 17:07:04 -0500 (EST)

branch: master
commit 88e48d8cd511b76592c0759e31179375cb86bab5
Author: Thien-Thi Nguyen <address@hidden>
Commit: Thien-Thi Nguyen <address@hidden>

    [gnugo] Fix bug: Don't clobber dead-group indication on refresh.
    
    Previously, when in game-over and w/ Gnugo Image Display mode
    enabled, ‘C-u C-l’ would clobber the overlays used to indicate
    stones in a dead group, and the only way revive the indication
    would be to toggle Gnugo Image Display mode.  With this change,
    dead-group indication persists ‘C-u C-l’.
    
    * packages/gnugo/gnugo.el (gnugo-image-display-mode):
    Call ‘gnugo-refresh’ w/ arg NOCACHE ‘t’;
    move dead-group overlays deletion from here...
    (gnugo-refresh): ...to here; conditionalize on NOCACHE.
---
 packages/gnugo/gnugo.el | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/packages/gnugo/gnugo.el b/packages/gnugo/gnugo.el
index 91460765..1503f72 100644
--- a/packages/gnugo/gnugo.el
+++ b/packages/gnugo/gnugo.el
@@ -1033,6 +1033,10 @@ its move."
          (inhibit-read-only t)
          window last)
     (when (and nocache (not (gnugo-get :waiting)))
+      ;; (search-forward "pall of death")
+      (dolist (group (gnugo-aqr 'dead game-over))
+        (mapc 'delete-overlay (cdar group))
+        (setcdr (car group) nil))
       (gnugo-propertize-board-buffer))
     ;; last move
     (when move
@@ -1927,11 +1931,7 @@ See function `display-images-p' and variable 
`gnugo-xpms'."
                            (gnugo-get :imul)
                          '(1 . 1)))
        (gnugo-put :display-using-images bool)
-       ;; a kludge to be reworked another time perhaps by another gnugo.el 
lover
-       (dolist (group (gnugo-aqr 'dead (gnugo-get :game-over)))
-         (mapc 'delete-overlay (cdar group))
-         (setcdr (car group) nil))
-       (save-excursion (gnugo-refresh))))))
+       (save-excursion (gnugo-refresh t))))))
 
 (defsubst gnugo--node-with-played-stone (pos &optional noerror)
   (car (gnugo--mem-with-played-stone pos noerror)))



reply via email to

[Prev in Thread] Current Thread [Next in Thread]