mirror of
https://github.com/rizonesoft/Notepad3.git
synced 2026-06-14 21:09:05 +08:00
+ fix: default "Slop" values changed
This commit is contained in:
parent
2c147211f2
commit
f1c07dd897
Binary file not shown.
10
src/Edit.c
10
src/Edit.c
@ -3713,15 +3713,15 @@ void EditRemoveBlankLines(HWND hwnd, bool bMerge, bool bRemoveWhiteSpace)
|
||||
bSpcOnly = false;
|
||||
const DocPos posLnBeg = SciCall_PositionFromLine(iLine + nBlanks);
|
||||
const DocPos posLnEnd = SciCall_GetLineEndPosition(iLine + nBlanks);
|
||||
const int iLnLength = (posLnEnd - posLnBeg);
|
||||
const DocPos iLnLength = (posLnEnd - posLnBeg);
|
||||
|
||||
if (iLnLength == 0) {
|
||||
++nBlanks;
|
||||
bSpcOnly = true;
|
||||
}
|
||||
else if (bRemoveWhiteSpace) {
|
||||
const char* pLine = SciCall_GetRangePointer(posLnBeg, (DocPos)iLnLength);
|
||||
int i = 0;
|
||||
const char* pLine = SciCall_GetRangePointer(posLnBeg, iLnLength);
|
||||
DocPos i = 0;
|
||||
for (; i < iLnLength; ++i) {
|
||||
if (!IsWhiteSpace(pLine[i])) {
|
||||
break;
|
||||
@ -4384,7 +4384,7 @@ void EditSortLines(HWND hwnd, int iSortFlags)
|
||||
//
|
||||
// EditSelectEx()
|
||||
//
|
||||
void EditSelectEx(HWND hwnd, DocPos iAnchorPos, DocPos iCurrentPos, int vSpcAnchor, int vSpcCurrent)
|
||||
void EditSelectEx(HWND hwnd, DocPos iAnchorPos, DocPos iCurrentPos, DocPos vSpcAnchor, DocPos vSpcCurrent)
|
||||
{
|
||||
UNUSED(hwnd);
|
||||
|
||||
@ -4464,7 +4464,7 @@ void EditScrollTo(HWND hwnd, DocLn iScrollToLine, int iSlop)
|
||||
UNUSED(hwnd);
|
||||
|
||||
const int iXoff = SciCall_GetXoffset();
|
||||
const int iLinesOnScreen = SciCall_LinesOnScreen();
|
||||
const DocLn iLinesOnScreen = SciCall_LinesOnScreen();
|
||||
const DocLn iSlopLines = ((iSlop < 0) || (iSlop >= iLinesOnScreen)) ? (iLinesOnScreen/2) : iSlop;
|
||||
|
||||
SciCall_SetVisiblePolicy((VISIBLE_SLOP | VISIBLE_STRICT), iSlopLines);
|
||||
|
||||
@ -75,7 +75,7 @@ void EditSortLines(HWND,int);
|
||||
|
||||
void EditJumpTo(HWND, DocLn, DocPos);
|
||||
void EditScrollTo(HWND, DocLn, int);
|
||||
void EditSelectEx(HWND, DocPos, DocPos, int, int);
|
||||
void EditSelectEx(HWND, DocPos, DocPos, DocPos, DocPos);
|
||||
void EditFixPositions(HWND);
|
||||
void EditEnsureSelectionVisible(HWND);
|
||||
void EditGetExcerpt(HWND,LPWSTR,DWORD);
|
||||
|
||||
@ -6252,10 +6252,10 @@ void LoadSettings()
|
||||
bDenyVirtualSpaceAccess = IniSectionGetBool(pIniSection, L"DenyVirtualSpaceAccess", false);
|
||||
bUseOldStyleBraceMatching = IniSectionGetBool(pIniSection, L"UseOldStyleBraceMatching", false);
|
||||
|
||||
iCurrentLineHorizontalSlop = IniSectionGetInt(pIniSection, L"CurrentLineHorizontalSlop", 0);
|
||||
iCurrentLineHorizontalSlop = IniSectionGetInt(pIniSection, L"CurrentLineHorizontalSlop", 40);
|
||||
iCurrentLineHorizontalSlop = max(min(iCurrentLineHorizontalSlop, 2000), 0);
|
||||
|
||||
iCurrentLineVerticalSlop = IniSectionGetInt(pIniSection, L"CurrentLineVerticalSlop", 0);
|
||||
iCurrentLineVerticalSlop = IniSectionGetInt(pIniSection, L"CurrentLineVerticalSlop", 5);
|
||||
iCurrentLineVerticalSlop = max(min(iCurrentLineVerticalSlop, 200), 0);
|
||||
|
||||
LoadIniSection(L"Toolbar Images",pIniSection,cchIniSection);
|
||||
|
||||
@ -19,6 +19,9 @@
|
||||
|
||||
//~#define NP3_COMPILE_TEST 1
|
||||
|
||||
//
|
||||
// SC_DOCUMENTOPTION_TEXT_LARGE
|
||||
//
|
||||
#if defined(SCI_LARGE_FILE_SUPPORT)
|
||||
typedef Sci_Position DocPos;
|
||||
typedef Sci_PositionU DocPosU;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user