Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
- adapt bufferId for x64
- further x64 fixes
- removed unused NotepadPlusBuffer.h from VS project
  • Loading branch information
chcg committed Mar 23, 2018
commit 8e8148214d5db5a6f6fd428af7102919c61f42c7
1 change: 0 additions & 1 deletion PythonScript/project/PythonScript2010.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -488,7 +488,6 @@ xcopy $(ProjectDir)..\python_tests\*.* "e:\notepadtest\unicode\plugins\config\py
<ClInclude Include="..\src\MenuManager.h" />
<ClInclude Include="..\src\MutexHolder.h" />
<ClInclude Include="..\src\NotAllowedInCallbackException.h" />
<ClInclude Include="..\src\NotepadPlusBuffer.h" />
<ClInclude Include="..\src\NotepadPlusWrapper.h" />
<ClInclude Include="..\src\NotepadPython.h" />
<ClInclude Include="..\src\NotSupportedException.h" />
Expand Down
3 changes: 0 additions & 3 deletions PythonScript/project/PythonScript2010.vcxproj.filters
Original file line number Diff line number Diff line change
Expand Up @@ -201,9 +201,6 @@
<ClInclude Include="..\src\Enums.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\NotepadPlusBuffer.h">
<Filter>Header Files</Filter>
</ClInclude>
<ClInclude Include="..\src\NotepadPlusWrapper.h">
<Filter>Header Files</Filter>
</ClInclude>
Expand Down
4 changes: 2 additions & 2 deletions PythonScript/src/AboutDialog2.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -50,13 +50,13 @@ INT_PTR CALLBACK AboutDialog::run_dlgProc(UINT Message, WPARAM wParam, LPARAM /*
}

case WM_CTLCOLORDLG:
return (LONG)m_hbrBackground;
return (INT_PTR)m_hbrBackground;

case WM_CTLCOLORSTATIC:
{
HDC hdcStatic = (HDC)wParam;
SetBkMode(hdcStatic, TRANSPARENT);
return (LONG)m_hbrBackground;
return (INT_PTR)m_hbrBackground;
}

case WM_COMMAND :
Expand Down
12 changes: 6 additions & 6 deletions PythonScript/src/ConsoleDialog.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -253,14 +253,14 @@ void ConsoleDialog::historyPrevious()
{
size_t length = GetWindowTextLength(m_hInput);
TCHAR *buffer = new TCHAR[length + 1];
GetWindowText(m_hInput, buffer, length + 1);
GetWindowText(m_hInput, buffer, (int)length + 1);

// Not an empty string and different from orig
if (buffer[0] && (m_historyIter == m_history.end() || *m_historyIter != buffer))
{
if (m_changes.find(m_currentHistory) == m_changes.end())
{
m_changes.insert(std::pair<int, tstring>(m_currentHistory, tstring(buffer)));
m_changes.insert(std::pair<idx_t, tstring>(m_currentHistory, tstring(buffer)));
}
else
{
Expand Down Expand Up @@ -302,7 +302,7 @@ void ConsoleDialog::historyNext()
{
if (m_changes.find(m_currentHistory) == m_changes.end())
{
m_changes.insert(std::pair<int, tstring>(m_currentHistory, tstring(buffer)));
m_changes.insert(std::pair<idx_t, tstring>(m_currentHistory, tstring(buffer)));
}
else
{
Expand Down Expand Up @@ -413,9 +413,9 @@ void ConsoleDialog::runStatement()
{

HWND hText = ::GetDlgItem(_hSelf, IDC_INPUT);
size_t length = GetWindowTextLengthW(hText);
size_t length = GetWindowTextLength(hText);
TCHAR *buffer = new TCHAR[length + 1];
GetWindowText(hText, buffer, length + 1);
GetWindowText(hText, buffer, (int)length + 1);
historyAdd(buffer);
std::shared_ptr<char> charBuffer = WcharMbcsConverter::tchar2char(buffer);
delete [] buffer;
Expand Down Expand Up @@ -450,7 +450,7 @@ void ConsoleDialog::createOutputWindow(HWND hParentWindow)
{
m_scintilla = (HWND)::SendMessage(_hParent, NPPM_CREATESCINTILLAHANDLE, 0, reinterpret_cast<LPARAM>(hParentWindow));

LONG currentStyle = GetWindowLongPtr(m_scintilla, GWL_STYLE);
LONG_PTR currentStyle = GetWindowLongPtr(m_scintilla, GWL_STYLE);
SetWindowLongPtr(m_scintilla, GWL_STYLE, currentStyle | WS_TABSTOP);


Expand Down
6 changes: 3 additions & 3 deletions PythonScript/src/ConstString.h
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@
template <class CharT>
class ConstString {
public:
typedef unsigned int size_type;
typedef size_t size_type;
ConstString() : _length(0), _str(0) { }
ConstString(const CharT* str, size_type length) : _length(length), _str(str) { }
ConstString(const ConstString<CharT>& source) {
Expand Down Expand Up @@ -52,10 +52,10 @@ class ConstString {
template <class CharT1, class CharT2>
bool operator==(const ConstString<CharT1>& a, const ConstString<CharT2>& b)
{
unsigned int a_length = a.length();
size_t a_length = a.length();
if (a_length != b.length())
return false;
for (unsigned int i = 0; i < a_length; i++)
for (size_t i = 0; i < a_length; i++)
if (a[i] != b[i])
return false;
return true;
Expand Down
Loading