Solve compiling error & fix a regression of "new #"

The regression is introduced by:
f7d9e7c095 (diff-2d5c277be2799a7e43a90232d8ef9add2e788e252c8692bf9416abc69836957d)
pull/15388/head
Don Ho 5 months ago
parent a301ffc774
commit dbef8cea91

@ -153,6 +153,20 @@
#ifdef _MSC_VER #ifdef _MSC_VER
#include <tchar.h> #include <tchar.h>
#else #else
#ifndef TCHAR
#define TCHAR char
#endif
#ifndef _T
#define _T(__x) (__x)
#define _tmain main
#define _tprintf printf
#define _getts gets
#define _tcslen strlen
#define _tfopen fopen
#define _tcscpy strcpy
#define _tcscat strcat
#define _sntprintf snprintf
#endif
#endif #endif
#endif #endif

@ -1353,7 +1353,7 @@ BufferID FileManager::newEmptyDocument()
wstring newTitle = ((NppParameters::getInstance()).getNativeLangSpeaker())->getLocalizedStrFromID("tab-untitled-string", UNTITLED_STR); wstring newTitle = ((NppParameters::getInstance()).getNativeLangSpeaker())->getLocalizedStrFromID("tab-untitled-string", UNTITLED_STR);
wchar_t nb[10]; wchar_t nb[10];
wsprintf(nb, L"%d"), static_cast<int>(nextUntitledNewNumber()); wsprintf(nb, L"%d", static_cast<int>(nextUntitledNewNumber()));
newTitle += nb; newTitle += nb;
Document doc = static_cast<Document>(_pscratchTilla->execute(SCI_CREATEDOCUMENT, 0, SC_DOCUMENTOPTION_TEXT_LARGE)); // this already sets a reference for filemanager Document doc = static_cast<Document>(_pscratchTilla->execute(SCI_CREATEDOCUMENT, 0, SC_DOCUMENTOPTION_TEXT_LARGE)); // this already sets a reference for filemanager

Loading…
Cancel
Save