Anas198900 / Anas198900/waledzaad

<!--

未关闭
#7 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看
主要语言
没有语言数据
星标
2
派生
0
PR 合并指标
30 天内没有已合并 PR

描述

**monaco-editor version:** 0.21.2
**Browser:** Chrome 88.0.4324.192
**OS:** macOS Catalina 10.15.2 (19C57)
**Playground code that reproduces the issue:**

```js

var diffEditor = monaco.editor.createDiffEditor(document.getElementById("container"), {
acceptSuggestionOnCommitCharacter: false,
acceptSuggestionOnEnter: 'off',
automaticLayout: true,
codeLens: false,
contextmenu: false,
copyWithSyntaxHighlighting: true,
fontFamily: 'Menlo',
fontSize: 14,
glyphMargin: false,
ignoreTrimWhitespace: false,
lineHeight: 24,
lineNumbersMinChars: 5,
links: true,
matchBrackets: 'always',
maxComputationTime: 5000,
mouseWheelZoom: false,
readOnly: true,
renderIndentGuides: false,
renderIndicators: true,
renderWhitespace: 'none',
scrollBeyondLastColumn: 0,
scrollBeyondLastLine: false,
scrollbar: {
alwaysConsumeMouseWheel: false,
vertical: 'hidden',
verticalScrollbarSize: 0,
verticalSliderSize: 0,
},
selectOnLineNumbers: false,
selectionHighlight: true,
showFoldingControls: 'always',
smoothScrolling: true,
stopRenderingLineAfter: 10000,
renderSideBySide: false
});
const lang = 'java';
diffEditor.setModel({
original: monaco.editor.createModel(
`import xxx;
if (optional.isPresent()) {
return optional.get().getCUserId(orderInfo,rpcUserService);
} else {
LOGGER.error("CUserAquireFactory.flowProcessContext 该订单险种策略查询异常,orderId:{}", orderInfo.getInsureOrderInfo().getOrderId(), new NoCUserStrategyFoundException());

throw new NoCUserStrategyFoundException();
}`,
lang
),
modified: monaco.editor.createModel(
`import xxx;
if (optional.isPresent()) {
return optional.get().getCUserId(orderInfo,rpcUserService);
} else {
ExceptionUtil.logError(LOGGER,"CUserAquireFactory.flowProcessContext 该订单险种策略查询异常,orderId:{}", orderInfo.getInsureOrderInfo().getOrderId(), new NoCUserStrategyFoundException());

throw new NoCUserStrategyFoundException();
}`,
lang
),
});
```

**Question:**
I use the configuration items and text as shown in the above code, and the horizontal scrolling is not normal in my system. The specific manifestation is that after the horizontal scroll to the rightmost side, the code cannot be scrolled without being fully displayed.
![image](https://user-images.githubusercontent.com/22138217/108970040-d1c1cb80-76bc-11eb-9e36-d09f97cafed6.png)

I tested on the playground that it can scroll normally, but in my system this case cannot scroll normally😔

Then I did not change the configuration items, and used other cases, and I can scroll normally
![image](https://user-images.githubusercontent.com/22138217/108991862-941c6d00-76d3-11eb-9d71-47d2dee320b1.png)

Playground code:

```js

var diffEditor = monaco.editor.createDiffEditor(document.getElementById("container"), {
acceptSuggestionOnCommitCharacter: false,
acceptSuggestionOnEnter: 'off',
automaticLayout: true,
codeLens: false,
contextmenu: false,
copyWithSyntaxHighlighting: true,
fontFamily: 'Menlo',
fontSize: 14,
glyphMargin: false,
ignoreTrimWhitespace: false,
lineHeight: 24,
lineNumbersMinChars: 5,
links: true,
matchBrackets: 'always',
maxComputationTime: 5000,
mouseWheelZoom: false,
readOnly: true,
renderIndentGuides: false,
renderIndicators: true,
renderWhitespace: 'none',
scrollBeyondLastColumn: 0,
scrollBeyondLastLine: false,
scrollbar: {
alwaysConsumeMouseWheel: false,
vertical: 'hidden',
verticalScrollbarSize: 0,
verticalSliderSize: 0,
},
selectOnLineNumbers: false,
selectionHighlight: true,
showFoldingControls: 'always',
smoothScrolling: true,
stopRenderingLineAfter: 10000,
renderSideBySide: false
});
const lang = 'java';
diffEditor.setModel({
original: monaco.editor.createModel(
`import xxx;
OrderInfo orderInfo = policyDelegate.getOrderInfo(orderId);
Long userId = CUserAquireFactory.flowProcessContext(orderInfo, rpcUserServiceDelegate);
if (userId == 0) {
LOGGER.error("syncOrderData2DB error orderId:{}", orderId, new NoCUserFoundException());
throw new NoCUserFoundException();
}
indexUserOrderPo.setUserId(userId);`,
lang
),
modified: monaco.editor.createModel(
`import xxx;
OrderInfo orderInfo = policyDelegate.getOrderInfo(orderId);
Long userId = CUserAquireFactory.flowProcessContext(orderInfo, rpcUserServiceDelegate);
if (userId == 0) {
ExceptionUtil.logError(LOGGER,"syncOrderData2DB error orderId:{}", orderId, new NoCUserFoundException());
throw new NoCUserFoundException();
}
indexUserOrderPo.setUserId(userId);`,
lang
),
});
```

__Originally posted by @chenmy0917 in https://github.com/microsoft/monaco-editor/issues/2365__

贡献指南

这个仓库没有索引到贡献指南

评估

这个 Issue 还没有评估数据。

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。