From 6b80cb8a7750885abf761d1b65e5c0065ae1640b Mon Sep 17 00:00:00 2001 From: Danilo Spinella Date: Tue, 5 Apr 2022 03:01:58 +0200 Subject: Fix toggle_comments command on multiple selections (#1882) --- helix-core/src/comment.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/helix-core/src/comment.rs b/helix-core/src/comment.rs index b22a95a6..44f6cdfe 100644 --- a/helix-core/src/comment.rs +++ b/helix-core/src/comment.rs @@ -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); -- cgit v1.2.3-70-g09d2