Philippe Fremy wrote:

> I've noticed that after applying setModified through the netbeans
> interface, the tab bar, status bar and title are not updated to reflect
> the changed modified status.
> 
> The proposed patch fixes that. I am a beginner in vim development, so
> tell me if it's not the correct way to get the gui updated.

Thanks for the patch.  I think it makes sense to check if the modified
flag actually changed.  How about this patch instead:


*** ../vim-7.1.298/src/netbeans.c       Sun Mar 16 16:02:47 2008
--- src/netbeans.c      Tue May 27 21:14:12 2008
***************
*** 1974,1986 ****
        }
        else if (streq((char *)cmd, "setModified"))
        {
            if (buf == NULL || buf->bufp == NULL)
            {
  /*            EMSG("E646: null bufp in setModified"); */
                return FAIL;
            }
            if (streq((char *)args, "T"))
!               buf->bufp->b_changed = 1;
            else
            {
                struct stat     st;
--- 1978,1993 ----
        }
        else if (streq((char *)cmd, "setModified"))
        {
+           int prev_b_changed;
+ 
            if (buf == NULL || buf->bufp == NULL)
            {
  /*            EMSG("E646: null bufp in setModified"); */
                return FAIL;
            }
+           prev_b_changed = buf->bufp->b_changed;
            if (streq((char *)args, "T"))
!               buf->bufp->b_changed = TRUE;
            else
            {
                struct stat     st;
***************
*** 1990,1998 ****
                if (buf->bufp->b_ffname != NULL
                        && mch_stat((char *)buf->bufp->b_ffname, &st) >= 0)
                    buf_store_time(buf->bufp, &st, buf->bufp->b_ffname);
!               buf->bufp->b_changed = 0;
            }
            buf->modified = buf->bufp->b_changed;
  /* =====================================================================*/
        }
        else if (streq((char *)cmd, "setModtime"))
--- 1997,2016 ----
                if (buf->bufp->b_ffname != NULL
                        && mch_stat((char *)buf->bufp->b_ffname, &st) >= 0)
                    buf_store_time(buf->bufp, &st, buf->bufp->b_ffname);
!               buf->bufp->b_changed = FALSE;
            }
            buf->modified = buf->bufp->b_changed;
+           if (prev_b_changed != buf->bufp->b_changed)
+           {
+ #ifdef FEAT_WINDOWS
+               check_status(buf);
+               redraw_tabline = TRUE;
+ #endif
+ #ifdef FEAT_TITLE
+               maketitle();
+ #endif
+               update_screen(0);
+           }
  /* =====================================================================*/
        }
        else if (streq((char *)cmd, "setModtime"))

-- 
SOLDIER: What?  Ridden on a horse?
ARTHUR:  Yes!
SOLDIER: You're using coconuts!
                 "Monty Python and the Holy Grail" PYTHON (MONTY) PICTURES LTD

 /// Bram Moolenaar -- [EMAIL PROTECTED] -- http://www.Moolenaar.net   \\\
///        sponsor Vim, vote for features -- http://www.Vim.org/sponsor/ \\\
\\\        download, build and distribute -- http://www.A-A-P.org        ///
 \\\            help me help AIDS victims -- http://ICCF-Holland.org    ///

--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_dev" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---

Raspunde prin e-mail lui