refactor: nudge tabstops
This commit is contained in:
parent
b472300b3d
commit
4a44838b88
1 changed files with 7 additions and 0 deletions
|
|
@ -2198,6 +2198,8 @@ pub const Editor = struct {
|
||||||
cursel.nudge_insert(nudge);
|
cursel.nudge_insert(nudge);
|
||||||
for (self.matches.items) |*match_| if (match_.*) |*match|
|
for (self.matches.items) |*match_| if (match_.*) |*match|
|
||||||
match.nudge_insert(nudge);
|
match.nudge_insert(nudge);
|
||||||
|
for (self.cursels_tabstops.items) |tabstop| for (tabstop) |*cursel|
|
||||||
|
cursel.nudge_insert(nudge);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn nudge_delete(self: *Self, nudge: Selection, exclude: *const CurSel, _: usize) void {
|
fn nudge_delete(self: *Self, nudge: Selection, exclude: *const CurSel, _: usize) void {
|
||||||
|
|
@ -2210,6 +2212,11 @@ pub const Editor = struct {
|
||||||
if (!match.nudge_delete(nudge)) {
|
if (!match.nudge_delete(nudge)) {
|
||||||
self.matches.items[i] = null;
|
self.matches.items[i] = null;
|
||||||
};
|
};
|
||||||
|
for (self.cursels_tabstops.items) |tabstop| for (tabstop) |*cursel|
|
||||||
|
if (!cursel.nudge_delete(nudge)) {
|
||||||
|
self.cancel_all_tabstops();
|
||||||
|
break;
|
||||||
|
};
|
||||||
}
|
}
|
||||||
|
|
||||||
pub fn delete_selection(self: *Self, root: Buffer.Root, cursel: *CurSel, allocator: Allocator) error{Stop}!Buffer.Root {
|
pub fn delete_selection(self: *Self, root: Buffer.Root, cursel: *CurSel, allocator: Allocator) error{Stop}!Buffer.Root {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue