gizak / gizak/termui

Delete keystroke

Open
#240 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Go
Stars
13.6k
Forks
819
PR merge metrics
No merged PRs in 30d

Description

I tried to modify the Backspace function to simulate the delete key, it seems to work except for the first character. Does someone know if this feature has already been implemented in wip-input-widget?

```
func (self *TextBox) Delete() {
// ll: line length
if ll := len(self.text[self.cursorPoint.Y-1]); self.cursorPoint.X-1 < ll {
self.text[self.cursorPoint.Y-1] = append(self.text[self.cursorPoint.Y-1][:self.cursorPoint.X-1],
self.text[self.cursorPoint.Y-1][self.cursorPoint.X:]...)

}
}
```

Contributor guide

No contributing guide indexed for this repository

Research direction

Search the wip-input-widget for the TextBox.Delete method and the Backspace handling first. Compare the existing behavior around cursor positions, especially the first character, and check whether delete-key support already exists. Done means the delete keystroke behaves correctly at the cursor without removing the wrong character.

Written by the indexing model from the issue text.

Assessment

Tech stack
go
Domain
cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.