mirror of
https://github.com/zed-industries/zed.git
synced 2024-12-27 09:44:46 +03:00
Get the Editor crate compiling
This commit is contained in:
parent
9c74be3bf2
commit
efc85d1b75
@ -185,6 +185,16 @@ impl<T: Debug> Debug for AnchorRangeMap<T> {
|
||||
}
|
||||
}
|
||||
|
||||
impl Debug for AnchorRangeSet {
|
||||
fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result {
|
||||
let mut f = f.debug_set();
|
||||
for (range, _) in &self.0.entries {
|
||||
f.entry(range);
|
||||
}
|
||||
f.finish()
|
||||
}
|
||||
}
|
||||
|
||||
impl AnchorRangeSet {
|
||||
pub fn len(&self) -> usize {
|
||||
self.0.len()
|
||||
|
@ -37,6 +37,10 @@ pub struct SelectionState {
|
||||
}
|
||||
|
||||
impl<T: ToOffset + ToPoint + Copy + Ord> Selection<T> {
|
||||
pub fn is_empty(&self) -> bool {
|
||||
self.start == self.end
|
||||
}
|
||||
|
||||
pub fn head(&self) -> T {
|
||||
if self.reversed {
|
||||
self.start
|
||||
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue
Block a user