Skip to content

Commit

Permalink
Stream.putBackString() revert tabs at start of line
Browse files Browse the repository at this point in the history
  • Loading branch information
NQNStudios committed Dec 13, 2024
1 parent 2e0991d commit 8597cc0
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/kiss/Stream.hx
Original file line number Diff line number Diff line change
Expand Up @@ -180,6 +180,12 @@ class Stream {
case "\n":
line -= 1;
column = lineLengths.pop();
// Revert tabs
case c if (c.trim() == ""):
var lastNewlineIdx = content.lastIndexOf('\n', absoluteChar + 1);
if (lastNewlineIdx >= 0 && content.substr(lastNewlineIdx,absoluteChar + 1).trim() == "")
_currentTab = _currentTab.substr(0, _currentTab.length - 1);
column -= 1;
default:
column -= 1;
}
Expand Down

0 comments on commit 8597cc0

Please sign in to comment.