def METHOD_NAME(self):
    cursorX = self.entry.guiItem.getCursorX() * self.entry['text_scale'][0]
    canvasX = self.canvas.getX()
    visXMin = self.clipXMin - canvasX
    visXMax = self.clipXMax - canvasX
    visXCenter = (visXMin + visXMax) * 0.5
    distanceToCenter = visXCenter - cursorX
    newX = canvasX + distanceToCenter
    clipExtent = self.clipXMax - self.clipXMin
    entryExtent = self.entry['text_scale'][0] * self.entry['width']
    entryWiggle = entryExtent - clipExtent
    if self.entry.guiItem.getCursorPosition() <= 0: #deals with the cursor jump bug
        newX = 0.0
    elif newX > 0.0:
        newX = 0.0
    elif newX < (-entryWiggle):
        newX = -entryWiggle
    #print("CursorX %s CanvasX %s VisCenter %s Distance %s NewX %s Wiggle %s" % (cursorX, canvasX, visXCenter, distanceToCenter, newX, entryWiggle))
    self.canvas.setX(newX)