diff -r 5693714a8b0b src/Catalogue.cxx --- a/src/Catalogue.cxx Fri Dec 06 16:19:52 2013 +1100 +++ b/src/Catalogue.cxx Sun Dec 15 21:21:20 2013 -0500 @@ -74,6 +74,7 @@ // Shorten the code that declares a lexer and ensures it is linked in by calling a method. #define LINK_LEXER(lexer) extern LexerModule lexer; Catalogue::AddLexerModule(&lexer); +#if 0 //++Autogenerated -- run scripts/LexGen.py to regenerate //**\(\tLINK_LEXER(\*);\n\) LINK_LEXER(lmA68k); @@ -187,6 +188,8 @@ LINK_LEXER(lmYAML); //--Autogenerated -- end of automatically generated section +#endif + LINK_LEXER(lmLPeg); return 1; } diff -r 326449de45d0 gtk/ScintillaGTK.cxx --- a/gtk/ScintillaGTK.cxx Thu Sep 25 09:48:50 2014 +1000 +++ b/gtk/ScintillaGTK.cxx Tue Oct 07 12:28:16 2014 -0400 @@ -1563,6 +1563,13 @@ len--; // Forget the extra '\0' #endif +#if PLAT_GTK_WIN32 + // Win32 includes an ending '\0' byte in 'len' for clipboard text from + // external applications; ignore it. + if (len > 0 && data[len - 1] == '\0') + len--; +#endif + std::string dest(data, len); if (selectionTypeData == GDK_TARGET_STRING) { if (IsUnicodeMode()) { diff -r 01c4696a39a9 src/Editor.cxx --- a/src/Editor.cxx Tue Sep 30 09:58:13 2014 +1000 +++ b/src/Editor.cxx Wed Oct 22 13:22:55 2014 -0400 @@ -112,6 +112,7 @@ mouseDownCaptures = true; lastClickTime = 0; + clickCloseThreshold = 3; dwellDelay = SC_TIME_FOREVER; ticksToDwell = SC_TIME_FOREVER; dwelling = false; @@ -3757,10 +3758,10 @@ EnsureCaretVisible(); } -static bool Close(Point pt1, Point pt2) { - if (abs(pt1.x - pt2.x) > 3) +static bool Close(Point pt1, Point pt2, int threshold) { + if (abs(pt1.x - pt2.x) > threshold) return false; - if (abs(pt1.y - pt2.y) > 3) + if (abs(pt1.y - pt2.y) > threshold) return false; return true; } @@ -4116,7 +4117,7 @@ if (shift && !inSelMargin) { SetSelection(newPos); } - if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick)) { + if (((curTime - lastClickTime) < Platform::DoubleClickTime()) && Close(pt, lastClick, clickCloseThreshold)) { //Platform::DebugPrintf("Double click %d %d = %d\n", curTime, lastClickTime, curTime - lastClickTime); SetMouseCapture(true); if (FineTickerAvailable()) { diff -r 01c4696a39a9 src/Editor.h --- a/src/Editor.h Tue Sep 30 09:58:13 2014 +1000 +++ b/src/Editor.h Wed Oct 22 13:22:55 2014 -0400 @@ -203,6 +203,7 @@ Point lastClick; unsigned int lastClickTime; + int clickCloseThreshold; int dwellDelay; int ticksToDwell; bool dwelling; diff -r 326449de45d0 src/EditView.cxx --- a/src/EditView.cxx Thu Sep 25 09:48:50 2014 +1000 +++ b/src/EditView.cxx Fri Nov 07 22:12:15 2014 -0500 @@ -185,6 +185,7 @@ pixmapIndentGuideHighlight = 0; llc.SetLevel(LineLayoutCache::llcCaret); posCache.SetSize(0x400); + customDrawTabArrow = NULL; } EditView::~EditView() { @@ -1465,7 +1466,10 @@ surface->PenColour(textFore); PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4, rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent); - DrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); + if (customDrawTabArrow == NULL) + DrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); + else + customDrawTabArrow(surface, rcTab, static_cast(rcSegment.top + vsDraw.lineHeight / 2)); } } } else { diff -r 326449de45d0 src/EditView.h --- a/src/EditView.h Thu Sep 25 09:48:50 2014 +1000 +++ b/src/EditView.h Fri Nov 07 22:12:15 2014 -0500 @@ -42,6 +42,8 @@ void DrawStyledText(Surface *surface, const ViewStyle &vs, int styleOffset, PRectangle rcText, const StyledText &st, size_t start, size_t length, DrawPhase phase); +typedef void (*DrawTabArrowFn)(Surface *, PRectangle, int); + /** * EditView draws the main text area. */ @@ -78,6 +80,12 @@ LineLayoutCache llc; PositionCache posCache; + /** Some platforms, notably PLAT_CURSES, do not support Scintilla's native + * DrawTabArrow function for drawing tab characters. Allow those platforms to + * override it instead of creating a new method in the Surface class that + * existing platforms must implement as empty. */ + DrawTabArrowFn customDrawTabArrow; + EditView(); virtual ~EditView();