On 25/11/08 03:10, Ben Schmidt wrote:
> anhnmncb wrote:
>> Yes, I still want to have a function that can let me confirm when quiting
>> even all
>> buffers have saved.
>>
>> Actually, I want map it to a key, so when I'm away, I can call it to
>> prevent someone from closing my gvim by accident.
>>
>> I know mksession is a better solution, but I still want a function like
>> that :)
>
> I think the only way you could do it would be to compile your own Vim
> and make some changes to the source code to disable or ignore the close
> button. It's quite probably not hard--just have to find the spot where
> the close event is handled and ignore it instead, so the close button
> does nothing. Then always quit Vim using :q or the menus. So if you
> really want this feature, I'd say that's the way to go.
>
> Ben.
I suspect that in that case the OS might (like mine does) pop an alert:
Program "gvim" is not responding. Do you want to terminate it?
[[ Terminate ]] [ Continue ]
giving the option to the user to _kill_ gvim. All unsaved data will be
lost, the viminfo won't be saved, etc.
Best regards,
Tony.
--
Issawi's Laws of Progress:
The Course of Progress:
Most things get steadily worse.
The Path of Progress:
A shortcut is the longest distance between two points.
--~--~---------~--~----~------------~-------~--~----~
You received this message from the "vim_use" maillist.
For more information, visit http://www.vim.org/maillist.php
-~----------~----~----~----~------~----~------~--~---