refactor: move clipboard_history command to tui module
This commit is contained in:
parent
acbf435a2e
commit
99c28b8102
3 changed files with 6 additions and 6 deletions
|
|
@ -37,7 +37,7 @@
|
||||||
["ctrl+page_down", "next_tab"],
|
["ctrl+page_down", "next_tab"],
|
||||||
["ctrl+page_up", "previous_tab"],
|
["ctrl+page_up", "previous_tab"],
|
||||||
["ctrl+shift+e", "switch_buffers"],
|
["ctrl+shift+e", "switch_buffers"],
|
||||||
["alt+shift+v", "paste_history"],
|
["alt+shift+v", "clipboard_history"],
|
||||||
["ctrl+0", "reset_fontsize"],
|
["ctrl+0", "reset_fontsize"],
|
||||||
["ctrl+plus", "adjust_fontsize", 1.0],
|
["ctrl+plus", "adjust_fontsize", 1.0],
|
||||||
["ctrl+minus", "adjust_fontsize", -1.0],
|
["ctrl+minus", "adjust_fontsize", -1.0],
|
||||||
|
|
|
||||||
|
|
@ -1018,11 +1018,6 @@ const cmds = struct {
|
||||||
}
|
}
|
||||||
pub const system_paste_meta: Meta = .{ .description = "Paste from system clipboard" };
|
pub const system_paste_meta: Meta = .{ .description = "Paste from system clipboard" };
|
||||||
|
|
||||||
pub fn paste_history(_: *Self, _: Ctx) Result {
|
|
||||||
return try tui.open_overlay(@import("mode/overlay/clipboard_palette.zig").Type);
|
|
||||||
}
|
|
||||||
pub const paste_history_meta: Meta = .{ .description = "Paste from clipboard history" };
|
|
||||||
|
|
||||||
pub fn find_in_files_query(self: *Self, ctx: Ctx) Result {
|
pub fn find_in_files_query(self: *Self, ctx: Ctx) Result {
|
||||||
var query: []const u8 = undefined;
|
var query: []const u8 = undefined;
|
||||||
if (!try ctx.args.match(.{tp.extract(&query)})) return error.InvalidFindInFilesQueryArgument;
|
if (!try ctx.args.match(.{tp.extract(&query)})) return error.InvalidFindInFilesQueryArgument;
|
||||||
|
|
|
||||||
|
|
@ -1276,6 +1276,11 @@ const cmds = struct {
|
||||||
}
|
}
|
||||||
pub const exit_helix_mode_meta: Meta = .{};
|
pub const exit_helix_mode_meta: Meta = .{};
|
||||||
|
|
||||||
|
pub fn clipboard_history(_: *Self, _: Ctx) Result {
|
||||||
|
return try open_overlay(@import("mode/overlay/clipboard_palette.zig").Type);
|
||||||
|
}
|
||||||
|
pub const clipboard_history_meta: Meta = .{ .description = "Paste from clipboard history" };
|
||||||
|
|
||||||
pub fn clipboard_delete(self: *Self, ctx: Ctx) Result {
|
pub fn clipboard_delete(self: *Self, ctx: Ctx) Result {
|
||||||
var idx: usize = 0;
|
var idx: usize = 0;
|
||||||
if (!try ctx.args.match(.{tp.extract(&idx)}))
|
if (!try ctx.args.match(.{tp.extract(&idx)}))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue