Loading ...
Sorry, an error occurred while loading the content.
 

Cursor position is not updated when YouCompleteMe diagnostic display closes

Expand Messages
  • ​​Babken Vardanyan
    See also: https://github.com/Valloric/YouCompleteMe/issues/992 When YouCompleteMe s diagnostic display is closed (i.e. a syntax problem is fixed), the cursor
    Message 1 of 5 , May 27, 2014
      See also: https://github.com/Valloric/YouCompleteMe/issues/992

      When YouCompleteMe's diagnostic display is closed (i.e. a syntax problem is fixed), the cursor position is not propery updated and the next `h` and `l` keyspress moves the cursor relative to previous column position (before closing).

      This should demonstrate the issue better than I can explain:
      https://cloud.githubusercontent.com/assets/4889592/3063795/688d70c2-e246-11e3-84f1-4de41a4c05f5.gif

      Steps to reproduce:
      0. Install YCM
      1. Make a syntax mistake in a file: The 2-column diagnostic display should appear at the left side
      2. Correct the syntax mistake and quickly press `l` key twice (there should be some more characters on the line to the left)
      What happens: First time `l` key is pressed the cursor moves 2 columns right from expected position.

      This happens only when diagnostic display closes, and does not happen when it opens.

      $ gvim --version
      VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 4 2014 07:23:59)
      Included patches: 1-274
      Compiled by Arch Linux
      Huge version with GTK2 GUI. Features included (+) or not (-):
      +acl +farsi +mouse_netterm +syntax
      +arabic +file_in_path +mouse_sgr +tag_binary
      +autocmd +find_in_path -mouse_sysmouse +tag_old_static
      +balloon_eval +float +mouse_urxvt -tag_any_white
      +browse +folding +mouse_xterm -tcl
      ++builtin_terms -footer +multi_byte +terminfo
      +byte_offset +fork() +multi_lang +termresponse
      +cindent +gettext -mzscheme +textobjects
      +clientserver -hangul_input +netbeans_intg +title
      +clipboard +iconv +path_extra +toolbar
      +cmdline_compl +insert_expand +perl +user_commands
      +cmdline_hist +jumplist +persistent_undo +vertsplit
      +cmdline_info +keymap +postscript +virtualedit
      +comments +langmap +printer +visual
      +conceal +libcall +profile +visualextra
      +cryptv +linebreak +python +viminfo
      +cscope +lispindent -python3 +vreplace
      +cursorbind +listcmds +quickfix +wildignore
      +cursorshape +localmap +reltime +wildmenu
      +dialog_con_gui +lua +rightleft +windows
      +diff +menu +ruby +writebackup
      +digraphs +mksession +scrollbind +X11
      +dnd +modify_fname +signs -xfontset
      -ebcdic +mouse +smartindent +xim
      +emacs_tags +mouseshape -sniff +xsmp_interact
      +eval +mouse_dec +startuptime +xterm_clipboard
      +ex_extra +mouse_gpm +statusline -xterm_save
      +extra_search -mouse_jsbterm -sun_workshop -xpm
      system vimrc file: "/etc/vimrc"
      user vimrc file: "$HOME/.vimrc"
      2nd user vimrc file: "~/.vim/vimrc"
      user exrc file: "$HOME/.exrc"
      system gvimrc file: "/etc/gvimrc"
      user gvimrc file: "$HOME/.gvimrc"
      2nd user gvimrc file: "~/.vim/gvimrc"
      system menu file: "$VIMRUNTIME/menu.vim"
      fall-back for $VIM: "/usr/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 -D_FORTIFY_SOURCE=2 -march=x86-64 -mtune=generic -O2 -pipe -fstack-protector-strong --param=ssp-buffer-size=4 -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 -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -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 -lXt -lX11 -lXdmcp -lSM -lICE -lm -lncurses -lelf -lnsl -lacl -lattr -lgpm -ldl -L/usr/lib -llua -Wl,-E -Wl,-rpath,/usr/lib/perl5/core_perl/CORE -Wl,-O1,--sort-common,--as-needed,-z,relro -fstack-protector -L/usr/local/lib -L/usr/lib/perl5/core_perl/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

      --
      --
      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 vim_dev+unsubscribe@....
      For more options, visit https://groups.google.com/d/optout.
    • Christian Brabandt
      ... I am not sure, what you mean by diagnostic display, but looking at your screencast, I think you are talking about the sign column (:h sign) That looks like
      Message 2 of 5 , May 27, 2014
        Am 2014-05-27 20:27, schrieb ​​Babken Vardanyan:
        > See also: https://github.com/Valloric/YouCompleteMe/issues/992
        >
        > When YouCompleteMe's diagnostic display is closed (i.e. a syntax
        > problem is fixed), the cursor position is not propery updated and the
        > next `h` and `l` keyspress moves the cursor relative to previous
        > column position (before closing).
        >
        > This should demonstrate the issue better than I can explain:
        > https://cloud.githubusercontent.com/assets/4889592/3063795/688d70c2-e246-11e3-84f1-4de41a4c05f5.gif
        >
        > Steps to reproduce:
        > 0. Install YCM
        > 1. Make a syntax mistake in a file: The 2-column diagnostic display
        > should appear at the left side
        > 2. Correct the syntax mistake and quickly press `l` key twice (there
        > should be some more characters on the line to the left)
        > What happens: First time `l` key is pressed the cursor moves 2 columns
        > right from expected position.
        >
        > This happens only when diagnostic display closes, and does not happen
        > when it opens.
        I am not sure, what you mean by diagnostic display, but looking at your
        screencast, I think you are talking about the sign column (:h sign)

        That looks like its related to syntastic rather then to youcompleteme.
        BTW: is there a way to reproduce this issue easily? I rather not like
        to install youcompleteme and syntastic to try to debug this issue.

        BTW: there have been some patches integrated, that fix redrawing issues
        (specifically 7.4.277 which may fix you problem). So could you please
        first check with the latest vim version?

        kind regards,
        Christian

        --
        --
        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 vim_dev+unsubscribe@....
        For more options, visit https://groups.google.com/d/optout.
      • ​​Babken Vardanyan
        ... Yes, it s the grey 2 char wide column on the left with red sign pointing at error. ... I don t have syntastic installed. Recently it was integrated
        Message 3 of 5 , May 28, 2014
          On Wednesday, May 28, 2014 10:40:12 AM UTC+4, Christian Brabandt wrote:
          > Am 2014-05-27 20:27, schrieb ​​Babken Vardanyan:
          >
          > > See also: https://github.com/Valloric/YouCompleteMe/issues/992
          >
          > >
          >
          > > When YouCompleteMe's diagnostic display is closed (i.e. a syntax
          >
          > > problem is fixed), the cursor position is not propery updated and the
          >
          > > next `h` and `l` keyspress moves the cursor relative to previous
          >
          > > column position (before closing).
          >
          > >
          >
          > > This should demonstrate the issue better than I can explain:
          >
          > > https://cloud.githubusercontent.com/assets/4889592/3063795/688d70c2-e246-11e3-84f1-4de41a4c05f5.gif
          >
          > >
          >
          > > Steps to reproduce:
          >
          > > 0. Install YCM
          >
          > > 1. Make a syntax mistake in a file: The 2-column diagnostic display
          >
          > > should appear at the left side
          >
          > > 2. Correct the syntax mistake and quickly press `l` key twice (there
          >
          > > should be some more characters on the line to the left)
          >
          > > What happens: First time `l` key is pressed the cursor moves 2 columns
          >
          > > right from expected position.
          >
          > >
          >
          > > This happens only when diagnostic display closes, and does not happen
          >
          > > when it opens.
          >
          > I am not sure, what you mean by diagnostic display, but looking at your
          >
          > screencast, I think you are talking about the sign column (:h sign)
          >
          Yes, it's the grey 2 char wide column on the left with red ">>" sign pointing at error.
          > That looks like its related to syntastic rather then to youcompleteme.
          >
          > BTW: is there a way to reproduce this issue easily? I rather not like
          >
          > to install youcompleteme and syntastic to try to debug this issue.
          >
          I don't have syntastic installed. Recently it was integrated into YCM:
          https://github.com/Valloric/YouCompleteMe#why-did-ycm-stop-using-syntastic-for-diagnostics-display
          I am not very skilled Vim user, so I can't tell if it's same as :sign, but it seems like it, and the bug *should* reproduce if you just open it and close it, but I am not sure how to do it myself.
          >
          > BTW: there have been some patches integrated, that fix redrawing issues
          >
          > (specifically 7.4.277 which may fix you problem). So could you please
          >
          > first check with the latest vim version?
          >
          >
          > kind regards,
          >
          > Christian
          I have latest version available from Arch repos:
          $ pacman -Qi gvim|grep ^Version
          Version : 7.4.307-1

          --
          --
          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 vim_dev+unsubscribe@....
          For more options, visit https://groups.google.com/d/optout.
        • Christian Brabandt
          ... Well it would be helpfull, to know, what exactly YCM or syntastic is doing in that case. I ll try to have a look, but probably not before next week.
          Message 4 of 5 , May 28, 2014
            Am 2014-05-28 09:30, schrieb ​​Babken Vardanyan:
            > I don't have syntastic installed. Recently it was integrated into YCM:
            > https://github.com/Valloric/YouCompleteMe#why-did-ycm-stop-using-syntastic-for-diagnostics-display
            > I am not very skilled Vim user, so I can't tell if it's same as :sign,
            > but it seems like it, and the bug *should* reproduce if you just open
            > it and close it, but I am not sure how to do it myself.

            Well it would be helpfull, to know, what exactly YCM or syntastic is
            doing in
            that case.

            I'll try to have a look, but probably not before next week. Perhaps you
            could
            put a sample config (including the plugins and a sample "error" file,
            that
            triggers the signs) on github so I could clone easily?

            >> BTW: there have been some patches integrated, that fix redrawing
            >> issues
            >>
            >> (specifically 7.4.277 which may fix you problem). So could you please
            >>
            >> first check with the latest vim version?
            >>
            >>
            >> kind regards,
            >>
            >> Christian
            > I have latest version available from Arch repos:
            > $ pacman -Qi gvim|grep ^Version
            > Version : 7.4.307-1

            That contradicts your initial report, where you mentioned your Vim
            version:
            ,----
            | $ gvim --version
            | VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 4 2014 07:23:59)
            | Included patches: 1-274
            `----

            kind regards,
            Christian

            --
            --
            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 vim_dev+unsubscribe@....
            For more options, visit https://groups.google.com/d/optout.
          • ​​Babken Vardanyan
            ... Oh, I apologize, I hadn t tested with latest version. This bug is now fixed in 307 (or earlier). Thanks. -- -- You received this message from the vim_dev
            Message 5 of 5 , May 28, 2014
              On Wednesday, May 28, 2014 11:40:57 AM UTC+4, Christian Brabandt wrote:
              > Am 2014-05-28 09:30, schrieb ​​Babken Vardanyan:
              >
              > > I don't have syntastic installed. Recently it was integrated into YCM:
              >
              > > https://github.com/Valloric/YouCompleteMe#why-did-ycm-stop-using-syntastic-for-diagnostics-display
              >
              > > I am not very skilled Vim user, so I can't tell if it's same as :sign,
              >
              > > but it seems like it, and the bug *should* reproduce if you just open
              >
              > > it and close it, but I am not sure how to do it myself.
              >
              >
              >
              > Well it would be helpfull, to know, what exactly YCM or syntastic is
              >
              > doing in
              >
              > that case.
              >
              >
              >
              > I'll try to have a look, but probably not before next week. Perhaps you
              >
              > could
              >
              > put a sample config (including the plugins and a sample "error" file,
              >
              > that
              >
              > triggers the signs) on github so I could clone easily?
              >
              >
              >
              > >> BTW: there have been some patches integrated, that fix redrawing
              >
              > >> issues
              >
              > >>
              >
              > >> (specifically 7.4.277 which may fix you problem). So could you please
              >
              > >>
              >
              > >> first check with the latest vim version?
              >
              > >>
              >
              > >>
              >
              > >> kind regards,
              >
              > >>
              >
              > >> Christian
              >
              > > I have latest version available from Arch repos:
              >
              > > $ pacman -Qi gvim|grep ^Version
              >
              > > Version : 7.4.307-1
              >
              >
              >
              > That contradicts your initial report, where you mentioned your Vim
              >
              > version:
              >
              > ,----
              >
              > | $ gvim --version
              >
              > | VIM - Vi IMproved 7.4 (2013 Aug 10, compiled May 4 2014 07:23:59)
              >
              > | Included patches: 1-274
              >
              > `----
              >
              >
              >
              > kind regards,
              >
              > Christian

              Oh, I apologize, I hadn't tested with latest version.
              This bug is now fixed in 307 (or earlier).
              Thanks.

              --
              --
              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 vim_dev+unsubscribe@....
              For more options, visit https://groups.google.com/d/optout.
            Your message has been successfully submitted and would be delivered to recipients shortly.