Skip to content

Commit

Permalink
trying one more fix...
Browse files Browse the repository at this point in the history
  • Loading branch information
eteran committed Jan 11, 2025
1 parent ae885d0 commit c8d4cd6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/shift.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -563,7 +563,7 @@ std::string shiftText(std::string_view text, ShiftDirection direction, bool tabs
while (true) {
if (textPtr == text.end() || *textPtr == '\n') {

auto segment = text.substr(gsl::narrow<size_t>(lineStartPtr - text.data()));
auto segment = text.substr(gsl::narrow<size_t>(lineStartPtr - text.begin()));

std::string shiftedLineString = (direction == ShiftDirection::Right)
? shiftLineRight(segment, textPtr - lineStartPtr, tabsAllowed, tabDist, nChars)
Expand Down

0 comments on commit c8d4cd6

Please sign in to comment.