Skip to content

Commit

Permalink
prevent message export from empty folder
Browse files Browse the repository at this point in the history
  • Loading branch information
d99kris committed Dec 10, 2022
1 parent 44bc17e commit 0c362c2
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/nmail.1
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man.
.TH NMAIL "1" "November 2022" "nmail v4.05" "User Commands"
.TH NMAIL "1" "December 2022" "nmail v4.06" "User Commands"
.SH NAME
nmail \- ncurses mail
.SH SYNOPSIS
Expand Down
10 changes: 9 additions & 1 deletion src/ui.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2488,7 +2488,15 @@ void Ui::ViewMessageListKeyHandler(int p_Key)
else if (p_Key == m_KeyExport)
{
UpdateUidFromIndex(true /* p_UserTriggered */);
ExportMessage();
const int uid = m_CurrentFolderUid.second;
if (uid != -1)
{
ExportMessage();
}
else
{
SetDialogMessage("No message to export");
}
}
else if (p_Key == m_KeyImport)
{
Expand Down
2 changes: 1 addition & 1 deletion src/version.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@

#include "version.h"

#define NMAIL_VERSION "4.05"
#define NMAIL_VERSION "4.06"

std::string Version::GetBuildOs()
{
Expand Down

0 comments on commit 0c362c2

Please sign in to comment.