dwmkerr / dwmkerr/consolecontrol
Backspace deletes last readonly character
- Dominant language
- C#
- Stars
- 786
- Forks
- 166
- Avg merge
- 3d 23h
- Merged PRs (30d)
- 1
Description
Steps to reproduct:
Start new "ConsoleControlSample.WPF" process.
Click "Run command" starts new command shell
Hit backspace on input area
Last character on output, probable a ">" character is removed.
Fix proposal:
on "richTextBoxConsole_PreviewKeyDown" method, change
```
var caretPosition = richTextBoxConsole.GetCaretPosition();
var delta = caretPosition - inputStartPos;
var inReadOnlyZone = delta < 0;
```
with this
```
var caretPosition = richTextBoxConsole.GetCaretPosition();
var delta = caretPosition - inputStartPos;
var inReadOnlyZone = delta <= 0;
```
Contributor guide
No contributing guide indexed for this repository
Research direction
Start the ConsoleControlSample.WPF process, run a command, and reproduce the backspace behavior in the input area. Inspect richTextBoxConsole_PreviewKeyDown and compare the current read-only-zone boundary with the proposed change. Done means backspace no longer removes the last read-only output character while input editing still works.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- desktop
- Issue type
- Bug
- Difficulty
- 1/5
- Estimated time
- Under an hour
- Activity status
- Stale
- Clarity
- Clearly specified
- Newbie friendliness
- 45/100