mirror of
https://github.com/jesseduffield/lazygit.git
synced 2025-06-15 00:15:32 +02:00
mention path in tooltips
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/context"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/filetree"
|
||||
"github.com/jesseduffield/lazygit/pkg/gui/types"
|
||||
"github.com/jesseduffield/lazygit/pkg/utils"
|
||||
)
|
||||
|
||||
// splitting this action out into its own file because it's self-contained
|
||||
@ -51,8 +52,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
|
||||
}
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
|
||||
},
|
||||
Key: 'x',
|
||||
Tooltip: self.c.Tr.DiscardAllTooltip,
|
||||
Key: 'x',
|
||||
Tooltip: utils.ResolvePlaceholderString(
|
||||
self.c.Tr.DiscardAllTooltip,
|
||||
map[string]string{
|
||||
"path": node.GetPath(),
|
||||
},
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
@ -67,8 +73,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
|
||||
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
|
||||
},
|
||||
Key: 'u',
|
||||
Tooltip: self.c.Tr.DiscardUnstagedTooltip,
|
||||
Key: 'u',
|
||||
Tooltip: utils.ResolvePlaceholderString(
|
||||
self.c.Tr.DiscardUnstagedTooltip,
|
||||
map[string]string{
|
||||
"path": node.GetPath(),
|
||||
},
|
||||
),
|
||||
})
|
||||
}
|
||||
} else {
|
||||
@ -97,8 +108,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
|
||||
}
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
|
||||
},
|
||||
Key: 'x',
|
||||
Tooltip: self.c.Tr.DiscardAllTooltip,
|
||||
Key: 'x',
|
||||
Tooltip: utils.ResolvePlaceholderString(
|
||||
self.c.Tr.DiscardAllTooltip,
|
||||
map[string]string{
|
||||
"path": node.GetPath(),
|
||||
},
|
||||
),
|
||||
},
|
||||
}
|
||||
|
||||
@ -113,8 +129,13 @@ func (self *FilesRemoveController) remove(node *filetree.FileNode) error {
|
||||
|
||||
return self.c.Refresh(types.RefreshOptions{Mode: types.ASYNC, Scope: []types.RefreshableView{types.FILES}})
|
||||
},
|
||||
Key: 'u',
|
||||
Tooltip: self.c.Tr.DiscardUnstagedTooltip,
|
||||
Key: 'u',
|
||||
Tooltip: utils.ResolvePlaceholderString(
|
||||
self.c.Tr.DiscardUnstagedTooltip,
|
||||
map[string]string{
|
||||
"path": node.GetPath(),
|
||||
},
|
||||
),
|
||||
})
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user