diff --git a/ChangeLog b/ChangeLog index 7fcc4c61..65f2c86f 100644 --- a/ChangeLog +++ b/ChangeLog @@ -6,6 +6,7 @@ terminator 0.96: * Optimise various low level components so they are dramatically faster (Stephen Boddy) * Fix various bugs (Stephen Boddy) + * Fix cursor colours (#700969) and a cursor blink issue (Tony Baker) terminator 0.95: * Add a configuration option to enable a DBus server diff --git a/terminatorlib/terminal.py b/terminatorlib/terminal.py index 72ea1bf9..940dbd23 100755 --- a/terminatorlib/terminal.py +++ b/terminatorlib/terminal.py @@ -605,7 +605,14 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) if color: palette.append(gtk.gdk.color_parse(color)) self.vte.set_colors(fgcolor, bgcolor, palette) - if self.config['cursor_color'] != '': + if self.config['cursor_color'] == self.config['foreground_color']: + try: + self.vte.set_color_cursor(None) + except TypeError: + # FIXME: I think this is only necessary because of + # https://bugzilla.gnome.org/show_bug.cgi?id=614910 + pass + elif self.config['cursor_color'] != '': self.vte.set_color_cursor(gtk.gdk.color_parse( self.config['cursor_color'])) if hasattr(self.vte, 'set_cursor_shape'): @@ -665,7 +672,13 @@ for %s (%s)' % (name, urlplugin.__class__.__name__)) dbg('setting background_transparent=False') self.vte.set_background_transparent(False) - self.vte.set_cursor_blinks(self.config['cursor_blink']) + if hasattr(vte, 'VVVVTE_CURSOR_BLINK_ON'): + if self.config['cursor_blink'] == True: + self.vte.set_cursor_blink_mode('VTE_CURSOR_BLINK_ON') + else: + self.vte.set_cursor_blink_mode('VTE_CURSOR_BLINK_OFF') + else: + self.vte.set_cursor_blinks(self.config['cursor_blink']) if self.config['force_no_bell'] == True: self.vte.set_audible_bell(False)