Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
1. 0002845: Wrong Handling of "exclamation marks" in Menu item "!?<ti…
…tle>?<init>!"
  • Loading branch information
alabuzhev committed Dec 27, 2014
1 parent 9fc56e7 commit dbc75ec
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 23 deletions.
6 changes: 5 additions & 1 deletion far/changelog
@@ -1,4 +1,8 @@
zg 26.12.2014 18:50:17 +0200 - build 4228
drkns 27.12.2014 15:13:59 +0200 - build 4229

1. 0002845: Wrong Handling of "exclamation marks" in Menu item "!?<title>?<init>!"

zg 26.12.2014 18:50:17 +0200 - build 4228

1. быстрый поиск в панелях не всегда корректно перерисовывался.

Expand Down
36 changes: 15 additions & 21 deletions far/fnparce.cpp
Expand Up @@ -399,17 +399,12 @@ int SubstFileName(const wchar_t *DlgTitle,
int IgnoreInput, // TRUE - íå èñïîëíÿòü "!?<title>?<init>!"
const wchar_t *CmdLineDir) // Êàòàëîã èñïîëíåíèÿ
{
if (pListName)
pListName->clear();

if (pAnotherListName)
pAnotherListName->clear();

if (pShortListName)
pShortListName->clear();

if (pAnotherShortListName)
pAnotherShortListName->clear();
string* Lists[] = { pListName, pAnotherListName, pShortListName, pAnotherShortListName };
FOR(auto& i, Lists)
{
if (i)
i->clear();
}

/* $ 19.06.2001 SVS
ÂÍÈÌÀÍÈÅ! Äëÿ àëüòåðíàòèâíûõ ìåòàñèìâîëîâ, íå îñíîâàííûõ íà "!",
Expand Down Expand Up @@ -459,16 +454,8 @@ int SubstFileName(const wchar_t *DlgTitle,

PSubstData->PreserveLFN=FALSE;
PSubstData->PassivePanel=FALSE; // ïåðâîíà÷àëüíî ðå÷ü èäåò ïðî àêòèâíóþ ïàíåëü!
string strTmp = strStr;

if (!IgnoreInput)
{
string title = NullToEmpty(DlgTitle);
SubstFileName(nullptr,title,Name,ShortName,nullptr,nullptr,nullptr,nullptr,TRUE);
ReplaceVariables(api::env::expand_strings(title).data(), strTmp, PSubstData);
}

const wchar_t *CurStr = strTmp.data();
const wchar_t *CurStr = strStr.data();
string strOut;

while (*CurStr)
Expand All @@ -483,8 +470,15 @@ int SubstFileName(const wchar_t *DlgTitle,
CurStr++;
}
}

strStr = strOut;


if (!IgnoreInput)
{
string title = NullToEmpty(DlgTitle);
ReplaceVariables(api::env::expand_strings(title).data(), strStr, PSubstData);
}

return PSubstData->PreserveLFN;
}

Expand Down
2 changes: 1 addition & 1 deletion far/vbuild.m4
@@ -1 +1 @@
m4_define(BUILD,4228)m4_dnl
m4_define(BUILD,4229)m4_dnl

0 comments on commit dbc75ec

Please sign in to comment.