stripe-buffer
stripe-buffer copied to clipboard
Table striping doesn't play nice with hl-line-mode
When using stripe-table-mode the table row highlighting interferes with line highlighting from hl-line-mode.
It looks like this is handled by adjusting the hl-line overlay priority here, but this applies only to stripe-buffer-mode and not stripe-table-mode.
Looks like just checking for either mode in the existing advice works fine:
(when (or stripe-buffer-mode stripe-table-mode)
Looks like just checking for either mode in the existing advice works fine:
(when (or stripe-buffer-mode stripe-table-mode)
This workaround (or more accurately, increasing hl-line-overlay priority) causes other problems (e.g. hl-line face covers region face). Here is a better solution:
;; Decrease sb/overlay priority
(defadvice sb/redraw-region (after stripe-set-priority activate)
(when (or stripe-buffer-mode stripe-table-mode)
(dolist (overlay sb/overlays)
(overlay-put overlay 'priority -100))))