I see several problems (that I can't explain) in the vim "refresh"-loop
watching the growing file (a-la 'tail -f'). Vim commands are below.
Problem #1: There is unexpected output on the bottom line
(lines of the file is echoed on the bottom line). Why ?
Problem #2: When you vertically resize the xterm window,
vim screen is corrupted and never repainted properly.
Problem #3: Sometimes, when I press Ctrl-C to quit the loop,
vim is in ex mode and responds 'Type :quit<Enter>
to exit Vim'
Why ?
Problem #4: Since vim repaints properly when waiting for chars, I'd like
to put getchartimeout(1000) in place of sleep 1. Do we
have getchar() with timeout ?
To see the demonstration:
1. In one window, create growing file using these shell command:
% while :; do date >>1; sleep 1; done
2. In another window:
vim -u NONE ~/xxx
:set nolz | while 1 | e | redraw | $ | sleep 1 | endw
" notice unexpected output on the bottom line
" try to resize screen. It is not restored properly.
" Press Ctrl-C to quit. Sometimes, vim quits the loop properly.
" Sometime, vim does not quit the loop, stays in ex mode.
" (Type :quit<Enter> to exit Vim)
(This command sequence must be not perfect but it demonstrates the problem).
Yakov