diff options
Diffstat (limited to 'commands/msg')
-rw-r--r-- | commands/msg/delete.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/commands/msg/delete.go b/commands/msg/delete.go index 6c786257..9a07e509 100644 --- a/commands/msg/delete.go +++ b/commands/msg/delete.go @@ -110,6 +110,9 @@ func findNextNonDeleted(deleted []uint32, store *lib.MessageStore) *models.Messa } } if next == nil || previous == next { + // If previous == next, this is the last + // message. Set next to nil either way + next = nil break } stepFn() |