Skip to content

Commit 26e3a93

Browse files
committed
Use AutoRenderHyperLinks in main views
This allows clicking on links in commit messages, for examples. It also affects the status view, so we can get rid of the manual hyperlinking there.
1 parent 1ceb5a6 commit 26e3a93

File tree

2 files changed

+7
-6
lines changed

2 files changed

+7
-6
lines changed

pkg/gui/controllers/status_controller.go

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -208,12 +208,12 @@ func (self *StatusController) showDashboard() {
208208
[]string{
209209
lazygitTitle(),
210210
fmt.Sprintf("Copyright %d Jesse Duffield", time.Now().Year()),
211-
fmt.Sprintf("Keybindings: %s", style.PrintSimpleHyperlink(fmt.Sprintf(constants.Links.Docs.Keybindings, versionStr))),
212-
fmt.Sprintf("Config Options: %s", style.PrintSimpleHyperlink(fmt.Sprintf(constants.Links.Docs.Config, versionStr))),
213-
fmt.Sprintf("Tutorial: %s", style.PrintSimpleHyperlink(constants.Links.Docs.Tutorial)),
214-
fmt.Sprintf("Raise an Issue: %s", style.PrintSimpleHyperlink(constants.Links.Issues)),
215-
fmt.Sprintf("Release Notes: %s", style.PrintSimpleHyperlink(constants.Links.Releases)),
216-
style.FgMagenta.Sprintf("Become a sponsor: %s", style.PrintSimpleHyperlink(constants.Links.Donate)), // caffeine ain't free
211+
fmt.Sprintf("Keybindings: %s", fmt.Sprintf(constants.Links.Docs.Keybindings, versionStr)),
212+
fmt.Sprintf("Config Options: %s", fmt.Sprintf(constants.Links.Docs.Config, versionStr)),
213+
fmt.Sprintf("Tutorial: %s", constants.Links.Docs.Tutorial),
214+
fmt.Sprintf("Raise an Issue: %s", constants.Links.Issues),
215+
fmt.Sprintf("Release Notes: %s", constants.Links.Releases),
216+
style.FgMagenta.Sprintf("Become a sponsor: %s", constants.Links.Donate), // caffeine ain't free
217217
}, "\n\n") + "\n"
218218

219219
self.c.RenderToMainViews(types.RefreshMainOpts{

pkg/gui/views.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,7 @@ func (gui *Gui) createAllViews() error {
118118
view.Wrap = true
119119
view.IgnoreCarriageReturns = true
120120
view.UnderlineHyperLinksOnlyOnHover = true
121+
view.AutoRenderHyperLinks = true
121122
}
122123

123124
gui.Views.Staging.Title = gui.c.Tr.UnstagedChanges

0 commit comments

Comments
 (0)