-
Notifications
You must be signed in to change notification settings - Fork 10
Closed
Description
現象としては表題の通りですが、わかりにくいと思ったのでgif用意しました。
vimのバージョンは7.4.383、linuxでもwindowsでも再現します。
macは未確認です。
また、再現用の最小vimrcを以下に置いています。
最小vimrc
再現用javaコード
最小vimrcを手元に落としてきて、再現用javaコードを以下のように読み込み、
vim -u vimrc -U NONE S.java
or gvim -u vimrc -U NONE S.java
o.| (|はカーソル位置) で<C-X><C-O>とすると、再現可能です。
現状わかっているポイントは、set nowrapした状態でnormal ggwとすると再現するということです。
また、normal ggwは、call cursor(1, 1)した後にnormal wでも再現しますので、ファイル先頭にカーソルがある状態でnormal wすることがポイントだと思います。
--- 2014-08-15 01:53 追記 ---
ソースコード短いので、直接貼っておきます。
filetype indent on
set nocompatible
set omnifunc=XXX
set nowrap
" This function is used for the 'omnifunc' option. {{{1
function! XXX(findstart, base)
if a:findstart
return match(getline('.'), '\.\zs\w*$')
endif
let save_pos= getpos('.')
try
normal ggw
finally
call setpos('.', save_pos)
endtry
return ['aaa', 'bbb', 'ccc', 'ddd']
endfunction
" vim:ft=vim:nocompatible
public class S
{
public static void main(String[] args)
{
final Object o;
o.
}
}
VIM - Vi IMproved 7.4 (2013 Aug 10, compiled Jul 27 2014 19:29:13)
Included patches: 1-383
Compiled by kamichidu
Huge version with GTK2 GUI. Features included (+) or not (-):
+acl +clientserver +cscope +emacs_tags +folding +keymap +menu +mouse_netterm +netbeans_intg -python3 -sniff -tcl +virtualedit +writebackup
+arabic +clipboard +cursorbind +eval -footer +langmap +mksession +mouse_sgr +path_extra +quickfix +startuptime +terminfo +visual +X11
+autocmd +cmdline_compl +cursorshape +ex_extra +fork() +libcall +modify_fname -mouse_sysmouse +perl +reltime +statusline +termresponse +visualextra -xfontset
+balloon_eval +cmdline_hist +dialog_con_gui +extra_search +gettext +linebreak +mouse +mouse_urxvt +persistent_undo +rightleft -sun_workshop +textobjects +viminfo +xim
+browse +cmdline_info +diff +farsi -hangul_input +lispindent +mouseshape +mouse_xterm +postscript +ruby +syntax +title +vreplace +xsmp_interact
++builtin_terms +comments +digraphs +file_in_path +iconv +listcmds +mouse_dec +multi_byte +printer +scrollbind +tag_binary +toolbar +wildignore +xterm_clipboard
+byte_offset +conceal +dnd +find_in_path +insert_expand +localmap +mouse_gpm +multi_lang +profile +signs +tag_old_static +user_commands +wildmenu -xterm_save
+cindent +cryptv -ebcdic +float +jumplist +lua -mouse_jsbterm -mzscheme +python +smartindent -tag_any_white +vertsplit +windows +xpm
system vimrc file: "$VIM/vimrc"
user vimrc file: "$HOME/.vimrc"
2nd user vimrc file: "~/.vim/vimrc"
user exrc file: "$HOME/.exrc"
system gvimrc file: "$VIM/gvimrc"
user gvimrc file: "$HOME/.gvimrc"
2nd user gvimrc file: "~/.vim/gvimrc"
system menu file: "$VIMRUNTIME/menu.vim"
fall-back for $VIM: "/home/maple/local/share/vim"
Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread -I/usr/include/gtk-2.0 -I/usr/lib/gtk-2.0/include -I/usr/include/pango-1.0 -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 -I/usr/include/libdrm -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 -I/usr/include/pango-1.0 -I/usr/include/glib-2.0 -I/usr/lib/glib-2.0/include -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/harfbuzz -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1
Linking: gcc -L. -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -rdynamic -Wl,-export-dynamic -Wl,-E -L/usr/local/lib -Wl,--as-needed -o vim -lgtk-x11-2.0 -lgdk-x11-2.0 -lpangocairo-1.0 -latk-1.0 -lcairo -lgdk_pixbuf-2.0 -lgio-2.0 -lpangoft2-1.0 -lpango-1.0 -lgobject-2.0 -lglib-2.0 -lfontconfig -lfreetype -lSM -lICE -lXpm -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl -lacl -lattr -lgpm -ldl -L/usr/lib -lluajit-5.1 -Wl,-E -fstack-protector -L/usr/local/lib -L/home/maple/perl5/perlbrew/perls/perl-5.16.3/lib/5.16.3/x86_64-linux-thread-multi/CORE -lperl -lnsl -ldl -lm -lcrypt -lutil -lpthread -lc -L/usr/lib/python2.7/config -lpython2.7 -lpthread -ldl -lutil -lm -Xlinker -export-dynamic -lruby -lpthread -lgmp -ldl -lcrypt -lm -L/usr/lib