summaryrefslogtreecommitdiffstats
path: root/src/process/help.rs
AgeCommit message (Collapse)Author
2021-03-23Componentize the help systemTim Oram
This moves the help system out of the process module and into a reusable component.
2021-03-07Add support for multiple key bindingsTim Oram
This allows a user to provide a list of key bindings for a particular action.
2021-02-24Adding missing semicolons at end of linesTim Oram
There were a handful of places that should have had semicolons at the end of the line, but it was missing.
2021-02-04Update rustfmt configuration with new optionsTim Oram
Re-evaluate the configurations for rustfmt, make some changes and reformat everything. The biggest change is how imports are formatted.
2021-01-27Rewrite display and input to use CrosstermTim Oram
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.
2021-01-27Add mutable to cursesTim Oram
2021-01-27Add Size struct and refactorTim Oram
2020-12-22Improve test render of paddingTim Oram
Previously the render of padding in tests would strip any default padding from the end of lines, but fully print non-default padding. This change keeps the stripping of default padding, but outputs a token version of other types of padding. A test in process:help was also updated to use the new type of padding.
2020-11-22Use TestContext functions in testsTim Oram
A few cases of process module tests where directly calling functions that should be using the TestContext wrappers.
2020-11-18Add tests for process::help and fix some issuesTim Oram
2020-11-13Replace ViewData::setContent with view linesTim Oram
This replaces the two uses of ViewData::setContent with view lines.
2020-10-29Move git interactive to todo file moduleTim Oram
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.
2020-10-22Use ViewLine::from trait instead of ViewLine::newTim Oram
The From trait was meant to handle conversion from one type to another, and the ViewLine struct did not take advantage of it. This removes the ViewLine::new function and replaces the existing usages of the function with a simplified version using the From trait. This greatly reduces the complexity of the usages of ViewLine in most cases.
2020-10-01Convert activate to use ProcessResultTim Oram
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.
2020-09-25Greatly improve input handling and missing keysTim Oram
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.
2020-09-21Use anyhow in process module traitTim Oram
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.
2020-09-19DRY up process moduleTim Oram
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.
2020-09-17Move error handling to process moduleTim Oram
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.
2020-09-17Fix some reference/bindings to be more clearTim Oram
2020-09-02Refactor help to not be a process moduleTim Oram
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.