Deletes the line content after the cursor
13949
def _end_del(self):
        
        text = self.edit_text[:self.edit_pos]
        self.set_edit_text(text)
372571
public void cleanup() {
        if (lineSource != null) {
            try {
                lineSource.close();
            } catch (Exception e) {
                // Ignore
            }
        }

        lineSource = null;
        line = null;
        number = 0;
    }
801433
private void skipToEndOfLine() {
		for (; this.pos < this.in.length(); this.pos++) {
			char c = this.in.charAt(this.pos);
			if (c == '\r' || c == '\n') {
				this.pos++;
				break;
			}
		}
	}
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();
    }
1043904
def end_of_line(event):
    "  "
    buff = event.current_buffer
    buff.cursor_position += buff.document.get_end_of_line_position()
543540
function cleanContent() {
    function transform(file, cb) {
        file.contents = new Buffer((function (src) {
            var lines = src.replace('_.mixin({\n','').split('\n'),
                last = lines.pop();
            // handle empty lines at the end of the file
            while(last===''){
                last = lines.pop();
            }
            return lines.join('\n');
        })(String(file.contents)));
        cb(null, file);
    }

    return require('event-stream').map(transform);
}
102850
def erase_line (self): # <ESC>[2K
        ''''''

        self.fill_region (self.cur_r, 1, self.cur_r, self.cols)
710074
function clearStringBackwards(stream: tty.WriteStream, str: string): void {
  readline.moveCursor(stream, -stream.columns, 0);
  readline.clearLine(stream, 0);
  let lineCount = (str.match(/\n/g) || []).length;
  while (lineCount > 0) {
    readline.moveCursor(stream, 0, -1);
    readline.clearLine(stream, 0);
    --lineCount;
  }
}
88231
def clear_selection(self):
        """"""
        cursor = self.textCursor()
        cursor.clearSelection()
        self.setTextCursor(cursor)
1083092
private void commentLinesAfter( String content, int line ) {
        int offset = rootElement.getElement(line).getEndOffset();
        // End of comment not found, nothing to do
        int endDelimiter = indexOf(content, getEndDelimiter(), offset);
        if (endDelimiter < 0)
            return;
        // Matching start/end of comment found, comment the lines
        int startDelimiter = lastIndexOf(content, getStartDelimiter(), endDelimiter);
        if (startDelimiter < 0 || startDelimiter <= offset) {
            doc.setCharacterAttributes(offset, endDelimiter - offset + 1, comment, false);
        }
    }
841519
def kill_cursor(self, cursor):
        
        text = cursor.selectedText()
        if text:
            cursor.removeSelectedText()
            self.kill(text)
632231
def delete_horizontal_space(event):
    "  "
    buff = event.current_buffer
    text_before_cursor = buff.document.text_before_cursor
    text_after_cursor = buff.document.text_after_cursor

    delete_before = len(text_before_cursor) - len(text_before_cursor.rstrip('\t '))
    delete_after = len(text_after_cursor) - len(text_after_cursor.lstrip('\t '))

    buff.delete_before_cursor(count=delete_before)
    buff.delete(count=delete_after)
1004133
public void clearTextWrap() {
		float tmpHeight = imageEnd - currentHeight;
		if (line != null) {
			tmpHeight += line.height();
		}
		if ((imageEnd > -1) && (tmpHeight > 0)) {
			carriageReturn();
			currentHeight += tmpHeight;
		}
	}
568256
def is_cursor_on_last_line(self):
        """"""
        cursor = self.textCursor()
        cursor.movePosition(QTextCursor.EndOfBlock)
        return cursor.atEnd()
1031707
function removeEmptyLinesAfter(
  node /*: postcss$node*/,
  newline /*: '\n' | '\r\n'*/
) /*: postcss$node*/ {
  node.raws.after = node.raws.after.replace(/(\r?\n\s*\r?\n)+/g, newline);

  return node;
}
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)
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)