From e7ee6d9e26bb5d3ad1e55dae748e156e2b48fd51 Mon Sep 17 00:00:00 2001 From: Kovid Goyal Date: Mon, 31 Jan 2022 08:17:40 +0530 Subject: [PATCH] A new action to clear the current selection Fixes #4600 --- docs/changelog.rst | 2 ++ kitty/window.py | 4 ++++ 2 files changed, 6 insertions(+) diff --git a/docs/changelog.rst b/docs/changelog.rst index 1ae250332..111134bde 100644 --- a/docs/changelog.rst +++ b/docs/changelog.rst @@ -107,6 +107,8 @@ Detailed list of changes rather than a plane. This means the first and last window are considered neighbors (:iss:`4494`) +- A new action to clear the current selection (:iss:`4600`) + - Shell integration: fish: Fix cursor shape not working with fish's vi mode (:iss:`4508`) diff --git a/kitty/window.py b/kitty/window.py index 2ae72652f..a60dfaf51 100644 --- a/kitty/window.py +++ b/kitty/window.py @@ -1178,6 +1178,10 @@ class Window: else: open_url(text, cwd=cwd) + @ac('cp', 'Clear the current selection') + def clear_selection(self) -> None: + self.screen.clear_selection() + @ac('sc', 'Scroll up by one line') def scroll_line_up(self) -> None: if self.screen.is_main_linebuf():