mirror of
https://github.com/textmate/textmate.git
synced 2026-04-28 03:00:34 -04:00
Lines increasing and decreasing indent no longer go below zero
Normally a line matched by both patterns will be decreased by one unit compared to the non-ignored lines immediately above and below. If however the line above was not indented, the line would in theory be decreased to -1 and thus just go back to zero indent for the line following it.
This commit is contained in:
@@ -116,7 +116,7 @@ namespace indent
|
||||
{
|
||||
if(type & (kIncrease | kDecrease))
|
||||
_carry = 0;
|
||||
if(type & kDecrease)
|
||||
if(type & kDecrease && (!(type & kIncrease) || _level > 0))
|
||||
_level -= _indent_size;
|
||||
|
||||
res = _level + _carry;
|
||||
|
||||
Reference in New Issue
Block a user