From 28ea89b62b322ea36aadb65d35caef1b0cf5de5d Mon Sep 17 00:00:00 2001 From: Vadim Zeitlin Date: Sat, 16 Jul 2005 23:10:46 +0000 Subject: [PATCH] handle '&' in the names of the files in the history correctly by quoting it git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@34872 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775 --- src/common/docview.cpp | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/common/docview.cpp b/src/common/docview.cpp index ce47e57..4ca21c4 100644 --- a/src/common/docview.cpp +++ b/src/common/docview.cpp @@ -2165,6 +2165,8 @@ void wxFileHistory::AddFileToHistory(const wxString& file) pathInMenu = m_fileHistory[i]; } + // we need to quote '&' characters which are used for mnemonics + pathInMenu.Replace(_T("&"), _T("&&")); wxString buf; buf.Printf(s_MRUEntryFormat, i + 1, pathInMenu.c_str()); wxList::compatibility_iterator node = m_fileMenus.GetFirst(); -- 2.7.4