2
2
şunun yansıması https://github.com/Hilbis/Hilbish eşitlendi 2025-07-02 01:02:03 +00:00

fix: print err don't panic and in the case of regex compile failing on menu find

Bu işleme şunda yer alıyor:
TorchedSammy 2022-05-28 20:19:39 -04:00
ebeveyn 3990d370fa
işleme 2faaf4e045
İmzalayan: sammyette
GPG Anahtar Kimliği: 904FC49417B44DCD
2 değiştirilmiş dosya ile 2 ekleme ve 0 silme

Dosyayı Görüntüle

@ -73,6 +73,7 @@ func (g *CompletionGroup) updateTabFind(rl *Instance) {
// We perform filter right here, so we create a new completion group, and populate it with our results.
for i := range g.Suggestions {
if rl.regexSearch == nil { continue }
if rl.regexSearch.MatchString(g.Suggestions[i]) {
suggs = append(suggs, g.Suggestions[i])
} else if g.DisplayType == TabDisplayList && rl.regexSearch.MatchString(g.Descriptions[g.Suggestions[i]]) {

Dosyayı Görüntüle

@ -33,6 +33,7 @@ func (rl *Instance) updateTabFind(r []rune) {
var err error
rl.regexSearch, err = regexp.Compile("(?i)" + string(rl.tfLine))
if err != nil {
rl.RefreshPromptLog(err.Error())
rl.infoText = []rune(Red("Failed to match search regexp"))
}