From 7790e31eb8e96b6f27f952121e5d23b38a814c22 Mon Sep 17 00:00:00 2001 From: Frank LENORMAND Date: Fri, 7 Feb 2020 12:27:54 +0100 Subject: [PATCH] src: Don't show startup information when opening a file Follow-up to #3317 --- src/main.cc | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/main.cc b/src/main.cc index e9d5bf36..79e0793d 100644 --- a/src/main.cc +++ b/src/main.cc @@ -1161,10 +1161,11 @@ int main(int argc, char* argv[]) try { auto ignore_kakrc = (bool)parser.get_switch("n"); - auto flags = (ignore_kakrc ? ServerFlags::IgnoreKakrc : ServerFlags::None) | - (parser.get_switch("d") ? ServerFlags::Daemon : ServerFlags::None) | - (parser.get_switch("ro") ? ServerFlags::ReadOnly : ServerFlags::None) | - ((argc == 2 and ignore_kakrc) and isatty(0) ? ServerFlags::StartupInfo : ServerFlags::None); + auto flags = (ignore_kakrc ? ServerFlags::IgnoreKakrc : ServerFlags::None) | + (parser.get_switch("d") ? ServerFlags::Daemon : ServerFlags::None) | + (parser.get_switch("ro") ? ServerFlags::ReadOnly : ServerFlags::None) | + ((argc == 1 or (ignore_kakrc and argc == 2)) + and isatty(0) ? ServerFlags::StartupInfo : ServerFlags::None); auto debug_flags = option_from_string(Meta::Type{}, parser.get_switch("debug").value_or("")); return run_server(session, server_init, client_init, init_coord, flags, ui_type, debug_flags, files); }