diff options
| author | nyamatongwe <nyamatongwe@gmail.com> | 2011-09-23 23:43:39 +1000 |
|---|---|---|
| committer | nyamatongwe <nyamatongwe@gmail.com> | 2011-09-23 23:43:39 +1000 |
| commit | 168aeec3b49a2eb97161dabcc6b9553024707647 (patch) | |
| tree | c5827724e797df59c800355b8ae95f527c400f5e /src/Editor.cxx | |
| parent | 554c74012aab4802c77a6346c20d11ae7d7b7d32 (diff) | |
| download | scintilla-mirror-168aeec3b49a2eb97161dabcc6b9553024707647.tar.gz | |
Optimized MarkerNext so it can be much faster when no marker ever set
and a little faster when markers have been used.
Diffstat (limited to 'src/Editor.cxx')
| -rw-r--r-- | src/Editor.cxx | 10 |
1 files changed, 2 insertions, 8 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index de0afdf49..2e4d724e5 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -8037,14 +8037,8 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_MARKERGET: return pdoc->GetMark(wParam); - case SCI_MARKERNEXT: { - int lt = pdoc->LinesTotal(); - for (int iLine = wParam; iLine < lt; iLine++) { - if ((pdoc->GetMark(iLine) & lParam) != 0) - return iLine; - } - } - return -1; + case SCI_MARKERNEXT: + return pdoc->MarkerNext(wParam, lParam); case SCI_MARKERPREVIOUS: { for (int iLine = wParam; iLine >= 0; iLine--) { |
