Hi, On Thu, Apr 18, 2019 at 1:23 AM Paul Jolly <[email protected]> wrote: > > Describe the bug > > As part of https://github.com/myitcv/govim, I have a > CursorHold,CursorHoldI autocmd setup the populates the quickfix list > via setqflist if any diagnostics have changed. > > This works well apart from the fact that there appears to be a > changing of buffers that happens that causes a flicker on screen... >
When the quickfix list is changed by the setqflist() function, if the quickfix window is present, then the quickfix buffer will be updated. As part of updating the quickfix buffer, the screen will be refreshed (this includes saving the current cursor position and window, making the quickfix window as the current window, updating the quickfix buffer contents, restoring the previous window as the current window and restoring the cursor position). > > and for the "current" window (excuse the almost certainly loose > terminology) to not be restored. > > This is best demonstrated by a video in which I've slightly changed > the code to always call setqflist(entries, 'r'), regardless of whether > the diagnostics have changed. In between cursor holds, I am simply > moving up and down the document with j and k: > > https://youtu.be/qi-tx2jNWBY > > As you can see the "active" window changes to the quickfix window and > doesn't return to where the cursor is. However when I press j or k > again the focus shifts back to the where I'm expecting it to be. > >From the video I am not able to see the problem. Are you saying that the cursor is moved to the first column in the line instead of the correct column and when you press j or k, it is moved to the correct column? I tried to reproduce this problem using an CursorHold autocmd and couldn't reproduce the screen refresh problem. In this test, the cursor is restored to the correct position. Regards, Yegappan > > To Reproduce > > I don't have a minimal reproduction for this unfortunately. > > Expected behavior > > The "focus" not to flicker as shown above. > > Screenshots > > Video provided above. > > Environment (please complete the following information): > > Vim version > > VIM - Vi IMproved 8.1 (2018 May 18, compiled Apr 18 2019 02:24:21) > Included patches: 1-1183 > Compiled by myitcv@myitcv > Huge version with GTK2 GUI. Features included (+) or not (-): > +acl +extra_search +mouse_netterm -tag_old_static > +arabic -farsi +mouse_sgr -tag_any_white > +autocmd +file_in_path -mouse_sysmouse -tcl > +autochdir +find_in_path +mouse_urxvt +termguicolors > -autoservername +float +mouse_xterm +terminal > +balloon_eval +folding +multi_byte +terminfo > +balloon_eval_term -footer +multi_lang +termresponse > +browse +fork() -mzscheme +textobjects > ++builtin_terms +gettext -netbeans_intg +textprop > +byte_offset -hangul_input +num64 +timers > +channel +iconv +packages +title > +cindent +insert_expand +path_extra +toolbar > +clientserver +job -perl +user_commands > +clipboard +jumplist +persistent_undo +vartabs > +cmdline_compl +keymap +postscript +vertsplit > +cmdline_hist +lambda +printer +virtualedit > +cmdline_info +langmap +profile +visual > +comments +libcall +python +visualextra > +conceal +linebreak -python3 +viminfo > +cryptv +lispindent +quickfix +vreplace > +cscope +listcmds +reltime +wildignore > +cursorbind +localmap +rightleft +wildmenu > +cursorshape +lua -ruby +windows > +dialog_con_gui +menu +scrollbind +writebackup > +diff +mksession +signs +X11 > +digraphs +modify_fname +smartindent -xfontset > +dnd +mouse +startuptime +xim > -ebcdic +mouseshape +statusline +xpm > +emacs_tags +mouse_dec -sun_workshop +xsmp_interact > +eval -mouse_gpm +syntax +xterm_clipboard > +ex_extra -mouse_jsbterm +tag_binary -xterm_save > 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" > defaults file: "$VIMRUNTIME/defaults.vim" > system menu file: "$VIMRUNTIME/menu.vim" > fall-back for $VIM: "/home/myitcv/usr/vim/share/vim" > Compilation: gcc -c -I. -Iproto -DHAVE_CONFIG_H -DFEAT_GUI_GTK -pthread > -I/usr/include/gtk-2.0 -I/usr/lib/x86_64-linux-gnu/gtk-2.0/include > -I/usr/include/gio-unix-2.0/ -I/usr/include/cairo -I/usr/include/pango-1.0 > -I/usr/include/atk-1.0 -I/usr/include/cairo -I/usr/include/pixman-1 > -I/usr/include/gdk-pixbuf-2.0 -I/usr/include/libpng16 > -I/usr/include/pango-1.0 -I/usr/include/harfbuzz -I/usr/include/pango-1.0 > -I/usr/include/glib-2.0 -I/usr/lib/x86_64-linux-gnu/glib-2.0/include > -I/usr/include/freetype2 -I/usr/include/libpng16 -I/usr/include/freetype2 > -I/usr/include/libpng16 -g -O2 -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=1 > Linking: gcc -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 -ltinfo -lnsl -ldl > -L/usr/lib/x86_64-linux-gnu -lluajit-5.1 > -L/home/myitcv/.pythons/2.7.15/lib/python2.7/config -lpython2.7 -lpthread > -ldl -lutil -lm -Xlinker -export-dynamic > > OS: Ubuntu 18.04.2 LTS > Terminal: XTerm(330) > > Additional context > > n/a > -- -- 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 --- You received this message because you are subscribed to the Google Groups "vim_dev" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
