chore(textarea,textinput/lint): modernize loops

This commit is contained in:
Christian Rocha
2025-05-26 09:15:38 -04:00
parent d42b7c42d5
commit b2bcf2232b
+2 -2
View File
@@ -487,7 +487,7 @@ func (m *Model) insertRunesFromUserInput(runes []rune) {
// Split the input into lines.
var lines [][]rune
lstart := 0
for i := 0; i < len(runes); i++ {
for i := range runes {
if runes[i] == '\n' {
// Queue a line to become a new row in the text area below.
// Beware to clamp the max capacity of the slice, to ensure no
@@ -1375,7 +1375,7 @@ func (m Model) placeholderView() string {
// split string by new lines
plines := strings.Split(strings.TrimSpace(pwrap), "\n")
for i := 0; i < m.height; i++ {
for i := range m.height {
isLineNumber := len(plines) > i
lineStyle := styles.computedPlaceholder()