Erases from the current cursor position to the start of the current
        line.
322893
def erase_start_of_line (self): # <ESC>[1K
        ''''''

        self.fill_region (self.cur_r, 1, self.cur_r, self.cur_c)
1354377
def erase_lines(n=1):
    
    for _ in range(n):
        print(codes.cursor["up"], end="")
        print(codes.cursor["eol"], end="")
1258767
void redrawRestOfLine() {
        //The number of lines to reach the end of the frame.
        int maxLinesToRepaint = terminal.getHeight() - getFooterSize() - frameLine;
        LinkedList<String> toRepaintLines = new LinkedList<String>();
        String currentLine = getContent(getLine());
        toRepaintLines.addAll(toDisplayLines(currentLine));
        //Remove already shown lines
        int remainingLines = (getColumn() - 1) / terminal.getWidth();
        for (int r = 0; r < remainingLines; r++) {
            toRepaintLines.removeFirst();
        }

        saveCursorPosition();
        for (int l = 0; l < Math.min(maxLinesToRepaint, toRepaintLines.size()); l++) {
            console.out().print(ansi().cursor(frameLine + getHeaderSize() + l, 1));
            console.out().print(ansi().eraseLine(Erase.FORWARD));
            displayText(toRepaintLines.get(l));
        }
        restoreCursorPosition();
    }
574646
def cut(self):
        
        tc = self.textCursor()
        helper = TextHelper(self)
        tc.beginEditBlock()
        no_selection = False
        sText = tc.selection().toPlainText()
        if not helper.current_line_text() and sText.count("\n") > 1:
            tc.deleteChar()
        else:
            if not self.textCursor().hasSelection():
                no_selection = True
                TextHelper(self).select_whole_line()
            super(CodeEdit, self).cut()
            if no_selection:
                tc.deleteChar()
        tc.endEditBlock()
        self.setTextCursor(tc)
1109803
void showCursor () {
		updateCurrentLine();
		if (cursorLine != firstLineShowing) {
			int step = cursorLine >= firstLineShowing ? 1 : -1;
			while (firstLineShowing > cursorLine || firstLineShowing + linesShowing - 1 < cursorLine) {
				firstLineShowing += step;
			}
		}
	}
1192174
protected void onCursorUpdated()
	{
		if (getParent() == null)
			return;

		startTimer = System.currentTimeMillis();
		//- 4 because Padding.of(2) for clipping
		if (text.length() == 0)
			xOffset = 0;
		else if (cursor.x <= -xOffset)
			xOffset = -cursor.x;
		else if (cursor.x >= innerSize().width() - xOffset)
			xOffset = Math.min(innerSize().width() - cursor.x - 4, 0);
		else if (guiText.size().width() <= innerSize().width() - xOffset - 5)
			xOffset = Math.min(innerSize().width() - guiText.size().width() - 4, 0);
	}
440884
def reverseCommit(self):
        

        if self.markerPos is None:
            return

        # Remove the specified string from the same position in every line
        # in between the mark and the cursor (inclusive).
        col = min((self.markerPos[1], self.cursorPos[1]))
        for line in range(self.markerPos[0], self.cursorPos[0] + 1):
            self.qteWidget.setSelection(line, col, line, col + len(self.text))
            self.baseClass.removeSelectedText()

        self.qteWidget.setCursorPosition(*self.cursorPos)
275027
protected void clearLine() {
        StringBuilder sb = new StringBuilder();
        for (int i = 0; i < terminal.getWidth(); i++) {
            sb.append(" ");
        }
        console.out().print(sb.toString());
    }
212293
def clear(self, scope = 'screen'):
        """"""
        if scope == 'line':
            self.clear('beginning of line')
            self.clear('end of line')
        else: self.stream.write(self._get_cap('clear '+scope))
        self.flush()
1211180
function(cm, operatorArgs, _vim, curStart, curEnd) {
        // If the ending line is past the last line, inclusive, instead of
        // including the trailing \n, include the \n before the starting line
        if (operatorArgs.linewise &&
            curEnd.line > cm.lastLine() && curStart.line > cm.firstLine()) {
          curStart.line--;
          curStart.ch = lineLength(cm, curStart.line);
        }
        vimGlobalState.registerController.pushText(
            operatorArgs.registerName, 'delete', cm.getRange(curStart, curEnd),
            operatorArgs.linewise);
        cm.replaceRange('', curStart, curEnd);
        if (operatorArgs.linewise) {
          cm.setCursor(motions.moveToFirstNonWhiteSpaceCharacter(cm));
        } else {
          cm.setCursor(curStart);
        }
      }
1148376
def kill_line(event):
    
    buff = event.current_buffer
    if event.arg < 0:
        deleted = buff.delete_before_cursor(count=-buff.document.get_start_of_line_position())
    else:
        if buff.document.current_char == '\n':
            deleted = buff.delete(1)
        else:
            deleted = buff.delete(count=buff.document.get_end_of_line_position())
    event.cli.clipboard.set_text(deleted)
572144
def reset(self):
        
        self._cli.reset()
        self._cli.buffers[DEFAULT_BUFFER].reset()
        self._cli.renderer.request_absolute_cursor_position()
        self._cli._redraw()
45452
public void resetCursor() {
        if(buffer == null) {
            buffer = Pointer.create(new byte[bufsize], 0);
        }
        buffer.buffer[buffer.start] = 0;
        cursor = -1;
        lineptr = -1;
        linectptr = -1;
        token = -1;
        toktmp = -1;
        marker = -1;
        limit = -1;

        root = null;
        root_on_error = null;
        linect = 0;
        eof = false;
        last_token = 0;
        force_token = 0;
    }
182046
function(start, end, direction) {
      var current = (start = startOfLine(start)), before = start && startOfLine(start.previousSibling);
      if (!isBR(end)) end = endOfLine(end, this.container);
      this.addDirtyNode(start);

      do {
        var next = endOfLine(current, this.container);
        if (current) this.highlight(before, next, true);
        this.indentLineAfter(current, direction);
        before = current;
        current = next;
      } while (current != end);
      select.setCursorPos(this.container, {node: start, offset: 0}, {node: end, offset: 0});
    }
567889
public static void dumpCursor(Cursor cursor, StringBuilder sb) {
        sb.append(">>>>> Dumping cursor " + cursor + "\n");
        if (cursor != null) {
            int startPos = cursor.getPosition();

            cursor.moveToPosition(-1);
            while (cursor.moveToNext()) {
                dumpCurrentRow(cursor, sb);
            }
            cursor.moveToPosition(startPos);
        }
        sb.append("<<<<<\n");
    }
1043904
def end_of_line(event):
    "  "
    buff = event.current_buffer
    buff.cursor_position += buff.document.get_end_of_line_position()
174990
private void skipToEndOfLine() throws IOException {
    while (pos < limit || fillBuffer(1)) {
      char c = buffer[pos++];
      if (c == '\n') {
        lineNumber++;
        lineStart = pos;
        break;
      } else if (c == '\r') {
        break;
      }
    }
  }