Skip to content

Commit

Permalink
! Tweak AddEditAllMatchingCommand
Browse files Browse the repository at this point in the history
  • Loading branch information
wmjordan committed Dec 5, 2024
1 parent db119bf commit 2644e2e
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions Codist/SmartBars/SmartBar.CommonEdit.cs
Original file line number Diff line number Diff line change
Expand Up @@ -195,15 +195,14 @@ protected void AddCommentCommand(System.Windows.Controls.ToolBar toolBar) {

void AddEditAllMatchingCommand() {
AddCommand(ToolBar, IconIds.EditMatches, R.CMD_EditMatches, ctx => {
var spans = ctx.View.Selection.SelectedSpans;
if (spans.Count < 1) {
var b = ctx.View.GetMultiSelectionBroker();
if (b.HasMultipleSelections || b.PrimarySelection.IsEmpty) {
return;
}
var s = spans[0];
var s = b.PrimarySelection.Extent.SnapshotSpan;
if (s.Length == 0) {
return;
}
var b = ctx.View.GetMultiSelectionBroker();
var option = FindOptions.Wrap | FindOptions.OrdinalComparison;
var m = ctx.ModifierKeys;
if (m.MatchFlags(ModifierKeys.Control)) {
Expand Down

0 comments on commit 2644e2e

Please sign in to comment.