mirror of https://github.com/helix-editor/helix
fix: panic
parent
e9683381b6
commit
7d53290dd2
|
@ -5244,7 +5244,11 @@ fn toggle_line_comments(cx: &mut Context) {
|
|||
}),
|
||||
);
|
||||
|
||||
transaction.with_selection(Selection::new(selections, selection.primary_index()))
|
||||
if selections.is_empty() {
|
||||
transaction
|
||||
} else {
|
||||
transaction.with_selection(Selection::new(selections, selection.primary_index()))
|
||||
}
|
||||
},
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue