diff options
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 6119944c3..be63ea839 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -9,6 +9,7 @@ #include <string.h> #include <stdio.h> #include <ctype.h> +#include <assert.h> #include <string> #include <vector> @@ -25,6 +26,7 @@ #include "Platform.h" +#include "ILexer.h" #include "Scintilla.h" #include "SplitVector.h" @@ -4132,6 +4134,13 @@ void Editor::NotifyStyleNeeded(Document *, void *, int endStyleNeeded) { NotifyStyleToNeeded(endStyleNeeded); } +void Editor::NotifyLexerChanged(Document *, void *) { +} + +void Editor::NotifyErrorOccurred(Document *, void *, int status) { + errorStatus = status; +} + void Editor::NotifyChar(int ch) { SCNotification scn = {0}; scn.nmhdr.code = SCN_CHARADDED; @@ -4315,6 +4324,14 @@ void Editor::NotifyModified(Document *, DocModification mh, void *) { Redraw(); } } + if (mh.modificationType & SC_MOD_LEXERSTATE) { + if (paintState == painting) { + CheckForChangeOutsidePaint( + Range(mh.position, mh.position + mh.length)); + } else { + Redraw(); + } + } if (mh.modificationType & (SC_MOD_CHANGESTYLE | SC_MOD_CHANGEINDICATOR)) { if (mh.modificationType & SC_MOD_CHANGESTYLE) { pdoc->IncrementStyleClock(); @@ -8711,6 +8728,10 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { sel.RangeMain() = SelectionRange(sel.RangeMain().anchor, sel.RangeMain().caret); break; + case SCI_CHANGELEXERSTATE: + pdoc->ChangeLexerState(wParam, lParam); + break; + default: return DefWndProc(iMessage, wParam, lParam); } |