From a3f887af0a66f93352fe8a6cb967eb2c3fa3ffbc Mon Sep 17 00:00:00 2001 From: Rainer Kottenhoff Date: Mon, 22 Feb 2021 19:48:47 +0100 Subject: [PATCH] + fix: Toggle comment on empty selection at insertion point: keep position of selection end --- src/Edit.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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: