+ fix: Toggle comment on empty selection at insertion point: keep position of selection end

This commit is contained in:
Rainer Kottenhoff 2021-02-22 19:48:47 +01:00
parent 2e6543789f
commit a3f887af0a

View File

@ -3393,7 +3393,7 @@ void EditToggleLineCommentsSimple(HWND hwnd, LPCWSTR pwszComment, bool bInsertAt
iSelStartOffset += (iSelStart <= iPos) ? 0 : cchComment;
}
DocPos const movedSelEnd = iSelEnd + iSelEndOffset;
iSelEndOffset += (movedSelEnd < iPos) ? 0 : cchComment;
iSelEndOffset += (movedSelEnd <= iPos) ? 0 : cchComment;
}
break;
case 2: