feat: add CurSel.merge function
This commit is contained in:
parent
1f3419ec94
commit
1c96a45822
1 changed files with 10 additions and 0 deletions
|
|
@ -242,6 +242,16 @@ pub const CurSel = struct {
|
|||
return false;
|
||||
return self.cursor.nudge_delete(nudge);
|
||||
}
|
||||
|
||||
fn merge(self: *Self, other: Selection) bool {
|
||||
if (self.selection) |*sel_| {
|
||||
if (sel_.merge(other)) {
|
||||
self.cursor = sel_.end;
|
||||
return true;
|
||||
}
|
||||
}
|
||||
return self.cursor.within(other);
|
||||
}
|
||||
};
|
||||
|
||||
pub const Diagnostic = struct {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue