### Bug description

I have had a couple of instances now when copying-and-pasting text containing em-dashes in Quarto's visual mode causes RStudio to freeze. When this occurs, I cannot save changes and cannot restart the R session. The only option is to end the program using the Windows Task Manager. I can go into source mode (if I remember to do so) and move copy-and-paste without a problem. I only seems to occur when in visual mode. I may occasionally work without a problem, but eventually moving it will cause the problem.

RStudio 2023.03.0+386 "Cherry Blossom" Release (3c53477afb13ab959aeb5b34df1f10c237b256c3, 2023-03-09) for Windows
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) RStudio/2023.03.0+386 Chrome/108.0.5359.179 Electron/22.0.3 Safari/537.36

OS Name	Microsoft Windows 11 Pro
Version	10.0.22621 Build 22621
12th Gen Intel(R) Core(TM) i5-1240P, 1700 Mhz, 12 Core(s), 16 Logical Processor(s)

quarto check - no idea how to find this from the description below

Also interestingly, you are requesting I attach a single .qmd file for this issue, but when I tried to do this, I get a message stating that .qmd files are not supported. Hence, I have put it into a zip file and attached it that way.

[em-dash bug.zip](https://github.com/quarto-dev/quarto-cli/files/11194184/em-dash.bug.zip)


### Checklist

- [X] Please include a minimal, fully reproducible example in a single .qmd file? Please provide the whole file rather than the snippet you believe is causing the issue.
- [X] Please [format your issue](https://quarto.org/bug-reports.html#formatting-make-githubs-markdown-work-for-us) so it is easier for us to read the bug report.
- [X] Please document the RStudio IDE version you're running (if applicable), by providing the value displayed in the "About RStudio" main menu dialog?
- [X] Please document the operating system you're running. If on Linux, please provide the specific distribution.
- [X] Please provide the output of `quarto check` so we know which version of quarto and its dependencies you're running.
cscheid
2023-04-10T21:40:05Z
cermak-consulting
bug needs-repro rstudio triaged-to stale
v1.4
open
Copy and paste text including em-dash in visual mode crashes RStudio 
https://github.com/quarto-dev/quarto-cli/issues/5148