+ fix: calc correct line length to delete on removing duplicate lines

This commit is contained in:
Rainer Kottenhoff 2018-06-01 18:07:29 +02:00
parent 734cf3c2eb
commit 93c0ebfc93

View File

@ -3715,7 +3715,7 @@ void EditRemoveDuplicateLines(HWND hwnd, bool bRemoveEmptyLines)
if (iCurLnLen == iCmpLnLen) {
if (StringCchCompareNA(pCurrentLine, iCurLnLen, pCompareLine, iCmpLnLen) == 0) {
const DocPos iLenToDel = iCmpLnLen + ((iCompareLine != Sci_GetLastDocLine()) ? Sci_GetEOLLen() : 0);
const DocPos iLenToDel = (iCompareLine != Sci_GetLastDocLine() ? SciCall_GetLine(iCompareLine, NULL) : iCmpLnLen);
SciCall_SetTargetRange(iBegCmpLine, iBegCmpLine + iLenToDel);
SciCall_ReplaceTarget(0, "");
--iCompareLine; // proactive preventing progress to avoid comparison line skip