Compare commits
No commits in common. "1eb6a773e5a0369bcdd38cdc4cf94077156d9753" and "0bd34279a8a65849cc556285e015a103ac47d9b6" have entirely different histories.
1eb6a773e5
...
0bd34279a8
3 changed files with 5 additions and 8 deletions
|
@ -30,8 +30,8 @@
|
|||
["ctrl+l", "scroll_view_center_cycle"],
|
||||
["ctrl+n", "goto_next_match"],
|
||||
["ctrl+p", "goto_prev_match"],
|
||||
["ctrl+b", "move_to_char", "left"],
|
||||
["ctrl+t", "move_to_char", "right"],
|
||||
["ctrl+b", "move_to_char", false],
|
||||
["ctrl+t", "move_to_char", true],
|
||||
["ctrl+x", "cut"],
|
||||
["ctrl+c", "copy"],
|
||||
["ctrl+v", "system_paste"],
|
||||
|
|
|
@ -85,9 +85,6 @@
|
|||
|
||||
["<C-k>", "TODO"],
|
||||
|
||||
["F", "move_to_char", "left"],
|
||||
["f", "move_to_char", "right"],
|
||||
|
||||
["<C-CR>", ["move_down"], ["move_begin"]],
|
||||
["<CR>", ["move_down"], ["move_begin"]]
|
||||
]
|
||||
|
|
|
@ -30,13 +30,13 @@ const Operation = enum {
|
|||
};
|
||||
|
||||
pub fn create(allocator: Allocator, ctx: command.Context) !struct { tui.Mode, tui.MiniMode } {
|
||||
var direction: Direction = undefined;
|
||||
var right: bool = true;
|
||||
const select = if (tui.get_active_editor()) |editor| if (editor.get_primary().selection) |_| true else false else false;
|
||||
_ = ctx.args.match(.{tp.extract(&direction)}) catch return error.InvalidMoveToCharArgument;
|
||||
_ = ctx.args.match(.{tp.extract(&right)}) catch return error.InvalidMoveToCharArgument;
|
||||
const self: *Self = try allocator.create(Self);
|
||||
self.* = .{
|
||||
.allocator = allocator,
|
||||
.direction = direction,
|
||||
.direction = if (right) .right else .left,
|
||||
.operation = if (select) .select else .move,
|
||||
};
|
||||
try self.commands.init(self);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue