This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH] Fix scrolling right in the TUI (Re: [RFC 8.3 0/3] Some style fixes)
> Cc: gdb-patches@sourceware.org
> From: Pedro Alves <palves@redhat.com>
> Date: Thu, 14 Mar 2019 20:58:36 +0000
>
> On 03/12/2019 05:08 PM, Hannes Domani via gdb-patches wrote:
> > + if (column <= first_col || column > first_col + line_width)
> > + {
> > + if (c == '\t')
> > + {
> > + int j, max_tab_len = tui_tab_width;
> > +
> > + --column;
> > + for (j = column % max_tab_len;
> > + j < max_tab_len && column < first_col + line_width;
> > + column++, j++)
> > + if (column >= first_col)
> > + result.push_back (' ');
> > + }
> > + continue;
> > + }
>
> instead of duplicating that code, I'd put it in a lambda
> and use it in both places.
>
> Tromey, WDYT? Would you prefer the version without the lambda?
Works for me, with the initialization fixed to be 'false'.
Thanks.