Repository: vscode
Issue: Data corruptted when pasting large JSON in the terminal (or via sendText)
Labels: bug,help wanted,macos,confirmed,terminal-input

Version: 1.45.1
Commit: 5763d909d5f12fe19f215cbfdd29a91c0fa9208a
Date: 2020-05-14T08:33:47.663Z
Electron: 7.2.4
Chrome: 78.0.3904.130
Node.js: 12.8.1
V8: 7.8.279.23-electron.0
OS: Darwin x64 19.5.0

When pasting a large JSON content in the terminal, the pasted data is corrupted occasionally. The larger the JSON content, the chance of corruption is higher. If I paste the same content in the system terminal, everything works normally. 

Here is one example:
```bash
echo '
{
  "web-app":{
    "servlet":[
      {
        "servlet-name":"cofaxCDS",
        "servlet-class":"org.cofax.cds.CDSServlet",
        "init-param":{
          "configGlossary:installationAt":"Philadelphia, PA",
          "dataStoreLogLevel":"debug",
          "maxUrlLength":500
        }
      },
      {
        "servlet-name":"cofaxEmail",
        "servlet-class":"org.cofax.cds.EmailServlet",
        "init-param":{
          "mailHost":"mail1",
          "mailHostOverride":"mail2"
        }
      },
      {
        "servlet-name":"cofaxAdmin",
        "servlet-class":"org.cofax.cds.AdminServlet"
      },
      {
        "servlet-name":"fileServlet",
        "servlet-class":"org.cofax.cds.FileServlet"
      },
      {
        "servlet-name":"cofaxTools",
        "servlet-class":"org.cofax.cms.CofaxToolsServlet",
        "init-param":{
          "templatePath":"toolstemplates/",
          "log":1,
          "logLocation":"/usr/local/tomcat/logs/CofaxTools.log",
          "logMaxSize":"",
          "dataLog":1,
          "dataLogLocation":"/usr/local/tomcat/logs/dataLog.log",
          "dataLogMaxSize":"",
          "removePageCache":"/content/admin/remove?cache=pages&id=",
          "removeTemplateCache":"/content/admin/remove?cache=templates&id=",
          "fileTransferFolder":"/usr/local/tomcat/webapps/content/fileTransferFolder",
          "lookInContext":1,
          "adminGroupID":4,
          "betaServer":true
        }
      }
    ],
    "servlet-mapping":{
      "cofaxCDS":"/",
      "cofaxEmail":"/cofaxutil/aemail/*",
      "cofaxAdmin":"/admin/*",
      "fileServlet":"/static/*",
      "cofaxTools":"/tools/*"
    },
    "taglib":{
      "taglib-uri":"cofax.tld",
      "taglib-location":"/WEB-INF/tlds/cofax.tld"
    }
  }
}'
```
When paste in the terminal, it will becomes:
```bash
{
  "web-app":{
    "servlet":[
      {
        "servlet-name":"cofaxCDS",
        "servlet-class":"org.cofax.cds.CDSServlet",
        "init-param":{
          "configGlossary:installationAt":"Philadelphia, PA",
          "dataStoreLogLevel":"debug",
          "maxUrlLength":500
        }
      },
      {
        "servlet-name":"cofaxEmail",
        "servlet-class":"org.cofax.cds.EmailServlet",
        "init-param":{
          "mailHost":"mail1",
          "mailHostOverride":"mail2"
        }
      },
      {
        "servlet-name":"cofaxAdmin",
        "servlet-class":"org.cofax.cds.AdminServlet"
      },
      {
        "servlet-name":"fileServlet",
        "servlet-class":"org.cofax.cds.FileServlet"
      },
      {
        "servlet-name":"cofaxTools",
        "servlet-class":"org.cofax.cms.CofaxToolsServlet",
        "init-param":{
          "templatePath":"toolstemplates/",
          "log":1,
          "logLocation":"/usr/local/tomcat/logs/CofaxTools.log",
          "logMaxSize":"",
          "dataLog":1,
          "dataLogLocation":"/usr/local/tomcat/logs/dataLog.log",
                                         "removePageCache":                     e?cache=pages&id=",
          "removeTemplateCache":"/content/ad          "removeTemplateCache":"                "removeTemper":"/usr/local/tomcat/weba      nt          "removeTemplateCache":"/ "l          "removeTemplateCache":"/content/a,
                                                   ,
    "servlet-mapping":{
      "cofaxCDS":"/",
      "cofaxEmail":      xu      "cofaxEmail":      xu  min":"/a      "cofaxEmail":      xu      "cofaxEmail":  "cofaxTools":"/tools/*      "cofaxEmail":      xu      "cob-      "cofaxEmail":      xu      "cofaxEmail": -INF/      "fax.tld"
    }
  }
}
```