Open tetrahedronix opened 5 years ago
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:]...) } }
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?