Two ANNOYING, REPRODUCIBLE NEGATIVE user experiences. These happen to me REPEATEDLY.
(1) Edit a package body. Select a string and press Ctrl+H (Search/Replace).
The SelectedWord appears in the "from" dialog box. Type in the replacement "to" value.
Click ReplaceAll icon. Done. The original SelectedWord remains highlighted / “selected” in the worksheet.
Click CompileDebug and get this ERROR.
Error starting at line : 1 in command -
SelectedWord
Error report -
Unknown Command
SOLUTION:
Immediately before the compile operation, perform a VsCode API call to "unselect text". This will fix the compilation error.
(2) Repeat the steps described above.
Closing or leaving the Ctrl+H dialog open makes no difference.
Click CompileDebug. The compilation error occurs (if performed exactly as described above).
REVIEW the worksheet source code and find that the global string replacement has been UNDONE!
The replaced "to" string is gone and the original substituted SelectedWord has been restored!
This is both a negative experience, and a time waster (if you haven't observed the reversal).
The suggested solution will redress both issues.