Skip to content

Commit

Permalink
comment: reverting small bug fix
Browse files Browse the repository at this point in the history
  • Loading branch information
TornaxO7 committed Oct 19, 2024
1 parent 898f231 commit 18d007a
Showing 1 changed file with 0 additions and 6 deletions.
6 changes: 0 additions & 6 deletions helix-core/src/comment.rs
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,6 @@ fn find_line_comment(
lines: impl IntoIterator<Item = usize>,
) -> (bool, Vec<usize>, usize, usize) {
let mut commented = true;
let mut text_is_empty = true;
let mut to_change = Vec::new();
let mut min = usize::MAX; // minimum col for first_non_whitespace_char
let mut margin = 1;
Expand All @@ -51,7 +50,6 @@ fn find_line_comment(
for line in lines {
let line_slice = text.line(line);
if let Some(pos) = line_slice.first_non_whitespace_char() {
text_is_empty = false;
let len = line_slice.len_chars();

min = std::cmp::min(min, pos);
Expand All @@ -76,10 +74,6 @@ fn find_line_comment(
}
}

if text_is_empty {
commented = false;
}

(commented, to_change, min, margin)
}

Expand Down

0 comments on commit 18d007a

Please sign in to comment.