@@ -216,10 +216,10 @@ void insertFinalNewline(bool insert)
216216 return ;
217217
218218 // Get the last line number
219- int lastLine = SendMessage (curScintilla, SCI_GETLINECOUNT, 0 , 0 ) - 1 ;
219+ intptr_t lastLine = :: SendMessage (curScintilla, SCI_GETLINECOUNT, 0 , 0 ) - 1 ;
220220
221221 // Get the length of that last line
222- int length = SendMessage (curScintilla, SCI_LINELENGTH, lastLine, 0 );
222+ intptr_t length = :: SendMessage (curScintilla, SCI_LINELENGTH, lastLine, 0 );
223223
224224 // Do we need to insert a final newline?
225225 if (insert)
@@ -231,7 +231,7 @@ void insertFinalNewline(bool insert)
231231 // What type of EOL must be inserted?
232232 char eolBuf[10 ];
233233 eolBuf[0 ] = 0 ;
234- int eolMode = SendMessage (curScintilla, SCI_GETEOLMODE, 0 , 0 );
234+ int eolMode = static_cast < int >(:: SendMessage (curScintilla, SCI_GETEOLMODE, 0 , 0 ) );
235235 switch (eolMode)
236236 {
237237 case SC_EOL_CRLF:
@@ -259,7 +259,7 @@ void insertFinalNewline(bool insert)
259259
260260 // Find the last non-newline character
261261 length = SendMessage (curScintilla, SCI_GETTEXTLENGTH, 0 , 0 );
262- int pos = length;
262+ intptr_t pos = length;
263263 while (pos > 0 && isNewline ((char ) SendMessage (curScintilla, SCI_GETCHARAT, pos - 1 , 0 )))
264264 pos--;
265265
@@ -353,7 +353,7 @@ void onBeforeSave(HWND hWnd, uptr_t idFrom)
353353 // Save the folding behavior and set it to 0 to keep folds from opening
354354 // when modifying the file.
355355 HWND curScintilla = getCurrentScintilla ();
356- int automatic_fold = SendMessage (curScintilla, SCI_GETAUTOMATICFOLD, 0 , 0 );
356+ int automatic_fold = static_cast < int >(:: SendMessage (curScintilla, SCI_GETAUTOMATICFOLD, 0 , 0 ) );
357357 SendMessage (curScintilla, SCI_SETAUTOMATICFOLD, 0 , 0 );
358358
359359 // Trailing whitespace needs to be trimmed before 'insert_final_newline' is
0 commit comments