diff options
author | nyamatongwe <unknown> | 2001-05-01 11:12:42 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2001-05-01 11:12:42 +0000 |
commit | 19724c5fcab3abb25d959a7c7a27950601a45270 (patch) | |
tree | 2d1d090c6804a9af2f81f04c4554c22e819a1487 /src | |
parent | b669de65e5aecfeb666cb660e0785851d7cde441 (diff) | |
download | scintilla-mirror-19724c5fcab3abb25d959a7c7a27950601a45270.tar.gz |
External lexer feature added by Simon allows lexers to be housed in DLLs with
a .lexer extension which are automatically loaded at startup.
Minor fix to IME support in ScintillaWin.cxx to deal with current mingw headers.
Diffstat (limited to 'src')
-rw-r--r-- | src/DocumentAccessor.h | 9 | ||||
-rw-r--r-- | src/ScintillaBase.cxx | 3 | ||||
-rw-r--r-- | src/ScintillaBase.h | 2 |
3 files changed, 10 insertions, 4 deletions
diff --git a/src/DocumentAccessor.h b/src/DocumentAccessor.h index abbb55f18..48742a9b4 100644 --- a/src/DocumentAccessor.h +++ b/src/DocumentAccessor.h @@ -18,6 +18,7 @@ class DocumentAccessor : public Accessor { protected: Document *pdoc; PropSet &props; + WindowID id; int lenDoc; char styleBuf[bufferSize]; @@ -30,8 +31,8 @@ protected: void Fill(int position); public: - DocumentAccessor(Document *pdoc_, PropSet &props_) : - Accessor(), pdoc(pdoc_), props(props_), + DocumentAccessor(Document *pdoc_, PropSet &props_, WindowID id_=0) : + Accessor(), pdoc(pdoc_), props(props_), id(id_), lenDoc(-1), validLen(0), chFlags(0), chWhile(0) { } ~DocumentAccessor(); @@ -46,6 +47,10 @@ public: int GetPropertyInt(const char *key, int defaultValue=0) { return props.GetInt(key, defaultValue); } + char *GetProperties() { + return props.ToString(); + } + WindowID GetWindow() { return id; } void StartAt(unsigned int start, char chMask=31); void SetFlags(char chFlags_, char chWhile_) {chFlags = chFlags_; chWhile = chWhile_; }; diff --git a/src/ScintillaBase.cxx b/src/ScintillaBase.cxx index fe873b0f2..2840e08fb 100644 --- a/src/ScintillaBase.cxx +++ b/src/ScintillaBase.cxx @@ -41,6 +41,7 @@ ScintillaBase::ScintillaBase() { lexCurrent = 0; for (int wl = 0;wl < numWordLists;wl++) keyWordLists[wl] = new WordList; + keyWordLists[numWordLists] = 0; #endif } @@ -362,7 +363,7 @@ void ScintillaBase::Colourise(int start, int end) { int len = end - start; //WindowAccessor styler(wMain.GetID(), props); - DocumentAccessor styler(pdoc, props); + DocumentAccessor styler(pdoc, props, wMain.GetID()); int styleStart = 0; if (start > 0) diff --git a/src/ScintillaBase.h b/src/ScintillaBase.h index 13172031a..d5b1e8ba0 100644 --- a/src/ScintillaBase.h +++ b/src/ScintillaBase.h @@ -43,7 +43,7 @@ protected: LexerModule *lexCurrent; PropSet props; enum {numWordLists=5}; - WordList *keyWordLists[numWordLists]; + WordList *keyWordLists[numWordLists+1]; void SetLexer(uptr_t wParam); void SetLexerLanguage(const char *languageName); void Colourise(int start, int end); |