Fix toggle_comments command on multiple selections (#1882)

This commit is contained in:
Danilo Spinella 2022-04-05 03:01:58 +02:00 committed by GitHub
parent d962e06e91
commit 6b80cb8a77
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -72,7 +72,7 @@ pub fn toggle_line_comments(doc: &Rope, selection: &Selection, token: Option<&st
let end = (end + 1).min(text.len_lines());
lines.extend(start..end);
min_next_line = end + 1;
min_next_line = end;
}
let (commented, to_change, min, margin) = find_line_comment(token, text, lines);