@@ -215,10 +215,10 @@ void insertFinalNewline(bool insert)
215215 return ;
216216
217217 // Get the last line number
218- int lastLine = SendMessage (curScintilla, SCI_GETLINECOUNT, 0 , 0 ) - 1 ;
218+ intptr_t lastLine = :: SendMessage (curScintilla, SCI_GETLINECOUNT, 0 , 0 ) - 1 ;
219219
220220 // Get the length of that last line
221- int length = SendMessage (curScintilla, SCI_LINELENGTH, lastLine, 0 );
221+ intptr_t length = :: SendMessage (curScintilla, SCI_LINELENGTH, lastLine, 0 );
222222
223223 // Do we need to insert a final newline?
224224 if (insert)
@@ -230,7 +230,7 @@ void insertFinalNewline(bool insert)
230230 // What type of EOL must be inserted?
231231 char eolBuf[10 ];
232232 eolBuf[0 ] = 0 ;
233- int eolMode = SendMessage (curScintilla, SCI_GETEOLMODE, 0 , 0 );
233+ int eolMode = static_cast < int >(:: SendMessage (curScintilla, SCI_GETEOLMODE, 0 , 0 ) );
234234 switch (eolMode)
235235 {
236236 case SC_EOL_CRLF:
@@ -258,7 +258,7 @@ void insertFinalNewline(bool insert)
258258
259259 // Find the last non-newline character
260260 length = SendMessage (curScintilla, SCI_GETTEXTLENGTH, 0 , 0 );
261- int pos = length;
261+ intptr_t pos = length;
262262 while (pos > 0 && isNewline ((char ) SendMessage (curScintilla, SCI_GETCHARAT, pos - 1 , 0 )))
263263 pos--;
264264
@@ -340,7 +340,7 @@ void onBeforeSave(HWND hWnd)
340340 // Save the folding behavior and set it to 0 to keep folds from opening
341341 // when modifying the file.
342342 HWND curScintilla = getCurrentScintilla ();
343- int automatic_fold = SendMessage (curScintilla, SCI_GETAUTOMATICFOLD, 0 , 0 );
343+ int automatic_fold = static_cast < int >(:: SendMessage (curScintilla, SCI_GETAUTOMATICFOLD, 0 , 0 ) );
344344 SendMessage (curScintilla, SCI_SETAUTOMATICFOLD, 0 , 0 );
345345
346346 // Trailing whitespace needs to be trimmed before 'insert_final_newline' is
0 commit comments