From 22b320f4417440147f8ef74d7e17dcc9948c1924 Mon Sep 17 00:00:00 2001 From: PatR Date: Mon, 3 May 2021 13:50:48 -0700 Subject: [PATCH] fix github issue #499 - perm_invent menu_headings 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 | 4 +++- win/curses/cursinvt.c | 3 ++- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/doc/fixes37.0 b/doc/fixes37.0 index 77318ab9b..907fcbd04 100644 --- a/doc/fixes37.0 +++ b/doc/fixes37.0 @@ -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 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 diff --git a/win/curses/cursinvt.c b/win/curses/cursinvt.c index 277d43d9d..221902419 100644 --- a/win/curses/cursinvt.c +++ b/win/curses/cursinvt.c @@ -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;