From ea909e38dc48e85b5a0f8ab3536e9466a1bd98f6 Mon Sep 17 00:00:00 2001 From: Beniamino Galvani Date: Wed, 7 Jun 2017 11:16:31 +0200 Subject: [PATCH] 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: 24c079e4b2a06b4e5240a520650f6cfb183e2bf6 --- clients/cli/utils.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/clients/cli/utils.c b/clients/cli/utils.c index 117a33d62e..b69f0ea75a 100644 --- a/clients/cli/utils.c +++ b/clients/cli/utils.c @@ -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)