summaryrefslogtreecommitdiffstats
path: root/pkg/gui
diff options
context:
space:
mode:
authorRyooooooga <eial5q265e5@gmail.com>2022-04-05 23:35:41 +0900
committerJesse Duffield <jessedduffield@gmail.com>2022-04-06 08:26:13 +1000
commit53257db99d10bd533c134714b76965041c56cd19 (patch)
tree422d58d742ae82f8a5e2b4c4d3464915462adc7a /pkg/gui
parent954d1a814793012d3a22d99e5570f6c369fff1b1 (diff)
fix: fix diff of renamed files
Diffstat (limited to 'pkg/gui')
-rw-r--r--pkg/gui/filetree/file_node.go7
1 files changed, 7 insertions, 0 deletions
diff --git a/pkg/gui/filetree/file_node.go b/pkg/gui/filetree/file_node.go
index 69663b000..53f87c71b 100644
--- a/pkg/gui/filetree/file_node.go
+++ b/pkg/gui/filetree/file_node.go
@@ -42,6 +42,13 @@ func (s *FileNode) GetPath() string {
return s.Path
}
+func (s *FileNode) GetPreviousPath() string {
+ if s.File != nil {
+ return s.File.GetPreviousPath()
+ }
+ return ""
+}
+
func (s *FileNode) GetChildren() []INode {
return slices.Map(s.Children, func(child *FileNode) INode {
return child