diff options
author | nyamatongwe <unknown> | 2005-03-20 01:37:22 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2005-03-20 01:37:22 +0000 |
commit | 0eeee7531d739c2fc06e54eb56d27f361ece0503 (patch) | |
tree | 8395a920bd832f73b878b22182452e5fc86f45c0 /src/Editor.cxx | |
parent | 6007ca5bf84031f6e353d05907f195ef448769ca (diff) | |
download | scintilla-mirror-0eeee7531d739c2fc06e54eb56d27f361ece0503.tar.gz |
Patch from nissl in RFE 1164540 adds WrapCount method.
Diffstat (limited to 'src/Editor.cxx')
-rw-r--r-- | src/Editor.cxx | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index 9211335df..5eb384bb2 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -5572,6 +5572,18 @@ int Editor::CodePage() const { return 0; } +int Editor::WrapCount(int line) { + AutoSurface surface(this); + AutoLineLayout ll(llc, RetrieveLineLayout(line)); + + if (surface && ll) { + LayoutLine(line, surface, vs, ll, wrapWidth); + return ll->lines; + } else { + return 1; + } +} + static bool ValidMargin(unsigned long wParam) { return wParam < ViewStyle::margins; } @@ -6642,6 +6654,9 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_DOCLINEFROMVISIBLE: return cs.DocFromDisplay(wParam); + case SCI_WRAPCOUNT: + return WrapCount(wParam); + case SCI_SETFOLDLEVEL: { int prev = pdoc->SetLevel(wParam, lParam); if (prev != lParam) |