mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-06 23:46:13 +02:00
Fix lack of icon assignation when extension don't match capitalization (lowercase) (#3810)
- **PR Description** The extension icon map contain all extensions on lowercase, when a file don't have extension on lowercase the string don't match and icon is not assigned.
This commit is contained in:
commit
58d7467180
@ -2,6 +2,7 @@ package icons
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
)
|
)
|
||||||
|
|
||||||
// NOTE: Visit next links for inspiration:
|
// NOTE: Visit next links for inspiration:
|
||||||
@ -728,7 +729,7 @@ func IconForFile(name string, isSubmodule bool, isLinkedWorktree bool, isDirecto
|
|||||||
return icon
|
return icon
|
||||||
}
|
}
|
||||||
|
|
||||||
ext := filepath.Ext(name)
|
ext := strings.ToLower(filepath.Ext(name))
|
||||||
if icon, ok := extIconMap[ext]; ok {
|
if icon, ok := extIconMap[ext]; ok {
|
||||||
return icon
|
return icon
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user