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
@@ -329,12 +329,10 @@ void Lyrics::edit()
|
||||
if (Config.use_console_editor)
|
||||
{
|
||||
command = "/bin/sh -c \"" + Config.external_editor + " \\\"" + filename + "\\\"\"";
|
||||
NC::pauseScreen();
|
||||
res = system(command.c_str());
|
||||
NC::unpauseScreen();
|
||||
fetch(m_song);
|
||||
// Reset ncurses state to refresh the screen.
|
||||
endwin();
|
||||
initscr();
|
||||
curs_set(0);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user