]> code.delx.au - gnu-emacs/commitdiff
(turn_on_face): In standout mode apply specified
authorJuri Linkov <juri@jurta.org>
Thu, 30 Jun 2005 14:57:50 +0000 (14:57 +0000)
committerJuri Linkov <juri@jurta.org>
Thu, 30 Jun 2005 14:57:50 +0000 (14:57 +0000)
fg to bg, and specified bg to fg (this makes the logic of
inversion on terminal consistent with X).

src/term.c

index c0eb7be8d56c00cb1f690ba1dfa86e2124ba0a08..452427f6ddcf883a2f9c76fd03b30740fb483b95 100644 (file)
@@ -2005,14 +2005,20 @@ turn_on_face (f, face_id)
 
       if (fg >= 0 && TS_set_foreground)
        {
-         p = tparam (TS_set_foreground, NULL, 0, (int) fg);
+         if (standout_mode)
+           p = tparam (TS_set_background, NULL, 0, (int) fg);
+         else
+           p = tparam (TS_set_foreground, NULL, 0, (int) fg);
          OUTPUT (p);
          xfree (p);
        }
 
       if (bg >= 0 && TS_set_background)
        {
-         p = tparam (TS_set_background, NULL, 0, (int) bg);
+         if (standout_mode)
+           p = tparam (TS_set_foreground, NULL, 0, (int) bg);
+         else
+           p = tparam (TS_set_background, NULL, 0, (int) bg);
          OUTPUT (p);
          xfree (p);
        }