Skip to content

Commit

Permalink
Reapply "Fix spacers offset"
Browse files Browse the repository at this point in the history
This reverts commit a22fdd8.
  • Loading branch information
boatbomber committed Nov 16, 2024
1 parent a22fdd8 commit 4b103a0
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions plugin/src/App/Components/StringDiffVisualizer/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,7 @@ function StringDiffVisualizer:updateDiffs()

-- Adjust the rich text lines and their diffs to include spacers (aka nil lines)
for spacerIdx, spacer in currentSpacers do
local spacerLineNum = spacer.currentLineNum + (spacerIdx - 1)
local spacerLineNum = spacer.currentLineNum + spacerIdx
table.insert(currentRichTextLines, spacerLineNum, nil)
-- The currentDiffs that come after this spacer need to be moved down
-- without overwriting the currentDiffs that are already there
Expand All @@ -235,7 +235,7 @@ function StringDiffVisualizer:updateDiffs()
currentDiffs = updatedCurrentDiffs
end
for spacerIdx, spacer in incomingSpacers do
local spacerLineNum = spacer.incomingLineNum + (spacerIdx - 1)
local spacerLineNum = spacer.incomingLineNum + spacerIdx
table.insert(incomingRichTextLines, spacerLineNum, nil)
-- The incomingDiffs that come after this spacer need to be moved down
-- without overwriting the incomingDiffs that are already there
Expand Down

0 comments on commit 4b103a0

Please sign in to comment.