diff --git a/src/Edit.c b/src/Edit.c index 6733c6f6f..f53d516de 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -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: