Moves the cursor one place to the left, erasing the character at the
        current position. Cannot move beyond column zero, nor onto the
        previous line.
337463
def backspace(self):
        
        if self._cx + self._cw >= 0:
            self.erase()
            self._cx -= self._cw

        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);
        }
      }
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)
295113
def _move_cursor_to_column(self, column):
        
        last_col = len(self._cursor.block().text())
        self._cursor.movePosition(self._cursor.EndOfBlock)
        to_insert = ''
        for i in range(column - last_col):
            to_insert += ' '
        if to_insert:
            self._cursor.insertText(to_insert)
        self._cursor.movePosition(self._cursor.StartOfBlock)
        self._cursor.movePosition(self._cursor.Right, self._cursor.MoveAnchor, column)
        self._last_cursor_pos = self._cursor.position()
855858
def delete_one_letter(self, letter=RIGHT):
        """"""

        assert letter in (self.RIGHT, self.LEFT)

        if letter == self.LEFT:
            papy = self.cursor
            self.text = self.text[:self.cursor - 1] + self.text[self.cursor:]
            self.cursor = papy - 1

        else:
            self.text = self.text[:self.cursor] + self.text[self.cursor + 1:]
1130214
def restore_cursor(self):
        
        if self.savepoints:
            savepoint = self.savepoints.pop()

            self.g0_charset = savepoint.g0_charset
            self.g1_charset = savepoint.g1_charset
            self.charset = savepoint.charset

            if savepoint.origin:
                self.set_mode(mo.DECOM)
            if savepoint.wrap:
                self.set_mode(mo.DECAWM)

            self.cursor = savepoint.cursor
            self.ensure_hbounds()
            self.ensure_vbounds(use_margins=True)
        else:
            # If nothing was saved, the cursor moves to home position;
            # origin mode is reset. :todo: DECAWM?
            self.reset_mode(mo.DECOM)
            self.cursor_position()
207292
function moveCursorRelative(stream, dx, dy) {
  if (dx < 0) {
    stream.write('\x1b[' + (-dx) + 'D');
  } else if (dx > 0) {
    stream.write('\x1b[' + dx + 'C');
  }

  if (dy < 0) {
    stream.write('\x1b[' + (-dy) + 'A');
  } else if (dy > 0) {
    stream.write('\x1b[' + dy + 'B');
  }
}
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)
682086
def lf (self):
        '''
        '''

        old_r = self.cur_r
        self.cursor_down()
        if old_r == self.cur_r:
            self.scroll_up ()
            self.erase_line()
931255
private void skipToEndOfLine()
  {
    while (pos < limit) {
      char c = in.charAt(pos++);
      if (c == '\n') {
        lineNumber++;
        lineStart = pos;
        break;
      } else if (c == '\r') {
        break;
      }
    }
  }
1339663
private void shift()
    {
        int currentPos = 1; // Asterisk starts at 1

        synchronized (entries)
        {
            for (AsteriskQueueEntryImpl qe : entries)
            {
                // Only set (and fire PCE on qe) if necessary
                if (qe.getPosition() != currentPos)
                {
                    qe.setPosition(currentPos);
                }
                currentPos++;
            }
        }
    }
338392
function updatePosition(str) {
    var lines = str.match(/\n/g);
    if (lines) lineno += lines.length;
    var i = str.lastIndexOf('\n');
    column = ~i ? str.length - i : column + str.length;
  }
1158548
def add!(char)
      left, cursor, right = abbrev_segments
      @abbrev = left + char + cursor + right
      @col += 1
      redraw
    end
1363682
public void moveToEndOfLine() {
        String currentLine = getContent(getLine());
        LinkedList<String> toDisplayLines = toDisplayLines(currentLine);
        int remainingLines = getColumn() / terminal.getWidth() + 1;
        for (int r = 0; r < remainingLines; r++) {
            toDisplayLines.removeFirst();
        }
        frameColumn = currentLine.length();
        delegate.moveToEndOfLine();
        for (int l = 0; l < toDisplayLines.size(); l++) {
            frameLine++;
            frameColumn -= terminal.getWidth();
            if (frameLine >= terminal.getHeight() - getFooterSize()) {
                frameLine = terminal.getHeight() - getHeaderSize() - getFooterSize();
                scrollUp(1);
                console.out().print(ansi().cursor(frameLine + getHeaderSize(), 1));
                displayText(toDisplayLines.get(l));
                console.out().print(ansi().cursor(frameLine + getHeaderSize(), getColumn()));
            }
        }
        console.out().print(ansi().cursor(frameLine + getHeaderSize(), frameColumn));
    }
1183361
def cursor(lcd, row, col):
    
    warnings.warn('The `cursor` context manager is deprecated', DeprecationWarning)
    lcd.cursor_pos = (row, col)
    yield
61989
void updateCurrentLine () {
		int index = calculateCurrentLineIndex(cursor);
		int line = index / 2;
		// Special case when cursor moves to the beginning of the line from the end of another and a word
		// wider than the box
		if (index % 2 == 0 || index + 1 >= linesBreak.size || cursor != linesBreak.items[index]
				|| linesBreak.items[index + 1] != linesBreak.items[index]) {
			if (line < linesBreak.size / 2 || text.length() == 0 || text.charAt(text.length() - 1) == ENTER_ANDROID
					|| text.charAt(text.length() - 1) == ENTER_DESKTOP) {
				cursorLine = line;
			}
		}
	}
224559
def cut(self):
        
        cursorPos = self._qpart.cursorPosition
        topLeft = (min(self._start[0], cursorPos[0]),
                   min(self._start[1], cursorPos[1]))
        self.copy()
        self.delete()

        """Move cursor to top-left corner of the selection,
        so that if text gets pasted again, original text will be restored"""
        self._qpart.cursorPosition = topLeft