diff --git a/docs/keybindings/Keybindings_en.md b/docs/keybindings/Keybindings_en.md index 82eafdb1d..435f48806 100644 --- a/docs/keybindings/Keybindings_en.md +++ b/docs/keybindings/Keybindings_en.md @@ -172,7 +172,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct ## Files Panel (Files)
-  d: view 'discard changes' options
   D: view reset options
   f: fetch
   ctrl+o: copy the file name to the clipboard
@@ -186,6 +185,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   e: edit file
   o: open file
   i: add to .gitignore
+  d: view 'discard changes' options
   r: refresh files
   s: stash changes
   S: view stash options
diff --git a/docs/keybindings/Keybindings_nl.md b/docs/keybindings/Keybindings_nl.md
index 0136a529b..b25c18fc5 100644
--- a/docs/keybindings/Keybindings_nl.md
+++ b/docs/keybindings/Keybindings_nl.md
@@ -180,6 +180,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   e: verander bestand
   o: open bestand
   i: voeg toe aan .gitignore
+  d: bekijk 'veranderingen ongedaan maken' opties
   r: refresh bestanden
   s: stash-bestanden
   S: bekijk stash opties
diff --git a/docs/keybindings/Keybindings_pl.md b/docs/keybindings/Keybindings_pl.md
index 1d7f4f725..afc1d3c9c 100644
--- a/docs/keybindings/Keybindings_pl.md
+++ b/docs/keybindings/Keybindings_pl.md
@@ -172,7 +172,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
 ## Pliki Panel (Pliki)
 
 
-  d: pokaż opcje porzucania zmian
   D: wyświetl opcje resetu
   f: pobierz
   ctrl+o: copy the file name to the clipboard
@@ -186,6 +185,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   e: edytuj plik
   o: otwórz plik
   i: dodaj do .gitignore
+  d: pokaż opcje porzucania zmian
   r: odśwież pliki
   s: przechowaj zmiany
   S: wyświetl opcje schowka
diff --git a/docs/keybindings/Keybindings_zh.md b/docs/keybindings/Keybindings_zh.md
index cba13cfc4..cec585c66 100644
--- a/docs/keybindings/Keybindings_zh.md
+++ b/docs/keybindings/Keybindings_zh.md
@@ -172,7 +172,6 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
 ## 文件 面板 (文件)
 
 
-  d: 查看'放弃更改‘选项
   D: 查看重置选项
   f: 抓取
   ctrl+o: 将文件名复制到剪贴板
@@ -186,6 +185,7 @@ _This file is auto-generated. To update, make the changes in the pkg/i18n direct
   e: 编辑文件
   o: 打开文件
   i: 添加到 .gitignore
+  d: 查看'放弃更改‘选项
   r: 刷新文件
   s: 将所有更改加入贮藏
   S: 查看隐藏选项
diff --git a/pkg/gui/gui.go b/pkg/gui/gui.go
index b80ef9656..93b9a2862 100644
--- a/pkg/gui/gui.go
+++ b/pkg/gui/gui.go
@@ -270,10 +270,6 @@ type MergingPanelState struct {
 	UserVerticalScrolling bool
 }
 
-type filePanelState struct {
-	listPanelState
-}
-
 // TODO: consider splitting this out into the window and the branches view
 type branchPanelState struct {
 	listPanelState
diff --git a/pkg/gui/presentation/files_test.go b/pkg/gui/presentation/files_test.go
index 8e9baf4e5..441ec7b69 100644
--- a/pkg/gui/presentation/files_test.go
+++ b/pkg/gui/presentation/files_test.go
@@ -127,7 +127,7 @@ M file1
 	for _, s := range scenarios {
 		s := s
 		t.Run(s.name, func(t *testing.T) {
-			viewModel := filetree.NewCommitFileTreeViewModel(s.files, utils.NewDummyLog(), true)
+			viewModel := filetree.NewCommitFileTreeViewModel(func() []*models.CommitFile { return s.files }, utils.NewDummyLog(), true)
 			for _, path := range s.collapsedPaths {
 				viewModel.ToggleCollapsed(path)
 			}