Make input_mapping_execute stop returning R_NULL too often

input_mapping_execute, when passed false for allow_commands, will return
R_NULL. However currently it does this unconditionally, even if we don't
have any commands. This defeats our read-ahead optimization, so we
always read and process one byte at a time. This caused pasting to be
much slower.

Fixes #2215
This commit is contained in:
ridiculousfish 2015-11-07 15:23:36 -08:00
parent 1854ef9823
commit e7d18b96f9

View file

@ -570,7 +570,7 @@ static void input_mapping_execute(const input_mapping_t &m, bool allow_commands)
return;
}
if (!allow_commands)
if (has_commands && !allow_commands)
{
/* We don't want to run commands yet. Put the characters back and return
R_NULL */