-
-
Notifications
You must be signed in to change notification settings - Fork 40
Closed
Labels
bugSomething isn't workingSomething isn't working
Description
When setting a mark, the mark is set on the wrong line if there is a section on screen. In contrast, when setting a mark when using a header, the mark line number is correctly adjusted to take the header into account.
Repro steps:
- create a file with many lines such as the attached bug.txt which consists of a line
TITLE
followed by lines1
,2
, ...200
.
Run:ov bug.txt --section-delimiter "TITLE"
. - press arrow down once to scroll down one line. Observe that the section "TITLE" correctly "sticks" to the top of the screen. The next visible line is the line that says
2
which is actually line 3 (one-based counting).
Place a mark withm
. Bug: the mark is placed on line 2. The mark is not visible. The status says "Marked to line 2" which is wrong. - press arrow up once to confirm that the mark was placed on Line 2, which says "1" (screenshot: "Step 3"). When the mark was placed that line was hidden behind the section.
Expected behavior: when the first line visible after a section header is the third line, the mark should be on the third line.
In the repro, the mark will always be on "current line minus 1". This skew gets worse with larger SectionHeaderNum
values.
Note: if you repeat these exact same steps with a one-line header then the behavior is as expected. Note that the status line still says "Marked to Line 2" but the mark is on the third line.
> ov --version
ov version 0.36.0 rev:d671c94
OS Name: Microsoft Windows 10 Pro
OS Version: 10.0.19045 N/A Build 19045
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working