Make Y offset to be a multiple of line height #45
Labels
No labels
Area-Accessibility
Area-Build
Area-CodeCompletion
Area-Document
Area-Documentation
Area-Editing
Area-Folding
Area-Highlighting
Area-i18n
Area-Indentation
Area-NetFx
Area-Rendering
Area-Search
Area-Snippets
dependencies
duplicate
Feedback Needed
help wanted
invalid
Issue-Bug
Issue-Discussion
Issue-Enhancement
Issue-Performance
Issue-Question
on-hold
Resolution-Answered
Resolution-By Design
Resolution-Duplicate
Resolution-Fixed
Resolution-Won't Fix
Up-for-Grabs
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
gh-icsharpcode/AvalonEdit#45
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
There is a possible incorrect behavior I've found I would like to discuss:
When you navigate with
page down, the caret is forced into view byTextView.MakeVisible(), but that often makes the scroll Y offset to be unaligned respect to text lines, causing a partially covered top line (very noticeable with big fonts).IMO, the correct behavior should be forcing
newScrollOffset.Yto be a perfect multiple ofDefaultLineHeight, so that the first line is always "in sync". This is what all other editors mostly do (e.g. VS).I was thinking something like this:
But I don't know if that fix is correct to, because of this
DefaultLineHeightcomment:What do you think?
the fix I mentioned seems to work nicely (I am using it in my fork), but has some side-effects I am not sure of.
I think along with it, there's scroll bar dragging and mouse wheeling that need to be aligned too.
Ok, I made another fix, I've moved the alignment operation within
IScrollInfo.SetVerticalOffset(),so that every change in Y offset is aligned with
DefaultLineHeight. Seem to work better than before.Also:
Roundin place ofFloorI closed my own pull request, as it had too many uncontrollable side effects.
I leave the issue open, in case someone else has a better solution.