From 44fde7128567a737b949a2ef655e87ab62babb6f Mon Sep 17 00:00:00 2001 From: herr kaste Date: Mon, 29 Apr 2024 12:23:45 +0200 Subject: [PATCH] Add pre-check for untracked files to `gs_line_history` --- core/commands/line_history.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/commands/line_history.py b/core/commands/line_history.py index 49d9c70b9..6777ea75a 100644 --- a/core/commands/line_history.py +++ b/core/commands/line_history.py @@ -61,6 +61,10 @@ def from_ordinary_view(self, view, window): flash(view, "Not available for unsaved files.") return + if self.is_probably_untracked_file(file_path): + flash(view, "Not available for untracked files.") + return + if view.is_dirty(): flash(view, "Hint: For unsaved files the line selection is probably not correct.")