curses 'perm_invent' fixes

I noticed the wrapping issue while testing out the 'bad fruit' fix,
then the other things while fixing it.

1) inventory entries too wide for narrow persistent inventory window
   wrapped without any control; normally can't be seen except for the
   last entry when the list is short enough to leave at least one line
   available; it looked fairly reasonable with window borders Off, but
   when On the last char of the first line and first char of second
   line were clobbered by the border box;
2) when there were too many entries to fit within the height, those
   after the last one which fit were appended to it for borders Off
   (or written on bottom line and then overwritten by the border box
   for borders On); noticed because the selector letter is highlighted
   with inverse video, even when written at an unexpected place;
3) suppress the inverse video hightlighting of inventory letters since
   they can't be selected from that 'menu';
4) for borders Off, the top line was left blank as if a border was
   going to be drawn there;
5) since the entries are truncated due to the narrow window (on a
   modest sized display), strip off leading "a", "an", or "the" prefix
   for inventory entries (written to curses perm_invent window only);
   lets a couple more characters of more interesting stuff be seen.
This commit is contained in:
PatR
2019-06-24 18:39:24 -07:00
parent cfc8599e69
commit e3af33c9db
2 changed files with 63 additions and 14 deletions

View File

@@ -1,4 +1,4 @@
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.66 $ $NHDT-Date: 1561414302 2019/06/24 22:11:42 $
$NHDT-Branch: NetHack-3.6 $:$NHDT-Revision: 1.67 $ $NHDT-Date: 1561426762 2019/06/25 01:39:22 $
This fixes36.3 file is here to capture information about updates in the 3.6.x
lineage following the release of 3.6.2 in May 2019. Please note, however,
@@ -144,6 +144,16 @@ curses: don't convert ^M (or <return> or <enter> key) into ^J; both ^J and ^M
cause the hero to try to move
curses: draw map in screen columns 1..79 like tty, rather than in 2..80
curses: make text windows wider so that help feedback is more readable
curses+'perm_invent': entries were wrapping without any control; usually not
noticeable because next entry overwrote, but visible for final entry
when whole inventory fit within the available height; looked ok with
borders Off but clearly wrong for borders On
curses+'perm_invent': if too many entries for window height, last one which
fit had the next one appended (including hightlighted selector letter)
when window borders were Off
curses+'perm_invent': top line was wasted (left blank) when borders Off
curses+'perm_invent': don't highlight inventory letters since nothing is
selectable from the menu comprising the persistent inventory window
curses+EDIT_GETLIN: when a prompt's answer was preloaded, using ESC to discard
it deleted it from the answer buffer but didn't erase it from screen
tty: re-do one optimization used when status conditions have all been removed
@@ -163,6 +173,9 @@ classify sources as released, beta, or work-in-progress via NH_DEVEL_STATUS
if you reach the edge of a level (relatively uncommon) and try to move off,
report that you can't go farther if the 'mention_walls' option is set
wizard-mode: display effect to show where an unseen wished-for monster landed
curses+'perm_invent': since persistent inventory is narrow, strip off "a",
"an", or "the" prefix on inventory entries shown there so that a tiny
bit more of the interesting portion is visible
NetHack Community Patches (or Variation) Included