Fix toggle_comments command on multiple selections (#1882)
commit6b80cb8a7750885abf761d1b65e5c0065ae1640b
authorDanilo Spinella <danilo.spinella@suse.com>
dateTue 5 Apr 2022, 03:01 (5 years ago)
parentd962e06
helix-core/src/comment.rs+1−1
@@ -72,7 +72,7 @@ pub fn toggle_line_comments(doc: &Rope, selection: &Selection, token: Option<&st
7272 let end = (end + 1).min(text.len_lines());
7373
7474 lines.extend(start..end);
75− min_next_line = end + 1;
75+ min_next_line = end;
7676 }
7777
7878 let (commented, to_change, min, margin) = find_line_comment(token, text, lines);