Skip to content

The current logic for view size calculation does not take in account the line wrapping. #18

@Feohr

Description

@Feohr

Description

We calculate the lines that are supposed to be displayed to the screen via the "view" logic. This "view" size is calculated every time screen is resized; dictating how many lines one would see. This view is also responsible for dictating the bounds of scrolling.

When wrapping takes place it causes a line to be split into two; One line will be omitted from the total since we are that amount in excess. Yet, the view loads the omitted line as well and infers it as being shown to the screen. Hence, the omitted lines at the end of the file cannot be scrolled and seen.

Example: The rectangular box represents the view which is 5 lines.

-------------
| 1) line 1 |
| 2) line 2 |
| 3) line 3 |
| 4) line 4 |
| 5) line 5 |
-------------

with wrapping the last two lines are omitted:

------------------
| 1) line 1      |
| 2) line 2 with |
| wrapping       |
| 3) line 3      |
| 4) line 4 with |
------------------
<!--
wrapping
5) line 5
-->

Steps to fix

We need to somehow also track the 'horizontal' size of the view so that line wrapping can be taken into account for view size.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingminorIncrements the minor version

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions