Age | Commit message (Collapse) | Author |
|
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.
|
|
|
|
|
|
|
|
|
|
Add Exit key input support and allow it to trigger an application abort.
|
|
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.
|
|
This greatly improves the handling of keyboard input by ensuring that
all Pancurses inputs are properly accounted for. This resulted in
several missing keys being added. Also, provide a standard function for
handling the scrolling of view data and add scrolling support to the
error display. Also add End and Home support to the edit module.
|
|
This replaces the final usages of String errors in the project. This
required a significant amount of rework in the process testutils, as the
anyhow Error is now used in the ProcessResult struct instead of a
String.
|
|
Replace the String errors in the process module with the anyhow library.
|
|
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 main application struct uses String errors, which make it difficult
to provide context on errors. This updates the struct to provide errors
with anyhow and fixes any references that used to depend on the String
errors. While working on the code, several poor usages of match have
been replaced with `map_or*`, `unwrap_or*` chains.
|
|
|
|
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 window size error never really worked as a separate module, so this
change moves that functionality into the process module.
|
|
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 render tests for the confirm abort/rebase modules required too much
knowledge of how the Curses interface rendered data. This resulted in
fragile tests that would break if the underlying curses interface
changed. This updates those tests to instead test against a test render
output that has no dependency on Curses.
|
|
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.
|
|
The Edit module is the final module that is not using the ViewData. This
adds a raw content value to the ViewData that will generated wrapped
content lines. The Edit module uses this new functionality to remove the
raw renders from the module.
|
|
This changes the Exiting module to use the ViewData struct over a raw
render call.
|
|
This updates the Window Size Error module to use the ViewData struct
over a direct view render.
|
|
The Error module was manually rendering the view with a render function.
This change converts the module to use the ViewData struct and remove
the need for a custom render function.
|
|
The confirm prompts were still using the raw view render function. This
adds support for prompts for the ViewData and draw_view_data functions
and updates the usage of the prompts to use the ViewData struct instead.
|
|
There were several places that borrows were occurring on values that did
not require another borrow. This removes the extra unneeded borrows.
|
|
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 refactors and improves the show commit module. This change
added:
- key bindings/help displayed on the last line
- list of number of files changed as well as the number of additions and
deletions
- git configuration for renames, rename_limit and copies now respected
- full help page
This change refactored:
- input handling to be specific to the show commit module
- rewritten how git diff information is queried from the git2-rs
bindings
- new ViewDataBuilder struct for building the view lines
|
|
This updates the configuration to add a `GitConfig` struct that contains
the configuration values from git.
|
|
This change changes the input configuration to nest the inputs under a
new struct called `key_bindings`. This new struct is now injected in
place of the full configuration object where possible.
|
|
The full configuration object is passed to the external editor module
when only the external editor value is used. This change injects the
editor value instead of the full configuration instance.
|
|
This updates the view text rendering system to render data based on a
data structure instead of having each module have to manually render the
required text. The new data structure is based on the data struct that
was created for the show_commit module, but has been expanded to provide
additional functionality and performance benefits. The new rendering
system has been implemented for the help, list and show_commit modules.
Additionally tests have been added to the view module to ensure that
this new functionality performs as expected.
|
|
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.
|
|
|
|
|
|
|
|
|