def delete_characters(self, count=0):
        """
        Delete n characters from cursor including cursor within the current line.
        :param count: If count is 0, delete till the next newline.
        """
        if self.cursor_xs == self.text_length or self._buffer[self.cursor_xs] == '\n':
            return
        if count == 0:  # delete till the next newline
            count = self.text_length
        with self.buffer_rotate(-self.cursor_xs):
            for _ in xrange(min(count, self.text_length - self.cursor_xs)):
                c = self._buffer.popleft()
                if c.data == '\n':  # do not delete newline
                    self._buffer.appendleft(c)
                    break
            self.x_drawend = self.cursor_xs
            if self.x_drawend < self.intact_right_bound:
                self.intact_right_bound = self.x_drawend

        Delete n characters from cursor including cursor within the current line.
        :param count: If count is 0, delete till the next newline.
        
system/shscreens.py