From 2f4c265ba96927926489b88edaa3ef6e4c67e45f Mon Sep 17 00:00:00 2001 From: MusikAnimal Date: Thu, 31 Oct 2024 00:38:45 -0400 Subject: [PATCH] ve.ui.CodeMirror.v6: use view's direction when updating gutter width I74bcbc46b0 erroneously passed the model's directionality (how it is saved) and not the view. This caused misalignment issues when changing directionality. Bug: T374196 Follow-Up: I74bcbc46b0b62ff2ed138fe57d852a3cd87c22d0 Change-Id: I81e863e19d6d0bad2cc2be743df896e17a8dc548 --- resources/ve-cm/ve.ui.CodeMirrorAction.v6.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js b/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js index c58340c7..222762b9 100644 --- a/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js +++ b/resources/ve-cm/ve.ui.CodeMirrorAction.v6.js @@ -240,7 +240,7 @@ ve.ui.CodeMirrorAction.prototype.onDocumentPrecommit = function ( tx ) { this.surface.mirror.view.dispatch( { changes: replacements[ i ] } ); } - action.updateGutterWidth( this.surface.getModel().getDocument().getDir() ); + action.updateGutterWidth( this.surface.getView().getDocument().getDir() ); }; /* Registration */