[vim/vim] E315 when deleting a selected visual block that goes to the end of the second-last line. (Issue #13526)

15 views
Skip to first unread message

Beanie496

unread,
Nov 11, 2023, 2:12:58 PM11/11/23
to vim/vim, Subscribed

Steps to reproduce

  1. Open Vim on a file that is at least 1 line longer than the maximum number of lines that Vim can display on the terminal at once (so a >=51-line file if Vim can display 50 lines).
  2. Move the cursor to a line that cannot be seen at the same time as the last line. (Line 1 of the same 51-line file, line 1 or 2 of a 52-line file, etc.)
  3. Enter visual mode with v and move the cursor down until the first line cannot be seen any more.
  4. Move the cursor to the second-last line (it doesn't matter if it's going backwards) and go to the end of the line.
  5. Delete the selection with d. The cursor should no longer be on any line according to the line numbers in the margin.
  6. Attempt to scroll with the mouse/trackpad. If you try to scroll in a direction where the cursor will still not be on a line, Vim will report E315.
  7. This error is not unrecoverable: undoing restores the cursor to a line.

Expected behaviour

The last line of the file should be at the top of the screen instead of past the top.

Version of Vim

9.0.2070

Environment

OS: Arch linux
Terminal: st
$TERM: st-256color
shell: zsh 5.9

Logs and stack traces

No response


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/13526@github.com>

Christian Brabandt

unread,
Nov 11, 2023, 2:30:38 PM11/11/23
to vim/vim, Subscribed

I cannot reproduce this. Can you please verify with vim --clean? Are you using gvim? or vim?

I tried like this with a default 24x80 terminal:

vim --clean -c ':set scrolloff=0' -c 'call append(0, range(0,30))' -c '2|norm! vGkk$d' 

Then I tried to scroll and it worked.


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/13526/1806898659@github.com>

Beanie496

unread,
Nov 12, 2023, 12:51:11 PM11/12/23
to vim/vim, Subscribed

I cannot reproduce this. Can you please verify with vim --clean? Are you using gvim? or vim?

I'm using regular vim. With vim --clean there is no error for me either. vim --clean then :runtime! archlinux.vim and :source $HOME/.vimrc still gave no error. I'm assuming the issue is caused by one of the plugins, but I have neither the expertise nor the time to figure out which. I'm unsure whether I should close this issue or not so I'll leave it open for the time being.


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/13526/1807195411@github.com>

Reply all
Reply to author
Forward
0 new messages