  								textFore = vsDraw.whitespaceColours.fore;
  							surface->PenColour(textFore);
 -							PRectangle rcTab(rcSegment.left + 1, rcSegment.top + 4,
-+							PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowPaddingTop,
++							PRectangle rcTab(rcSegment.left + 1, rcSegment.top + tabArrowHeight,
  								rcSegment.right - 1, rcSegment.bottom - vsDraw.maxDescent);
 -							DrawTabArrow(surface, rcTab, static_cast<int>(rcSegment.top + vsDraw.lineHeight / 2));
 +							if (customDrawTabArrow == NULL)

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

 	pixmapIndentGuideHighlight = 0;
 	llc.SetLevel(LineLayoutCache::llcCaret);
 	posCache.SetSize(0x400);
+	tabArrowHeight = 4;
+	customDrawTabArrow = NULL;
+	customDrawWrapMarker = NULL;
 }
