def backspace(self):
        """Delete the previous character."""
        curs = reversed(sorted(self.cursors, key=lambda c: (c[1], c[0])))
        # Iterate through all cursors from bottom to top
        for cursor in curs:
            line_no = cursor.y
            # If we're at the beginning of file don't do anything
            if cursor.x == 0 and cursor.y == 0:
                continue
            # If were operating at the beginning of a line
            if cursor.x == 0 and cursor.y != 0:
                curr_line = self.lines.pop(line_no)
                prev_line = self.lines[line_no-1]
                length = len(prev_line)  # Get the length of previous line

                # Add the current line to the previous one
                new_data = self.lines[cursor.y-1] + curr_line
                self.lines[cursor.y-1].set_data(new_data)

                # Get all cursors on current line
                line_cursors = self.get_cursors_on_line(line_no)

                for line_cursor in line_cursors:  # Move the cursors
                    line_cursor.move_up()
                    # Add the length of previous line to each x coordinate
                    # so that their relative positions
                    line_cursor.move_right(length)
                # Move all cursors below up one line
                # (since a line was removed above them)
                self.move_y_cursors(cursor.y, -1)
            # Handle all other cases
            else:
                curr_line = self.lines[line_no]
                # Remove one character by default
                del_n_chars = 1
                # Check if we should unindent
                if self.config["backspace_unindent"]:
                    # Check if we can unindent,
                    # and that it's actually  whitespace
                    indent = self.config["tab_width"]
                    if cursor.x >= indent:
                        if curr_line[cursor.x-indent:cursor.x] == indent*" ":
                            # Remove an indents worth of whitespace
                            del_n_chars = indent
                # Slice characters out of the line
                start = curr_line[:cursor.x-del_n_chars]
                end = curr_line[cursor.x:]
                # Store the new line
                self.lines[line_no].set_data(start+end)
                # Move the operating curser back the deleted amount
                cursor.move_left(del_n_chars)
                # Do the same to the rest
                self.move_x_cursors(line_no, cursor.x, -1*del_n_chars)
        # Ensure we keep the view scrolled
        self.move_cursors()
        self.scroll_up()
        # Add a restore point if previous action != backspace
        self.store_action_state("backspace")
dataset/ETHPy150Open richrd/suplemon/suplemon/editor.py/Editor.backspace/original