@@ -26,8 +26,6 @@ PluginBase::~PluginBase() {
2626// --------------------------------------------------------------------------------------
2727void PluginBase::setInfo (const NppData *data) {
2828 _data = *data;
29- _editor = SciApplication::getApplication (data, apiLevel ());
30-
3129 DWORD versionWords = static_cast <DWORD>(sendNppMessage (NPPM_GETNPPVERSION));
3230 div_t loWords = ::div ((versionWords & 0xffff ) * 10 , 10 );
3331 while (loWords.quot > 9 ) {
@@ -37,10 +35,11 @@ void PluginBase::setInfo(const NppData *data) {
3735 _nppVersion.major = ((versionWords >> 0x10 ) & 0xffff );
3836 _nppVersion.minor = loWords.quot ;
3937 _nppVersion.revision = loWords.rem ;
38+ _editor = SciApplication::getApplication (data, apiLevel ());
4039}
4140// --------------------------------------------------------------------------------------
4241HWND PluginBase::currentScintilla () const {
43- intptr_t index = - 1 ;
42+ DWORD_PTR index = 0 ;
4443 sendNppMessage (NPPM_GETCURRENTSCINTILLA, UNUSEDW, &index);
4544 return (index > 0 ) ? _data._scintillaSecondHandle : _data._scintillaMainHandle ;
4645}
@@ -161,7 +160,7 @@ path_t PluginBase::pluginNameFromModule(HMODULE hInstace) {
161160// SciApplication
162161// --------------------------------------------------------------------------------------
163162SciActiveDocument const &SciApplication::getDocument () const {
164- intptr_t index = - 1 ;
163+ DWORD_PTR index = 0 ;
165164 sendMessage (NPPM_GETCURRENTSCINTILLA, UNUSEDW, &index);
166165 return getViews ()[(index > 0 )];
167166}
0 commit comments