diff --git a/Versions/build.txt b/Versions/build.txt index f34461850..758f7c981 100644 --- a/Versions/build.txt +++ b/Versions/build.txt @@ -1 +1 @@ -1711 +1712 diff --git a/res/Notepad3.exe.manifest.conf b/res/Notepad3.exe.manifest.conf index 3750c4264..618dbab69 100644 --- a/res/Notepad3.exe.manifest.conf +++ b/res/Notepad3.exe.manifest.conf @@ -3,7 +3,7 @@ Notepad3 RC diff --git a/scintilla/doc/ScintillaHistory.html b/scintilla/doc/ScintillaHistory.html index cdd31553e..66fcaf36b 100644 --- a/scintilla/doc/ScintillaHistory.html +++ b/scintilla/doc/ScintillaHistory.html @@ -568,8 +568,17 @@ Feature #1280.
  • + Improved performance of line folding code on large files when no folds are contracted. + This improves the time taken to open or close large files. +
  • +
  • Fix bug where changing identifier sets in lexers preserved previous identifiers.
  • +
  • + Fixed bug where changing to Unicode would rediscover line end positions even if still + sticking to ASCII (not Unicode NEL, LS, PS) line ends. + Only noticeable on huge files with over 100,000 lines. +
  • Changed behaviour of SCI_STYLESETCASE(*,SC_CASE_CAMEL) so that it only treats 'a-zA-Z' as word characters because this covers the feature's intended use (viewing case-insensitive ASCII-only diff --git a/scintilla/src/CellBuffer.cxx b/scintilla/src/CellBuffer.cxx index 4d8e711ee..f2445751f 100644 --- a/scintilla/src/CellBuffer.cxx +++ b/scintilla/src/CellBuffer.cxx @@ -678,7 +678,6 @@ void CellBuffer::Allocate(Sci::Position newSize) { void CellBuffer::SetUTF8Substance(bool utf8Substance_) { if (utf8Substance != utf8Substance_) { utf8Substance = utf8Substance_; - ResetLineEnds(); } } diff --git a/scintilla/src/ContractionState.cxx b/scintilla/src/ContractionState.cxx index 565f9e141..8b5821470 100644 --- a/scintilla/src/ContractionState.cxx +++ b/scintilla/src/ContractionState.cxx @@ -210,16 +210,24 @@ Sci::Line ContractionState::DocFromDisplay(Sci::Line lineDisplay) const { template void ContractionState::InsertLines(Sci::Line lineDoc, Sci::Line lineCount) { - for (Sci::Line l = 0; l < lineCount; l++) { - InsertLine(lineDoc + l); + if (OneToOne()) { + linesInDocument += static_cast(lineCount); + } else { + for (Sci::Line l = 0; l < lineCount; l++) { + InsertLine(lineDoc + l); + } } Check(); } template void ContractionState::DeleteLines(Sci::Line lineDoc, Sci::Line lineCount) { - for (Sci::Line l = 0; l < lineCount; l++) { - DeleteLine(lineDoc); + if (OneToOne()) { + linesInDocument -= static_cast(lineCount); + } else { + for (Sci::Line l = 0; l < lineCount; l++) { + DeleteLine(lineDoc); + } } Check(); } diff --git a/scintilla/src/Editor.cxx b/scintilla/src/Editor.cxx index 4fb4eb2a5..947b39f6a 100644 --- a/scintilla/src/Editor.cxx +++ b/scintilla/src/Editor.cxx @@ -4507,7 +4507,7 @@ void Editor::ButtonDownWithModifiers(Point pt, unsigned int curTime, int modifie if (hoverIndicatorPos != Sci::invalidPosition) if (modifiers & (SCI_ALT | SCI_CTRL)) { DisplayCursor(Window::cursorHand); } // <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<< - //Platform::DebugPrintf("ButtonDown %d %d = %d alt=%d %d\n", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop); + //Platform::DebugPrintf("ButtonDown %d %d = %d alt=%d %d\n", curTime, lastClickTime, curTime - lastClickTime, alt, inDragDrop); ptMouseLast = pt; const bool ctrl = (modifiers & SCI_CTRL) != 0; const bool shift = (modifiers & SCI_SHIFT) != 0; diff --git a/scintilla/win32/ScintillaWin.cxx b/scintilla/win32/ScintillaWin.cxx index 8f3d237aa..32ec95d9f 100644 --- a/scintilla/win32/ScintillaWin.cxx +++ b/scintilla/win32/ScintillaWin.cxx @@ -1547,8 +1547,10 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam break; case WM_MOUSEMOVE: { +// >>>>>>>>>>>>>>> BEG NON STD SCI PATCH >>>>>>>>>>>>>>> #if 0 const Point pt = PointFromLParam(lParam); + // Windows might send WM_MOUSEMOVE even though the mouse has not been moved: // https://blogs.msdn.com/b/oldnewthing/archive/2003/10/01/55108.aspx XYPOSITION const dx = abs(ptMouseLast.x - pt.x); @@ -1561,6 +1563,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam const Point pt = PointFromLParam(lParam); SetTrackMouseLeaveEvent(true); ButtonMoveWithModifiers(pt, ::GetMessageTime(), MouseModifiers(wParam)); +// <<<<<<<<<<<<<<< END NON STD SCI PATCH <<<<<<<<<<<<<<< } break; @@ -1581,6 +1584,7 @@ sptr_t ScintillaWin::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam CancelModes(); SetEmptySelection(PositionFromLocation(PointFromLParam(lParam))); } + RightButtonDownWithModifiers(pt, ::GetMessageTime(), MouseModifiers(wParam)); } break; diff --git a/src/Edit.c b/src/Edit.c index ce7c362a1..c17761e59 100644 --- a/src/Edit.c +++ b/src/Edit.c @@ -6930,11 +6930,7 @@ void EditHideNotMarkedLineRange(HWND hwnd, bool bHideLines) EditFinalizeStyling(hwnd, -1); FocusedView.CodeFoldingAvailable = true; FocusedView.ShowCodeFolding = true; - - Style_SetFoldingProperties(FocusedView.CodeFoldingAvailable); - SciCall_SetProperty("fold.compact", "1"); - // special case, cause Lexer is mad - SciCall_SetProperty("fold.ahkl.skip", "1"); + Style_SetFoldingFocusedView(); Style_SetFolding(hwnd, true); diff --git a/src/Styles.c b/src/Styles.c index 5be9020d3..b93067c15 100644 --- a/src/Styles.c +++ b/src/Styles.c @@ -820,6 +820,20 @@ void Style_SetFoldingProperties(bool active) } +//============================================================================= +// +// Style_SetFoldingFocusedView() +// +void Style_SetFoldingFocusedView() +{ + SciCall_SetProperty("fold", "1"); + SciCall_SetProperty("fold.comment", "1"); + SciCall_SetProperty("fold.compact", "0"); + SciCall_SetProperty("fold.foldsyntaxbased", "1"); + SciCall_SetProperty("fold.ahkl.skip", "1"); +} + + //============================================================================= // // Style_SetLexer() diff --git a/src/Styles.h b/src/Styles.h index 69d7a006f..22e930216 100644 --- a/src/Styles.h +++ b/src/Styles.h @@ -44,6 +44,7 @@ void Style_DynamicThemesMenuCmd(int cmd, bool bEnableSaveSettings); float Style_GetCurrentFontSize(); void Style_SetFoldingAvailability(PEDITLEXER pLexer); void Style_SetFoldingProperties(bool active); +void Style_SetFoldingFocusedView(); void Style_SetLexer(HWND hwnd,PEDITLEXER pLexNew); void Style_SetUrlHotSpot(HWND hwnd); void Style_SetInvisible(HWND hwnd, bool); diff --git a/src/VersionEx.h b/src/VersionEx.h index 98af06d37..b6256335a 100644 --- a/src/VersionEx.h +++ b/src/VersionEx.h @@ -8,7 +8,7 @@ #define VERSION_MAJOR 5 #define VERSION_MINOR 19 #define VERSION_REV 519 -#define VERSION_BUILD 1711 +#define VERSION_BUILD 1712 #define SCINTILLA_VER 415+ #define ONIGMO_REGEX_VER 6.2.0 #define VERSION_PATCH RC