feat: add configuration option default_cursor

This commit is contained in:
CJ van den Berg 2024-12-20 21:44:35 +01:00
parent deaafbefa0
commit afca8a86bc
Signed by: neurocyte
GPG key ID: 8EB1E1BB660E3FB9
3 changed files with 8 additions and 4 deletions

View file

@ -78,7 +78,7 @@ pub const Mode = struct {
name: []const u8 = "",
line_numbers: LineNumbers = .absolute,
keybind_hints: *const KeybindHints,
cursor_shape: CursorShape = .block,
cursor_shape: ?CursorShape = null,
pub fn deinit(self: *Mode) void {
self.allocator.free(self.mode);
@ -362,7 +362,7 @@ const BindingSet = struct {
on_match_failure: OnMatchFailure = .ignore,
name: []const u8,
line_numbers: LineNumbers = .absolute,
cursor_shape: CursorShape = .block,
cursor_shape: ?CursorShape = null,
insert_command: []const u8 = "",
hints_map: KeybindHints = .{},
@ -379,7 +379,7 @@ const BindingSet = struct {
on_match_failure: OnMatchFailure = .insert,
name: ?[]const u8 = null,
line_numbers: LineNumbers = .absolute,
cursor: CursorShape = .block,
cursor: ?CursorShape = null,
};
const parsed = try std.json.parseFromValue(JsonConfig, allocator, mode_bindings, .{
.ignore_unknown_fields = true,