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

[Bug] Wrong possition when jumping into a window

Expand Messages
  • Yue Wu
    How to reproduce: run vim; edit file 1 ... split window horizotally: s Jump into the bottom window and move the cursor from current position to another,
    Message 1 of 4 , Jul 13, 2011
    • 0 Attachment
      How to reproduce:

      run vim;

      edit file 1
      :e file1

      split window horizotally:
      <C-w>s

      Jump into the bottom window and move the cursor from current position
      to another, then jump back into the top window:
      <C-w>j G <C-w>t

      edit another file
      :e file2

      Jump to window that is showing file1:
      <C-w>j

      Now issue comes, cursor in file1 will go back to the original position.

      vim version:

      VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 29 2011 08:20:05)
      MS-Windows 32-bit GUI version with OLE support
      Included patches: 1-237
      Compiled by digitectNO@...
      Huge version with 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_gui +diff +digraphs -dnd
      -ebcdic +emacs_tags +eval +ex_extra +extra_search +farsi +file_in_path
      +find_in_path +float +folding -footer +gettext/dyn
      -hangul_input +iconv/dyn +insert_expand +jumplist +keymap +langmap
      +libcall +linebreak +lispindent +listcmds +localmap +lua/dyn
      +menu +mksession +modify_fname +mouse +mouseshape +multi_byte_ime/dyn
      +multi_lang +mzscheme/dyn +netbeans_intg +ole +path_extra
      +perl/dyn +persistent_undo -postscript +printer +profile +python/dyn
      -python3 +quickfix +reltime +rightleft +ruby/dyn +scrollbind
      +signs +smartindent -sniff +startuptime +statusline -sun_workshop +syntax
      +tag_binary +tag_old_static -tag_any_white +tcl/dyn
      -tgetent -termresponse +textobjects +title +toolbar +user_commands
      +vertsplit +virtualedit +visual +visualextra +viminfo
      +vreplace +wildignore +wildmenu +windows +writebackup -xfontset -xim
      -xterm_save -xpm_w32
      system vimrc file: "$VIM\vimrc"
      user vimrc file: "$HOME\_vimrc"
      2nd user vimrc file: "$VIM\_vimrc"
      user exrc file: "$HOME\_exrc"
      2nd user exrc file: "$VIM\_exrc"
      system gvimrc file: "$VIM\gvimrc"
      user gvimrc file: "$HOME\_gvimrc"
      2nd user gvimrc file: "$VIM\_gvimrc"
      system menu file: "$VIMRUNTIME\menu.vim"
      Compilation: gcc -O3 -fomit-frame-pointer -freg-struct-return
      -fno-strength-reduce -DWIN32 -DHAVE_PATHDEF -DFEAT_HUGE -DWINVER=0x0
      400 -D_WIN32_WINNT=0x0400 -DFEAT_PERL -DDYNAMIC_PERL
      -DDYNAMIC_PERL_DLL="perl58.dll" -DFEAT_PYTHON -DDYNAMIC_PYTHON
      -DDYNAMIC_PYTH
      ON_DLL="python26.dll" -DFEAT_RUBY -DDYNAMIC_RUBY
      -DDYNAMIC_RUBY_DLL="msvcrt-ruby18.dll" -DDYNAMIC_RUBY_VER=18
      -DFEAT_MZSCHEME -DDY
      NAMIC_MZSCHEME -DDYNAMIC_MZSCH_DLL="libmzsch42.dll"
      -DDYNAMIC_MZGC_DLL="libmzgc42.dll" -DINCLUDE_MZSCHEME_BASE -DFEAT_TCL
      -DDYNAMI
      C_TCL -DDYNAMIC_TCL_DLL="tcl85.dll" -DFEAT_LUA -DDYNAMIC_LUA
      -DDYNAMIC_LUA_DLL="lua51.dll" -DDYNAMIC_GETTEXT -DDYNAMIC_ICONV -DFEA
      T_MBYTE -DFEAT_MBYTE_IME -DDYNAMIC_IME -DFEAT_CSCOPE -DFEAT_NETBEANS_INTG
      -DFEAT_GUI_W32 -DFEAT_CLIPBOARD -DFEAT_OLE -march=i386 -
      Iproto -I/cygdrive/c/strawberry/perl/lib/CORE
      -I/cygdrive/c/RUBY/lib/ruby/1.8/i386-mswin32
      -I/cygdrive/c/PROGRA~1/MzScheme/include
      -I/cygdrive/c/Tcl/include -I/cygdrive/c/PROGRA~1/Lua/5.1/include -s
      -mno-cygwin
      Linking:
      gcc -s -o gvim.exe -luuid -lole32 /cygdrive/c/Tcl/lib/tclstub85.lib
      -lwsock32 -mwindows -lcomctl32 -lversion -loleaut32 -lstdc++


      --
      Regards,
      Yue Wu

      Key Laboratory of Modern Chinese Medicines
      Department of Traditional Chinese Medicine
      China Pharmaceutical University(中國藥科大學)
      No.24, Tongjia Xiang Street, Nanjing 210009, China

      --
      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
    • MacDonald, Stuart
      From: On Behalf Of Yue Wu ... [snip] ... I can t reproduce. ... ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ You are using a non-standard vim 7.3. Can you reproduce with a
      Message 2 of 4 , Jul 14, 2011
      • 0 Attachment
        From: On Behalf Of Yue Wu
        > Subject: [Bug] Wrong possition when jumping into a window
        >
        > How to reproduce:
        [snip]
        > Now issue comes, cursor in file1 will go back to the original
        > position.

        I can't reproduce.

        > vim version:
        >
        > VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 29 2011 08:20:05)
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
        > MS-Windows 32-bit GUI version with OLE support
        > Included patches: 1-237
        > Compiled by digitectNO@...
        ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

        You are using a non-standard vim 7.3. Can you reproduce with a
        standard vim 7.3?

        ...Stu

        --
        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
      • Christian Brabandt
        ... Neither can I on linux with 7.3.170 ... I think that is the version from the Cream Webpage (which is mentioned on the Vim homepage) and provides updated
        Message 3 of 4 , Jul 14, 2011
        • 0 Attachment
          On Thu, July 14, 2011 3:10 pm, MacDonald, Stuart wrote:
          > From: On Behalf Of Yue Wu
          >> Subject: [Bug] Wrong possition when jumping into a window
          >>
          >> How to reproduce:
          > [snip]
          >> Now issue comes, cursor in file1 will go back to the original
          >> position.
          >
          > I can't reproduce.

          Neither can I on linux with 7.3.170

          >> vim version:
          >>
          >> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 29 2011 08:20:05)
          > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          >> MS-Windows 32-bit GUI version with OLE support
          >> Included patches: 1-237
          >> Compiled by digitectNO@...
          > ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
          >
          > You are using a non-standard vim 7.3. Can you reproduce with a
          > standard vim 7.3?

          I think that is the version from the Cream Webpage (which is mentioned on
          the Vim homepage) and provides updated versions of vim 7.3 for Windows.

          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
        • Yue Wu
          ... Sorry for noise again, I find the issue finally, not caused by this setting, but caused by another wrong autocmd BufEnter written by me ;p -- Regards, Yue
          Message 4 of 4 , Jul 14, 2011
          • 0 Attachment
            On Thu, 14 Jul 2011 21:41:00 +0800, Yue Wu wrote:

            > On Thu, 14 Jul 2011 21:10:37 +0800, MacDonald, Stuart wrote:
            >
            >> From: On Behalf Of Yue Wu
            >>> Subject: [Bug] Wrong possition when jumping into a window
            >>>
            >>> How to reproduce:
            >> [snip]
            >>> Now issue comes, cursor in file1 will go back to the original
            >>> position.
            >>
            >> I can't reproduce.
            >>
            >>> vim version:
            >>>
            >>> VIM - Vi IMproved 7.3 (2010 Aug 15, compiled Jun 29 2011 08:20:05)
            >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            >>> MS-Windows 32-bit GUI version with OLE support
            >>> Included patches: 1-237
            >>> Compiled by digitectNO@...
            >> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
            >>
            >> You are using a non-standard vim 7.3. Can you reproduce with a
            >> standard vim 7.3?
            >>
            >> ...Stu
            >>
            >
            > I'm afraid I've found the setting causing the issue:
            >
            > autocmd BufReadPost * if line("'\"") > 1 && line("'\"") <= line("$") |
            > exe "normal! g`\"" | endif
            >
            > But I don't understand why the procedure I described can cause the
            > trigger of BufReadPost.
            >

            Sorry for noise again, I find the issue finally, not caused by this
            setting, but caused by another wrong autocmd BufEnter written by me ;p

            --
            Regards,
            Yue Wu

            Key Laboratory of Modern Chinese Medicines
            Department of Traditional Chinese Medicine
            China Pharmaceutical University(中國藥科大學)
            No.24, Tongjia Xiang Street, Nanjing 210009, China

            --
            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
          Your message has been successfully submitted and would be delivered to recipients shortly.