Skip to content

Commit 1423e42

Browse files
committed
fix bruderstein#255 notepad.getCurrentDocIndex(v) doesn't return -1 if view 'v' is not open
use signed var for getCurrentDocIndex() return type
1 parent 1e090b7 commit 1423e42

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

PythonScript/src/NotepadPlusWrapper.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -405,7 +405,7 @@ void NotepadPlusWrapper::destroyScintilla(boost::shared_ptr<ScintillaWrapper> bu
405405
}
406406
}
407407

408-
idx_t NotepadPlusWrapper::getCurrentDocIndex(int view)
408+
intptr_t NotepadPlusWrapper::getCurrentDocIndex(int view)
409409
{
410410
return callNotepad(NPPM_GETCURRENTDOCINDEX, 0, static_cast<LPARAM>(view));
411411
}

PythonScript/src/NotepadPlusWrapper.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -663,7 +663,7 @@ class NotepadPlusWrapper
663663
boost::shared_ptr<ScintillaWrapper> createScintilla();
664664
void destroyScintilla(boost::shared_ptr<ScintillaWrapper> buffer);
665665

666-
idx_t getCurrentDocIndex(int view);
666+
intptr_t getCurrentDocIndex(int view);
667667

668668
void setStatusBar(StatusBarSection section, const char *text);
669669

0 commit comments

Comments
 (0)