rstudio / rstudio

RStudio is an integrated development environment (IDE) for R
https://posit.co/products/open-source/rstudio/
Other
4.68k stars 1.09k forks source link

Ctrl+Shift+V in Windows Desktop app pastes output twice, Windows 10, RStudio 1.3 #6395

Closed remlapmot closed 4 years ago

remlapmot commented 4 years ago

I am not sure if Ctrl+Shift+V is a supported shortcut. It doesn't appear to be mentioned in the official list of keyboard shortcuts but there was some discussion in #1687 and Windows users would appreciate/expect it in the Terminal pane.

On Windows 10 I find that it produces double output in both the Source and Terminal panes.

System details

RStudio Edition : Desktop
RStudio Version : 1.3.878
OS Version      : Windows 10 (Version 1909 Build 18363.657)
R Version       : 3.6.3

Steps to reproduce the problem

Describe the problem in detail

Describe the behavior you expected

ronblum commented 4 years ago

@remlapmot Thank you for filing the issue! I can reproduce this RStudio Desktop 1.3.878 with Command Prompt, PowerShell, and Git Bash. It works properly in 1.2.5033, so this is a regression. I'll mark this ticket for review as we continue development of RStudio. Thanks!

gtritchie commented 4 years ago

Not just terminal, happens anywhere you can paste text, the console, the editor, even simple textboxes.

Desktop only, can't repro in RStudio Server with Chrome or Firefox.

gtritchie commented 4 years ago

Don't know that this meets the bar for 1.3, but will investigate and see if there's a safe fix.

gtritchie commented 4 years ago

Relatively recent regression, started with build 1.3.812 on Feb 5, 2020.

gtritchie commented 4 years ago

Believe this was caused by this PR: #6158

Specifically, this code:

https://github.com/rstudio/rstudio/blob/8437450d58fb5b99731d71b1e6ef4eefd4f02848/src/cpp/desktop/DesktopWebView.cpp#L172-L177

FWIW, none of the keyboard shortcut references mention this "Paste and Indent" shortcut.

R-Hannibal commented 4 years ago

Verified Fixed on: Version 1.3.926 Tested on Windows 10 desktop, pasting text tested in Console, Terminal, Source, and plain text.