`viw` results in wrong selection in whitespace at beginning of line
Nobody has claimed this yet.
- Dominant language
- TypeScript
- Stars
- 15.2k
- Forks
- 1.5k
- Avg merge
- 3d 18h
- Merged PRs (30d)
- 6
Description
Scenario 1:
if x is None:
| y = 0
viw should select all of whitespace before y, but not the newline or anything on the first line. Our current implementation selects up to and including the :.
Scenario 2:
| y = 0
This is the first line in the file. Same as above, viw should select all the whitespace. Here our current implementation misses the first space.
(The above is also a problem with viW as well as with operators like diw/diW)
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
The issue does not name a file or test; start by locating the TypeScript handling for viw, viW, diw, and diW. Reproduce both whitespace-at-line-start scenarios, then verify that the selection includes all leading spaces, excludes the newline and previous-line text, and includes the first space on the file's first line.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- typescript
- Domain
- tooling
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100