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

Error in the management of the jump list when using File browser (windows or Linux)

Expand Messages
  • Jean Johner
    Hello, Please put two files file1 and file2 in the same directory. Suppress the ~/(.,_)viminfo file. Type vim test1 (file1 opens at line 1) Type :e . (The file
    Message 1 of 9 , Feb 23, 2010
    • 0 Attachment
      Hello,

      Please put two files file1 and file2 in the same directory.

      Suppress the ~/(.,_)viminfo file.

      Type vim test1 (file1 opens at line 1)
      Type :e . (The file browser opens at line 8)
      Type :q
      Type vim file2 (file2 opens at line 1)

      When going back to preceeding jumps with Ctrl-0, we should go to file
      browser, then to file1 and stop there.

      Type Ctrl-O (we go to File browser but at the wrong line)
      Type Ctrl-O twice (we go to file1, we should stop there))
      Type Ctrl-O (we go to File browser again !)
      Type Ctrl-O twice (we finally get an error message E19 : Mark has
      invalid line number)

      Best regards

      Jean Johner

      --
      You received this message from the "vim_dev" maillist.
      For more information, visit http://www.vim.org/maillist.php
    • Jean Johner
      Hello, A still simpler case showing a problem with File browser and Ctrl-O/ Ctrl-I Suppress the ~/(.,_)viminfo file. Type vim test1 (file1 opens at line 1)
      Message 2 of 9 , Feb 24, 2010
      • 0 Attachment
        Hello,

        A still simpler case showing a problem with File browser and Ctrl-O/
        Ctrl-I

        Suppress the ~/(.,_)viminfo file.

        Type vim test1 (file1 opens at line 1)
        Type :e . (The file browser opens at line 8 OK)
        Type Ctrl-O twice (Return to file1, OK)
        Type Ctrl-I (Return to File browser, OK)
        Type Ctrl-O (Nothing happens, not OK)
        Type Ctrl-O: error message E19 : Mark has invalid line number, not OK

        Best regards

        Jean Johner

        --
        You received this message from the "vim_dev" maillist.
        For more information, visit http://www.vim.org/maillist.php
      • Charles Campbell
        ... Put let g:netrw_fastbrowse= 2 into your .vimrc. The penalty for this is that you get slow browsing -- ie. netrw (vim, actually) doesn t remember
        Message 3 of 9 , Mar 15, 2010
        • 0 Attachment
          Jean Johner wrote:
          > Hello,
          >
          > A still simpler case showing a problem with File browser and Ctrl-O/
          > Ctrl-I
          >
          > Suppress the ~/(.,_)viminfo file.
          >
          > Type vim test1 (file1 opens at line 1)
          > Type :e . (The file browser opens at line 8 OK)
          > Type Ctrl-O twice (Return to file1, OK)
          > Type Ctrl-I (Return to File browser, OK)
          > Type Ctrl-O (Nothing happens, not OK)
          > Type Ctrl-O: error message E19 : Mark has invalid line number, not OK
          >

          Put

          let g:netrw_fastbrowse= 2

          into your .vimrc. The penalty for this is that you get "slow" browsing
          -- ie. netrw (vim, actually) doesn't remember previous directory
          listings. This may not be so important for local browsing, but every
          refresh of a remote directory via ftp or ssh will require a new query of
          the remote site. This can be unpleasant when one has to re-enter passwords.

          Regards,
          Chip Campbell

          --
          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
        • Jean Johner
          On Mar 15, 9:00 pm, Charles Campbell ... Hi Chip, The above correction solves the problem for my Feb 24 message. Thank you. The
          Message 4 of 9 , Mar 16, 2010
          • 0 Attachment
            On Mar 15, 9:00 pm, Charles Campbell <Charles.E.Campb...@...>
            wrote:
            >   let g:netrw_fastbrowse= 2

            Hi Chip,

            The above correction solves the problem for my Feb 24 message. Thank
            you.

            The situation is not so clean with the Feb 23 problem (CTRL-O goes
            back to netrw, then to file2 again!, then to netrw again, then to
            file1). Fortunately, the error message does not show any longer.

            Best regards

            Jean Johner

            --
            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
          • Lech Lorens
            ... This is partly the fault of :keepjumps not being respected for the :put command used in the Netrw plugin, partly the fault of Netrw setting marks (in Gdb I
            Message 5 of 9 , Apr 5, 2010
            • 0 Attachment
              On 24-Feb-2010 Jean Johner <jean.johner@...> wrote:
              > Hello,
              >
              > A still simpler case showing a problem with File browser and Ctrl-O/
              > Ctrl-I
              >
              > Suppress the ~/(.,_)viminfo file.
              >
              > Type vim test1 (file1 opens at line 1)
              > Type :e . (The file browser opens at line 8 OK)
              > Type Ctrl-O twice (Return to file1, OK)
              > Type Ctrl-I (Return to File browser, OK)
              > Type Ctrl-O (Nothing happens, not OK)
              > Type Ctrl-O: error message E19 : Mark has invalid line number, not OK
              >
              > Best regards
              >
              > Jean Johner

              This is partly the fault of :keepjumps not being respected for the :put
              command used in the Netrw plugin, partly the fault of Netrw setting
              marks (in Gdb I found "mark '" being executed) while producing
              a directory listing.

              I already sent a patch solving the first problem.

              I don't know if it is essential for Netrw to set the ' mark, but it
              seems that it messes up the jump list when this list is being traversed
              by pressing <C-o> or <C-i>. Maybe Charles Campbell could respond to my
              accusation? ;-)

              --
              Cheers,
              Lech

              --
              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

              To unsubscribe, reply using "remove me" as the subject.
            • Charles Campbell
              ... Netrw does use and set the mark; however, I note that :keepj mark protects the jump list. I ll put that keepj in there with it. What I wish was
              Message 6 of 9 , Apr 5, 2010
              • 0 Attachment
                Lech Lorens wrote:
                > On 24-Feb-2010 Jean Johner <jean.johner@...> wrote:
                >
                >> Hello,
                >>
                >> A still simpler case showing a problem with File browser and Ctrl-O/
                >> Ctrl-I
                >>
                >> Suppress the ~/(.,_)viminfo file.
                >>
                >> Type vim test1 (file1 opens at line 1)
                >> Type :e . (The file browser opens at line 8 OK)
                >> Type Ctrl-O twice (Return to file1, OK)
                >> Type Ctrl-I (Return to File browser, OK)
                >> Type Ctrl-O (Nothing happens, not OK)
                >> Type Ctrl-O: error message E19 : Mark has invalid line number, not OK
                >>
                >> Best regards
                >>
                >> Jean Johner
                >>
                >
                > This is partly the fault of :keepjumps not being respected for the :put
                > command used in the Netrw plugin, partly the fault of Netrw setting
                > marks (in Gdb I found "mark '" being executed) while producing
                > a directory listing.
                >
                > I already sent a patch solving the first problem.
                >
                > I don't know if it is essential for Netrw to set the ' mark, but it
                > seems that it messes up the jump list when this list is being traversed
                > by pressing <C-o> or <C-i>. Maybe Charles Campbell could respond to my
                > accusation? ;-)
                >
                >
                Netrw does use and set the ' mark; however, I note that :keepj mark '
                protects the jump list. I'll put that keepj in there with it. What I
                wish was that there was

                :lockjumps (implemented with a counter; this command would
                increment it)
                :unlockjumps (would decrement the counter; need an equivalent qty of
                :unlockjumps to unlock the jumps, perhaps :unlockjumps! would reset
                the jumplock counter and unlock the jumps)

                instead of having to put keepjumps all over the place.

                Regards,
                Chip Campbell

                --
                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

                To unsubscribe, reply using "remove me" as the subject.
              • Bram Moolenaar
                ... That has the problem that when something goes wrong and the :unlockjumps is not reached the editor doesn t work properly. Perhaps we should support
                Message 7 of 9 , Apr 6, 2010
                • 0 Attachment
                  Charles Campbell wrote:

                  > Lech Lorens wrote:
                  > > On 24-Feb-2010 Jean Johner <jean.johner@...> wrote:
                  > >
                  > >> Hello,
                  > >>
                  > >> A still simpler case showing a problem with File browser and Ctrl-O/
                  > >> Ctrl-I
                  > >>
                  > >> Suppress the ~/(.,_)viminfo file.
                  > >>
                  > >> Type vim test1 (file1 opens at line 1)
                  > >> Type :e . (The file browser opens at line 8 OK)
                  > >> Type Ctrl-O twice (Return to file1, OK)
                  > >> Type Ctrl-I (Return to File browser, OK)
                  > >> Type Ctrl-O (Nothing happens, not OK)
                  > >> Type Ctrl-O: error message E19 : Mark has invalid line number, not OK
                  > >>
                  > >> Best regards
                  > >>
                  > >> Jean Johner
                  > >>
                  > >
                  > > This is partly the fault of :keepjumps not being respected for the :put
                  > > command used in the Netrw plugin, partly the fault of Netrw setting
                  > > marks (in Gdb I found "mark '" being executed) while producing
                  > > a directory listing.
                  > >
                  > > I already sent a patch solving the first problem.
                  > >
                  > > I don't know if it is essential for Netrw to set the ' mark, but it
                  > > seems that it messes up the jump list when this list is being traversed
                  > > by pressing <C-o> or <C-i>. Maybe Charles Campbell could respond to my
                  > > accusation? ;-)
                  > >
                  > >
                  > Netrw does use and set the ' mark; however, I note that :keepj mark '
                  > protects the jump list. I'll put that keepj in there with it. What I
                  > wish was that there was
                  >
                  > :lockjumps (implemented with a counter; this command would
                  > increment it)
                  > :unlockjumps (would decrement the counter; need an equivalent qty of
                  > :unlockjumps to unlock the jumps, perhaps :unlockjumps! would reset
                  > the jumplock counter and unlock the jumps)
                  >
                  > instead of having to put keepjumps all over the place.

                  That has the problem that when something goes wrong and the
                  ":unlockjumps" is not reached the editor doesn't work properly.

                  Perhaps we should support ":keepjumps! call DoTheWork()" ?

                  --
                  FATAL ERROR! SYSTEM HALTED! - Press any key to continue doing nothing.

                  /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
                  /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
                  \\\ download, build and distribute -- http://www.A-A-P.org ///
                  \\\ help me help AIDS victims -- http://ICCF-Holland.org ///

                  --
                  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

                  To unsubscribe, reply using "remove me" as the subject.
                • Jean Johner
                  Hello, The situation is improving rapidly. I just installed netrw v137o. 1) Using a .vimrc containing just the following line: let g:netrw_fastbrowse = 2 and
                  Message 8 of 9 , Apr 7, 2010
                  • 0 Attachment
                    Hello,
                    The situation is improving rapidly.
                    I just installed netrw v137o.
                    1) Using a .vimrc containing just the following line:
                    let g:netrw_fastbrowse = 2
                    and doing
                    gvim file1
                    :e. (netrw opens at line 1 with line ../ in grey OK)
                    click on file2 (file2 opens)
                    :e. (netrw opens at line file2 in grey OK)
                    click on file3 (file3 opens)
                    Now do CTRL-O several times:
                    netrw opens with file3 in grey (OK)
                    file2 opens
                    netrw opens with file2 in grey (OK)
                    file1 opens

                    The way back with CTRL-I is OK

                    For case 1), the behaviour is then perfect.

                    2) Using a .vimrc containing just the 2 following lines:
                    let g:netrw_fastbrowse = 2
                    let g:netrw_liststyle = 2
                    and doing
                    gvim file1
                    :e. (netrw opens at line 8 with the cursor on ../, why not on line 1)
                    click on file2 (file2 opens)
                    :e. (netrw opens at line 1 with the cursor at the beginning of the
                    line containing file2, why not on file2)
                    click on file3 (file3 opens)
                    Now do CTRL-O several times:
                    netrw opens at line 1 with the cursor on file3 (OK)
                    file2 opens
                    netrw opens at line 1 with the cursor on file2 (OK)
                    file1 opens

                    The way back with CTRL-I is OK

                    So just 2 little imperfections in case 2)

                    Best regards
                    Jean Johner



                    --
                    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

                    To unsubscribe, reply using "remove me" as the subject.
                  • Jean Johner
                    Error when opening more than 3 files with :e. (v138b) see below: Using a .vimrc containing just the 2 following lines: let g:netrw_fastbrowse = 2 let
                    Message 9 of 9 , May 19, 2010
                    • 0 Attachment
                      Error when opening more than 3 files with :e. (v138b) see below:

                      Using a .vimrc containing just the 2 following lines:
                      let g:netrw_fastbrowse = 2
                      let g:netrw_liststyle = 2
                      and doing
                      gvim file1
                      :e.
                      click on file2 (file2 opens)
                      :e.
                      click on file3 (file3 opens)
                      :e.
                      click on file4 (file4 opens)

                      Now do CTRL-O several times:
                      netrw opens at line 1 with the cursor on file4 (OK)
                      file3 opens
                      netrw opens at line 1 with the cursor on file3 (OK)
                      file2 opens
                      file1 opens

                      Conclusion: the jump before file1 with netrw with cursor on file2 has
                      vanished.

                      Remark: this does not occur with "let g:netrw_liststyle = 2" omitted
                      in .vimrc

                      Best regards

                      Jean Johner

                      --
                      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.