parent
e17345eff7
commit
ff0987c108
8 changed files with 37 additions and 22 deletions
|
@ -142,7 +142,7 @@ fn load_history(self: *Self, pos: usize) void {
|
|||
fn update_mini_mode_text(self: *Self) void {
|
||||
if (tui.current().mini_mode) |*mini_mode| {
|
||||
mini_mode.text = self.input.items;
|
||||
mini_mode.cursor = self.input.items.len;
|
||||
mini_mode.cursor = tui.current().stdplane().egc_chunk_width(self.input.items, 0, 8);
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -187,7 +187,7 @@ const cmds = struct {
|
|||
pub const mini_mode_insert_bytes_meta = .{ .arguments = &.{.string} };
|
||||
|
||||
pub fn mini_mode_delete_backwards(self: *Self, _: Ctx) Result {
|
||||
_ = self.input.popOrNull();
|
||||
self.input.resize(self.input.items.len - tui.current().stdplane().egc_last(self.input.items).len) catch {};
|
||||
self.update_mini_mode_text();
|
||||
}
|
||||
pub const mini_mode_delete_backwards_meta = .{ .description = "Delete backwards" };
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue