Compare commits

..

No commits in common. "8dc6f9823dd3ffe63712683ab81aa347c30f9ae2" and "dad8deac7aa4da644105ae1a21ca82313b5d25bb" have entirely different histories.

View file

@ -769,11 +769,8 @@ const BindingSet = struct {
fn terminate_sequence(self: *const @This(), abort_type: AbortType) anyerror!void {
if (abort_type == .match_impossible) {
switch (self.on_match_failure) {
.insert => if (globals.current_sequence_egc.items.len > 0)
try self.insert_bytes(globals.current_sequence_egc.items)
else
log_keyhints_message(),
.ignore => log_keyhints_message(),
.insert => try self.insert_bytes(globals.current_sequence_egc.items),
.ignore => {},
}
globals.current_sequence.clearRetainingCapacity();
globals.current_sequence_egc.clearRetainingCapacity();
@ -784,19 +781,6 @@ const BindingSet = struct {
}
}
fn log_keyhints_message() void {
for (globals.current_sequence.items) |item| switch (item.key) {
input.key.left_control, input.key.right_control => return,
input.key.left_alt, input.key.right_alt => return,
input.key.left_shift, input.key.right_shift => return,
else => {},
};
const logger = log.logger("keybind");
defer logger.deinit();
logger.print("C-? for key hints", .{});
}
/// Retrieve bindings that will match a key event sequence
pub fn get_matches_for_key_event_sequence(
self: *const @This(),