Skip to content

Commit 18d007a

Browse files
committed
comment: reverting small bug fix
1 parent 898f231 commit 18d007a

File tree

1 file changed

+0
-6
lines changed

1 file changed

+0
-6
lines changed

helix-core/src/comment.rs

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,6 @@ fn find_line_comment(
4242
lines: impl IntoIterator<Item = usize>,
4343
) -> (bool, Vec<usize>, usize, usize) {
4444
let mut commented = true;
45-
let mut text_is_empty = true;
4645
let mut to_change = Vec::new();
4746
let mut min = usize::MAX; // minimum col for first_non_whitespace_char
4847
let mut margin = 1;
@@ -51,7 +50,6 @@ fn find_line_comment(
5150
for line in lines {
5251
let line_slice = text.line(line);
5352
if let Some(pos) = line_slice.first_non_whitespace_char() {
54-
text_is_empty = false;
5553
let len = line_slice.len_chars();
5654

5755
min = std::cmp::min(min, pos);
@@ -76,10 +74,6 @@ fn find_line_comment(
7674
}
7775
}
7876

79-
if text_is_empty {
80-
commented = false;
81-
}
82-
8377
(commented, to_change, min, margin)
8478
}
8579

0 commit comments

Comments
 (0)