File tree Expand file tree Collapse file tree 1 file changed +2
-9
lines changed
Expand file tree Collapse file tree 1 file changed +2
-9
lines changed Original file line number Diff line number Diff line change @@ -74,20 +74,13 @@ class PasteEditProvider implements DocumentPasteEditProvider {
7474 return null ;
7575 }
7676
77- // Skip paste handling for single line copies from the same document to avoid unwanted escaping
78- // in string literals when copying lines
79- const isSingleLineCopy = ! insertText . includes ( '\n' ) && ! insertText . includes ( '\r' ) ;
77+ const editorData = dataTransfer . get ( "vscode-editor-data" ) ?. value ;
78+ const isSingleLineCopy = Boolean ( editorData && JSON . parse ( editorData ) . isFromEmptySelection ) ;
8079 const isFromSameDocument = this . copiedContent === insertText && this . copiedDocumentUri === document . uri . toString ( ) ;
8180 if ( isSingleLineCopy && isFromSameDocument ) {
8281 return undefined ; // Let VS Code handle this normally
8382 }
8483
85- // Skip paste handling when pasting content that contains quotes to avoid unwanted escaping
86- // This is a broader check than the above to handle cases where content is modified or from different documents
87- if ( insertText . includes ( '"' ) ) {
88- return undefined ; // Let VS Code handle this normally
89- }
90-
9184 const range = ranges [ 0 ] ;
9285
9386 const location : Location = {
You can’t perform that action at this time.
0 commit comments