Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error if terminal is resized while in external command #33

Open
ericfreese opened this issue Dec 1, 2017 · 0 comments
Open

Error if terminal is resized while in external command #33

ericfreese opened this issue Dec 1, 2017 · 0 comments

Comments

@ericfreese
Copy link
Owner

Repro:

  • Set up key-binding to run vim
  • Run rat and hit key-binding to open vim
  • Resize terminal while vim is open
  • Exit vim
  • See error below
panic: runtime error: makeslice: cap out of range

goroutine 1 [running]:
github.com/ericfreese/rat/lib.(*buffer).StyledLines(0xc420010500, 0x0, 0xfffffffffffff
	/home/ericfreese/golang/src/github.com/ericfreese/rat/lib/buffer.go:83 +0x7d
github.com/ericfreese/rat/lib.(*cmdPager).drawContent(0xc4200e2580)
	/home/ericfreese/golang/src/github.com/ericfreese/rat/lib/pager.go:136 +0x11f
github.com/ericfreese/rat/lib.(*cmdPager).Render(0xc4200e2580)
	/home/ericfreese/golang/src/github.com/ericfreese/rat/lib/pager.go:144 +0x50
github.com/ericfreese/rat/lib.(*pagerStack).Render(0xc42005e200)
	/home/ericfreese/golang/src/github.com/ericfreese/rat/lib/pager_stack.go:170 +
github.com/ericfreese/rat/lib.(*widgetStack).Render(0xc42000c1c0)
	/home/ericfreese/golang/src/github.com/ericfreese/rat/lib/widget.go:68 +0x45
github.com/ericfreese/rat/lib.render()
	/home/ericfreese/golang/src/github.com/ericfreese/rat/lib/rat.go:168 +0x41
github.com/ericfreese/rat/lib.Run()
	/home/ericfreese/golang/src/github.com/ericfreese/rat/lib/rat.go:93 +0x6c
main.main()
	/home/ericfreese/golang/src/github.com/ericfreese/rat/main.go:65 +0x1df
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant