]> granicus.if.org Git - nethack/commitdiff
fix github issue #499 - perm_invent menu_headings
authorPatR <rankin@nethack.org>
Mon, 3 May 2021 20:50:48 +0000 (13:50 -0700)
committerPatR <rankin@nethack.org>
Mon, 3 May 2021 20:50:48 +0000 (13:50 -0700)
Implementation of '|'/#perminv command for scrolling perm_invent
deliberately disabled menu_headings (video attribute for object
class separator lines) on the persistent inventory window under
curses.  I don't recall why (possibly because it isn't actually
a menu) but there's no compelling need to do that, so reinstate
heading attributes.

Fixes #499

doc/fixes37.0
win/curses/cursinvt.c

index 77318ab9b75fc07ee47f225932adc87c6747194f..907fcbd0452cf005a908ef3be8b23f3a6aeda5c8 100644 (file)
@@ -1,4 +1,4 @@
-NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.519 $ $NHDT-Date: 1619919402 2021/05/02 01:36:42 $
+NHDT-Branch: NetHack-3.7 $:$NHDT-Revision: 1.520 $ $NHDT-Date: 1620075044 2021/05/03 20:50:44 $
 
 General Fixes and Modified Features
 -----------------------------------
@@ -651,6 +651,8 @@ curses: line input that doesn't take place on the bottom line of the message
        a character "^["; have the popup version of getlin() fake the usual
        ESC handling, but player has to type <escape><return> for that to work
 curses: menu headings didn't use default text color
+curses: #perminv changes disabled menu_headings attribute for persistent
+       inventory window headings; reinstate that
 Qt: at Xp levels above 20 with 'showexp' On, the combined status field
        "Level:NN/nnnnnnnn" was too big and truncated by a char at each end
 Qt: searching a text window for something that wasn't found and then searching
index 277d43d9d88a165710305e2e6c951300993ac933..22190241946d4001e5fb43f934ba013472ec7490 100644 (file)
@@ -296,7 +296,8 @@ curs_add_invt(
     }
 
     newelement.invtxt = dupstr(str);
-    newelement.c_attr = attr ? A_NORMAL : NONE; /* override menu_headings */
+    newelement.c_attr = attr; /* note: caller has already converted 'attr'
+                               * from tty-style attribute to curses one */
     newelement.letter = accelerator;
     aptr[pi.inuseindx++] = newelement;