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

Regression in 7.4: invisible unfocusable preview window

Expand Messages
  • Marius Gedminas
    Vim 7.4 broke my svn filetype plugin (http://mg.pov.lt/vim/ftplugin/svn.vim). The plugin opens a new split window and puts the output of svn diff in there
    Message 1 of 5 , Aug 20, 2013
    • 0 Attachment
      Vim 7.4 broke my svn filetype plugin (http://mg.pov.lt/vim/ftplugin/svn.vim).

      The plugin opens a new split window and puts the output of 'svn diff' in
      there when I run 'svn commit'. This window gets some attributes set,
      including 'previewwindow', which I use to make vim quit as soon as I
      close the svn-commit.tmp file.

      With vim 7.4 the preview window appears empty (lacking even a status
      line), and you cannot switch to it with Ctrl-W W.

      Steps to reproduce:

      echo "au BufRead,BufNewFile * new|put ='some text'|setlocal pvw" > bug.vim
      vim -u bug.vim newfile.txt

      Expected behavior (which I get with vim 7.3.547, and which I used to get
      with 7.3.verylargenumbers):

      http://i.imgur.com/MRN6f9c.png -- you get two windows, with some text
      in the first one

      Actual behavior:

      http://i.imgur.com/0KKz1i3.png -- the preview window takes up space,
      but is completely blank, doesn't even have a statusline, and cannot be
      switched to.

      Note: if you run vim -u bug.vim, and then open a new file with :e, this
      bug doesn't show up.

      Marius Gedminas
      --
      And yes, you'd be insane to consider C++ for a new project in 2007.
      -- Thomas Ptacek
    • Christian Brabandt
      Hi Marius! ... I might have caused this with patch 7.3.1201. Strange, this error didn t happen with my plugin. Anyway, here is an alternative approach: diff
      Message 2 of 5 , Aug 20, 2013
      • 0 Attachment
        Hi Marius!

        On Di, 20 Aug 2013, Marius Gedminas wrote:

        > Vim 7.4 broke my svn filetype plugin (http://mg.pov.lt/vim/ftplugin/svn.vim).
        >
        > The plugin opens a new split window and puts the output of 'svn diff' in
        > there when I run 'svn commit'. This window gets some attributes set,
        > including 'previewwindow', which I use to make vim quit as soon as I
        > close the svn-commit.tmp file.
        >
        > With vim 7.4 the preview window appears empty (lacking even a status
        > line), and you cannot switch to it with Ctrl-W W.
        >
        > Steps to reproduce:
        >
        > echo "au BufRead,BufNewFile * new|put ='some text'|setlocal pvw" > bug.vim
        > vim -u bug.vim newfile.txt
        >
        > Expected behavior (which I get with vim 7.3.547, and which I used to get
        > with 7.3.verylargenumbers):
        >
        > http://i.imgur.com/MRN6f9c.png -- you get two windows, with some text
        > in the first one
        >
        > Actual behavior:
        >
        > http://i.imgur.com/0KKz1i3.png -- the preview window takes up space,
        > but is completely blank, doesn't even have a statusline, and cannot be
        > switched to.
        >
        > Note: if you run vim -u bug.vim, and then open a new file with :e, this
        > bug doesn't show up.

        I might have caused this with patch 7.3.1201. Strange, this error didn't
        happen with my plugin. Anyway, here is an alternative approach:

        diff --git a/src/main.c b/src/main.c
        --- a/src/main.c
        +++ b/src/main.c
        @@ -2816,6 +2816,8 @@
        # ifdef FEAT_AUTOCMD
        --autocmd_no_enter;
        # endif
        + /* make the first window the current window */
        + win_enter(firstwin, FALSE);
        #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
        /*
        * Avoid making a preview window the current window.
        @@ -2827,13 +2829,11 @@
        for (win = firstwin; win != NULL; win = win->w_next)
        if (!win->w_p_pvw)
        {
        - firstwin = win;
        + win_goto(win);
        break;
        }
        }
        #endif
        - /* make the first window the current window */
        - win_enter(firstwin, FALSE);

        # ifdef FEAT_AUTOCMD
        --autocmd_no_leave;



        Mit freundlichen Grüßen
        Christian
        --
        Die Menschen wären alle bescheidener und demütiger, trieben sie alle
        nur eine Kunst.
        -- Jean Paul

        --
        --
        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/groups/opt_out.
      • Marius Gedminas
        Hi! ... Your patch fixes the bug, thanks! What are the next steps to get it included upstream? Marius Gedminas -- The main reason I always use my
        Message 3 of 5 , Aug 21, 2013
        • 0 Attachment
          Hi!

          On Tue, Aug 20, 2013 at 05:15:49PM +0200, Christian Brabandt wrote:
          > On Di, 20 Aug 2013, Marius Gedminas wrote:
          > > Steps to reproduce:
          > >
          > > echo "au BufRead,BufNewFile * new|put ='some text'|setlocal pvw" > bug.vim
          > > vim -u bug.vim newfile.txt
          > >
          > > Expected behavior (which I get with vim 7.3.547, and which I used to get
          > > with 7.3.verylargenumbers):
          > >
          > > http://i.imgur.com/MRN6f9c.png -- you get two windows, with some text
          > > in the first one
          > >
          > > Actual behavior:
          > >
          > > http://i.imgur.com/0KKz1i3.png -- the preview window takes up space,
          > > but is completely blank, doesn't even have a statusline, and cannot be
          > > switched to.
          > >
          > > Note: if you run vim -u bug.vim, and then open a new file with :e, this
          > > bug doesn't show up.
          >
          > I might have caused this with patch 7.3.1201. Strange, this error didn't
          > happen with my plugin. Anyway, here is an alternative approach:

          <snip patch>

          Your patch fixes the bug, thanks!

          What are the next steps to get it included upstream?

          Marius Gedminas
          --
          The main reason I always use my name is lack of imagination. Well, and vanity,
          but mainly lack of imagination.
          -- James Nicoll's Reason For Not Using A Nickname
        • Christian Brabandt
          ... Bram will include it eventually. regards, Christian -- -- You received this message from the vim_dev maillist. Do not top-post! Type your reply below the
          Message 4 of 5 , Aug 21, 2013
          • 0 Attachment
            On Thu, August 22, 2013 07:40, Marius Gedminas wrote:
            > On Tue, Aug 20, 2013 at 05:15:49PM +0200, Christian Brabandt wrote:
            > <snip patch>
            >
            > Your patch fixes the bug, thanks!
            >
            > What are the next steps to get it included upstream?

            Bram will include it eventually.

            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/groups/opt_out.
          • Bram Moolenaar
            ... Thanks. However, entering a window may have side effects, I think it s better to avoid doing it twice. -- hundred-and-one symptoms of being an internet
            Message 5 of 5 , Aug 22, 2013
            • 0 Attachment
              Christian Brabandt wrote:

              > On Di, 20 Aug 2013, Marius Gedminas wrote:
              >
              > > Vim 7.4 broke my svn filetype plugin (http://mg.pov.lt/vim/ftplugin/svn.vim).
              > >
              > > The plugin opens a new split window and puts the output of 'svn diff' in
              > > there when I run 'svn commit'. This window gets some attributes set,
              > > including 'previewwindow', which I use to make vim quit as soon as I
              > > close the svn-commit.tmp file.
              > >
              > > With vim 7.4 the preview window appears empty (lacking even a status
              > > line), and you cannot switch to it with Ctrl-W W.
              > >
              > > Steps to reproduce:
              > >
              > > echo "au BufRead,BufNewFile * new|put ='some text'|setlocal pvw" > bug.vim
              > > vim -u bug.vim newfile.txt
              > >
              > > Expected behavior (which I get with vim 7.3.547, and which I used to get
              > > with 7.3.verylargenumbers):
              > >
              > > http://i.imgur.com/MRN6f9c.png -- you get two windows, with some text
              > > in the first one
              > >
              > > Actual behavior:
              > >
              > > http://i.imgur.com/0KKz1i3.png -- the preview window takes up space,
              > > but is completely blank, doesn't even have a statusline, and cannot be
              > > switched to.
              > >
              > > Note: if you run vim -u bug.vim, and then open a new file with :e, this
              > > bug doesn't show up.
              >
              > I might have caused this with patch 7.3.1201. Strange, this error didn't
              > happen with my plugin. Anyway, here is an alternative approach:

              Thanks. However, entering a window may have side effects, I think it's
              better to avoid doing it twice.

              --
              hundred-and-one symptoms of being an internet addict:
              104. When people ask about the Presidential Election you ask "Which country?"

              /// Bram Moolenaar -- Bram@... -- http://www.Moolenaar.net \\\
              /// sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
              \\\ an exciting new programming language -- http://www.Zimbu.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

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