chore(textarea,textinput/lint): use slices.Delete()

This commit is contained in:
Christian Rocha
2025-05-26 09:15:38 -04:00
parent b2bcf2232b
commit 0f113d10c4
2 changed files with 4 additions and 2 deletions
+2 -1
View File
@@ -6,6 +6,7 @@ import (
"crypto/sha256"
"fmt"
"image/color"
"slices"
"strconv"
"strings"
"time"
@@ -1125,7 +1126,7 @@ func (m Model) Update(msg tea.Msg) (Model, tea.Cmd) {
}
case key.Matches(msg, m.KeyMap.DeleteCharacterForward):
if len(m.value[m.row]) > 0 && m.col < len(m.value[m.row]) {
m.value[m.row] = append(m.value[m.row][:m.col], m.value[m.row][m.col+1:]...)
m.value[m.row] = slices.Delete(m.value[m.row], m.col, m.col+1)
}
if m.col >= len(m.value[m.row]) {
m.mergeLineBelow(m.row)