Repository: Textualize/textual
File: src/textual/widgets/_list_view.py (Python)

Code before:

        Returns:
            An awaitable that yields control to the event loop until
                the DOM has been updated to reflect item being removed.
        """
        if index is None:
            await_remove = self.query("ListItem").last().remove()
        else:
            await_remove = self.query("ListItem")[index].remove()
        return await_remove

    def remove_items(self, indices: Iterable[int]) -> AwaitRemove:
        """Remove ListItems from ListView by indices

        Args:
            indices: index(s) of ListItems to remove from ListView

        Returns:
            An awaitable object that waits for the direct children to be removed.
        """
        items = self.query("ListItem")
        items_to_remove = []
        for index in indices:
            items_to_remove.append(items[index])

        await_remove = self.app._remove_nodes(items_to_remove, self)
        return await_remove

    def action_select_cursor(self) -> None:
        """Select the current item in the list."""
        selected_child = self.highlighted_child
        if selected_child is None:
            return
        self.post_message(self.Selected(self, selected_child))

    def action_cursor_down(self) -> None:
        """Highlight the next item in the list."""
        candidate = _widget_navigation.find_next_enabled(
            self._nodes,
            anchor=self.index,
            direction=1,
        )
        if self.index is not None and candidate is not None and candidate < self.index:
            return  # Avoid wrapping around.

        self.index = candidate

    def action_cursor_up(self) -> None:
        """Highlight the previous item in the list."""
        candidate = _widget_navigation.find_next_enabled(
            self._nodes,

Review comment (suggestion):
I believe this changes the behavior of this functions to removing all `ListItem`s instead of the ones at the specific `indices`.

Code after:

        Returns:
            An awaitable that yields control to the event loop until
                the DOM has been updated to reflect item being removed.
        """
        if index is None:
            await_remove = self.query("ListItem").last().remove()
        else:
            await_remove = self.query("ListItem")[index].remove()
        return await_remove

    def remove_items(self, indices: Iterable[int]) -> AwaitRemove:
        """Remove ListItems from ListView by indices

        Args:
            indices: index(s) of ListItems to remove from ListView

        Returns:
            An awaitable object that waits for the direct children to be removed.
        """
        items = self.query("ListItem")
        items_to_remove = []
        for index in indices:
            items_to_remove.append(items[index])

        await_remove = items.remove()
        return await_remove

    def action_select_cursor(self) -> None:
        """Select the current item in the list."""
        selected_child = self.highlighted_child
        if selected_child is None:
            return
        self.post_message(self.Selected(self, selected_child))

    def action_cursor_down(self) -> None:
        """Highlight the next item in the list."""
        candidate = _widget_navigation.find_next_enabled(
            self._nodes,
            anchor=self.index,
            direction=1,
        )
        if self.index is not None and candidate is not None and candidate < self.index:
            return  # Avoid wrapping around.

        self.index = candidate

    def action_cursor_up(self) -> None:
        """Highlight the previous item in the list."""
        candidate = _widget_navigation.find_next_enabled(
            self._nodes,