fix: panic

pull/12759/head
Nikita Revenco 2025-02-03 12:46:12 +00:00 committed by Nik Revenco
parent e9683381b6
commit 7d53290dd2
1 changed files with 5 additions and 1 deletions

View File

@ -5244,7 +5244,11 @@ fn toggle_line_comments(cx: &mut Context) {
}), }),
); );
if selections.is_empty() {
transaction
} else {
transaction.with_selection(Selection::new(selections, selection.primary_index())) transaction.with_selection(Selection::new(selections, selection.primary_index()))
}
}, },
); );
} }