Quantcast
Channel: vim scrolling with cursor, only bottom line moves until certain amount lines scrolled (in gnu screen) - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 2

vim scrolling with cursor, only bottom line moves until certain amount lines scrolled (in gnu screen)

$
0
0

Vim issue, note this happens only when i open gnu screen, on ubuntu, when shelled from a Mac, and only in the top pane of the screen (bottom pane works fine). It does not happen on the mac when i open screen. It is not a screen within a screen. I did install libncurses5.

symptom: Let's use my vertical split screen as an example, its 22 vim lines high currently. So when i open the file, and get the cursor on to line 1, then i scroll down to line 22, all is normal, then when i continue to scroll down only the last line changes (line 1-21 never changes, but where line 22 was, it correctly becomes line 23). This will continue until i get to line 37(e.g. i see 1-21, and 37 only), then when i scroll down once more to line 38 and stop, what i see is line 2-21(because the lines moved up by one finally), but then what i see is now line 2-21,37, and 45 now becomes visible. scrolling down once more i see 3-37,45,46, this pattern repeats until i get to bottom of the file.

Essentially I have to scroll down 36 times to make it say 37,45-65, if i scroll down once more, the page looks correct finally, showing a linear 45-66.

If i press 1g (go to line 1), i see 2-21,36,44 again. scrolling up doesn't replace line 2 with 1, but scrolling down by one now shows 1,2,4-21,36,44.

Essentially theres a 15 line buffer in there.

This only happens on gnu screen.

What i have done:

  • switching TERM=xterm-256color, ansi, screen-256color, doesnt help.
  • renaming .vimrc to bak.vimrc, still happens without .vimrc.

@roaima Thank you for comment. I see it is 48. What would I change at this point? There is only room for 22 Vim lines in this pane. Which one is incorrect, a Vim setting, or a terminal setting?

$ stty -aspeed 38400 baud; rows 48; columns 190; line = 0;intr = ^C; quit = ^\; erase = ^?; kill = ^U; eof = ^D; eol = M-^?; eol2 = M-^?; swtch = <undef>; start = ^Q; stop = ^S; susp = ^Z; rprnt = ^R; werase = ^W; lnext = ^V; discard = ^O;min = 1; time = 0;-parenb -parodd -cmspar cs8 -hupcl -cstopb cread -clocal -crtscts-ignbrk -brkint -ignpar -parmrk -inpck -istrip -inlcr -igncr icrnl ixon -ixoff -iuclc ixany imaxbel iutf8opost -olcuc -ocrnl onlcr -onocr -onlret -ofill -ofdel nl0 cr0 tab0 bs0 vt0 ff0isig icanon iexten echo echoe echok -echonl -noflsh -xcase -tostop -echoprt echoctl echoke -flusho -extproc$ echo $LINES48```I suspect the whole screen is 48 high, but there is a split pane in the middle.  For the bottom pane vim shows 18 lines (And works correctly also) Edit: I do notice that in a correct setup, e.g. when i run my screen layout on the mac, `stty -a` correctly reports `23` rows in screen, and `49` without screen running.  So it seems the lines arent being updated by screen on the ubuntu. How would I go about manually setting that in .vimrc, or .screen, or somewhere that it will take affect when I open screen?

Viewing all articles
Browse latest Browse all 2

Trending Articles