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

lazyredraw affecting highlight?

Expand Messages
  • Bailey Ling
    Hey all, I m running into a weird issue with rendering the statusline in my plugin vim-airline. I created a minimal vimrc gist here
    Message 1 of 3 , Jul 3, 2013
    • 0 Attachment
      Hey all,

      I'm running into a weird issue with rendering the statusline in my plugin vim-airline. I created a minimal vimrc gist here (https://gist.github.com/bling/7d26e6c63ba0207e657f) that illustrates the problem.

      It appears that if lazyredraw is on, then highlight commands are executed immediately and rendered to the user. If lazyredraw is off (the default), the highlight command is executed (as shown with the echos), but will not update the statusline until the user enters another key.

      It seems counter-intuitive to me because it would seem that the symptoms I'm seeing should be reversed (i.e. having lazyredraw ON should result in what i'm seeing, not the other way around).

      If anyone has any ideas why/how lazyredraw affects rendering it'd be greatly appreciated, as I'd like to fix my plugin to be able to support with and without lazyredraw.

      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/groups/opt_out.
    • Bailey Ling
      It appears that this issue has something to do with using the User1-9 highlight groups. If I define custom highlights it works as expected with/without
      Message 2 of 3 , Jul 4, 2013
      • 0 Attachment
        It appears that this issue has something to do with using the User1-9 highlight groups. If I define custom highlights it works as expected with/without lazyredraw.

        I'm still curious as to why the User1-9 groups do this, so if anyone knows the underlying reason, please let me know.

        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/groups/opt_out.
      • Christian Brabandt
        Hi Bailey! ... I am not sure, why lazyredraw would have that effect, but you shouldn t really change highlighting, while vim is redrawing. It can have nasty
        Message 3 of 3 , Jul 5, 2013
        • 0 Attachment
          Hi Bailey!

          On Mi, 03 Jul 2013, Bailey Ling wrote:

          > Hey all,
          >
          > I'm running into a weird issue with rendering the statusline in my plugin vim-airline. I created a minimal vimrc gist here (https://gist.github.com/bling/7d26e6c63ba0207e657f) that illustrates the problem.
          >
          > It appears that if lazyredraw is on, then highlight commands are executed immediately and rendered to the user. If lazyredraw is off (the default), the highlight command is executed (as shown with the echos), but will not update the statusline until the user enters another key.
          >
          > It seems counter-intuitive to me because it would seem that the symptoms I'm seeing should be reversed (i.e. having lazyredraw ON should result in what i'm seeing, not the other way around).
          >
          > If anyone has any ideas why/how lazyredraw affects rendering it'd be greatly appreciated, as I'd like to fix my plugin to be able to support with and without lazyredraw.

          I am not sure, why lazyredraw would have that effect, but you shouldn't
          really change highlighting, while vim is redrawing. It can have nasty
          side-effects, such that an extra redraw is required. It annoyed me with
          vim-smartusline [https://github.com/molok/vim-smartusline%5d and Bram
          explained the problem here:
          https://groups.google.com/forum/#!msg/vim_dev/uaOe1JgEm4o/eupqNETKH_QJ

          regards,
          Christian
          --
          2 Dinge werden Männer nie verstehen: Gottes Willen und die Frauen.

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