1
0
mirror of https://github.com/jesseduffield/lazygit.git synced 2025-07-31 14:24:25 +03:00

Use our new hyperlink support in confirmations

This commit is contained in:
Stefan Haller
2024-08-16 11:22:50 +02:00
parent e65c0a9d5e
commit 61b59837bb
4 changed files with 6 additions and 24 deletions

View File

@ -259,11 +259,7 @@ func underlineLinks(text string) string {
} else {
linkEnd += linkStart
}
underlinedLink := style.AttrUnderline.Sprint(remaining[linkStart:linkEnd])
if strings.HasSuffix(underlinedLink, "\x1b[0m") {
// Replace the "all styles off" code with "underline off" code
underlinedLink = underlinedLink[:len(underlinedLink)-2] + "24m"
}
underlinedLink := style.PrintSimpleHyperlink(remaining[linkStart:linkEnd])
result += remaining[:linkStart] + underlinedLink
remaining = remaining[linkEnd:]
}