+ upd: current Scintilla GitHub mirror dev stage (2019-05-19)

+ fix: focused view problem
This commit is contained in:
Rainer Kottenhoff 2019-05-19 03:02:30 +02:00
parent 8490e9114d
commit 6fcd11dc5d
11 changed files with 45 additions and 14 deletions

View File

@ -1 +1 @@
1711
1712

View File

@ -3,7 +3,7 @@
<assemblyIdentity
name="Notepad3"
processorArchitecture="*"
version="5.19.519.1711"
version="5.19.519.1712"
type="win32"
/>
<description>Notepad3 RC</description>

View File

@ -568,8 +568,17 @@
<a href="https://sourceforge.net/p/scintilla/feature-requests/1280/">Feature #1280</a>.
</li>
<li>
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.
</li>
<li>
Fix bug where changing identifier sets in lexers preserved previous identifiers.
</li>
<li>
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.
</li>
<li>
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

View File

@ -678,7 +678,6 @@ void CellBuffer::Allocate(Sci::Position newSize) {
void CellBuffer::SetUTF8Substance(bool utf8Substance_) {
if (utf8Substance != utf8Substance_) {
utf8Substance = utf8Substance_;
ResetLineEnds();
}
}

View File

@ -210,16 +210,24 @@ Sci::Line ContractionState<LINE>::DocFromDisplay(Sci::Line lineDisplay) const {
template <typename LINE>
void ContractionState<LINE>::InsertLines(Sci::Line lineDoc, Sci::Line lineCount) {
for (Sci::Line l = 0; l < lineCount; l++) {
InsertLine(lineDoc + l);
if (OneToOne()) {
linesInDocument += static_cast<LINE>(lineCount);
} else {
for (Sci::Line l = 0; l < lineCount; l++) {
InsertLine(lineDoc + l);
}
}
Check();
}
template <typename LINE>
void ContractionState<LINE>::DeleteLines(Sci::Line lineDoc, Sci::Line lineCount) {
for (Sci::Line l = 0; l < lineCount; l++) {
DeleteLine(lineDoc);
if (OneToOne()) {
linesInDocument -= static_cast<LINE>(lineCount);
} else {
for (Sci::Line l = 0; l < lineCount; l++) {
DeleteLine(lineDoc);
}
}
Check();
}

View File

@ -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;

View File

@ -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;

View File

@ -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);

View File

@ -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()

View File

@ -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);

View File

@ -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