[PATCH 1/3] Remove superfluous function key_is_command_char()
Patrick Palka
patrick@parcs.ath.cx
Thu Jan 8 13:48:00 GMT 2015
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.
More information about the Gdb-patches
mailing list