Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions pkg/ui/keymap/keymap.go
Original file line number Diff line number Diff line change
Expand Up @@ -198,7 +198,7 @@ func DefaultKeyMap() *KeyMap {
"right",
),
key.WithHelp(
"→",
"→/l",
"select",
),
)
Expand All @@ -210,7 +210,7 @@ func DefaultKeyMap() *KeyMap {
"backspace",
),
key.WithHelp(
"←",
"←/h",
"back",
),
)
Expand Down
23 changes: 12 additions & 11 deletions pkg/ui/pages/repo/files.go
Original file line number Diff line number Diff line change
Expand Up @@ -151,17 +151,7 @@
func (f *Files) FullHelp() [][]key.Binding {
b := make([][]key.Binding, 0)
copyKey := f.common.KeyMap.Copy
actionKeys := []key.Binding{
copyKey,
}
if !f.code.UseGlamour {
actionKeys = append(actionKeys, lineNo)
}
actionKeys = append(actionKeys, blameView)
if common.IsFileMarkdown(f.currentContent.content, f.currentContent.ext) &&
!f.blameView {
actionKeys = append(actionKeys, preview)
}
actionKeys := []key.Binding{}

Check warning on line 154 in pkg/ui/pages/repo/files.go

View check run for this annotation

Codecov / codecov/patch

pkg/ui/pages/repo/files.go#L154

Added line #L154 was not covered by tests
switch f.activeView {
case filesViewFiles:
copyKey.SetHelp("c", "copy name")
Expand All @@ -183,6 +173,14 @@
},
}...)
case filesViewContent:
if !f.code.UseGlamour {
actionKeys = append(actionKeys, lineNo)
}
actionKeys = append(actionKeys, blameView)
if common.IsFileMarkdown(f.currentContent.content, f.currentContent.ext) &&
!f.blameView {
actionKeys = append(actionKeys, preview)
}

Check warning on line 183 in pkg/ui/pages/repo/files.go

View check run for this annotation

Codecov / codecov/patch

pkg/ui/pages/repo/files.go#L176-L183

Added lines #L176 - L183 were not covered by tests
copyKey.SetHelp("c", "copy content")
k := f.code.KeyMap
b = append(b, []key.Binding{
Expand All @@ -203,6 +201,9 @@
},
}...)
}
actionKeys = append([]key.Binding{
copyKey,
}, actionKeys...)

Check warning on line 206 in pkg/ui/pages/repo/files.go

View check run for this annotation

Codecov / codecov/patch

pkg/ui/pages/repo/files.go#L204-L206

Added lines #L204 - L206 were not covered by tests
return append(b, actionKeys)
}

Expand Down
Loading