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

Re: GVim flickers during page down/up scrolling - fonts renderer issue?

Expand Messages
  • John Little
    ... Yes, I get it too, but it s more of a flash than a flicker. Going forward a screen Vim seems to clear the screen, then redraw it, but gets interrupted
    Message 1 of 20 , Feb 3, 2012
      On Feb 4, 10:17 am, Mikey <smieciar...@...> wrote:
      > Hello again.
      >
      > Accidentally I've discovered some new facts about described problem.
      > In contrast to my previous posts now I dare to claim that the source
      > of bug is in the Vim itself. Steps to reproduce: ...

      Yes, I get "it" too, but it's more of a flash than a flicker. Going
      forward a screen Vim seems to clear the screen, then redraw it, but
      gets interrupted and pauses a third of the way through, and at two
      thirds. And yes, after a :vsplit page up doesn't flash.

      Interestingly, the behaviour is identical with vim in gnome-terminal,
      konsole, and xterm.

      Regards, John

      --
      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
      Hi John! ... I am not sure why, but this patch seems to fix it. This potentially makes redrawing much slower, though. diff --git a/src/move.c b/src/move.c ...
      Message 2 of 20 , Feb 4, 2012
        Hi John!

        On Fr, 03 Feb 2012, John Little wrote:

        > On Feb 4, 10:17 am, Mikey <smieciar...@...> wrote:
        > > Hello again.
        > >
        > > Accidentally I've discovered some new facts about described problem.
        > > In contrast to my previous posts now I dare to claim that the source
        > > of bug is in the Vim itself. Steps to reproduce: ...
        >
        > Yes, I get "it" too, but it's more of a flash than a flicker. Going
        > forward a screen Vim seems to clear the screen, then redraw it, but
        > gets interrupted and pauses a third of the way through, and at two
        > thirds. And yes, after a :vsplit page up doesn't flash.
        >
        > Interestingly, the behaviour is identical with vim in gnome-terminal,
        > konsole, and xterm.

        I am not sure why, but this patch seems to fix it. This potentially
        makes redrawing much slower, though.

        diff --git a/src/move.c b/src/move.c
        --- a/src/move.c
        +++ b/src/move.c
        @@ -2533,7 +2533,7 @@
        }
        }

        - redraw_later(VALID);
        + redraw_later(NOT_VALID);
        return retval;
        }


        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
      • Mikey
        ... Strange... On my machine scrolling is now faster, not very much but indeed faster. But there is a problem with your patch. After John Little had confirmed
        Message 3 of 20 , Feb 5, 2012
          On Feb 4, 2:33 pm, Christian Brabandt <cbli...@...> wrote:
          > I am not sure why, but this patch seems to fix it. This potentially
          > makes redrawing much slower, though.

          Strange... On my machine scrolling is now faster, not very much but
          indeed faster.

          But there is a problem with your patch. After John Little had
          confirmed my observations, I investigated a little and found that this
          'flashing' is more general bug i.e. not only with ctrl-f/b but also
          with ctrl-d/u, gg, G, :set scrolljump=-25 or even :set scrolljump=1
          and maybe more. I dont't have the foggiest idea about Vim's internals
          but I suspect it should be fixed on some higher level than your
          attempt.

          --
          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
        • Marko Mahnič
          ... The flickering problem is usually solved by using double-buffering in an application: the application draws text into an off-screen buffer, then it
          Message 4 of 20 , Feb 5, 2012
            On Feb 5, 3:01 pm, Mikey <smieciar...@...> wrote:
            > I dont't have the foggiest idea about Vim's internals
            > but I suspect it should be fixed on some higher level than your
            > attempt.

            The flickering problem is usually solved by using double-buffering in
            an application: the application draws text into an off-screen buffer,
            then it displays the buffer. I'm not sure, but I think that Vim
            doesn't use double buffering. Instead it (I think) tries to modify
            only the parts of the screen that have actually changed. When
            scrolling (eg. when you move down line by line) it may also copy the
            part of the screen that will be visible after the scroll to a new
            location.

            When you move by page (or pressing ctrl-L), the whole screen needs to
            be updated. It is first cleared and then redrawn, and both changes are
            immediately visible. On slow graphic cards and large Vim windows the
            flicker appears stronger because it takes more time to redraw the
            screen. The flicker is usually stronger in the bottom lines.

            Hope this helps,
            Marko

            --
            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
            I have vim 7.3 (p1-46) on Win 7. From: On Behalf Of Christian Brabandt ... I see a flicker, but it s expected, see below. ... This is without looking at the
            Message 5 of 20 , Feb 7, 2012
              I have vim 7.3 (p1-46) on Win 7.

              From: On Behalf Of Christian Brabandt
              > On Fr, 03 Feb 2012, John Little wrote:
              >
              > > On Feb 4, 10:17 am, Mikey <smieciar...@...> wrote:
              > > > Hello again.
              > > >
              > > > Accidentally I've discovered some new facts about described problem.
              > > > In contrast to my previous posts now I dare to claim that the source
              > > > of bug is in the Vim itself. Steps to reproduce: ...
              > >
              > > Yes, I get "it" too, but it's more of a flash than a flicker. Going
              > > forward a screen Vim seems to clear the screen, then redraw it, but
              > > gets interrupted and pauses a third of the way through, and at two
              > > thirds. And yes, after a :vsplit page up doesn't flash.

              I see a flicker, but it's expected, see below.

              > I am not sure why, but this patch seems to fix it. This potentially
              > makes redrawing much slower, though.
              >
              > diff --git a/src/move.c b/src/move.c
              > --- a/src/move.c
              > +++ b/src/move.c
              > @@ -2533,7 +2533,7 @@
              > }
              > }
              >
              > - redraw_later(VALID);
              > + redraw_later(NOT_VALID);
              > return retval;
              > }

              This is without looking at the code, so ICBW...

              This is a well-known although possibly fallen-into-disuse graphics
              optimization: if you're partway through drawing the screen and you get
              a command that will cause a redraw, abandon the current drawing and
              start the next drawing.

              The patch probably turns the optimization off, which should make the
              scrolling slower because each view on the data is fully drawn before
              the next navigation command occurs.

              The fact that there is no flicker when scrolling up is an artifact of
              the top-to-bottom drawing process.

              I'm not sure this is something that needs to be fixed. I pasted the
              10,001 lines to notepad and see the same thing when scrolling.

              Hm. Although in notepad there is flicker in both directions, so I'm
              wondering if the lack of flicker when scrolling up in gvim is in fact
              a bug: the optimization is not applied correctly?

              ...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
            • Peter Robinson
              I m having the same problem with the most recent GVim under certain scenarios: 1. In MacOS, GVim (or rather MVim) works perfectly, no flickering whatsoever. 2.
              Message 6 of 20 , Nov 12, 2014
                I'm having the same problem with the most recent GVim under certain scenarios:
                1. In MacOS, GVim (or rather MVim) works perfectly, no flickering whatsoever.
                2. In Linux (on the same machine), the flickering in GVim is very noticeable when using fast scrolling, for the exact same file that works smoothly using MVim in MacOs. If I open the same file in a console using vim, there is no flickering.
                I also compiled the latest GVim with motif instead of GTK2 but the problem persists, which tells me that the issue must be in the way the redrawing of the screen is handled (that works fine with Quartz (MacOS) but has performance issues with X).

                PS: I've also tried to recompile with the line "redraw_later(NOT_VALID);" in move.c as suggested earlier, but this didn't have any noticeable effect.

                Peter

                On Monday, January 23, 2012 5:12:52 AM UTC+8, Wiktor Ruben wrote:
                > Hi,
                >
                > I use GVim ver. 7.3.154 with GTK2 GUI on Slackware 13.37. During page
                > down/up scrolling with Ctrl-F/B keys, screen flickers. It is
                > especially well seen when GVim is maximized and working with large
                > files (for example /var/log/messages) where text fills entire screen
                > (not only from top to bottom, but also from left to right). Launching
                > GVim with '-u NONE - U NONE' changes nothing. For additional
                > comparison I opened the same file with Emacs 23.3.1 and rendering was
                > very smooth. Of course both editors use exactly the same font. Is
                > there any chance that GVim will use equally efficient rendering
                > technique as Emacs? I'm a visually impaired person and this problem
                > has a great meaning for me. As far as I know Emacs uses libXft to
                > render fonts. Maybe lack of libXft support in GVim is the core of the
                > issue?
                >
                > Regards, Mike.

                --
                --
                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.
              • Dominique Pellé
                ... I remember having the same kind of issue years ago and it turned out that I did not install a driver and did not have 3D hardware acceleration. After
                Message 7 of 20 , Nov 13, 2014
                  Peter Robinson <thaldyron@...> wrote:

                  > I'm having the same problem with the most recent GVim under certain scenarios:
                  > 1. In MacOS, GVim (or rather MVim) works perfectly, no flickering whatsoever.
                  > 2. In Linux (on the same machine), the flickering in GVim is very noticeable when using fast scrolling, for the exact same file that works smoothly using MVim in MacOs. If I open the same file in a console using vim, there is no flickering.
                  > I also compiled the latest GVim with motif instead of GTK2 but the problem persists, which tells me that the issue must be in the way the redrawing of the screen is handled (that works fine with Quartz (MacOS) but has performance issues with X).
                  >
                  > PS: I've also tried to recompile with the line "redraw_later(NOT_VALID);" in move.c as suggested earlier, but this didn't have any noticeable effect.


                  I remember having the same kind of issue years ago
                  and it turned out that I did not install a driver and did
                  not have 3D hardware acceleration. After installing the
                  driver on Linux, Vim no longer flickered. I don't
                  know if it's the same problem, but what's the output
                  of running "glxinfo | grep rendering"? It should say:

                  $ glxinfo | grep rendering
                  direct rendering: Yes

                  Regards

                  PS: please bottom post in the vim mailing list.

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