I think this question of mine should be closed, since I do not have access to that computer anymore, so I can't check wheter the answers are effective solutions or not.
I never had this problem, but recently I "lost" my .vimrc file of my Mac and had to use another one from a different computer.
The strange thing, is now that the cursorlines are drawn and remain fixed when I move up with k or ↑, whereas are removed when I move down with j or ↓. (So, moving from downmost line to upmost line I can fill every line with the cursorline, whereas moving from upmost to downmost line I can erase all cursorlines.)
Furthermore
- Moving with ⇧L, ⇧M and ⇧H, does not affect the behavior.
- Moving to another buffer with ctrlWctrlW or ctrlk or similars doesn't affect the behavior.
- Moving to another program with ⌘↹, makes all cursorlines disappear, but those where the cursor is (cursors are, if more than one buffer is visible).
- Setting
cursor columnoption make the redraw happen only when the movements implies a change in the column of the cursor.
EDIT
I launched Vim with vim -u NONE -U NONE -N (as suggested here) and the problem is still present, so it's not about my .vimrc file.
EDIT 2
(I have not solved the problem yet, so I use set nocul to avoid this persistent lines. I set the option manually, not in my .vimrc file, since I hope I will solve the problem! With your help.) I have news! I noticed that the first time I open a file, no matter how much time I rest with my arms folded, when I start moving (doing some j and then some k I can fill some lines with cursorlines) a "spontaneous" refresh is done after a second (or not much more than a second), then no more.
EDIT 3
When I ssh-connect to the machine on which I have the problem from another one I experience no problem; when I ssh-connect to another computer form the the machine on which I have the problem, I experience the same problem. Thus, it seems to be a problem of the terminal and not Vim.
had to use another [vimrc] from a different computerand you have lines sayingI don't remember: Don't do that. You'll have less trouble re-creating your vimrc from scratch than using a vimrc that you don't fully understand. And finally on an unrelated note: on line 184 you call the externalmakecommand why is that in your vimrc? – statox Oct 28 '16 at 07:57makecommand. Your copy-past failed but it is meant to be part of the mapping, The copy simply replaced<CR>by a new line. – statox Oct 28 '16 at 08:04.vimrc. Oh, the copy and paste have done a mess, I'm going to edit that part. – Enlico Oct 28 '16 at 08:07vim -u NONE -U NONE -N, enterset culand the problem is still present, so it's not about my.vimrc. – Enlico Oct 28 '16 at 08:15echo $TERMin your terminal andset term?in Vim? – muru Oct 28 '16 at 08:34xterm-256colorandterm=xterm-256color. – Enlico Oct 28 '16 at 08:57TERM=xterm vimto see if it changes anything, but other than that it's hard to tell which one of terminal and vim does something wrong (if you try iTerm2 and vim will work there, it might indicate an issue with iTerm). – xaizek Nov 09 '16 at 14:49TERM=xterm vimandTERM=xterm vinothing changes. – Enlico Nov 09 '16 at 15:58:h 'term') – Christian Brabandt Nov 09 '16 at 17:14