Allow some more characters (up to 64 char) in UDL name
Fix #5400, fix #4714, close #5458
This commit is contained in:
parent
cfa702a8a8
commit
cf35168491
@ -2086,18 +2086,19 @@ void Notepad_plus::checkLangsMenu(int id) const
|
|||||||
if (curBuf->isUserDefineLangExt())
|
if (curBuf->isUserDefineLangExt())
|
||||||
{
|
{
|
||||||
const TCHAR *userLangName = curBuf->getUserDefineLangName();
|
const TCHAR *userLangName = curBuf->getUserDefineLangName();
|
||||||
const int nbChar = 16;
|
TCHAR menuLangName[langNameLenMax];
|
||||||
TCHAR menuLangName[nbChar];
|
|
||||||
|
|
||||||
for (int i = IDM_LANG_USER + 1 ; i <= IDM_LANG_USER_LIMIT ; ++i)
|
for (int i = IDM_LANG_USER + 1 ; i <= IDM_LANG_USER_LIMIT ; ++i)
|
||||||
{
|
{
|
||||||
if (::GetMenuString(_mainMenuHandle, i, menuLangName, nbChar-1, MF_BYCOMMAND))
|
if (::GetMenuString(_mainMenuHandle, i, menuLangName, langNameLenMax, MF_BYCOMMAND))
|
||||||
|
{
|
||||||
if (!lstrcmp(userLangName, menuLangName))
|
if (!lstrcmp(userLangName, menuLangName))
|
||||||
{
|
{
|
||||||
HMENU _langMenuHandle = ::GetSubMenu(_mainMenuHandle, MENUINDEX_LANGUAGE);
|
HMENU _langMenuHandle = ::GetSubMenu(_mainMenuHandle, MENUINDEX_LANGUAGE);
|
||||||
doCheck(_langMenuHandle, i);
|
doCheck(_langMenuHandle, i);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -31,7 +31,7 @@
|
|||||||
|
|
||||||
#include "SciLexer.h"
|
#include "SciLexer.h"
|
||||||
|
|
||||||
const int langNameLenMax = 33;
|
const int langNameLenMax = 64;
|
||||||
const int extsLenMax = 256;
|
const int extsLenMax = 256;
|
||||||
const int max_char = 1024*30;
|
const int max_char = 1024*30;
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user