Commit 484b967
committed
code-editor: indent with two spaces instead of tabs
indentUnit was "\t", so getIndentUnit() resolved to tabSize (4) while
every document in the app is pretty-printed with 2 spaces —
JSON.stringify(x, null, 2) and YAML.dump({indent: 2}). continuedIndent()
therefore asked for 4 columns and indentString() materialized them as a
literal tab: pressing Enter inside a JSON object put the caret one level
too deep and mixed tabs into space-indented content.
Tab had the same problem through insertTab, which always inserts "\t" —
invalid indentation in YAML. Use indentMore so Tab follows indentUnit,
matching Enter and the existing Shift-Tab (indentLess) behaviour.1 parent 6e75111 commit 484b967
1 file changed
Lines changed: 3 additions & 3 deletions
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
13 | 13 | | |
14 | 14 | | |
15 | 15 | | |
16 | | - | |
| 16 | + | |
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
| |||
1509 | 1509 | | |
1510 | 1510 | | |
1511 | 1511 | | |
1512 | | - | |
| 1512 | + | |
1513 | 1513 | | |
1514 | 1514 | | |
1515 | 1515 | | |
| |||
1540 | 1540 | | |
1541 | 1541 | | |
1542 | 1542 | | |
1543 | | - | |
| 1543 | + | |
1544 | 1544 | | |
1545 | 1545 | | |
1546 | 1546 | | |
| |||
0 commit comments