jesseduffield / jesseduffield/lazygit
`o` ("open file") fails and makes lazygit crash
- Dominant language
- Go
- Stars
- 82.4k
- Forks
- 3k
- Avg merge
- 2d 18h
- Merged PRs (30d)
- 19
Description
**Describe the bug**
A clear and concise description of what the bug is.
Using `o` which is `open file` in "Patch" or "Unstaged Changes" sections fails and makes lazygit crash
**To Reproduce**
Steps to reproduce the behavior:
1. Go to 'Commits' Section
2. `Enter` and `Enter` again into the `Patch` section
3. `o` to open the file
4. it fails and crashes
or
1. Go to 'Files' Section
2. `Enter` into the `Unstaged Changes` section
3. `o` to open the file
4. it fails and crashes
**Expected behavior**
A clear and concise description of what you expected to happen.
`o` should be handled correctly
**Screenshots**
If applicable, add screenshots to help explain your problem.

**Desktop (please complete the following information):**
- OS: [e.g. Windows] `Manjaro-Linux`
- Lazygit Version [e.g. v0.1.45] `v0.26.1` installed from `go get u`
- The last commit id if you built project from sources (run : ```git-rev parse HEAD```)
**Additional context**
Add any other context about the problem here.
```
[chz@chz Dotfiles.d]$ lazygit
2021/03/14 18:17:18 An error occurred! Please create an issue at https://github.com/jesseduffield/lazygit/issues
*exec.ExitError exit status 4
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/utils/errors.go:13 (0x64004f)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:203 (0x640055)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:96 (0x63f294)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:171 (0x6402dc)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:171 (0x6402a6)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/line_by_line_panel.go:356 (0x9b86e5)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/line_by_line_panel.go:415 (0x98e1b4)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/line_by_line_panel.go:336 (0x98de4e)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/view_helpers.go:404 (0x9c1be6)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:963 (0x92409d)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:943 (0x92409e)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:863 (0x923e1d)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:551 (0x9224a6)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:499 (0x921e69)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/gui.go:507 (0x96fb05)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/gui.go:520 (0x96ffe8)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/app/app.go:240 (0x9ced4b)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/main.go:126 (0x9d065b)
/usr/lib/go/src/runtime/proc.go:225 (0x43a696)
main: fn()
/usr/lib/go/src/runtime/asm_amd64.s:1371 (0x46e3c1)
goexit: BYTE $0x90 // NOP
[chz@chz Dotfiles.d]$ lazygit
2021/03/14 18:17:29 An error occurred! Please create an issue at https://github.com/jesseduffield/lazygit/issues
*exec.ExitError exit status 4
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/utils/errors.go:13 (0x64004f)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:203 (0x640055)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:96 (0x63f294)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:171 (0x6402dc)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/commands/oscommands/os.go:171 (0x6402a6)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/line_by_line_panel.go:356 (0x9b86e5)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/line_by_line_panel.go:415 (0x98e1b4)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/line_by_line_panel.go:336 (0x98de4e)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/view_helpers.go:404 (0x9c1be6)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:963 (0x92409d)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:943 (0x92409e)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:863 (0x923e1d)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:551 (0x9224a6)
/home/chz/.go/pkg/mod/github.com/jesseduffield/gocui@v0.3.1-0.20210208224444-2eecee85583d/gui.go:499 (0x921e69)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/gui.go:507 (0x96fb05)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/gui/gui.go:520 (0x96ffe8)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/pkg/app/app.go:240 (0x9ced4b)
/home/chz/.go/pkg/mod/github.com/jesseduffield/lazygit@v0.26.1/main.go:126 (0x9d065b)
/usr/lib/go/src/runtime/proc.go:225 (0x43a696)
main: fn()
/usr/lib/go/src/runtime/asm_amd64.s:1371 (0x46e3c1)
goexit: BYTE $0x90 // NOP
```
Contributor guide
Assessment
This issue has not been assessed yet.