Skip to content

Last editor line partly hidden #103

@PyvesB

Description

@PyvesB

Unfortunately, my fix from #95 introduced an annoying side effect: the last line of an editor is partly hidden even when scrolling right to the very bottom. See the following screenshot:
partly-hidden-last-line

It's not the end of the world as the last line is generally empty or contains a single bracket, but it's still something I'm keen on getting fixed.

After quickly digging through the code, I believe the following line is at fault:

int horizontalBarHeight = context.getScrollable().getHorizontalBarSize().y;

If the flat scrollbar is visible (i.e. context.isHorizontalBarVisible() true), padding is applied. However, the padding includes the height of the native horizontal scroll bar even if it's not visible (i.e. context.getScrollable().getHorizontalBarVisible() would return false).

The code should be made more clever to cover three cases:

  • no flat scrollbar nor native one -> no padding
  • flat scrollbar but no native one -> reduced padding
  • flat scrollbar and native one -> full padding

I will be submitting a pull request shortly.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions