mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-07-03 12:22:34 +03:00
Enable intrange linter, and fix warnings
This commit is contained in:
@ -25,7 +25,7 @@ type ColumnConfig struct {
|
||||
func StringWidth(s string) int {
|
||||
// We are intentionally not using a range loop here, because that would
|
||||
// convert the characters to runes, which is unnecessary work in this case.
|
||||
for i := 0; i < len(s); i++ {
|
||||
for i := range len(s) {
|
||||
if s[i] > unicode.MaxASCII {
|
||||
return runewidth.StringWidth(s)
|
||||
}
|
||||
|
Reference in New Issue
Block a user