From b8ed2026586a2319daca3187f7a3ba3040e6f62e Mon Sep 17 00:00:00 2001 From: Juergen Spitzmueller Date: Wed, 8 Aug 2018 15:50:04 +0200 Subject: [PATCH] Consider default output format --- src/insets/InsetInfo.cpp | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/insets/InsetInfo.cpp b/src/insets/InsetInfo.cpp index e959836dd3..b532fe998f 100644 --- a/src/insets/InsetInfo.cpp +++ b/src/insets/InsetInfo.cpp @@ -828,12 +828,17 @@ void InsetInfo::updateBuffer(ParIterator const & it, UpdateType utype) { if (initialized_) break; docstring_list names; - FuncRequest const func = lyxaction.lookupFunc(params_.name); + FuncRequest func = lyxaction.lookupFunc(params_.name); if (func.action() == LFUN_UNKNOWN_ACTION) { gui = _("Unknown action %1$s"); error(from_ascii("Unknown action %1$s"), params_.lang); break; } + if (func.action() == LFUN_BUFFER_VIEW || func.action() == LFUN_BUFFER_UPDATE) + // The default output format is in the menu without argument, + // so strip it here. + if (func.argument() == from_ascii(buffer().params().getDefaultOutputFormat())) + func = FuncRequest(func.action()); // iterate through the menubackend to find it if (!theApp()) { gui = _("Can't determine menu entry for action %1$s in batch mode"); -- 2.39.2