diff options
Diffstat (limited to 'chess-ics2.el')
| -rw-r--r-- | chess-ics2.el | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/chess-ics2.el b/chess-ics2.el index a052bea..18ff7dc 100644 --- a/chess-ics2.el +++ b/chess-ics2.el @@ -169,13 +169,20 @@ PERSPECTIVE is t for white or nil for black." (goto-char pos))) (defun chess-ics2-highlight (index &optional mode) - (let ((pos (chess-display-index-pos nil index))) + (let ((pos (chess-display-index-pos nil index)) + (piece (chess-pos-piece (chess-display-position nil) index))) (put-text-property pos (save-excursion (goto-char (+ pos 2)) (point)) 'face (cond ((eq mode :selected) 'chess-ics2-highlight-face) + ((eq mode :unselected) + (if (> piece ?a) + (if (= a 0) 'chess-ics2-black-face + 'chess-ics2-black-face-alt) + (if (= a 0) 'chess-ics2-white-face + 'chess-ics2-white-face-alt))) (t (chess-display-get-face mode)))))) |
