cli: disable pager in editor mode

nmcli closes its stdout when spawning the pager and thus, in editor
mode, nothing is printed once the pager terminates. For an interactive
mode like the editor, the pager seems not suitable, disable it.

Fixes: 24c079e4b2
This commit is contained in:
Beniamino Galvani
2017-06-07 11:16:31 +02:00
parent a675a619f4
commit ea909e38dc

View File

@@ -1484,7 +1484,8 @@ nmc_terminal_spawn_pager (const NmcConfig *nmc_config)
pid_t parent_pid;
int fd[2];
if ( nm_cli.pager_pid > 0
if ( nm_cli.nmc_config.in_editor
|| nm_cli.pager_pid > 0
|| nmc_config->print_output == NMC_PRINT_TERSE
|| !use_colors (nmc_config->use_colors)
|| g_strcmp0 (pager, "") == 0)