Editor does not scroll horizontally with long line

When a line is longer than the width of the editor, I would expect that the horizontal scrollbar appears within the editor.

Instead, CodeMirror increases the width of the editor

I made sure than the option lineWrapping is set to false.

Is there a way to force scrolling of the editor itself.

The editor does behave like you expect if you make sure it has a fixed width in your style (see all the examples on the website for example). So check your CSS, I guess.

I use width='100%' for the style of the TextArea, so that the editor always fit horizontally when the dialog window is resized. Is this the problem?

If I set a fixed width, it does work however: the horizontal scrollbar appears within the editor.

Have you found a solution for this?