Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Character input causes line jumps in certain cases #4592

Open
1 of 2 tasks
tingjiangcao opened this issue Jul 7, 2024 · 0 comments
Open
1 of 2 tasks

Character input causes line jumps in certain cases #4592

tingjiangcao opened this issue Jul 7, 2024 · 0 comments

Comments

@tingjiangcao
Copy link

tingjiangcao commented Jul 7, 2024

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

image

  1. Enter a long line of Chinese characters at random to ensure that a horizontal scroll bar appears

  2. Scroll the scrollbar to the far right.

  3. Cursor to the current line anywhere except the last, enter any Chinese characters, you will find that the current line of abnormal flickering (sometimes shorter text will also appear this problem, but I can only 100% reproduce this situation)

Also, I noticed that when typing Chinese characters, the highlight border breaks at a different position。Below is a different representation of Monaco and vscode :

image
image

playground:
https://microsoft.github.io/monaco-editor/playground.html?source=v0.50.0#XQAAAAIgAgAAAAAAAABBqQkHQ5NjdMjwa-jY7SIQ9S7DNlzs5W-mwj0fe1ZCDRFc9ws9XQE0SJE1jc2VKxhaLFIw9vEWSxW3yscw0i8NiAEiAKctgAboa7AaZZDHLgrLqPRv_fRv2RyIokydlTdTYccsu6v6jDrc8jQ8ulrCVzjWBVWZVl-YrARXWjHX0-tquUNesdygYRbQM1JUnAtH1yn78Jh8JtjV9J0vDOFbfIWELHEvDDCR2k0hns3ZEz2xjIc5FMtaSaQTgFS2RSoDdu6PXBPWm-JBPkjrxSK-Pls337lNPQ6EY3MfZYncMMZVz4nAVQQxoVmqkLq_ezgYnBDdMqXUoAI3MkYs5VL9rIXFFPidVSPQJCigTuo6a_iQbSJ2IsHoPbHCNBOtNdWcZXKr4Z_oUNKGlC3vFx_0esvu9bjPf_-I8Bfg

Monaco Editor Playground Code

const value = /* set from `myEditor.getModel()`: */ `function hello() {
	alert('Hello world!');
	这是一段中文字符这是一段中文字符这是一段中文字符这是一段中文字符这是一段中文字符这是一段中文字符这是一段中文字符这是一段中文字符
}`;

// Hover on each property to see its docs!
const myEditor = monaco.editor.create(document.getElementById("container"), {
	value,
	language: "javascript",
	automaticLayout: true,
});

Reproduction Steps

  1. Enter a long line of Chinese characters at random to ensure that a horizontal scroll bar appears

  2. Scroll the scrollbar to the right.

  3. Cursor to the current line anywhere except the last, enter any Chinese characters, you will find that the current line of abnormal flickering (sometimes shorter text will also appear this problem, but I can only 100% reproduce this situation)

Actual (Problematic) Behavior

No response

Expected Behavior

No response

Additional Context

No response

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant