tilemill
tilemill copied to clipboard
Shift-tab adds extra colon
Small bug in the text editor for mss files.
Place your cursor (I'll fake it here with a | character) behind the colon in a style declaration, like so:
line-w|idth:10;
And press shift-tab. The expected result is a decrease in indentation, like so:
line-w|idth:10;
But somehow that triggers the tab-autocompletion, so instead I got this:
line-width:|:10;
Is shift-tab an expected keybinding? It isn't present in default OSX textarea keybindings or vi visual mode, I'm guessing it's something editor-specific, and its presence in TileMill is not to be expected.
I beg to differ. Tilemill uses CodeMirror as a basis for the text editor, and Shift-Tab is an expected keybinding for "auto indent": http://codemirror.net/doc/manual.html#keymaps
I guess the culprit is in https://github.com/mapbox/tilemill/blob/master/assets/js/codemirror.carto.complete.js#L196 - apparently that is being triggered even when the auto-complete list is not visible.