diff --git a/README.asciidoc b/README.asciidoc index 02e528207..1b78983d7 100644 --- a/README.asciidoc +++ b/README.asciidoc @@ -244,14 +244,13 @@ feature is best illustrated with a link:remote-control.asciidoc[tutorial]. kitty supports scrolling back to view history, just like most terminals. You can use either the <> or the mouse -scroll wheel to do so. However, kitty has an extra, neat feature. Sometimes you -need to explore the scrollback buffer in more detail, maybe search for some +scroll wheel to do so. However, kitty has an extra, neat feature. Sometimes +you need to explore the scrollback buffer in more detail, maybe search for some text or refer to it side-by-side while typing in a follow-up command. kitty allows you to do this by pressing the {sc_show_scrollback} key-combination, -which will open the scrollback buffer in a new window, using your favorite -pager program (which is `less` by default). You can then explore the scrollback -buffer using whatever program you normally use. Colors and text formatting are -preserved. +which will open the scrollback buffer in your favorite pager program (which is +`less` by default). Colors and text formatting are preserved. You can explore +the scrollback pager comfortably within the pager. == Miscellaneous features diff --git a/kitty/boss.py b/kitty/boss.py index 2f65fae68..dbbd59850 100644 --- a/kitty/boss.py +++ b/kitty/boss.py @@ -359,15 +359,12 @@ class Boss: for window_id in tuple(w.id for w in self.window_id_map.values() if getattr(w, 'os_window_id', None) == os_window_id): self.window_id_map.pop(window_id, None) - def display_scrollback(self, data): - if self.opts.scrollback_in_new_tab: - self.display_scrollback_in_new_tab(data) - else: - tab = self.active_tab - if tab is not None: - tab.new_special_window( - SpecialWindow( - self.opts.scrollback_pager, data, _('History'))) + def display_scrollback(self, window, data): + tab = self.active_tab + if tab is not None: + tab.new_special_window( + SpecialWindow( + self.opts.scrollback_pager, data, _('History'), overlay_for=window.id)) def switch_focus_to(self, window_idx): tab = self.active_tab @@ -506,9 +503,3 @@ class Boss: tm = self.active_tab_manager if tm is not None: tm.move_tab(-1) - - def display_scrollback_in_new_tab(self, data): - tm = self.active_tab_manager - if tm is not None: - tm.new_tab(special_window=SpecialWindow( - self.opts.scrollback_pager, data, _('History'))) diff --git a/kitty/config.py b/kitty/config.py index 0e6a8785c..38e436656 100644 --- a/kitty/config.py +++ b/kitty/config.py @@ -251,7 +251,6 @@ type_map = { 'adjust_column_width': adjust_line_height, 'scrollback_lines': positive_int, 'scrollback_pager': shlex.split, - 'scrollback_in_new_tab': to_bool, 'font_size': to_font_size, 'font_size_delta': positive_float, 'focus_follows_mouse': to_bool, diff --git a/kitty/kitty.conf b/kitty/kitty.conf index 8d48b1779..ff28c09a5 100644 --- a/kitty/kitty.conf +++ b/kitty/kitty.conf @@ -90,9 +90,6 @@ scrollback_lines 2000 # handle ANSI escape sequences for colors and text formatting. scrollback_pager less +G -R -# When viewing scrollback in a new window, put it in a new tab as well -scrollback_in_new_tab no - # Wheel scroll multiplier (modify the amount scrolled by the mouse wheel). Use negative # numbers to change scroll direction. wheel_scroll_multiplier 5.0 diff --git a/kitty/window.py b/kitty/window.py index 9b07c9ab5..16318f2b3 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -332,7 +332,7 @@ class Window: # actions {{{ def show_scrollback(self): - get_boss().display_scrollback(self.buffer_as_ansi().encode('utf-8')) + get_boss().display_scrollback(self, self.buffer_as_ansi().encode('utf-8')) def paste(self, text): if text and not self.destroyed: