From 43104e3e15d594e16e108e8540a73416a0a2da8a Mon Sep 17 00:00:00 2001 From: Bjorn Winckler Date: Sun, 2 Sep 2007 13:09:10 +0000 Subject: [PATCH] Visual bg color changed in script instead of in code. git-svn-id: http://macvim.googlecode.com/svn/trunk@226 96c4425d-ca35-0410-94e5-3396d5c13a8f --- MMBackend.m | 16 ---------------- gvimrc | 7 ++++++- 2 files changed, 6 insertions(+), 17 deletions(-) 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 "