From a91eb00b5d102027a37ecf5d4415afdbbcfd8d68 Mon Sep 17 00:00:00 2001 From: bhsd <2545473905@qq.com> Date: Tue, 3 Dec 2024 16:58:10 +0800 Subject: [PATCH] CodeMirror: indent with `\t` Based on the discussion, the default indent unit should be `\t` instead of spaces. Bug: T376351 Change-Id: Ib369501019e15c3d9bb7e83a6518c71896cecddc --- resources/codemirror.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/resources/codemirror.js b/resources/codemirror.js index 2e8e4c77..8ae26f8a 100644 --- a/resources/codemirror.js +++ b/resources/codemirror.js @@ -13,6 +13,7 @@ const { highlightSpecialChars, history, historyKeymap, + indentUnit, keymap, lineNumbers, rectangularSelection, @@ -134,6 +135,7 @@ class CodeMirror { this.dirExtension, this.searchExtension, this.preferences.extension, + indentUnit.of( '\t' ), EditorState.readOnly.of( this.readOnly ), EditorView.domEventHandlers( { blur: () => {