[BUG_FIXED] Fix Matlab script making Notepad++ crash under Chinese windows issue.
Signed-off-by: Don HO <don.h@free.fr> git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@501 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
3fa7bd97ff
commit
736137918e
@ -7055,6 +7055,7 @@ LRESULT Notepad_plus::runProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lPa
|
||||
_invisibleEditView.init(_hInst, hwnd);
|
||||
_invisibleEditView.execute(SCI_SETUNDOCOLLECTION);
|
||||
_invisibleEditView.execute(SCI_EMPTYUNDOBUFFER);
|
||||
_invisibleEditView.wrap(false); // Make sure no slow down
|
||||
|
||||
// Configuration of 2 scintilla views
|
||||
_mainEditView.showMargin(ScintillaEditView::_SC_MARGE_LINENUMBER, svp1._lineNumberMarginShow);
|
||||
|
@ -1490,12 +1490,13 @@ void ScintillaEditView::bufferUpdated(Buffer * buffer, int mask) {
|
||||
if (buffer->getUnicodeMode() == uni8Bit)
|
||||
{ //either 0 or CJK codepage
|
||||
LangType typeDoc = buffer->getLangType();
|
||||
if (isCJK() && (typeDoc != L_CSS || typeDoc != L_CAML || typeDoc != L_ASM || typeDoc != L_MATLAB))
|
||||
if (isCJK())
|
||||
{
|
||||
execute(SCI_SETCODEPAGE, _codepage); //you may also want to set charsets here, not yet implemented
|
||||
if (typeDoc == L_CSS || typeDoc == L_CAML || typeDoc == L_ASM || typeDoc == L_MATLAB)
|
||||
execute(SCI_SETCODEPAGE, 0); //you may also want to set charsets here, not yet implemented
|
||||
else
|
||||
execute(SCI_SETCODEPAGE, _codepage);
|
||||
}
|
||||
else
|
||||
execute(SCI_SETCODEPAGE, 0);
|
||||
}
|
||||
else //CP UTF8 for all unicode
|
||||
execute(SCI_SETCODEPAGE, SC_CP_UTF8);
|
||||
|
Loading…
Reference in New Issue
Block a user