Skip to content

Commit

Permalink
Fix indent size calculation
Browse files Browse the repository at this point in the history
  • Loading branch information
Aisper committed May 15, 2024
1 parent 1616aff commit fd37aba
Showing 1 changed file with 2 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -131,10 +131,11 @@ public TextRange getRange(@NotNull VimEditor editor,
// This is done as a separate step so that it works even when the caret is inside the indentation.
int offset = caretLineStartOffset;
int indentSize = 0;
while (++offset < charSequence.length()) {
while (offset < charSequence.length()) {
final char ch = charSequence.charAt(offset);
if (ch == ' ' || ch == '\t') {
++indentSize;
++offset;
} else {
break;
}
Expand Down

0 comments on commit fd37aba

Please sign in to comment.