I was wondering if I could use scintilla with the horizontal scrollbar and wrapping disabled. I'd guess that in this case the content view will still be scrolled, but only by keeping the caret visible. It seems that this does not work in Scintilla on Mac but works on Windows.
To reproduce:
[mEditor setGeneralProperty: SCI_SETHSCROLLBAR value: 0]; and run the app.I've attached a screen recording demonstrating the issue
Any ideas of ways to work around this, or is the fix simple? As of now, I'm not able to come up with a fix.
The key method here is
ScintillaCocoa::SetScrollingSize. The document widthdocWidthis set to the view width when the scroll bar is not shown. You can start experimenting here by disregardinghorizontalScrollBarVisiblewhen determining thedocWidth, changing line 1967 fromif (!showHorizontalScroll)toif (Wrapping()):There may be further problems that need to be addressed - I haven't thought through all the potential implications of this change.
Committed [73ece9] which makes the mentioned change.
Related
Commit: [73ece9]