Microsoft/monaco-editor

[Bug] Since 0.46.0, dropped text append "$0"

開放

#4,386 建立於 2024年2月16日

 (14 則留言) (4 個反應) (1 位負責人)JavaScript (4,064 個分叉)batch import
bughelp wanted

倉庫指標

星標
 (46,002 顆星)
PR 合併指標
 (平均合併 6小時 26分鐘) (30 天內合併 15 個 PR)

描述

Reproducible in vscode.dev or in VS Code Desktop?

  • Not reproducible in vscode.dev or VS Code Desktop

Reproducible in the monaco editor playground?

Monaco Editor Playground Link

https://microsoft.github.io/monaco-editor/playground.html?source=v0.46.0#example-creating-the-editor-hello-world

Monaco Editor Playground Code

Empty.

Reproduction Steps

  1. Open a notepad
  2. Type "text" in the notepad
  3. Drag and drop the text from the notepad to the editor on the playground

Actual (Problematic) Behavior

The editor contains "text$0".

Expected Behavior

The editor should contain "text".

Additional Context

I'm not sure, but I guess the problem must have appeared with this PR: https://github.com/microsoft/vscode/pull/202049 and come from this code: https://github.com/microsoft/vscode/blob/7f07489455fda8bc1841b98b9b7e58b20b7ee3ef/src/vs/editor/contrib/dropOrPasteInto/browser/edit.ts#L34

cc. @mjbvz

貢獻者指南