From: Eli Zaretskii <eliz@gnu.org>
To: Pedro Alves <palves@redhat.com>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCHSET] [2/4] Fix various issue in TUI
Date: Mon, 05 Jan 2015 19:40:00 -0000 [thread overview]
Message-ID: <83h9w5819b.fsf@gnu.org> (raw)
In-Reply-To: <54AAE1D9.9000409@redhat.com>
> Date: Mon, 05 Jan 2015 19:11:21 +0000
> From: Pedro Alves <palves@redhat.com>
>
> On 12/31/2014 05:45 PM, Eli Zaretskii wrote:
> > This patch fixes the problem whereby setting the border attributes had
> > no effect whatsoever.
>
> Rather, you need to switch out of the TUI and back, with c-x,a.
Yeah, well... not really friendly.
> > While at that, this also fixes a copy/paste error in a comment to a
> > function.
>
> Could you please push this part separately?
Will do.
> > 2014-12-31 Eli Zaretskii <eliz@gnu.org>
> >
> > * tui/tui-win.c (tui_rehighlight_all): New function.
> >
>
> No empty lines between ChangeLog entries, please.
Why are we using a format that is different from how Emacs formats
ChangeLog entries? It's just annoying extra manual work.
> > --- gdb/tui/tui-command.c~0 2014-10-29 21:45:50 +0200
> > +++ gdb/tui/tui-command.c 2014-12-31 13:49:43 +0200
> > @@ -50,7 +50,12 @@
>
> Seems like you're not using git diff to generate the diffs
> for some reason.
This wasn't done in the git repo, I did it with the GDB 7.8.1 sources.
> If using GNU diff, could you make sure to use the "-p" switch? It
> makes review a lot easier.
I'll try to remember. (The ChangeLog entries state the function
names, don't they?)
> > --- gdb/tui/tui-command.c~0 2014-10-29 21:45:50 +0200
> > +++ gdb/tui/tui-command.c 2014-12-31 13:49:43 +0200
> > @@ -50,7 +50,12 @@
> >
> > /* Handle the CTRL-L refresh for each window. */
> > if (ch == '\f')
> > - tui_refresh_all_win ();
> > + {
> > + if (tui_update_variables ())
> > + tui_rehighlight_all ();
> > +
> > + tui_refresh_all_win ();
>
>
> tui_refresh_all_win already calls tui_check_and_display_highlight_if_needed,
> so why do we need to call tui_rehighlight_all? Is it the tui_update_variables
> call that is really missing?
Yes, the call to tui_update_variables is required to take notice of
the changes. Also, I'm not sure tui_refresh_all_win does that for all
windows, it has a switch that handles on 3 types.
> But why would we need to call tui_update_variables on CTRL-L, if we
> already call it when the user changes the variables?
I thought it'd be better to ensure this is called directly on refresh,
since C-l can be used in all kinds of weird situations where the
screen is messed up e.g. by the program being debugged.
> > --- gdb/tui/tui-hooks.c~0 2014-06-11 18:34:41 +0300
> > +++ gdb/tui/tui-hooks.c 2014-12-31 14:41:11 +0200
> > @@ -247,12 +247,23 @@
> > tui_display_main ();
> > }
> >
> > +/* Refresh the display when settings important to us change. */
> > +static void
> > +tui_note_setting_change (const char *param, const char *value)
> > +{
> > + if (tui_active
> > + && strncmp (param, "tui ", sizeof ("tui ") - 1) == 0
> > + && tui_update_variables ())
> > + tui_rehighlight_all ();
> > +}
> > +
>
> Please do this from the "set" hook of the relevant commands instead.
> IOW, replace NULL below (and in the other commands):
>
> add_setshow_enum_cmd ("active-border-mode", no_class, tui_border_mode_enums,
> &tui_active_border_mode, _("\
> ...
> NULL,
> show_tui_active_border_mode,
> &tui_setlist, &tui_showlist);
OK.
> > @@ -985,11 +995,14 @@
> > /* Make sure the curses mode is enabled. */
> > tui_enable ();
> >
> > + if (tui_update_variables ())
> > + tui_rehighlight_all ();
> > +
> > tui_refresh_all_win ();
> > }
> >
>
> I don't understand this one. When is it ever necessary?
Same as Ctrl-l: this is the "refresh" command.
next prev parent reply other threads:[~2015-01-05 19:40 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-12-31 17:45 Eli Zaretskii
2015-01-05 19:11 ` Pedro Alves
2015-01-05 19:40 ` Eli Zaretskii [this message]
2015-01-06 16:03 ` Pedro Alves
2015-01-06 15:58 ` Eli Zaretskii
2015-01-07 13:48 ` Pedro Alves
2015-01-16 16:29 ` Eli Zaretskii
2015-01-16 16:59 ` Sergio Durigan Junior
2015-01-16 17:59 ` Eli Zaretskii
2015-01-16 16:34 ` Eli Zaretskii
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=83h9w5819b.fsf@gnu.org \
--to=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=palves@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).