diff options
author | nyamatongwe <unknown> | 2003-01-31 23:11:24 +0000 |
---|---|---|
committer | nyamatongwe <unknown> | 2003-01-31 23:11:24 +0000 |
commit | f566263f31075e3d36782dd3f5901466b789f763 (patch) | |
tree | d46be56b27c969dd406d74d47febaab4b010bc59 | |
parent | 4e62df1da1150f0cfa156cd9c64b80fb43fb7d2c (diff) | |
download | scintilla-mirror-f566263f31075e3d36782dd3f5901466b789f763.tar.gz |
Patch from David Ascher for horizontal scrolling.
Change the scroll range when moving caret outside normal scroll range.
Modify scroll bar when calling SetXOffset API to ensure synchronised.
-rw-r--r-- | src/Editor.cxx | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/src/Editor.cxx b/src/Editor.cxx index c20990a70..8ac091e8d 100644 --- a/src/Editor.cxx +++ b/src/Editor.cxx @@ -1224,6 +1224,14 @@ void Editor::EnsureCaretVisible(bool useMargin, bool vert, bool horiz) { } if (xOffset != xOffsetNew) { xOffset = xOffsetNew; + if (xOffsetNew > 0) { + PRectangle rcText = GetTextRectangle(); + if (horizontalScrollBarVisible == true && + rcText.Width() + xOffset > scrollWidth) { + scrollWidth = xOffset + rcText.Width(); + SetScrollBars(); + } + } SetHorizontalScrollPos(); Redraw(); } @@ -4782,6 +4790,7 @@ sptr_t Editor::WndProc(unsigned int iMessage, uptr_t wParam, sptr_t lParam) { case SCI_SETXOFFSET: xOffset = wParam; + SetHorizontalScrollPos(); Redraw(); break; |