Age | Commit message (Collapse) | Author |
|
|
|
Move the initialization of the different modules from the process module
and instead do the initialization in the main function.
|
|
|
|
|
|
This decouples the render of the view from the process loop and renders
the view in a separate thread.
|
|
Remove the remaining cases of the RenderContext from the input handling
functions and remove the parameter.
|
|
Move the triggering of the external command to the process module and
refactor external editor to use it instead. This also allows the view to
be removed from all modules.
|
|
|
|
|
|
Add a render context to move towards not passing the view into the
modules. The render context currently contains information around the
size of the view.
|
|
Instead of having every module perform a resize of the view_data, return
a mutable reference and have the view do a resize in all cases where
possible.
|
|
This moves the help system out of the process module and into a reusable
component.
|
|
This allows a user to provide a list of key bindings for a particular
action.
|
|
Re-evaluate the configurations for rustfmt, make some changes and
reformat everything. The biggest change is how imports are formatted.
|
|
The project has pushed the limits of what curses can support on Windows
systems. Crossterm has far superior support for creating cross platform
TUI applications.
|
|
|
|
Update the ProcessModule trait to make the handle_input function a
required function on structs that implement the trait.
|
|
|
|
The GitInteractive stuct is one of the oldest structs in the project and
was initially used as a catch-all for any functionality that was shared
across the application. Overtime the functionality of this file has been
moved into the various modules of the project. At this point, the only
thing the struct handles is the direct interactions with the rebase todo
file and it's lines. This finally moves the global stuct into a module.
|
|
The process function from the process module was only being used in the
external editor system. The usage in the external editor system was only
used as a faux on activate hook. Since the existing activate function
can instead be used to perform the same action, the process function can
be removed. This change removes the last usage of the process function
and then completely removes the usage of the process function from the
project.
|
|
The way that Result was used to handle errors in activate does not allow
an error to return the user to another state. This converts the
activate function to use ProcessResult that supports error results and
state change.
|
|
Update the activate function in the process module trait to use anyhow
for error handling and update any usages of the error to use the new
error type.
|
|
The external editor module has not seen any attention in some time and
was showing some warts. This refactors the module to remove some dead
code and unneeded complexity. This allowed for the error process result
to be simplified, view to not be provided to the process function and
for two of the internal states to be removed/combined.
Tests have also been added to ensure that the module works as expected.
|
|
The process module has always been fairly repetitive and adding a new
module required updates to several places in the file. This change
refactors the process module to use dynamic dispatch to call the
functions on the ProcessModule trait dynamically. This required the error,
help and window size error systems to be modified to implement the
ProcessModule. The show commit module has been refactored to use the
error module. And the state and modules have been extracted into their
own Modules struct.
|
|
The error handling module needed to have state provided to it from other
modules, which meant that the other modules needed to understand how the
error module worked. This was awkward and fragile. This moves the error
handling code into the process module and makes it a global system. This
has the advantage of not requiring tracking of the previous state and
allows for the removal of the HandleInputResult struct.
|
|
The help process module always needed to have knowledge of the different
modules in the project, which was very awkward. This updates the help
system to be part of the process module and moves the help data into the
modules. This also allowed the removal of the visual boolean on the List
state, that was only used when rendering the help module.
|
|
The RefCell in the Process module was no longer needed, so remove it.
|
|
This reworks the interaction between the Process and View module.
|
|
I was overzealous in my application of `pub(crate)` in a project that
does not provide an external library. This removes most of the usages of
`pub(crate)`, though I am sure there are more that could be safely
converted to use `pub`.
|
|
|
|
This change updates the usages of `pub` to be the minimum level of
visibility needed. This also required cleaning up some of the use
statements to use a simpler set of imports.
|
|
|
|
|