mirror of https://github.com/helix-editor/helix
fix: crash when using block comment if no block comment but yes line comment
parent
f18a2d7c5a
commit
f8a38a1229
|
@ -5295,7 +5295,11 @@ fn toggle_block_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