Update recent characters only when the selected character is inserted

Change-Id: Ic8cd715553f995d8adc1e84381c00646c9c252af
Reviewed-on: https://gerrit.libreoffice.org/46065
Tested-by: Jenkins <ci@libreoffice.org>
Reviewed-by: Tamás Zolnai <tamas.zolnai@collabora.com>
diff --git a/cui/source/dialogs/cuicharmap.cxx b/cui/source/dialogs/cuicharmap.cxx
index 31c2591..c01af45 100644
--- a/cui/source/dialogs/cuicharmap.cxx
+++ b/cui/source/dialogs/cuicharmap.cxx
@@ -631,9 +631,9 @@ void SvxCharacterMap::insertCharToDoc(const OUString& sGlyph)
        aArgs[1].Name = "FontName";
        aArgs[1].Value <<= aFont.GetFamilyName();
        comphelper::dispatchCommand(".uno:InsertSymbol", aArgs);
    }

    updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
        updateRecentCharacterList(sGlyph, aFont.GetFamilyName());
    }
}