From: Patrick Palka <patrick@parcs.ath.cx>
To: Eli Zaretskii <eliz@gnu.org>
Cc: gdb-patches@sourceware.org
Subject: Re: [PATCH 1/3] Remove superfluous function key_is_command_char()
Date: Thu, 08 Jan 2015 13:48:00 -0000 [thread overview]
Message-ID: <CA+C-WL_F-VD2Z0mY2WEjW1zGayz9aw0CYFZGuWRfr6c5+ww_yQ@mail.gmail.com> (raw)
In-Reply-To: <83zj9t5rbe.fsf@gnu.org>
On Thu, Jan 8, 2015 at 8:34 AM, Eli Zaretskii <eliz@gnu.org> wrote:
>> From: Patrick Palka <patrick@parcs.ath.cx>
>> Cc: Patrick Palka <patrick@parcs.ath.cx>
>> Date: Wed, 7 Jan 2015 23:04:43 -0500
>>
>> The function key_is_command_char() is simply a predicate that determines
>> whether the function tui_dispatch_ctrl_char() will do anything useful.
>> Since tui_dispatch_ctrl_char() performs the same checks as
>> key_is_command_char() it is unnecessary to keep key_is_command_char()
>> around. This patch removes this useless function and instead
>> unconditionally calls tui_dispatch_ctrl_char() inside its only caller,
>> tui_getc().
>
> But tui_dispatch_ctrl_char punts when the current window is the
> command window, doesn't it? This means we are losing the possibility
> to handle command keys in the command window.
I don't see how that follows. If the current window is the command
window then dispatch_ctrl_char() returns the input character
unmodified. So the behavior after the patch is the same as if the
call to dispatch_ctrl_char() was guarded by the key_is_command_char()
predicate, before the patch.
>
> Thanks.
next prev parent reply other threads:[~2015-01-08 13:48 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-01-08 4:05 Patrick Palka
2015-01-08 4:05 ` [PATCH 2/3] TUI: Don't print KEY_RESIZE keys Patrick Palka
2015-01-08 11:29 ` Pedro Alves
2015-01-08 12:32 ` Patrick Palka
2015-01-08 13:22 ` Pedro Alves
2015-01-08 13:38 ` Patrick Palka
2015-02-11 0:25 ` Patrick Palka
2015-02-16 22:42 ` Pedro Alves
2015-02-17 0:53 ` Patrick Palka
2015-02-17 10:23 ` Pedro Alves
2015-02-17 13:02 ` Patrick Palka
2015-02-17 13:24 ` Patrick Palka
2015-01-08 4:05 ` [PATCH 3/3] Don't flush the prompt when resizing the terminal within TUI Patrick Palka
2015-01-08 11:39 ` Pedro Alves
2015-01-08 11:40 ` [PATCH 1/3] Remove superfluous function key_is_command_char() Pedro Alves
2015-01-08 13:34 ` Eli Zaretskii
2015-01-08 13:48 ` Patrick Palka [this message]
2015-01-08 14:58 ` 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=CA+C-WL_F-VD2Z0mY2WEjW1zGayz9aw0CYFZGuWRfr6c5+ww_yQ@mail.gmail.com \
--to=patrick@parcs.ath.cx \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
/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