Skip to content

Commit

Permalink
format
Browse files Browse the repository at this point in the history
  • Loading branch information
sahinfalcon committed Dec 29, 2024
1 parent 32a9b19 commit 12b5823
Showing 1 changed file with 10 additions and 10 deletions.
20 changes: 10 additions & 10 deletions src/internal/handle_file_operations.go
Original file line number Diff line number Diff line change
Expand Up @@ -141,11 +141,11 @@ func (m *model) deleteSingleItem() {
channel <- message
}
if len(panel.element) == 0 {
panel.cursor = 0
} else {
if panel.cursor >= len(panel.element) {
panel.cursor = len(panel.element) - 1
}
panel.cursor = 0
} else {
if panel.cursor >= len(panel.element) {
panel.cursor = len(panel.element) - 1
}
}
m.fileModel.filePanels[m.filePanelFocusIndex] = panel
}
Expand Down Expand Up @@ -263,11 +263,11 @@ func (m *model) completelyDeleteSingleItem() {
channel <- message
}
if len(panel.element) == 0 {
panel.cursor = 0
} else {
if panel.cursor >= len(panel.element) {
panel.cursor = len(panel.element) - 1
}
panel.cursor = 0
} else {
if panel.cursor >= len(panel.element) {
panel.cursor = len(panel.element) - 1
}
}
m.fileModel.filePanels[m.filePanelFocusIndex] = panel
}
Expand Down

0 comments on commit 12b5823

Please sign in to comment.