Skip to content

Commit

Permalink
When in-line editing yaml and other files, the tab key now uses spaces
Browse files Browse the repository at this point in the history
  • Loading branch information
manthey committed Oct 7, 2024
1 parent 8f6a4d2 commit 9d9232c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@
- Handle a variation in a bioformats exception ([#1656](../../pull/1656))
- Increase logging slow histograms ([#1658](../../pull/1658))
- Use paginated item lists ([#1664](../../pull/1664))
- When in-line editing yaml and other files, the tab key now uses spaces ([#1667](../../pull/1667))

### Bug Fixes

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -214,6 +214,13 @@ var CodemirrorEditWidget = View.extend({
value: this._contents,
mode: Formats[this.mimeType].mode,
lineNumbers: true,
indentWithTabs: false,
extraKeys: {
Tab: function (cm) {
var spaces = Array(cm.getOption('tabSize') + 1).join(' ');
cm.replaceSelection(spaces);

Check warning on line 221 in girder/girder_large_image/web_client/views/itemViewCodemirror.js

View check run for this annotation

Codecov / codecov/patch

girder/girder_large_image/web_client/views/itemViewCodemirror.js#L219-L221

Added lines #L219 - L221 were not covered by tests
}
},
gutters: ['CodeMirror-lint-markers'],
lint: true,
readOnly: this.accessLevel < AccessType.WRITE
Expand Down

0 comments on commit 9d9232c

Please sign in to comment.