]> granicus.if.org Git - nethack/commitdiff
more win32 more (from <Someone>)
authornethack.allison <nethack.allison>
Fri, 21 Feb 2003 01:55:26 +0000 (01:55 +0000)
committernethack.allison <nethack.allison>
Fri, 21 Feb 2003 01:55:26 +0000 (01:55 +0000)
<Someone> and <Someone> both agreed that this was:
- useful
- unlikely to break anything.

win/win32/mhmsgwnd.c

index ad9c0250ecab6144e7519ce4fb0ec7ee9f673f5c..08149e5f1e2b7237b49c23f66acd3163df575a61 100644 (file)
@@ -491,10 +491,13 @@ void onPaint(HWND hWnd)
            oldFont = SelectObject(hdc, mswin_get_font(NHW_MESSAGE, data->window_text[lineidx].attr, hdc, FALSE));
 
            /* find out if we can concatenate the scheduled message without wrapping,
-              but only if no clear_nhwindow was done just before putstr'ing this one. 
+        but only if no clear_nhwindow was done just before putstr'ing this one,
+        and only if not in a more prompt already (to prevent concatenating to
+        a line containing --More-- when resizing while --More-- is displayed.) 
               */
            if (i == MSG_LINES-1 
-                   && strlen(data->new_line.text) > 0) {
+  && strlen(data->new_line.text) > 0
+  && !data->in_more) {
                /* concatenate to the previous line if that is not empty, and
                   if it has the same attribute, and no clear was done.
                   */