Patchwork [8.3] Fix style bug when paging

login
register
mail settings
Submitter Tom Tromey
Date May 8, 2019, 4:36 p.m.
Message ID <87ef58lx7i.fsf@tromey.com>
Download mbox | patch
Permalink /patch/32609/
State New
Headers show

Comments

Tom Tromey - May 8, 2019, 4:36 p.m.
>>>>> "Tom" == Tom Tromey <tromey@adacore.com> writes:

Tom> gdb/ChangeLog
Tom> 2019-05-01  Tom Tromey  <tromey@adacore.com>

Tom> 	* utils.c (fputs_maybe_filtered): Reset style after paging, even
Tom> 	when no wrap column is set.

When merging this to master I neglected to commit a fixup that I needed.

This patch fixes the problem, sorry about that.
I'm checking this in.

Tom

commit ca1df239078318425cf8038995bf02f1b9ab6e50
Author: Tom Tromey <tromey@adacore.com>
Date:   Wed May 8 10:35:09 2019 -0600

    Fix build problem in fputs_maybe_filtered
    
    When merging commit 99f20f ("Fix style bug when paging") to master, I
    had to make some changes to get it to compile again.  Unfortunately, I
    must not have added these to the index at the correct time, because
    they were not committed.
    
    This patch fixes the problem.
    
    gdb/ChangeLog
    2019-05-08  Tom Tromey  <tromey@adacore.com>
    
            * utils.c (fputs_maybe_filtered): Call can_emit_style_escape as a
            method.

Patch

diff --git a/gdb/ChangeLog b/gdb/ChangeLog
index ca20a7c3654..ec2424a5bc8 100644
--- a/gdb/ChangeLog
+++ b/gdb/ChangeLog
@@ -1,3 +1,8 @@ 
+2019-05-08  Tom Tromey  <tromey@adacore.com>
+
+	* utils.c (fputs_maybe_filtered): Call can_emit_style_escape as a
+	method.
+
 2019-05-08  Tom Tromey  <tromey@adacore.com>
 
 	* utils.c (fputs_maybe_filtered): Reset style after paging, even
diff --git a/gdb/utils.c b/gdb/utils.c
index 10fa5bcce64..96869274735 100644
--- a/gdb/utils.c
+++ b/gdb/utils.c
@@ -1826,7 +1826,7 @@  fputs_maybe_filtered (const char *linebuffer, struct ui_file *stream,
 		    + (save_chars - wrap_column);
 		  wrap_column = 0;	/* And disable fancy wrap */
 		}
-	      else if (did_paginate && can_emit_style_escape (stream))
+	      else if (did_paginate && stream->can_emit_style_escape ())
 		emit_style_escape (save_style, stream);
 	    }
 	}