  	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 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 @@
++++ b/src/EditView.cxx	Sat Nov 08 21:00:02 2014 -0500
+@@ -185,6 +185,9 @@
  	pixmapIndentGuideHighlight = 0;
  	llc.SetLevel(LineLayoutCache::llcCaret);
  	posCache.SetSize(0x400);
++	tabArrowPaddingTop = 4;
 +	customDrawTabArrow = NULL;
++	customDrawWrapMarker = NULL;
  }
  
  EditView::~EditView() {
-@@ -1465,7 +1466,10 @@
+@@ -927,7 +930,11 @@
+ 			rcPlace.right = rcLine.right;
+ 			rcPlace.left = rcPlace.right - vsDraw.aveCharWidth;
+ 		}
+-		DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour());
++		if (customDrawWrapMarker == NULL) {
++			DrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour());
++		} else {
++			customDrawWrapMarker(surface, rcPlace, true, vsDraw.WrapColour());
++		}
+ 	}
+ }
+ 
+@@ -1201,7 +1208,7 @@
+ }
+ 
+ static void DrawWrapIndentAndMarker(Surface *surface, const ViewStyle &vsDraw, const LineLayout *ll,
+-	int xStart, PRectangle rcLine, ColourOptional background) {
++	int xStart, PRectangle rcLine, ColourOptional background, DrawWrapMarkerFn customDrawWrapMarker) {
+ 	// default bgnd here..
+ 	surface->FillRectangle(rcLine, background.isSet ? background :
+ 		vsDraw.styles[STYLE_DEFAULT].back);
+@@ -1219,7 +1226,11 @@
+ 		else
+ 			rcPlace.right = rcPlace.left + vsDraw.aveCharWidth;
+ 
+-		DrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour());
++		if (customDrawWrapMarker == NULL) {
++			DrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour());
++		} else {
++			customDrawWrapMarker(surface, rcPlace, false, vsDraw.WrapColour());
++		}
+ 	}
+ }
+ 
+@@ -1463,9 +1474,12 @@
+ 							if (vsDraw.whitespaceColours.fore.isSet)
+ 								textFore = vsDraw.whitespaceColours.fore;
  							surface->PenColour(textFore);
- 							PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4,
+-							PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4,
++							PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowPaddingTop,
  								rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent);
 -							DrawTabArrow(surface, rcTab, static_cast<int>(rcSegment.top + vsDraw.lineHeight / 2));
 +							if (customDrawTabArrow == NULL)

 /**
 * 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();
 

 						}
 					}
 				} else {
@@ -1632,7 +1646,7 @@
 
 	if ((ll->wrapIndent != 0) && (subLine > 0)) {
 		if (phase & drawBack) {
-			DrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background);
+			DrawWrapIndentAndMarker(surface, vsDraw, ll, xStart, rcLine, background, customDrawWrapMarker);
 		}
 		xStart += static_cast<int>(ll->wrapIndent);
 	}
diff -r 326449de45d0 src/EditView.h
--- a/src/EditView.h	Thu Sep 25 09:48:50 2014 +1000
+++ b/src/EditView.h	Sat Nov 08 21:00:02 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);
