Indentation bug


#1
  • If there’s a single cursor with no selection, indent-and-outdent and indent-and-undo works as you’d expect.
  • If there’s a single selection (could span multiple lines) indent-and-outdent and indent-and-undo works as you’d expect.
  • If you have multiple selections, indent-and-outdent and indent-and-undo works as you’d expect.
  • If there are multiple cursors with no selections, indent appears to indent each cursor position separately but in one go (i.e. in one command but not in a transaction) so you need multiple undo operations to get back to where you were. Outdent works as you’d expect. This is probably due to the tab trigger being activated once per cursor (though it’s interesting that multiple selection doesn’t have the same issue).

Gifs galore!

  • Single cursor, no selection, indent then outdent

  • Single cursor, no selection, indent then undo

  • Single selection, indent then outdent

  • Single selection, indent then undo

  • Multiple selection, indent then outdent

  • Multiple selection, indent then undo

  • Multiple cursors, indent then outdent

  • Multiple cursors, indent then undo

Bork!