Skip to content

Fix apply_all_code_actions function to preserve trailing newlines and support multi-line ranges #2222

@coderabbitai

Description

@coderabbitai

The apply_all_code_actions function in the test file crates/lsp/tests/basic.rs has two issues:

  1. It drops the final trailing newline when reconstructing text
  2. It doesn't properly handle cross-line edits (ignores end_line parameter)

This can cause test failures and incorrect text transformations when applying LSP code actions.

Related:

Metadata

Metadata

Labels

No labels
No labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions