Tabby
Tabby copied to clipboard
Selection can grow or shrink slightly
The selection can grow or shrink slightly with each indent/outdent operation.
Observed in Chrome 10 and Firefox 4, probably happens in other browsers as well.
Here is the patch, just apply it (this patch applies behaviour the same as phpStorm does when indenting a selection with Tab or Shift+Tab):
// selections will always add/remove tabs from the start of the line
else {
+ while (ss < o.value.length && o.value.charAt(ss).match(/[ \t]/)) ss++;
// split the textarea up into lines and figure out which lines are included in the selection
Hey, that definitely helps. I still get somewhat unexpected behavior when the selection starts with a newline, however.
Applying this because it’s definitely much better. Thank you very much.