Skip to content

Commit 7e0f659

Browse files
committed
Fixed bug introduced in previous commit
1 parent 11b203f commit 7e0f659

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

TextEditor.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2956,7 +2956,7 @@ void TextEditor::Document::setText(const std::string_view& text) {
29562956
} else if (insertSpacesOnTabs && character == '\t') {
29572957
auto spaces = ((back().size() / tabSize) + 1) * tabSize - back().size();
29582958

2959-
for (size_t i = 0; i < spaces; i++) {
2959+
for (size_t s = 0; s < spaces; s++) {
29602960
back().emplace_back(Glyph(' ', Color::text));
29612961
}
29622962

@@ -2993,7 +2993,7 @@ void TextEditor::Document::setText(const std::vector<std::string_view>& text) {
29932993
if (insertSpacesOnTabs && character == '\t') {
29942994
auto spaces = ((back().size() / tabSize) + 1) * tabSize - back().size();
29952995

2996-
for (size_t i = 0; i < spaces; i++) {
2996+
for (size_t s = 0; s < spaces; s++) {
29972997
back().emplace_back(Glyph(' ', Color::text));
29982998
}
29992999

@@ -3047,7 +3047,7 @@ TextEditor::Coordinate TextEditor::Document::insertText(Coordinate start, const
30473047
} else if (insertSpacesOnTabs && character == '\t') {
30483048
auto spaces = ((index / tabSize) + 1) * tabSize - index;
30493049

3050-
for (size_t i = 0; i < spaces; i++) {
3050+
for (size_t s = 0; s < spaces; s++) {
30513051
line->insert(line->begin() + (index++), Glyph(' ', Color::text));
30523052
}
30533053

0 commit comments

Comments
 (0)