Skip to content

Commit 8c6eaad

Browse files
authored
Fix double paste when CF_UNICODETEXT & CF_HDROP are present (#17543)
Well, this one is rather simple. :) tl;dr: We shouldn't call `StringPaste` twice for the same paste. Closes MSFT:51822029
1 parent 04c33f3 commit 8c6eaad

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/interactivity/win32/Clipboard.cpp

+1
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,7 @@ void Clipboard::Paste()
7575
// NOTE: Some applications don't add a trailing null character. This includes past conhost versions.
7676
const auto maxLen = GlobalSize(handle) / sizeof(wchar_t);
7777
StringPaste(str, wcsnlen(str, maxLen));
78+
return;
7879
}
7980

8081
// We get CF_HDROP when a user copied a file with Ctrl+C in Explorer and pastes that into the terminal (among others).

0 commit comments

Comments
 (0)