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

[bug] Fix Tmux Config Parsing #55

Open
wants to merge 3 commits into
base: master
Choose a base branch
from

Conversation

coreyja
Copy link
Contributor

@coreyja coreyja commented Apr 16, 2022

Hey again! I've made a few changes in my fork, and wanted to contribute them back! The first one here is a bug fix I ran into with newer versions of tmux

I was running into issues with parsing the my tmux config after a tmux upgrade. Unfortunately I didn't record the version I was upgrading too, for documentation

What I found when digging in was that tmux was reporting a config option that did not have a value. This was breaking the config parsing in muxed.
Since muxed only actually checks for a few config options, and not the value less ones I was finding. The easiest fix seemed to be to default to an empty string value in this case, which this PR implements!

coreyja added 3 commits April 16, 2022 15:17
…ompiler changes. 1.4.5 was reported to work for people on Github so that's what I went with
I was getting this error
```
thread 'main' panicked at 'index out of bounds: the len is 1 but the index is 1', load/src/tmux/config.rs:25:35
```

From looking at the options tmux is printing on my machine I found the
issue was with the `pane-colours` option. Which didn't have a value in
my TMUX. This is while running a potentially pre-release version from
Homebrew

Just making it so we get an empty string if there is no value at least
gets around the panic.

Assuming `muxed` doesn't rely on `pane-colours` it _feels_ like it might
be a reasonable move. We could also not write `pane-colours` at all if
it doesn't have a value.
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

Successfully merging this pull request may close these issues.

1 participant