Skip to content

Commit 663b41b

Browse files
authored
Merge pull request #20 from m-tmatma/feature/keep-text-selected-after-replace-command
keep text selected after running replace command
2 parents aa412d9 + c5866b2 commit 663b41b

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

CreateGUIDVSPlugin/RenewGuidCommand.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,8 +176,9 @@ private void MenuItemCallback(object sender, EventArgs e)
176176
this.OutputString(seltext);
177177
this.OutputString(output);
178178
#endif
179-
selection.Delete();
180-
selection.Insert(output);
179+
// vsInsertFlagsContainNewText
180+
// The specified text overwrites the selected text
181+
selection.Insert(output, (int)EnvDTE.vsInsertFlags.vsInsertFlagsContainNewText);
181182
}
182183
}
183184
}

0 commit comments

Comments
 (0)