mirror of
https://github.com/sourcegit-scm/sourcegit
synced 2025-06-16 16:05:00 +00:00
enhance: revision file viewer
- show current file path - add a toggle button to use global syntax highlighting setting (sometimes TextMateSharp will crash this app) Signed-off-by: leo <longshuang@msn.cn>
This commit is contained in:
parent
f003f67129
commit
ac55bed812
5 changed files with 71 additions and 17 deletions
|
@ -105,10 +105,16 @@ namespace SourceGit.ViewModels
|
|||
}
|
||||
}
|
||||
|
||||
public string ViewRevisionFilePath
|
||||
{
|
||||
get => _viewRevisionFilePath;
|
||||
private set => SetProperty(ref _viewRevisionFilePath, value);
|
||||
}
|
||||
|
||||
public object ViewRevisionFileContent
|
||||
{
|
||||
get => _viewRevisionFileContent;
|
||||
set => SetProperty(ref _viewRevisionFileContent, value);
|
||||
private set => SetProperty(ref _viewRevisionFileContent, value);
|
||||
}
|
||||
|
||||
public string RevisionFileSearchFilter
|
||||
|
@ -189,10 +195,13 @@ namespace SourceGit.ViewModels
|
|||
{
|
||||
if (file == null)
|
||||
{
|
||||
ViewRevisionFilePath = string.Empty;
|
||||
ViewRevisionFileContent = null;
|
||||
return;
|
||||
}
|
||||
|
||||
ViewRevisionFilePath = file.Path;
|
||||
|
||||
switch (file.Type)
|
||||
{
|
||||
case Models.ObjectType.Blob:
|
||||
|
@ -893,6 +902,7 @@ namespace SourceGit.ViewModels
|
|||
private List<Models.Change> _selectedChanges = null;
|
||||
private string _searchChangeFilter = string.Empty;
|
||||
private DiffContext _diffContext = null;
|
||||
private string _viewRevisionFilePath = string.Empty;
|
||||
private object _viewRevisionFileContent = null;
|
||||
private CancellationTokenSource _cancellationSource = null;
|
||||
private bool _requestingRevisionFiles = false;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue