Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Ensure correct coordinate ordering in selection file write (#4078)
## Description Fix an issue where `write_selection_file` would create empty files when selecting multiple lines. This occurred because the selection coordinates were not properly ordered when writing to file. ## Problem When selecting multiple lines from bottom to top , the resulting file would be empty. This happened because: 1. Selection coordinates were used directly without proper ordering 2. `start()` and `end()` don't guarantee top-to-bottom, left-to-right ordering ## Solution Use `topLeft()` and `bottomRight()` methods to ensure correct coordinate ordering when writing selection to file. ## Testing Tested the following scenarios: - Selecting multiple lines from top to bottom ✅ - Selecting multiple lines from bottom to top ✅ ## Known Behavior When selecting a single word, the entire line containing that word is written to the file. This is consistent with the current terminal behavior as noted in the [original discussion](#3594). Fixes #3594
- Loading branch information