refactor: add binding set on_match_failure nothing mode
This commit is contained in:
parent
6643341574
commit
3d81631679
1 changed files with 2 additions and 1 deletions
|
|
@ -485,7 +485,7 @@ const BindingSet = struct {
|
||||||
deinit_command: ?Command = null,
|
deinit_command: ?Command = null,
|
||||||
|
|
||||||
const KeySyntax = enum { flow, vim };
|
const KeySyntax = enum { flow, vim };
|
||||||
const OnMatchFailure = enum { insert, ignore };
|
const OnMatchFailure = enum { insert, ignore, nothing };
|
||||||
|
|
||||||
fn load(allocator: std.mem.Allocator, namespace_name: []const u8, config_section: []const u8, mode_bindings: std.json.Value, fallback: ?*const BindingSet, namespace: *Namespace) (error{ OutOfMemory, WriteFailed } || parse_flow.ParseError || parse_vim.ParseError || std.json.ParseFromValueError)!@This() {
|
fn load(allocator: std.mem.Allocator, namespace_name: []const u8, config_section: []const u8, mode_bindings: std.json.Value, fallback: ?*const BindingSet, namespace: *Namespace) (error{ OutOfMemory, WriteFailed } || parse_flow.ParseError || parse_vim.ParseError || std.json.ParseFromValueError)!@This() {
|
||||||
var self: @This() = .{ .name = undefined, .config_section = config_section, .selection_style = undefined };
|
var self: @This() = .{ .name = undefined, .config_section = config_section, .selection_style = undefined };
|
||||||
|
|
@ -787,6 +787,7 @@ const BindingSet = struct {
|
||||||
else
|
else
|
||||||
log_keyhints_message(),
|
log_keyhints_message(),
|
||||||
.ignore => log_keyhints_message(),
|
.ignore => log_keyhints_message(),
|
||||||
|
.nothing => {},
|
||||||
}
|
}
|
||||||
globals.current_sequence.clearRetainingCapacity();
|
globals.current_sequence.clearRetainingCapacity();
|
||||||
globals.current_sequence_egc.clearRetainingCapacity();
|
globals.current_sequence_egc.clearRetainingCapacity();
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue