aaronjanse / 3mux

Terminal multiplexer inspired by i3
MIT License
1.82k stars 46 forks source link

3mux running vim with a theme is broken #25

Open hugohabicht01 opened 4 years ago

hugohabicht01 commented 4 years ago

What I did

I tried running a instance of vim inside of 3mux. I just opened a simple bash file and all that got displayed was a bunch of jibberish.

System

I use neovim with a theme and airline inside of kitty. In alacritty I can atleast see some colors, but a places where they shouldnt be. So far I havent found a terminal where everything looks fine with my neovim setup. The same for vim.

aaronjanse commented 4 years ago

Hmmm. I cannot reproduce this with the OneDark theme and default vim-airline. Are your (neo)vim dotfiles open source?

hugohabicht01 commented 4 years ago

This is how it looks like: https://imgur.com/a/g1UzqWi This is my current init.vim: https://pastebin.com/XpCrcULC I'm using the Oceanic Next colorscheme and vim-airline with with powerline fonts enabled.

hugohabicht01 commented 4 years ago

https://imgur.com/a/KrLlI4L This is how it's supposed to look

aaronjanse commented 4 years ago

Thanks for the screenshots! I recently updated 3mux's parser to deal with these situations.

Would you mind updating with go get -u github.com/aaronjanse/3mux and reporting back on whether your Vim setup works better?

I'm still working on making the Vim background color fill the entire screen (not just behind characters). If you have any other issues, please run 3mux with the --logs flag then send me ./logs.txt. Another screenshot would also be greatly appreciated if you're still having issues.

Thanks!

hugohabicht01 commented 4 years ago

Ok, deinstalled the AUR package, installed via the go package manager. Now I can't even open neovim, this is the output: `Error during: pane.go (vt.ProcessStream) runtime error: index out of range [0] with length 0 Tiling state: Universe0) goroutine 12 [running]: runtime/debug.Stack(0x55615d4ab600, 0xc000010018, 0xc000043ac0) /usr/lib/go/src/runtime/debug/stack.go:24 +0x9f main.fatalShutdownNow(0xc000e66000, 0x4e) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/main.go:125 +0x16e main.newTerm.func4.1() /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/pane.go:112 +0xb5 panic(0x55615d4972a0, 0xc000e4e080) /usr/lib/go/src/runtime/panic.go:969 +0x16a github.com/aaronjanse/3mux/vterm.(VTerm).handleSGR(0xc000e46160, 0xc00009e3e4, 0xc) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/sgr.go:19 +0x8b0 github.com/aaronjanse/3mux/vterm.(VTerm).DispatchCsi(0xc000e46160) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/states.go:316 +0xf51 github.com/aaronjanse/3mux/vterm.(VTerm).StateCsiParam(0xc000e46160, 0x6d) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/states.go:139 +0x12e github.com/aaronjanse/3mux/vterm.(VTerm).Anywhere(0xc000e46160, 0x10000006d) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/states.go:73 +0x264 github.com/aaronjanse/3mux/vterm.(VTerm).ProcessStream(0xc000e46160) Error during: pane.go (vt.ProcessStream) runtime error: index out of range [0] with length 0 Tiling state: Universe[0](Workspace(HSplit[0](Term[91x24]))) goroutine 15 [running]: runtime/debug.Stack(0x55a889bb7600, 0xc000010018, 0xc000045ac0) /usr/lib/go/src/runtime/debug/stack.go:24 +0x9f main.fatalShutdownNow(0xc001b70000, 0x4e) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/main.go:125 +0x16e main.newTerm.func4.1() /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/pane.go:112 +0xb5 panic(0x55a889ba32a0, 0xc000014300) /usr/lib/go/src/runtime/panic.go:969 +0x16a github.com/aaronjanse/3mux/vterm.(VTerm).handleSGR(0xc000e38160, 0xc000195034, 0xc) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/sgr.go:19 +0x8b0 github.com/aaronjanse/3mux/vterm.(VTerm).DispatchCsi(0xc000e38160) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/states.go:316 +0xf51 github.com/aaronjanse/3mux/vterm.(VTerm).StateCsiParam(0xc000e38160, 0x6d) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/states.go:139 +0x12e github.com/aaronjanse/3mux/vterm.(VTerm).Anywhere(0xc000e38160, 0x10000006d) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/states.go:73 +0x264 github.com/aaronjanse/3mux/vterm.(*VTerm).ProcessStream(0xc000e38160) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/vterm/states.go:39 +0x3d main.newTerm.func4(0xc000e38160) /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/pane.go:115 +0x4f created by main.newTerm /home/linuxer/GolandProjects/pkg/mod/github.com/aaronjanse/3mux@v0.1.1/pane.go:109 +0x1f7

Please submit a bug report with this stack trace to https://github.com/aaronjanse/3mux/issues And this is the content of logs.txt: 2020/04/15 19:12:26 HARD REFRESH 2020/04/15 19:12:26 ? GROUND  (62211) 2020/04/15 19:12:26 ? GROUND  (61461) 2020/04/15 19:12:26 ? GROUND  (62211) 2020/04/15 19:12:26 ? GROUND  (61461) 2020/04/15 19:12:26 ? DECSET 1 2020/04/15 19:12:26 ? DECSET 2004 2020/04/15 19:12:28 ? GROUND  (62211) 2020/04/15 19:12:28 ? GROUND  (61461) 2020/04/15 19:12:28 ? GROUND  (7) 2020/04/15 19:12:31 ? DECRST 2004 2020/04/15 19:12:31 ? DECRST 1 2020/04/15 19:12:31 ? CSI 22;0;0 t 2020/04/15 19:12:31 ? DECSET 1 2020/04/15 19:12:31 ? DECSET 2004 2020/04/15 19:12:31 ? DECSET 25 2020/04/15 19:12:32 ? DECRST 25 2020/04/15 19:12:32 ? ESC ( 2020/04/15 19:12:32 ? DECSET 1004 2020/04/15 19:12:32 ? CSI 1 q 2020/04/15 19:12:32 ? CSI 1 q ` Thanks for your help so far

aaronjanse commented 4 years ago

Oh wow, this is definitely weird. On the dev branch, I added a statement to prevent that panic. Would you mind trying it via go get -u github.com/aaronjanse/3mux@dev?

Thanks for your help so far

Thank you for helping me debug this!

hugohabicht01 commented 4 years ago

` go: github.com/aaronjanse/3mux upgrade => v0.1.1 go: github.com/creack/pty upgrade => v1.1.9 go: golang.org/x/sys upgrade => v0.0.0-20200413165638-669c56c373c4 go: golang.org/x/crypto upgrade => v0.0.0-20200414173820-0848c9571904

github.com/aaronjanse/3mux

loadinternal: cannot find runtime/cgo `

Thats the output of it, so I reckon that the upgrade fails... I've already duckduckgoed this error, but nothing seems to be useful in this case as I don't try to crosscompile...

aaronjanse commented 4 years ago

Thats the output of it, so I reckon that the upgrade fails... I've already duckduckgoed this error, but nothing seems to be useful in this case as I don't try to crosscompile...

Oh, this is weird. Also, hello fellow DDGer!

I've released v0.2.0 on master. A large portion of the release was dedicated to fixing this issue.

hugohabicht01 commented 4 years ago

What I did now is, that I manually updated all the dependencies instead of using the -u flag. Now I on you latest release and there isn't a panic anymore. But colors don't get displayed correctly in kitty(no colors whatsoever) image In alacritty I get colors but they are not completly correct: image This is how it should look: image In all other terminals I've tested(st, xfceterminal) it looks the same like in alacritty. Thanks for your help and support so far!

aaronjanse commented 4 years ago

Whoops, this seems to be specific to Oceanic Next's dark theme. Thanks for the screenshots!

aaronjanse commented 4 years ago

I've reproduced this issue and figured out the problem. Fix probably later today for v0.2.1

aaronjanse commented 4 years ago

Would you mind checking if the latest commit on master works?

hugohabicht01 commented 4 years ago

YEAAAH it works! Thanks for this fix thats great. Now all the colors get displayed correctly. Just two things don't work so far which is the support for powerline and ligatures and redrawing some stuff(opening a split in vim and closing it again). Then some stuff stays where it isn't supposed to be: image And another thing I noticed(isn't a bug) is the fonts looks a bit thinner(just a tiny bit) than normally. Here the comparison: image But thanks for you fixes!

aaronjanse commented 4 years ago

YEAAAH it works! Thanks for this fix thats great

Awesome! Thanks for the helpful screenshots!

Just two things don't work so far which is the support for powerline and ligatures and redrawing some stuff(opening a split in vim and closing it again).

Fixing ligatures does not sound fun, but I'll work on that anyway. I'm working on reproducing the vim split issue.

And another thing I noticed(isn't a bug) is the fonts looks a bit thinner(just a tiny bit) than normally.

I've noticed the same thing. Apparently it was a bug: bold wasn't being displayed. I've pushed a fix to master, but I'll probably bundle the bold fix with something else before creating another release.