Undo to selection

When I drag-select a text to wrap it around with a markdown character but enter the key(s) in the wrong way, I want to undo to the point before inserting the wrong character(s) but after selecting the portion of text for wrapping. Logseq v0.4.4 won’t undo to that point, it will go further to cancel the selection (and also move the caret to a position different from where it was before the selection). I would like selection to be part of the operation history.