diff --git a/ChangeLog b/ChangeLog index f9ee6f0f1..d725f449f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,8 @@ ------ current release --------------------------- 2.2.0 () + +Bugs + Fixed bug #1038, which prints blank lines with bulk changes and when the verbose attributes does not specify it. Lines do a better separation between each changes also. diff --git a/src/commands/CmdAnnotate.cpp b/src/commands/CmdAnnotate.cpp index 3d2f4dddc..7069e18c3 100644 --- a/src/commands/CmdAnnotate.cpp +++ b/src/commands/CmdAnnotate.cpp @@ -119,8 +119,6 @@ int CmdAnnotate::execute (std::string& output) std::cout << STRING_CMD_ANNO_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } // Now list the project changes. diff --git a/src/commands/CmdAppend.cpp b/src/commands/CmdAppend.cpp index a44a10242..25d52ff31 100644 --- a/src/commands/CmdAppend.cpp +++ b/src/commands/CmdAppend.cpp @@ -119,8 +119,6 @@ int CmdAppend::execute (std::string& output) std::cout << STRING_CMD_APPEND_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } // Now list the project changes. diff --git a/src/commands/CmdDelete.cpp b/src/commands/CmdDelete.cpp index aa2f1fde1..1804608a1 100644 --- a/src/commands/CmdDelete.cpp +++ b/src/commands/CmdDelete.cpp @@ -143,8 +143,6 @@ int CmdDelete::execute (std::string& output) std::cout << STRING_CMD_DELETE_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } else { diff --git a/src/commands/CmdDenotate.cpp b/src/commands/CmdDenotate.cpp index 4f28027bb..f6ebc2ebf 100644 --- a/src/commands/CmdDenotate.cpp +++ b/src/commands/CmdDenotate.cpp @@ -132,8 +132,6 @@ int CmdDenotate::execute (std::string& output) std::cout << STRING_CMD_DENO_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } else { diff --git a/src/commands/CmdDone.cpp b/src/commands/CmdDone.cpp index ab90a5528..f7fa4d9c2 100644 --- a/src/commands/CmdDone.cpp +++ b/src/commands/CmdDone.cpp @@ -120,8 +120,6 @@ int CmdDone::execute (std::string& output) << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } // Now list the project changes. diff --git a/src/commands/CmdDuplicate.cpp b/src/commands/CmdDuplicate.cpp index b7d074d34..baba55060 100644 --- a/src/commands/CmdDuplicate.cpp +++ b/src/commands/CmdDuplicate.cpp @@ -125,8 +125,6 @@ int CmdDuplicate::execute (std::string& output) std::cout << STRING_CMD_DUPLICATE_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } // Now list the project changes. diff --git a/src/commands/CmdModify.cpp b/src/commands/CmdModify.cpp index 04c53cb2f..3fc87996e 100644 --- a/src/commands/CmdModify.cpp +++ b/src/commands/CmdModify.cpp @@ -162,8 +162,6 @@ int CmdModify::execute (std::string& output) std::cout << STRING_CMD_MODIFY_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } } diff --git a/src/commands/CmdPrepend.cpp b/src/commands/CmdPrepend.cpp index 55af6438a..6fbafdd95 100644 --- a/src/commands/CmdPrepend.cpp +++ b/src/commands/CmdPrepend.cpp @@ -119,8 +119,6 @@ int CmdPrepend::execute (std::string& output) std::cout << STRING_CMD_PREPEND_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } // Now list the project changes. diff --git a/src/commands/CmdStart.cpp b/src/commands/CmdStart.cpp index f3f7f98f2..6c73e22ca 100644 --- a/src/commands/CmdStart.cpp +++ b/src/commands/CmdStart.cpp @@ -104,8 +104,6 @@ int CmdStart::execute (std::string& output) std::cout << STRING_CMD_START_NO << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } else { diff --git a/src/commands/CmdStop.cpp b/src/commands/CmdStop.cpp index bf669e3ea..16409e7e5 100644 --- a/src/commands/CmdStop.cpp +++ b/src/commands/CmdStop.cpp @@ -109,8 +109,6 @@ int CmdStop::execute (std::string& output) << "\n"; rc = 1; } - if (context.verbose ("blank")) - std::cout << "\n"; } // Now list the project changes. diff --git a/src/commands/Command.cpp b/src/commands/Command.cpp index 7e88ba3df..2db5c3c13 100644 --- a/src/commands/Command.cpp +++ b/src/commands/Command.cpp @@ -210,6 +210,7 @@ Command::Command () , _needs_confirm (false) , _permission_quit (false) , _permission_all (false) +, _first_iteration (true) { } @@ -223,6 +224,7 @@ Command::Command (const Command& other) _needs_confirm = other._needs_confirm; _permission_quit = other._permission_quit; _permission_all = other._permission_all; + _first_iteration = other._first_iteration; } //////////////////////////////////////////////////////////////////////////////// @@ -237,6 +239,7 @@ Command& Command::operator= (const Command& other) _needs_confirm = other._needs_confirm; _permission_quit = other._permission_quit; _permission_all = other._permission_all; + _first_iteration = other._first_iteration; } return *this; @@ -718,9 +721,12 @@ bool Command::permission ( // 1 < Quantity < bulk modifications have optional confirmation, in the (y/n/a/q) // style. if (quantity < bulk && (!_needs_confirm || !confirmation)) - return true; + return true; + if (context.verbose ("blank") && !_first_iteration) + std::cout << "\n"; int answer = confirm4 (question); + _first_iteration = false; switch (answer) { case 1: return true; // yes diff --git a/src/commands/Command.h b/src/commands/Command.h index 44f8ce731..db8c8f8b0 100644 --- a/src/commands/Command.h +++ b/src/commands/Command.h @@ -80,6 +80,7 @@ protected: // Permission support bool _permission_quit; bool _permission_all; + bool _first_iteration; }; #endif