mirror of
https://github.com/kovidgoyal/kitty
synced 2026-07-16 21:45:03 +02:00
diff kitten: Allow theming the selection background/foreground as well
This commit is contained in:
@@ -205,9 +205,17 @@ class DiffHandler(Handler):
|
||||
def init_terminal_state(self):
|
||||
self.cmd.set_line_wrapping(False)
|
||||
self.cmd.set_window_title(main.title)
|
||||
self.cmd.set_default_colors(self.opts.foreground, self.opts.background, self.opts.foreground)
|
||||
self.cmd.set_default_colors(
|
||||
fg=self.opts.foreground, bg=self.opts.background,
|
||||
cursor=self.opts.foreground, select_fg=self.opts.select_fg,
|
||||
select_bg=self.opts.select_bg)
|
||||
self.cmd.set_cursor_shape('bar')
|
||||
|
||||
def finalize(self):
|
||||
self.cmd.set_default_colors()
|
||||
self.cmd.set_cursor_visible(True)
|
||||
self.cmd.set_scrolling_region()
|
||||
|
||||
def initialize(self):
|
||||
self.init_terminal_state()
|
||||
self.set_scrolling_region()
|
||||
@@ -217,10 +225,6 @@ class DiffHandler(Handler):
|
||||
def enforce_cursor_state(self):
|
||||
self.cmd.set_cursor_visible(self.state > DIFFED)
|
||||
|
||||
def finalize(self):
|
||||
self.cmd.set_cursor_visible(True)
|
||||
self.cmd.set_scrolling_region()
|
||||
|
||||
def draw_lines(self, num, offset=0):
|
||||
offset += self.scroll_pos
|
||||
image_involved = False
|
||||
|
||||
Reference in New Issue
Block a user