refactor: use orelse in CurSel.to_selection
This commit is contained in:
parent
93f8587881
commit
1bc53b5875
1 changed files with 1 additions and 1 deletions
|
|
@ -121,7 +121,7 @@ pub const CurSel = struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_selection(self: *const Self) Selection {
|
fn to_selection(self: *const Self) Selection {
|
||||||
return if (self.selection) |sel| sel else Selection.from_cursor(&self.cursor);
|
return self.selection orelse Selection.from_cursor(&self.cursor);
|
||||||
}
|
}
|
||||||
|
|
||||||
fn to_selection_inclusive(self: *const Self, root: Buffer.Root, metrics: Buffer.Metrics) Selection {
|
fn to_selection_inclusive(self: *const Self, root: Buffer.Root, metrics: Buffer.Metrics) Selection {
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue