Skip to content

Commit

Permalink
deleted Workaround and highlightColumnsInLine() in updateDelimitersIn…
Browse files Browse the repository at this point in the history
…Document()
  • Loading branch information
daddel80 committed Dec 2, 2023
1 parent fcae815 commit 0088f4d
Showing 1 changed file with 2 additions and 13 deletions.
15 changes: 2 additions & 13 deletions src/MultiReplacePanel.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3148,6 +3148,7 @@ void MultiReplace::processLogForDelimiters()
}
}


// Apply the saved "Modify" entries to the original delimiter list
for (const auto& modifyLogEntry : modifyLogEntries) {
if (modifyLogEntry.lineNumber != -1) {
Expand All @@ -3160,14 +3161,6 @@ void MultiReplace::processLogForDelimiters()
}
}

// Workaround: Highlight last line to fix N++ bug causing loss of styling on last character whwn modification in any other line
if (isColumnHighlighted) {
LRESULT lastLine = send(SCI_GETLINECOUNT, 0, 0) - 1;
if (lastLine >= 0) {
highlightColumnsInLine(lastLine);
}
}

// Clear Log queue
logChanges.clear();
textModified = false;
Expand Down Expand Up @@ -3221,11 +3214,6 @@ void MultiReplace::updateDelimitersInDocument(SIZE_T lineNumber, ChangeType chan
// Re-analyze the line to find delimiters
findDelimitersInLine(lineNumber);

// Update the highlight if necessary
if (isColumnHighlighted) {
highlightColumnsInLine(lineNumber);
}

// Only adjust following lines if not at the last line
if (lineNumber < lineDelimiterPositions.size() - 1) {
// Calculate the difference to the next line start position (considering EOL)
Expand Down Expand Up @@ -3255,6 +3243,7 @@ void MultiReplace::updateDelimitersInDocument(SIZE_T lineNumber, ChangeType chan
default:
break;
}

}

void MultiReplace::handleDelimiterPositions(DelimiterOperation operation) {
Expand Down

0 comments on commit 0088f4d

Please sign in to comment.