mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-11 21:03:05 +08:00
+ fix: Extended Toggle Line Comment Block should not select last line
This commit is contained in:
parent
62796a9833
commit
cbaf98e0b9
@ -1 +1 @@
|
||||
2653
|
||||
2654
|
||||
|
||||
@ -3,7 +3,7 @@
|
||||
<assemblyIdentity
|
||||
name="Notepad3"
|
||||
processorArchitecture="*"
|
||||
version="5.19.926.2653"
|
||||
version="5.19.927.2654"
|
||||
type="win32"
|
||||
/>
|
||||
<description>Notepad3 BETA</description>
|
||||
|
||||
12
src/Edit.c
12
src/Edit.c
@ -3243,8 +3243,9 @@ void EditToggleLineCommentsSimple(HWND hwnd, LPCWSTR pwszComment, bool bInsertAt
|
||||
const DocLn iLineStart = SciCall_LineFromPosition(iSelStart);
|
||||
DocLn iLineEnd = SciCall_LineFromPosition(iSelEnd);
|
||||
|
||||
// don't consider (last) line where caret is before 1st column
|
||||
if (iSelEnd <= SciCall_PositionFromLine(iLineEnd)) {
|
||||
if ((iLineEnd - iLineStart) >= 1) {
|
||||
if ((iLineEnd - iLineStart) >= 1) { // except it is the only one
|
||||
--iLineEnd;
|
||||
}
|
||||
}
|
||||
@ -3383,6 +3384,15 @@ void EditToggleLineCommentsExtended(HWND hwnd, LPCWSTR pwszComment, bool bInsert
|
||||
const DocLn iLineStart = SciCall_LineFromPosition(iSelStart);
|
||||
DocLn iLineEnd = SciCall_LineFromPosition(iSelEnd);
|
||||
|
||||
if (!Sci_IsMultiOrRectangleSelection()) {
|
||||
// don't consider (last) line where caret is before 1st column
|
||||
if (iSelEnd <= SciCall_PositionFromLine(iLineEnd)) {
|
||||
if ((iLineEnd - iLineStart) >= 1) { // except it is the only one
|
||||
--iLineEnd;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
DocPos iCommentCol = 0;
|
||||
|
||||
if (!bInsertAtStart) {
|
||||
|
||||
@ -7,8 +7,8 @@
|
||||
#define SAPPNAME "Notepad3"
|
||||
#define VERSION_MAJOR 5
|
||||
#define VERSION_MINOR 19
|
||||
#define VERSION_REV 926
|
||||
#define VERSION_BUILD 2653
|
||||
#define VERSION_REV 927
|
||||
#define VERSION_BUILD 2654
|
||||
#define SCINTILLA_VER 420
|
||||
#define ONIGURUMA_REGEX_VER 6.9.3
|
||||
#define UCHARDET_VER 2018.09.27
|
||||
|
||||
Loading…
Reference in New Issue
Block a user