mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-05-21 04:04:59 +00:00
feat: Allow Copy only file name with extension
This commit is contained in:
parent
7c8b04e84e
commit
33c9771f58
5 changed files with 49 additions and 2 deletions
|
@ -209,7 +209,7 @@ namespace SourceGit.ViewModels
|
|||
_unstaged.Clear();
|
||||
OnPropertyChanged(nameof(Unstaged));
|
||||
}
|
||||
|
||||
|
||||
if (_staged != null)
|
||||
{
|
||||
_staged.Clear();
|
||||
|
@ -584,6 +584,17 @@ namespace SourceGit.ViewModels
|
|||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(copy);
|
||||
var copyFileName = new MenuItem()
|
||||
{
|
||||
Header = App.Text("CopyFileName"),
|
||||
Icon = App.CreateMenuIcon("Icon.Copy"),
|
||||
};
|
||||
copyFileName.Click += (_, e) =>
|
||||
{
|
||||
App.CopyText(Path.GetFileName(change.Path));
|
||||
e.Handled = true;
|
||||
};
|
||||
menu.Items.Add(copyFileName);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue