Qt: there was no way to enter extended command "#version" by typing; command
name matching was waiting to disambiguate it from "#versionshort"
and the only way to that was to type #version<return> but <return>
- explicitly triggered rejection, cancelling '#' processing
+ explicitly triggered rejection, cancelling '#' processing; #drop vs
+ "droptype, "known vs "knownclass, and #takeoff vs #takeoffall are in
+ similar ambiguous situation but usually invoked via keystroke
+Qt: render all text windows in fixed-width font instead of just ones which
+ have one or more lines with four consecutive spaces; some data.base
+ entries do have those (usually final attribution) and some don't,
+ so display from one entry to another was inconsistent if default
+ proportional font was ever used
Qt: while a text window was shown (such as the "things that are here" popup
when stepping on items), typing commands had the input passed on to
the map and then executed; sometimes that caused the not-yet-dismissed
textsearching = false;
}
+// handle a line of text for a text window
void NetHackQtTextWindow::PutStr(int attr UNUSED, const QString& text)
{
- str_fixed=str_fixed || text.contains(" ");
+#if 1
+ // 3.7: Always render text windows with fixed-width font. The majority
+ // of text files we'll ever display including ('license' and 'history')
+ // happen to have some lines with four spaces anyway and/or they have
+ // been pre-formatted to fit within less than 80 columns. For data.base
+ // entries, some do have four spaces (usually the final attribution)
+ // and some don't, resulting in inconsistent display from one entry to
+ // another if the default proportional font is ever used.
+ str_fixed = true;
+#else
+ // if any line contains four consecutive spaces, render this text window
+ // using fixed-width font; skip substring lookup if flag is already set
+ str_fixed = str_fixed || text.contains(" ");
+#endif
+ // instead of outputting the line directly, save it for future rendering
lines->addItem(text);
}