@@ -25,9 +25,12 @@ data XTermColor = XTermColor
25-- Regardless of what is output the text encoding is assumed to be UTF-8
25-- Regardless of what is output the text encoding is assumed to be UTF-8
26terminal_instance :: ( Applicative m, MonadIO m ) => String -> m XTermColor
26terminal_instance :: ( Applicative m, MonadIO m ) => String -> m XTermColor
27terminal_instance variant = do
27terminal_instance variant = do
28+ -- If the terminal variant is xterm-color use xterm instead since, more often than not,
29+ -- xterm-color is broken.
30+ let variant' = if variant == "xterm-color" then "xterm" else variant
28 flushed_put set_utf8_char_set
31 flushed_put set_utf8_char_set
29− t <- TerminfoBased.terminal_instance variant >>= new_terminal_handle
32+ t <- TerminfoBased.terminal_instance variant' >>= new_terminal_handle
30− return $ XTermColor variant t
33+ return $ XTermColor variant' t
32flushed_put :: MonadIO m => String -> m ()
35flushed_put :: MonadIO m => String -> m ()
33flushed_put str = do
36flushed_put str = do