Fix selectionReplace in src/tools/selection.js