Skip to content

Commit

Permalink
Add pre-check for untracked files to gs_line_history
Browse files Browse the repository at this point in the history
  • Loading branch information
kaste committed May 2, 2024
1 parent 1158bb1 commit 44fde71
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions core/commands/line_history.py
Original file line number Diff line number Diff line change
Expand Up @@ -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.")

Expand Down

0 comments on commit 44fde71

Please sign in to comment.