diff --git a/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js b/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js index 218a9226..b3a96736 100644 --- a/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js +++ b/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js @@ -96,7 +96,7 @@ ve.ui.CodeMirrorAction.prototype.toggle = function ( enable ) { surface.mirror.view.viewState.printing = true; // Account for the gutter width in the margin. - action.updateGutterWidth( doc.getDir() ); + action.updateGutterWidth( surfaceView.getDocument().getDir() ); // Set focus on the surface view. surfaceView.focus();