mirror of
https://github.com/notepad-plus-plus/notepad-plus-plus.git
synced 2025-07-25 23:05:13 +02:00
[BUG_FIXED] Walk around Notepad++ hanging on C(JK?) input with ANSI document while enabling word completion.
git-svn-id: svn://svn.tuxfamily.org/svnroot/notepadplus/repository/trunk@939 f5eea248-9336-0410-98b8-ebc06183d4e3
This commit is contained in:
parent
418c440f63
commit
211932fdd7
@ -189,7 +189,10 @@ void AutoCompletion::update(int character)
|
|||||||
if (lstrlen(s) >= int(nppGUI._autocFromLen))
|
if (lstrlen(s) >= int(nppGUI._autocFromLen))
|
||||||
{
|
{
|
||||||
if (nppGUI._autocStatus == nppGUI.autoc_word)
|
if (nppGUI._autocStatus == nppGUI.autoc_word)
|
||||||
showWordComplete(false);
|
{
|
||||||
|
if (!_pEditView->isCJK())
|
||||||
|
showWordComplete(false);
|
||||||
|
}
|
||||||
else if (nppGUI._autocStatus == nppGUI.autoc_func)
|
else if (nppGUI._autocStatus == nppGUI.autoc_func)
|
||||||
showAutoComplete();
|
showAutoComplete();
|
||||||
}
|
}
|
||||||
|
@ -613,29 +613,12 @@ public:
|
|||||||
void setTabSettings(Lang *lang);
|
void setTabSettings(Lang *lang);
|
||||||
bool isWrapRestoreNeeded() const {return _wrapRestoreNeeded;};
|
bool isWrapRestoreNeeded() const {return _wrapRestoreNeeded;};
|
||||||
void setWrapRestoreNeeded(bool isWrapRestoredNeeded) {_wrapRestoreNeeded = isWrapRestoredNeeded;};
|
void setWrapRestoreNeeded(bool isWrapRestoredNeeded) {_wrapRestoreNeeded = isWrapRestoredNeeded;};
|
||||||
/*
|
|
||||||
pair<size_t, bool> getLineUndoState(size_t currentLine) {
|
bool isCJK() const {
|
||||||
Buffer * buf = getCurrentBuffer();
|
return ((_codepage == CP_CHINESE_TRADITIONAL) || (_codepage == CP_CHINESE_SIMPLIFIED) ||
|
||||||
return buf->getLineUndoState(currentLine);
|
(_codepage == CP_JAPANESE) || (_codepage == CP_KOREAN));
|
||||||
};
|
|
||||||
void setLineUndoState(size_t currentLine, size_t undoLevel, bool isSaved = false) {
|
|
||||||
Buffer * buf = getCurrentBuffer();
|
|
||||||
buf->setLineUndoState(currentLine, undoLevel, isSaved);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
void markSavedLines() {
|
|
||||||
for (int i = 0 ; i <= lastZeroBasedLineNumber() ; i++)
|
|
||||||
{
|
|
||||||
if ((execute(SCI_MARKERGET, i) & (1 << MARK_LINEMODIFIEDUNSAVED)) != 0)
|
|
||||||
{
|
|
||||||
execute(SCI_MARKERDELETE, i, MARK_LINEMODIFIEDUNSAVED);
|
|
||||||
execute(SCI_MARKERADD, i, MARK_LINEMODIFIEDSAVED);
|
|
||||||
//pair<size_t, bool> st = getLineUndoState(i);
|
|
||||||
setLineUndoState(i, 0, true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
|
||||||
*/
|
|
||||||
protected:
|
protected:
|
||||||
static HINSTANCE _hLib;
|
static HINSTANCE _hLib;
|
||||||
static int _refCount;
|
static int _refCount;
|
||||||
@ -906,11 +889,6 @@ protected:
|
|||||||
execute(SCI_MARKERSETBACKSELECTED, marker, foreActive);
|
execute(SCI_MARKERSETBACKSELECTED, marker, foreActive);
|
||||||
};
|
};
|
||||||
|
|
||||||
bool isCJK() const {
|
|
||||||
return ((_codepage == CP_CHINESE_TRADITIONAL) || (_codepage == CP_CHINESE_SIMPLIFIED) ||
|
|
||||||
(_codepage == CP_JAPANESE) || (_codepage == CP_KOREAN));
|
|
||||||
};
|
|
||||||
|
|
||||||
int codepage2CharSet() const {
|
int codepage2CharSet() const {
|
||||||
switch (_codepage)
|
switch (_codepage)
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user