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
WIP: move from console to crossterm #213
Commits on Jul 10, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 7004341 - Browse repository at this point
Copy the full SHA 7004341View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9bd2dd8 - Browse repository at this point
Copy the full SHA 9bd2dd8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 56a89c0 - Browse repository at this point
Copy the full SHA 56a89c0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a857b75 - Browse repository at this point
Copy the full SHA a857b75View commit details -
TEMP comment out most files with compile errors: all but theme and co…
…nfirmation prompt (which will come next)
Configuration menu - View commit details
-
Copy full SHA for d295ca6 - Browse repository at this point
Copy the full SHA d295ca6View commit details -
Remove uses of console::Term, part 1: mechanically remove all uses of…
… the Term type. Instead, crossterm uses just a io::Write trait object. Doesn't compile yet; many terminal methods are still missing. In the next changes, I'll slowly add them to TermThemeRenderer instead or replace calls by their crossterm equivalent. (The buffered example is not adjusted yet; this will happen in the very end.)
Configuration menu - View commit details
-
Copy full SHA for ac4a99f - Browse repository at this point
Copy the full SHA ac4a99fView commit details -
Allow flushing the terminal via TermThemeRenderer.
The password prompt needs it, and it allows removing the Term accessor.
Configuration menu - View commit details
-
Copy full SHA for 400df55 - Browse repository at this point
Copy the full SHA 400df55View commit details -
Remove clear_line() calls in input.rs.
They are superfluous, now that TermThemeRenderer::clear also clears the current line.
Configuration menu - View commit details
-
Copy full SHA for 528c0df - Browse repository at this point
Copy the full SHA 528c0dfView commit details -
This required adding another few helper methods to theme.rs, but apart from that went quite smoothly. The result is essentially untested; that's for later.
Configuration menu - View commit details
-
Copy full SHA for 8d19d22 - Browse repository at this point
Copy the full SHA 8d19d22View commit details -
Mostly port select,multi_select,sort prompt to crossterm: just borrow…
…ing errors remaining.
Configuration menu - View commit details
-
Copy full SHA for 683a193 - Browse repository at this point
Copy the full SHA 683a193View commit details -
Configuration menu - View commit details
-
Copy full SHA for a7072aa - Browse repository at this point
Copy the full SHA a7072aaView commit details
Commits on Aug 17, 2022
-
Move TermThemeRenderer and the confirmation prompt to crossterm.
General things of note - As crossterm operates on any io::Write trait object instead of a dedicated Term struct, we use the static terminal::size() method to obtain the terminal size, which returns an option. - We conciously only support clearing an u16 number of lines, since that's crossterm only allows moving the cursor by that many lines. - We conciously manually clear the last N lines instead of the entire terminal since the confirmation prompt expects it so. This change was manually tested, by running the `confirm` example with various inputs. The confirmation prompt behaves the same as before this change.
Configuration menu - View commit details
-
Copy full SHA for 6d41b18 - Browse repository at this point
Copy the full SHA 6d41b18View commit details -
Make the paging module compile.
- create a new constant for the default terminal size, as that's now used in three different places - make clear_last_lines a static method, operating on any dyn io::Write, now just a TermThemeRenderer -- paging also needs it. - also extract clear_current_line to that level
Configuration menu - View commit details
-
Copy full SHA for dd0d6f4 - Browse repository at this point
Copy the full SHA dd0d6f4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 47d1cd1 - Browse repository at this point
Copy the full SHA 47d1cd1View commit details
Commits on Aug 18, 2022
-
Configuration menu - View commit details
-
Copy full SHA for 82ed7d4 - Browse repository at this point
Copy the full SHA 82ed7d4View commit details
Commits on Aug 28, 2022
-
Allow sharing a terminal between a TermThemeRenderer and a Paging ins…
…tance. Use an Arc<Mutex<dyn io::Write>> instead of a &mut dyn io::Write. - an arc allows sharing the terminal, a mutex allows mutating it while shared To avoid lots of boilerplate with .lock().unwrap(), introduce a wrapper type. Make the remaining prompts compile; almost all examples compile now. The sole exception is the buffered example, which uses console's buffered_stderr type.
Configuration menu - View commit details
-
Copy full SHA for cda693a - Browse repository at this point
Copy the full SHA cda693aView commit details -
theme.rs: remove some now-superfluous helper functions.
- {show,hide}_cursor can be removed now, - flush() can be reduced to one single occurrence. These were needed before we wrapped our terminal in an Arc.
Configuration menu - View commit details
-
Copy full SHA for a975463 - Browse repository at this point
Copy the full SHA a975463View commit details -
Configuration menu - View commit details
-
Copy full SHA for 9582bc8 - Browse repository at this point
Copy the full SHA 9582bc8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 271daf3 - Browse repository at this point
Copy the full SHA 271daf3View commit details -
Add a new helper to construct a terminal from stderr.
Replaces lots of boilerplate with Term::new(Arc::new(Mutex::new(_))).
Configuration menu - View commit details
-
Copy full SHA for 0bcb0da - Browse repository at this point
Copy the full SHA 0bcb0daView commit details -
Configuration menu - View commit details
-
Copy full SHA for a44708e - Browse repository at this point
Copy the full SHA a44708eView commit details -
Configuration menu - View commit details
-
Copy full SHA for a53f478 - Browse repository at this point
Copy the full SHA a53f478View commit details