Changeset 248739 in webkit
- Timestamp:
- Aug 15, 2019 12:32:14 PM (5 years ago)
- Location:
- trunk/Source/WebInspectorUI
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/WebInspectorUI/ChangeLog
r248737 r248739 1 2019-08-15 Devin Rousso <drousso@apple.com> 2 3 Web Inspector: CodeMirror still inserts a tab even when "Prefer indent using" is set to "Spaces" 4 https://bugs.webkit.org/show_bug.cgi?id=200770 5 6 Reviewed by Ross Kirsling. 7 8 * UserInterface/Views/CodeMirrorAdditions.js: 9 Remap the `insertTab` command to use `insertSoftTab` when "Prefer indent using" is set to 10 "Spaces" so that CodeMirror inserts the number of spaces that would match a tab ("\t") being 11 inserted at the same spot. 12 1 13 2019-08-15 Devin Rousso <drousso@apple.com> 2 14 -
trunk/Source/WebInspectorUI/UserInterface/Views/CodeMirrorAdditions.js
r237186 r248739 620 620 }; 621 621 622 { 623 // CodeMirror's default behavior is to always insert a tab ("\t") regardless of `indentWithTabs`. 624 let original = CodeMirror.commands.insertTab; 625 CodeMirror.commands.insertTab = function(cm) { 626 if (cm.options.indentWithTabs) 627 original(cm); 628 else 629 CodeMirror.commands.insertSoftTab(cm); 630 }; 631 } 632 622 633 // Register some extra MIME-types for CodeMirror. These are in addition to the 623 634 // ones CodeMirror already registers, like text/html, text/javascript, etc.
Note: See TracChangeset
for help on using the changeset viewer.