Anas198900 / Anas198900/waledzaad

<!--

Abierto
#7 0 comentarios 0 reacciones 0 asignados Ver en GitHub
Lenguaje dominante
Sin datos de lenguaje
Estrellas
2
Forks
0
Métricas de merge de PR
Sin PR fusionados en 30 d

Descripción

**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__

Guía de contribución

No hay ninguna guía de contribución indexada para este repositorio

Evaluación

Este issue todavía no se ha evaluado.

Recibe los nuevos issues en tu correo

Un resumen breve de issues de GitHub para principiantes.