smoothscroll very long line

20 views
Skip to first unread message

Ernie Rael

unread,
Oct 8, 2022, 2:46:28 PM10/8/22
to vim...@googlegroups.com
vim 9.0.698, columns=100,lines=55
Two files with only one line: screen lines: longer ~90, shorter ~34
command: gvim/vim -u NONE -U NONE
then: set smoothscroll

There are no asan errors. Trying to figure out valgrind now.
Any hints/suggestions on tracking it down, like what to look at in the
debugger, welcome.

=== vim longer # the longer file, ~90 screen lines

=== test 1: gvim -u NONE -U NONE longer
- ^E the screen does not scroll. The cursor moves to the next screen
  line (as it should) for a small fraction of a second, then back.

=== test 2: gvim -u NONE -U NONE longer
- click somewhere in the middle of the line, several screen lines down.
- ^E,^Y work as expected, until the cursor gets to the top, then it
  behaves as described in test 1 above.

=== vim shorter # the shorter file, ~34 screen lines

===== test 1: gvim -u NONE -U NONE shorter
- ^E a few times, screen scrolls as expected
- ^Y once, display jumps so first line is visible, and cursor is
  on the first line, and not one screen line from where it was.

===== test 2: gvim -u NONE -U NONE shorter
- click somewhere in the middle of the line, several screen lines down.
- ^E scrolls up 1 screen line. But the cursor does not move, it stays
  at the same screen location, instead of staying on the same character.
- Do a few more ^E, same pattern.
- Do ^Y and it stays on the same character as expected, keep going
  until no change, first characters of file are visible at the top.
- Do ^E, screen scrolls one line, cursor jumps to where it should be.


-ernie

Ernie Rael

unread,
Oct 8, 2022, 4:01:27 PM10/8/22
to vim...@googlegroups.com
On 10/8/22 11:46 AM, Ernie Rael wrote:
> vim 9.0.698, columns=100,lines=55
> Two files with only one line: screen lines: longer ~90, shorter ~34
> command: gvim/vim -u NONE -U NONE
> then: set smoothscroll
>
> There are no asan errors. Trying to figure out valgrind now.

ran valgrind on the 4 tests, all had: ERROR SUMMARY: 0 errors from 0
contexts

Quick look through, most leaks seem to be  in lsan-suppress.txt

-ernie

Bram Moolenaar

unread,
Oct 9, 2022, 11:25:56 AM10/9/22
to vim...@googlegroups.com, Ernie Rael

Ernie Rael wrote:

> vim 9.0.698, columns=100,lines=55

Please try again with 9.0.0701 or later.

It looks like it works when 'scrolloff' is zero, not when it is
non-zero.


--
ARTHUR: Well, it doesn't matter. Will you go and tell your master that
Arthur from the Court of Camelot is here.
GUARD #1: Listen, in order to maintain air-speed velocity, a swallow
needs to beat its wings 43 times every second, right?
ARTHUR: Please!
The Quest for the Holy Grail (Monty Python)

/// Bram Moolenaar -- Br...@Moolenaar.net -- http://www.Moolenaar.net \\\
/// \\\
\\\ sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ ///
\\\ help me help AIDS victims -- http://ICCF-Holland.org ///

Bram Moolenaar

unread,
Oct 9, 2022, 1:54:16 PM10/9/22
to vim...@googlegroups.com, Bram Moolenaar, Ernie Rael

> Ernie Rael wrote:
>
> > vim 9.0.698, columns=100,lines=55
>
> Please try again with 9.0.0701 or later.
>
> It looks like it works when 'scrolloff' is zero, not when it is
> non-zero.

A non-zero 'scrolloff' should also work now, at least for CTRL-E and
CTRL-Y. But I expect other problems still, let me know a repro case if
you find one.

--
Computers are not intelligent. They only think they are.

Bram Moolenaar

unread,
Oct 9, 2022, 4:25:31 PM10/9/22
to vim...@googlegroups.com, Ernie Rael

Ernie Rael

unread,
Oct 9, 2022, 4:59:09 PM10/9/22
to vim...@googlegroups.com
On 10/9/22 1:25 PM, Bram Moolenaar wrote:
>> Ernie Rael wrote:
>>
>>> vim 9.0.698, columns=100,lines=55
>> Please try again with 9.0.0701 or later.
>>
>> It looks like it works when 'scrolloff' is zero, not when it is
>> non-zero.
> A non-zero 'scrolloff' should also work now, at least for CTRL-E and
> CTRL-Y. But I expect other problems still, let me know a repro case if
> you find one.
>
Not getting stuck at the topline is a real plus :-)

I notice I do not get the "<<<" anymore with my regular settings. If I
start rc NONE, the I see it. Did I miss a new option, or am I
misunderstanding something?

I've got another case, thought I'd try to create a test, but I've never
played with screen-dump stuff before. I'm getting there.

-ernie

Bram Moolenaar

unread,
Oct 9, 2022, 5:16:34 PM10/9/22
to vim...@googlegroups.com, Ernie Rael

Ernie Rael wrote:

> >>> vim 9.0.698, columns=100,lines=55
> >> Please try again with 9.0.0701 or later.
> >>
> >> It looks like it works when 'scrolloff' is zero, not when it is
> >> non-zero.
> > A non-zero 'scrolloff' should also work now, at least for CTRL-E and
> > CTRL-Y. But I expect other problems still, let me know a repro case if
> > you find one.
> >
> Not getting stuck at the topline is a real plus :-)
>
> I notice I do not get the "<<<" anymore with my regular settings. If I
> start rc NONE, the I see it. Did I miss a new option, or am I
> misunderstanding something?

A few days ago the "<<<" was made not to show if 'showbreak' is set.
It isn't needed then.

> I've got another case, thought I'd try to create a test, but I've never
> played with screen-dump stuff before. I'm getting there.

That would be ideal, but just a short script to reproduce the problem,
which can be turned into a test, would also do.

--
GUARD #2: Wait a minute -- supposing two swallows carried it together?
GUARD #1: No, they'd have to have it on a line.
GUARD #2: Well, simple! They'd just use a standard creeper!
GUARD #1: What, held under the dorsal guiding feathers?
GUARD #2: Well, why not?
The Quest for the Holy Grail (Monty Python)

Ernie Rael

unread,
Oct 9, 2022, 6:58:20 PM10/9/22
to vim...@googlegroups.com
On 10/9/22 2:16 PM, Bram Moolenaar wrote:
> Ernie Rael wrote:
>
>> I've got another case, thought I'd try to create a test, but I've never
>> played with screen-dump stuff before. I'm getting there.
> That would be ideal, but just a short script to reproduce the problem,
> which can be turned into a test, would also do.
>
Description might be more useful than the tests, attached, I put together.

Window 6x40, 1 long line covering 3 screen lines. Full line visible when
run test.

With cursor at column 0, do ^E. Vim scrolls one line, cursor is on
screen line 3.

With cursor at column 5, do ^E, Vim scrolls one line, cursor is on
screen line 2.

-ernie
xx.zip

Bram Moolenaar

unread,
Oct 12, 2022, 5:04:03 PM10/12/22
to vim...@googlegroups.com, Ernie Rael
This is working now. Unfortunately, as a side effect two tests are now
failing. I tried making both work but it's complicated. I'll try again
tomorrow, disabled the failing tests for now.

--
Advice to worms: Sleep late.
Reply all
Reply to author
Forward
0 new messages