Can't copy the whole line if there is a null character in it. When trying to copy the entire line, only the part before the null character is copied.
Does this issue occur when all extensions are disabled?: Yes
Version: 1.100.2 Electron: 34.5.1 ElectronBuildId: 11369351 Chromium: 132.0.6834.210 Node.js: 20.19.0 V8: 13.2.152.41-electron.0 OS: Windows_NT x64 10.0.19045
Steps to Reproduce:
When selecting the entire line, the content after szDisposeFlag=nul is not copied.
~~I would think copying works correctly~~ ~~but pasting will stop at the null~~
I would think copying works correctly but pasting will stop at the null
I copied text from Notepad and pasted it into VS Code — everything looked fine, although the NUL character seemed to be ignored. However, when I copied the same text from VS Code and pasted it into Notepad, only the part before the NUL character was pasted.
Hi thanks for filing the issue. Could you please paste here the exact text which you were copying/pasting as well as your settings file? I am currently not able to reproduce.
https://github.com/user-attachments/assets/fcb1abe4-3aac-4dae-872d-960e8851147c
Hi thanks for filing the issue. Could you please paste here the exact text which you were copying/pasting as well as your settings file? I am currently not able to reproduce.
Screen.Recording.2025-06-10.at.12.22.33.mov
NUL is a special character in the ASCII character set, rather than the word 'null'.
Hi thanks for filing the issue. Could you please paste here the exact text which you were copying/pasting as well as your settings file? I am currently not able to reproduce.
Screen.Recording.2025-06-10.at.12.22.33.mov
I'm unable to provide the text at the moment since I can't copy it, but I’ll upload the file later.
Here is the file
If the null character is not visible, please enable the display of control characters.
Once enabled, the null character will become visible.
When you copy the entire first line and paste it, the second line will be produced.
Ran into the same problem when trying to read some trace-files: Error-messages hat NUL-characters in them and wanted to look at those lines in isolation -> no way of copying them over. It is a major bug if a text-editor can not copy valid text.
hi, same issue toggling the "view toggle control characters" for me replaces the characters with the replacement characters but still cannot copy them. i think this just a system limitation but would be nice if vscode let skip the null characters https://learn.microsoft.com/en-us/windows/win32/dataxchg/standard-clipboard-formats where there is null maybe replace with � and keep copying