Skip to content

donkey 1.14.1 — a banked line no longer disappears under hl-line-mode

Choose a tag to compare

@YardQuit YardQuit released this 18 Sep 19:24
· 166 commits to master since this release
aa84769

A bug fix release, from a report that banking looked broken in a
configuration with the current-line highlight turned on.

It was. m l puts a line aside and highlights it, and hl-line-mode
draws a band across the line point is on. Both are overlays, both
cover exactly the same whole line, and both sat at priority -50.
Emacs is explicit about that case: when two overlays share a priority
and neither is nested in the other, which one shows is not something
you may assume. So the bank you had just made was there or it was not,
decided by nothing either package controls — measured over 200 banks
in a stock Emacs, the band hid the bank 116 times, and in one real
configuration 55 times in 100.

Fixed — you will notice these

  • m l — a banked line shows its own highlight whenever
    hl-line-mode or global-hl-line-mode is on. It used to show it
    about half the time and show the current-line band the rest, with
    nothing to tell you which run you were in; a line you had banked
    simply looked unbanked. Nothing else about banking changed: the
    keys, the counts, the messages, and what y, d and p spend are
    all as they were, and a line that is both banked and selected still
    shows the selection.

Under the hood

  • A bank now sits at overlay priority -25, between the current-line
    band at -50 and the region. Two other highlights live in that band
    and are drawn under a bank as a result: the current line gud draws
    while debugging, which is off unless you set
    gud-highlight-current-line, and the next-error message
    highlight, which is transient. Everything else in stock Emacs sits
    above a bank and is unaffected.
  • Two tests pin the new order: one that the band cannot hide a bank in
    either creation order, one that a bank cannot hide the live
    selection.

Upgrading

Nothing to do. No option, key or command changed.