tilemill icon indicating copy to clipboard operation
tilemill copied to clipboard

Shift-tab adds extra colon

Open IvanSanchez opened this issue 10 years ago • 2 comments

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; 

IvanSanchez avatar Dec 05 '14 10:12 IvanSanchez

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.

tmcw avatar Mar 17 '15 22:03 tmcw

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.

IvanSanchez avatar Mar 18 '15 08:03 IvanSanchez