diff --git a/MMBackend.m b/MMBackend.m index 6425344864..582fe51c0c 100644 --- a/MMBackend.m +++ b/MMBackend.m @@ -1539,23 +1539,7 @@ enum { - (void)focusChange:(BOOL)on { - // This is a bit of an ugly way to change the selection color. - // TODO: Is there a nicer way to do this? - // TODO: Store selection color and restore it when focus is regained. - char *cmd = on - ? "hi Visual guibg=MacSelectedTextBackgroundColor" - : "hi Visual guibg=MacSecondarySelectedControlColor"; - - do_cmdline_cmd((char_u*)cmd); gui_focus_change(on); - - // TODO: Is all this necessary just to get the highlights to update? - redraw_all_later(CLEAR); - update_screen(NOT_VALID); - setcursor(); - out_flush(); - gui_update_cursor(FALSE, FALSE); - gui_mch_flush(); } - (void)processInputBegin diff --git a/gvimrc b/gvimrc index 513a41f0b3..b7fe90f5b4 100644 --- a/gvimrc +++ b/gvimrc @@ -1,7 +1,7 @@ " System gvimrc file for MacVim " " Maintainer: Björn Winckler -" Last Change: Wed Aug 29 2007 +" Last Change: Sun Sep 02 2007 " " This is a work in progress. If you feel so inclined, please help me improve " this file. @@ -25,6 +25,11 @@ endif set keymodel=startsel +" Change selection color on focus change +au FocusLost * hi Visual guibg=MacSecondarySelectedControlColor +au FocusGained * hi Visual guibg=MacSelectedTextBackgroundColor + + " " Extra menus "