Nicolas Weber wrote:

> this patch sets the close button state according to "Indicating  
> Changes With the Close Button"  in the Apple HIG ( http:// 
> developer.apple.com/documentation/UserExperience/Conceptual/ 
> OSXHIGuidelines/XHIGWindows/chapter_17_section_3.html ).
> 
> I set the button state in gui_mch_flush(), if a buffer was changed  
> then gui_mch_flush() will probably called...at least I couldn't find  
> a better place to do this :-P

I haven't tried it but it's good to try to make Vim look like other Mac
applications.

The implementation is rather brute force.  I think it won't be difficult
to add a call to where buf->b_changed is set or reset and only update
the info then.  I think it can be done in maketitle(), since that's
where the "+" is added to the window title.  Although perhaps unloading
a changed buffer other than one that's in the current window needs an
extra call.

BTW: Instead of b_changed bufIsChanged() should be used, and only for
loaded buffers.

-- 
At some point in the project somebody will start whining about the need to
determine the project "requirements".  This involves interviewing people who
don't know what they want but, curiously, know exactly when they need it.
                                (Scott Adams - The Dilbert principle)

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

Reply via email to