Closed pop closed 4 years ago
Thanks for opening this!
I think loading a view before loading the config makes sense as a fix.
lib.rs
is the entry point, and session::init
is where init.rx
gets loaded. session::blank
is how the initial blank view is created, which is done in lib.rs
after ::init
.
The desired behavior is that a blank view is created only if rx
wasn't started with a file name, eg. rx hero.png
. So the blank view creation is under the if session.views.is_empty()
conditional.
I think the first thing to try would be to just move the blank view creation before the ::init
, and see what happens.
Let me know if you run into any trouble.
@cloudhead That worked! PR open, I'd love some feedback. It's definitely a first draft.
Great, will have a look tomorrow!
~Hmm. I just checked master and this seems like it's still broken. I'm digging into why but we may want to re-open this.~
EDIT: my PATH was messed up and I was using the wrong rx
. Keep this closed. :sweat_smile:
When loading config options from ~/.config/rx/init.rx I'm getting the following errors:
Not every setting triggers this crash, but these do:
Seems like any command that calls
self.active_view_mut()
triggers the crash. Maybe the active view needs to be initialized before config files are loaded?Without those config options set
rx
starts and runs well.I'd love to contribute to the project. If I could get some direction on what changes should be made and where to make them I'd be more than happy to put together a pull request.
System details:
Let me know if you need more system deets.