Skip to content

Commit 08ea59a

Browse files
committed
remove refactoring
1 parent 340ca0c commit 08ea59a

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

crates/vim/src/object.rs

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -283,7 +283,15 @@ impl Object {
283283
TextObject::InsideFunction
284284
},
285285
),
286-
Object::Comment => comment_object(map, relative_to),
286+
Object::Comment => text_object(
287+
map,
288+
relative_to,
289+
if around {
290+
TextObject::AroundComment
291+
} else {
292+
TextObject::InsideComment
293+
},
294+
),
287295
Object::Class => text_object(
288296
map,
289297
relative_to,
@@ -496,16 +504,6 @@ fn around_next_word(
496504
Some(start..end)
497505
}
498506

499-
fn comment_object(
500-
map: &DisplaySnapshot,
501-
relative_to: DisplayPoint,
502-
target: TextObject,
503-
) -> Option<Range<DisplayPoint>> {
504-
let snapshot = &map.buffer_snapshot;
505-
let offset = relative_to.to_offset(map, Bias::Left);
506-
snapshot.range_for_syntax_ancestor(range)
507-
}
508-
509507
fn text_object(
510508
map: &DisplaySnapshot,
511509
relative_to: DisplayPoint,

0 commit comments

Comments
 (0)