GNU nano - Bugs: bug #57797, [Request] when zap is set, typing...
You are not allowed to post comments on this tracker with your current authentication level.
bug #57797: [Request] when zap is set, typing any character should replace the marked text
Submitter: | Saagar Jha <saagarjha> | ||
Submitted: | Wed 12 Feb 2020 01:01:46 AM UTC | ||
Severity: | 1 - Wish | Status: | Wont Fix |
Assigned to: | None | Open/Closed: | Closed |
Wed 12 Feb 2020 12:46:28 PM UTC, comment #1: |
Benno Schulenberg <bens> |
Wed 12 Feb 2020 01:01:46 AM UTC, original submission:
Since zap seems to have been added to match how most editors handle selections, it seems like it would be logical to have this work too (specifically, if you have a marked region and type "a" then it's as if you typed "delete" followed by "a") specifically when this setting is enabled. I'd expect that the people who enable this are looking for an experience that matches other editors anyways. (I'm actually curious if the current behavior of just adding the character to the marked region is there as a holdover from pico, or because there's a use for it that I haven't found yet…) |
Saagar Jha <saagarjha> |
No files currently attached
Depends on the following items: None found
Items that depend on this one: None found
There are 0 votes so far. Votes easily highlight which items people would like to see resolved in priority, independently of the priority of the item set by tracker managers.
Follow 4 latest changes.
Date | Changed by | Updated Field | Previous Value | => | Replaced by |
---|---|---|---|---|---|
2020-03-25 | bens | Open/Closed | Open | Closed | |
2020-02-12 | bens | Severity | 3 - Normal | 1 - Wish | |
Status | None | Wont Fix | |||
Summary | [Request] When zap is set, typing any character should replace the marked text | [Request] when zap is set, typing any character should replace the marked text |
Powered by Savane 3.13-02a9.
Corresponding source code
The 'set zap' option was added to make it easier to delete marked regions: not just with ^K but also with <Backspace> or <Delete>. That was a concession to ease of use. But typing any plain character should never destroy any other text. Nano demands that the user is chirurgical about her operations: if she wants to delete something, she must give a deleting command.
Also, there are users that first set the mark, then type what they want to have marked, then use M-6 to copy this text, and use ^U to paste this text also in other places. If typing a character would delete the currently marked region, that manner of working would no longer be possible. Or it would mean that a hard-marked region (started with ^6) would behave different in this respect from a Shift-selected region. I don't want to go there.