[vim/vim] cursor drawn on command-line when 'smoothscroll' is enabled (Issue #11288)

10 views
Skip to first unread message

lacygoill

unread,
Oct 5, 2022, 2:39:38 AM10/5/22
to vim/vim, Subscribed

Steps to reproduce

Run this shell command:

vim -Nu NONE -S <(tee <<'EOF'
    vim9script
    &smoothscroll = true
    &wrap = true
    &lines = 24
    vsplit
    var text: string = 'the quick brown fox jumps over the lazy dog '
    [text->repeat(&columns / text->strcharlen() + 1)]->repeat(&lines)->setline(1)
    feedkeys('j'->repeat(&lines), 'xnt')
EOF
)

The cursor is drawn on the command-line, below the statusline .

Expected behavior

The cursor is drawn on the last line of the buffer, above the statusline.

Version of Vim

9.0 Included patches: 1-662

Environment

Operating system: Ubuntu 20.04.5 LTS
Terminal: XTerm(353)
Value of $TERM: xterm-256color
Shell: GNU bash, version 5.0.17

Gif

gif

Additional context

The issue disappears if we reset 'smoothscroll'.


The issue seems to be influenced by &lines. For example, I can't reproduce when &lines = 10; but I can when &lines = 24.


Reply to this email directly, view it on GitHub.
You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288@github.com>

Bram Moolenaar

unread,
Oct 5, 2022, 3:25:06 PM10/5/22
to vim/vim, Subscribed

I tried this and a few variants, but I cannot reproduce.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1268859511@github.com>

lacygoill

unread,
Oct 5, 2022, 7:47:12 PM10/5/22
to vim/vim, Subscribed

I'm on 9.0.669 and I can still reliably reproduce. But as mentioned earlier, it depends on the number of lines. For me, it works with 24 lines.

I wonder whether the font size also affects the issue. I can reproduce in xterm, with no config:

$ xrdb /dev/null
$ xterm
$ HOME=/tmp vim -Nu NONE -i NONE -U NONE -S <(tee <<'EOF'
    vim9script
    &smoothscroll = true
    &wrap = true
    &lines = 24
    vsplit
    var text: string = 'the quick brown fox jumps over the lazy dog '
    [text->repeat(&columns / text->strcharlen() + 1)]->repeat(&lines)->setline(1)
    feedkeys('j'->repeat(&lines), 'xnt')
EOF
)

I press C-X C-E in xterm to paste the last multiline shell command inside a Vim buffer, then ZZ to run it.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1269115184@github.com>

lacygoill

unread,
Oct 5, 2022, 7:56:49 PM10/5/22
to vim/vim, Subscribed

Also, if we maintain l pressed, the cursor:

  • moves forward till the vertical bar
  • gets back to the beginning
  • moves forward till the vertical bar again
  • moves 8 cells forward (and stops there)

That's with &columns = 80. With &columns = 100, something similar happens; the cursor:

  • moves forward till the vertical bar
  • gets back to the beginning
  • moves forward till the vertical bar again
  • moves 32 cells forward (and stops there)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1269121382@github.com>

lacygoill

unread,
Oct 5, 2022, 7:58:01 PM10/5/22
to vim/vim, Subscribed

gif


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1269122288@github.com>

lacygoill

unread,
Oct 5, 2022, 9:12:38 PM10/5/22
to vim/vim, Subscribed

The number of columns also affects the issue. 80 columns and 24 lines works for me:

HOME=/tmp vim -Nu NONE -i NONE -U NONE -S <(tee <<'EOF'
    vim9script
    &smoothscroll = true
    &wrap = true
    &lines = 24
    &columns = 80
    vsplit
    var text: string = 'the quick brown fox jumps over the lazy dog '
    [text->repeat(&columns / text->strcharlen() + 1)]->repeat(&lines)->setline(1)
    feedkeys('j'->repeat(&lines), 'xnt')
EOF
)


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1269175958@github.com>

Bram Moolenaar

unread,
Oct 6, 2022, 7:41:29 AM10/6/22
to vim/vim, Subscribed


> I'm on 9.0.669 and I can still reliably reproduce. But as mentioned earlier, it depends on the number of lines. For me, it works with 24 lines.
>
> I wonder whether the font size also affects the issue. I can reproduce in xterm, with no config:
>
> $ xrdb /dev/null
> $ xterm
> $ HOME=/tmp vim -Nu NONE -i NONE -U NONE -S <(tee <<'EOF'

> vim9script
> &smoothscroll = true
> &wrap = true
> &lines = 24
> vsplit
> var text: string = 'the quick brown fox jumps over the lazy dog '
> [text->repeat(&columns / text->strcharlen() + 1)]->repeat(&lines)->setline(1)
> feedkeys('j'->repeat(&lines), 'xnt')
> EOF
> )
>
> I press `C-X C-E` in xterm to paste the last multiline shell command
> inside a Vim buffer, then `ZZ` to run it.

Ah, I need to set 'scrolloff' to zero for this to happen.
Might be a duplicate of #11269.

--
From "know your smileys":
(\___/)
(+'.'+) Bunny
(")_(")

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


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1269875176@github.com>

Bram Moolenaar

unread,
Oct 6, 2022, 10:14:36 AM10/6/22
to vim/vim, Subscribed

I expect this to be fixed by patch 9.0.0671, please check.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1270130178@github.com>

lacygoill

unread,
Oct 6, 2022, 2:21:43 PM10/6/22
to vim/vim, Subscribed

Yes, it is fixed as of Vim 9.0.0676, so closing.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issues/11288/1270501569@github.com>

lacygoill

unread,
Oct 6, 2022, 2:21:45 PM10/6/22
to vim/vim, Subscribed

Closed #11288 as completed.


Reply to this email directly, view it on GitHub.

You are receiving this because you are subscribed to this thread.Message ID: <vim/vim/issue/11288/issue_event/7537639775@github.com>

Reply all
Reply to author
Forward
0 new messages