Restore curses after running external command
This allows running TUI tools like vim via run_external_command without destroying the ncmpcpp curses output.
This commit is contained in:
committed by
Andrzej Rybczak
parent
1ef061a87c
commit
81cb7a4f85
@@ -21,6 +21,7 @@
|
||||
#include "bindings.h"
|
||||
#include "global.h"
|
||||
#include "macro_utilities.h"
|
||||
#include "curses/window.h"
|
||||
#include "utility/string.h"
|
||||
#include "utility/wide_string.h"
|
||||
|
||||
@@ -87,7 +88,10 @@ RunExternalCommand::RunExternalCommand(std::string &&command)
|
||||
void RunExternalCommand::run()
|
||||
{
|
||||
GNUC_UNUSED int res;
|
||||
|
||||
NC::pauseScreen();
|
||||
res = std::system(m_command.c_str());
|
||||
NC::unpauseScreen();
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user