On Saturday, September 22, 2012 4:26:57 AM UTC-7, Christian Brabandt wrote:
> Considering that you answered to a mail, which is 5 years old, please
>
> give us more context. What exactly is your problem and where did you try
>
> adding :redraw! which did not help?
When starting vim using the restore-cursor autocommand tip, about 75% of the
time the cursor is displayed on the last column of the statusline, or the
statusline isn't drawn and instead the cursor is displayed on the last column
of the last displayed line. When I press any key, the cursor is redisplayed at
the proper position and the status line gets redrawn, if it wasn't originally
drawn. The following is the minimal vimrc that is needed for me to reproduce
this.
set nocompatible
set lazyredraw
" :help restore-cursor
autocmd BufReadPost *
\ if line("'\"") > 1 && line("'\"") <= line("$") |
\ exe "normal! g`\""
\ endif
If I add a call to `redraw!` after the execute, the problem resolves for this
example, but for a more complicated vimrc using a lot of plugins, figuring out
where to add the redraw can be very challenging.
Unsetting lazyredraw is my only guaranteed solution now.
Tested with both iterm2 and Apple's Terminal.
vim --version:
VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Sep 14 2012 08:16:31)
MacOS X (unix) version
Included patches: 1-244, 246-661
Compiled by [email protected]
Normal version without GUI. Features included (+) or not (-):
-arabic +autocmd -balloon_eval -browse +builtin_terms +byte_offset +cindent
-clientserver +clipboard +cmdline_compl +cmdline_hist +cmdline_info +comments
-conceal +cryptv -cscope +cursorbind +cursorshape +dialog_con +diff +digraphs
-dnd -ebcdic -emacs_tags +eval +ex_extra +extra_search -farsi +file_in_path
+find_in_path +float +folding -footer +fork() +gettext -hangul_input +iconv
+insert_expand +jumplist -keymap -langmap +libcall +linebreak +lispindent
+listcmds +localmap -lua +menu +mksession +modify_fname +mouse -mouseshape
-mouse_dec -mouse_gpm -mouse_jsbterm -mouse_netterm -mouse_sysmouse
+mouse_xterm -mouse_urxvt -mouse_sgr +multi_byte +multi_lang -mzscheme
+netbeans_intg +path_extra -perl +persistent_undo +postscript +printer -profile
-python -python3 +quickfix +reltime -rightleft -ruby +scrollbind +signs
+smartindent -sniff +startuptime +statusline -sun_workshop +syntax +tag_binary
+tag_old_static -tag_any_white -tcl +terminfo +termresponse +textobjects +title
-toolbar +user_commands +vertsplit +virtualedit +visual +visualextra +viminfo
+vreplace +wildignore +wildmenu +windows +writebackup -X11 -xfontset -xim -xsmp
-xterm_clipboard -xterm_save
system vimrc file: "/opt/local/etc/vimrc"
user vimrc file: "$HOME/.vimrc"
user exrc file: "$HOME/.exrc"
fall-back for $VIM: "/opt/local/share/vim"
Compilation: /usr/bin/clang -c -I. -Iproto -DHAVE_CONFIG_H
-I/opt/local/include -DMACOS_X_UNIX -no-cpp-precomp -pipe -O2 -arch x86_64
-U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: /usr/bin/clang -L/opt/local/lib -arch x86_64 -L/usr/local/lib -o vim
-lm -lncurses -liconv -lintl -framework Cocoa
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php