fix: comp

This commit is contained in:
Carlos Alexandro Becker
2024-11-26 14:17:28 -05:00
committed by Christian Rocha
parent ca9cbbc99e
commit 4755f88132
+4 -1
View File
@@ -1268,7 +1268,10 @@ func (m Model) View() string {
} else {
m.Cursor.SetChar(string(wrappedLine[lineInfo.ColumnOffset]))
if m.canAcceptSuggestion() && len(m.matchedSuggestions) > 0 {
suggestion := m.matchedSuggestions[m.currentSuggestionIndex][m.row:]
suggestion := m.matchedSuggestions[m.currentSuggestionIndex]
if len(suggestion) >= m.row {
suggestion = suggestion[m.row:]
}
m.Cursor.TextStyle = m.style.Placeholder
if len(suggestion) > m.row && len(suggestion[m.row]) > m.col {
m.Cursor.SetChar(string(suggestion[m.row][m.col]))