Scroll the abstract canvas to make a specific line.

        :param line: The line to scroll to.
499638
def scroll_to(self, line):
        
        self._buffer.scroll(line - self._start_line)
        self._start_line = line
1122273
private void createLine( int index0 , int index1 , List<Point2D_I32> contour , LineGeneral2D_F64 line )
	{
		if( index1 < 0 )
			System.out.println("SHIT");
		Point2D_I32 p0 = contour.get(index0);
		Point2D_I32 p1 = contour.get(index1);

//		System.out.println("createLine "+p0+" "+p1);

		work.a.set(p0.x, p0.y);
		work.b.set(p1.x, p1.y);

		UtilLine2D_F64.convert(work,line);

		// ensure A*A + B*B = 1
		line.normalize();
	}
121937
def _move_cursor_to_line(self, line):
        
        last_line = self._text_edit.document().blockCount() - 1
        self._cursor.clearSelection()
        self._cursor.movePosition(self._cursor.End)
        to_insert = ''
        for i in range(line - last_line):
            to_insert += '\n'
        if to_insert:
            self._cursor.insertText(to_insert)
        self._cursor.movePosition(self._cursor.Start)
        self._cursor.movePosition(self._cursor.Down, self._cursor.MoveAnchor, line)
        self._last_cursor_pos = self._cursor.position()
752793
function Line(options) {

    var self = this;
    this.manager = options.manager;
    this.paper = options.paper;

    if (options.id) {
        this._id = options.id;
    } else {
        this._id = this.manager.getRandomId();
    }
    this._x1 = options.x1;
    this._y1 = options.y1;
    this._x2 = options.x2;
    this._y2 = options.y2;
    this._strokeColor = options.strokeColor;
    this._strokeWidth = options.strokeWidth || 2;
    this.handle_wh = 6;
    this._selected = false;
    this._zoomFraction = 1;
    if (options.zoom) {
        this._zoomFraction = options.zoom / 100;
    }

    this.element = this.paper.path();
    this.element.attr({'cursor': 'pointer'});

    // Drag handling of line
    if (this.manager.canEdit) {
        this.element.drag(
            function(dx, dy) {
                // DRAG, update location and redraw
                dx = dx / self._zoomFraction;
                dy = dy / self._zoomFraction;

                var offsetX = dx - this.prevX;
                var offsetY = dy - this.prevY;
                this.prevX = dx;
                this.prevY = dy;

                // Manager handles move and redraw
                self.manager.moveSelectedShapes(offsetX, offsetY, true);
                return false;
            },
            function() {
                // START drag: note the location of all points
                self._handleMousedown();
                this.prevX = 0;
                this.prevY = 0;
                return false;
            },
            function() {
                // STOP
                // notify manager if line has moved
                if (this.prevX !== 0 || this.prevY !== 0) {
                    self.manager.notifySelectedShapesChanged();
                }
                return false;
            }
        );
    }

    this.createHandles();

    this.drawShape();
}
579179
def do_echo(self, line):
        
        args = self.line_to_args(line)
        self.print(*args)
671942
def jump_to_line l
    l = l.clamp 0, lines - 1
    return if @topline == l
    @topline = l
    @botline = [l + buffer.content_height, lines].min
    buffer.mark_dirty
  end
884648
function drawLinearTick(context, x1, y1, x2, y2) {
    context.beginPath();

    context.moveTo(x1, y1);
    context.lineTo(x2, y2);
    context.stroke();

    context.closePath();
    context.save();
}
59101
function startLine (e) {
            e.preventDefault();

            strokes = that.strokes;
            sketching = true;
            that.undos = [];

            var cursor = getCursorRelativeToCanvas(e);
            strokes.push({
                points: [cursor],
                color: opts.line.color,
                size: getLineSizeRelativeToCanvas(opts.line.size),
                cap: opts.line.cap,
                join: opts.line.join,
                miterLimit: opts.line.miterLimit
            });
        }
1243786
private LinkedList<String> toDisplayLines(String line) {
        LinkedList<String> displayLines = new LinkedList<String>();
        if (line.length() <= terminal.getWidth()) {
            displayLines.add(line);
        } else {
            int total = Math.max(0, line.length() - 1) / terminal.getWidth() + 1;
            int startIndex = 0;
            for (int l = 0; l < total; l++) {
                displayLines.add(line.substring(startIndex, Math.min(startIndex + terminal.getWidth(), line.length())));
                startIndex += terminal.getWidth();
            }
        }
        return displayLines;
    }
158179
def process(self, line):
        ''''''
        self.raw = self.raw + line
        try:
            if not line[-1] == self.eol_char:
                # Should always be here, but add it just in case.
                line = line + self.eol_char
        except IndexError:
            # Thrown if line == ''
            line = self.eol_char
                
        for char in line:
            if char == self.escape_char:
                # Always handle escaped characters.
                self.last_process_char = self.process_char
                self.process_char = self.process_escape
                continue
            self.process_char(char)
        if not self.complete:
            # Ask for more.
            self.process( self.handler.readline(prompt=self.handler.CONTINUE_PROMPT) )
1059371
def scroll_up(lines=1, file=sys.stdout):
    
    scroll.up(lines).write(file=file)
620095
def _set_scroll(self, *args):
        """"""
        self._canvas_scroll.xview(*args)
        self._canvas_ticks.xview(*args)
1122473
def _go_to_line(editor, line):
    
    b = editor.application.current_buffer
    b.cursor_position = b.document.translate_row_col_to_index(max(0, int(line) - 1), 0)
780055
def a_send_line(text, ctx):
    """"""
    if hasattr(text, '__iter__'):
        try:
            ctx.ctrl.sendline(text.next())
        except StopIteration:
            ctx.finished = True
    else:
        ctx.ctrl.sendline(text)
    return True
676881
def scroll(self, lines):
        
        line = [(ord(u" "), Screen.COLOUR_WHITE, 0, 0, 1) for _ in range(self._width)]
        if lines > 0:
            # Limit to buffer size - this will just invalidate all the data
            lines = min(lines, self._height)
            for y in range(0, self._height - lines):
                self._double_buffer[y] = self._double_buffer[y + lines]
                self._screen_buffer[y] = self._screen_buffer[y + lines]
            for y in range(self._height - lines, self._height):
                self._double_buffer[y] = line[:]
                self._screen_buffer[y] = line[:]
        else:
            # Limit to buffer size - this will just invalidate all the data
            lines = max(lines, -self._height)
            for y in range(0, -lines):
                self._double_buffer[self._height + lines + y] = line[:]
                self._screen_buffer[y] = line[:]
            for y in range(self._height - 1, -lines, -1):
                self._double_buffer[y] = self._double_buffer[y + lines]
                self._screen_buffer[y] = self._screen_buffer[y + lines]
1156502
def execute_lines(self, lines):
        """"""
        self.shell.execute_lines(to_text_string(lines))
        self.shell.setFocus()
544858
def go_to_line(self, line=None):
        """"""
        editorstack = self.get_current_editorstack()
        if editorstack is not None:
            editorstack.go_to_line(line)