nushell/crates/nu-table/src
Ian Manske 399a7c8836
Add and use new Signals struct (#13314)
# Description
This PR introduces a new `Signals` struct to replace our adhoc passing
around of `ctrlc: Option<Arc<AtomicBool>>`. Doing so has a few benefits:
- We can better enforce when/where resetting or triggering an interrupt
is allowed.
- Consolidates `nu_utils::ctrl_c::was_pressed` and other ad-hoc
re-implementations into a single place: `Signals::check`.
- This allows us to add other types of signals later if we want. E.g.,
exiting or suspension.
- Similarly, we can more easily change the underlying implementation if
we need to in the future.
- Places that used to have a `ctrlc` of `None` now use
`Signals::empty()`, so we can double check these usages for correctness
in the future.
2024-07-07 22:29:01 +00:00
..
types Add and use new Signals struct (#13314) 2024-07-07 22:29:01 +00:00
common.rs Add command_prelude module (#12291) 2024-03-26 21:17:30 +00:00
lib.rs Add an option to set header on border (style) (#9920) 2023-08-04 13:50:47 -05:00
table_theme.rs Update crates-ci/typos and fix new typos (#10313) 2023-09-11 12:37:06 +02:00
table.rs Fix issue with head on separation lines (#13291) 2024-07-06 14:47:39 -05:00
unstructured_table.rs Copy-on-write for record values (#12305) 2024-04-14 01:42:03 +00:00
util.rs nu-table: Fix expand table unnessary color in trail head config when wrap is used (#10367) 2023-09-15 11:44:53 -05:00