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

Re: How to redraw the whole vim screen after splitting new windows?

Expand Messages
  • Tony Mechelynck
    ... I can reproduce this on Vim 7.2.148. After the steps mentioned, three windows are visible, like this ... with the following numbers displayed: left (top)
    Message 1 of 10 , Apr 1, 2009
    • 0 Attachment
      On 31/03/09 12:42, Clark J. Wang wrote:
      >
      > On Mar 30, 10:38 pm, Charles Campbell<Charles.E.Campb...@...>
      > wrote:
      >> Clark J. Wang wrote:
      >>> On Mar 27, 7:16 pm, "Clark J. Wang"<dearv...@...> wrote:
      >>
      >>>> I included %{winnr()} in the var `statusline'. But sometimes when I
      >>>> splitted new windows the winnr() string on screen was not updated
      >>>> (try :vsplit and then :split). So I want to call `redraw' when I split
      >>>> new windows but I failed to find an autocmd for that.
      >>
      >>> Any idea?
      >>
      >> Hello:
      >>
      >> I don't see any problems with %{winnr()}. I'm normally use a rather
      >> more involved statusline setting than just %{winnr()}, but with just
      >>
      >> :set stl=%{winnr()}
      >> :vsplit
      >> :split
      >>
      >> the window numbers are all updated properly. I then used:
      >>
      >> vim -u NONE -N
      >> :set nocp
      >> :filetype plugin on
      >> :set stl=%{winnr()}
      >> :vsplit
      >> :split
      >>
      >> and, again, all the window numbers are updated properly (without
      >> recourse to ctrl-l or :redraw).
      >>
      >> So: please give a detailed sequence of commands that causes a lack of
      >> updated status line(s), preferably using vim -u NONE -N to avoid any
      >> entanglements with your current .vimrc settings.
      >>
      >> Regards,
      >> Chip Campbell
      >
      > The following steps can reproduce the issue for vim 7.2.69:
      >
      > vim -u NONE -N
      > :set laststatus=2
      > :set statusline=%{winnr()}
      > :vsplit
      > :split
      >
      > I tested with an old vim-6.3.30 on Fedora 3 but it worked fine so
      > different versions of vim behave differently.

      I can reproduce this on Vim 7.2.148. After the steps mentioned, three
      windows are visible, like this

      ----------------------------
      | | |
      | | |
      | | |
      | | |
      |-------------| |
      | | |
      | | |
      | | |
      | | |
      ----------------------------

      with the following numbers displayed: left (top) 1, left (bottom) 2,
      right 2. After hitting Ctrl-L, the right-side windows gets number 3.

      This is a GUI-enabled (GTK2/Gnome2) Huge build, and I see the same bug
      in both Console and GUI modes, but not if I reverse the order of the
      ":vsplit" and ":split" commands.

      ":set nocp" is not necessary, since that's the purpose of the -N switch.
      With or without --noplugin makes no difference.


      Best regards,
      Tony.
      --
      If I traveled to the end of the rainbow
      As Dame Fortune did intend,
      Murphy would be there to tell me
      The pot's at the other end.
      -- Bert Whitney

      --~--~---------~--~----~------------~-------~--~----~
      You received this message from the "vim_use" maillist.
      For more information, visit http://www.vim.org/maillist.php
      -~----------~----~----~----~------~----~------~--~---
    Your message has been successfully submitted and would be delivered to recipients shortly.