mirror of
https://github.com/jesseduffield/lazygit.git
synced 2026-10-24 16:59:22 +03:00
If you press `e` on a file of a commit, and a later commit deleted that file, the editor is opened on a path that doesn't exist. Most editors then create it as a new, empty file. This is confusing. The same happens with `o`, and with any other file that the worktree it is opened from doesn't have. An example is a file that is added in a branch that isn't checked out anywhere, since it is opened from the current worktree. Show an error instead of opening the editor. For a range selection in the commit files panel, show it only if none of the selected files exist. Otherwise open the existing ones and leave out the others silently; an error shown only after returning from the editor would come too late to be useful. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>