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

Re: Bug in wincmd?

Expand Messages
  • Yegappan Lakshmanan
    Hi Bram, ... With this patch, I am still seeing the same problem. The :wincmd c closes the incorrect window, while :close closes the correct window. -
    Message 1 of 6 , Jun 24, 2002
      Hi Bram,

      --- Bram Moolenaar <Bram@...> wrote:
      >
      > I wrote:
      >
      > > OK, now I see the problem. What happens is that a ":close" command is
      > > put in the stuff buffer, but this isn't executed until after the
      > > function returns.
      > >
      > > This patch should avoid this problem. I'll look for other commands that
      > > have the same problem.
      >
      > Oops! Trow away that patch, try this one instead:
      >

      With this patch, I am still seeing the same problem. The ":wincmd c"
      closes the incorrect window, while ":close" closes the correct window.

      - Yegappan

      > *** ../../vim61.100/src/window.c Sat Mar 23 12:33:19 2002
      > --- window.c Fri Jun 21 20:13:28 2002
      > ***************
      > *** 144,153 ****
      > #ifdef FEAT_VISUAL
      > reset_VIsual_and_resel(); /* stop Visual mode */
      > #endif
      > ! stuffReadbuff((char_u *)":split #");
      > ! if (Prenum)
      > ! stuffnumReadbuff(Prenum); /* buffer number */
      > ! stuffcharReadbuff('\n');
      > break;
      >
      > /* open new window */
      > --- 144,157 ----
      > #ifdef FEAT_VISUAL
      > reset_VIsual_and_resel(); /* stop Visual mode */
      > #endif
      > ! {
      > ! char_u nbuf[40];
      > !
      > ! STRCPY(nbuf, "split #");
      > ! if (Prenum)
      > ! sprintf((char *)nbuf + 7, "%ld", Prenum);
      > ! do_cmdline_cmd(nbuf);
      > ! }
      > break;
      >
      > /* open new window */
      > ***************
      > *** 178,184 ****
      > #ifdef FEAT_VISUAL
      > reset_VIsual_and_resel(); /* stop Visual mode */
      > #endif
      > ! stuffReadbuff((char_u *)":close\n");
      > break;
      >
      > #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
      > --- 182,188 ----
      > #ifdef FEAT_VISUAL
      > reset_VIsual_and_resel(); /* stop Visual mode */
      > #endif
      > ! do_cmdline_cmd((char_u *)"close");
      > break;
      >
      > #if defined(FEAT_WINDOWS) && defined(FEAT_QUICKFIX)
      > ***************
      > *** 189,195 ****
      > #ifdef FEAT_VISUAL
      > reset_VIsual_and_resel(); /* stop Visual mode */
      > #endif
      > ! stuffReadbuff((char_u *)":pclose\n");
      > break;
      >
      > /* cursor to preview window */
      > --- 193,199 ----
      > #ifdef FEAT_VISUAL
      > reset_VIsual_and_resel(); /* stop Visual mode */
      > #endif
      > ! do_cmdline_cmd((char_u *)"pclose");
      > break;
      >
      > /* cursor to preview window */
      >


      __________________________________________________
      Do You Yahoo!?
      Yahoo! - Official partner of 2002 FIFA World Cup
      http://fifaworldcup.yahoo.com
    Your message has been successfully submitted and would be delivered to recipients shortly.