pub struct MagitRevisionPreview;Expand description
MG.54: show the file’s content while choosing a revision in the
C-c f v picker (:magit-find-file). On by default.
This runs git show <rev>:<path> on the input thread, so the
trade-off is visible here rather than discovered as jank. It is
affordable because it is debounced: arrowing through revisions
runs nothing at all, and the fetch happens only once the
selection has sat still for a moment — so a scroll through fifty
revisions costs one git show, not fifty. The cost you can feel
is a keystroke arriving while that one fetch is in flight, which
waits for it. Blobs over 256 KiB are refused with a note in the
pane instead of being fetched.
Turn it off and the picker behaves as it did before: a list of revisions, with the file shown only once you accept one.
Read per selection, not at picker-open, so :set takes effect
without reopening the picker.
Implementations§
Source§impl MagitRevisionPreview
impl MagitRevisionPreview
Sourcepub fn build_spec() -> Option<bool>
pub fn build_spec() -> Option<bool>
Build the runtime spec for this declaration.
Used by the registry’s self-registration boot
path; not generally called by hand. Direct
construction of Option<T> is the macro’s
internal-only path – consumer code uses
config.get_typed::<#name_ident>() to read
and config.set_typed::<#name_ident>(...) to
write.
Trait Implementations§
Source§impl HasGroup for MagitRevisionPreview
impl HasGroup for MagitRevisionPreview
Source§const GROUP_NAME: &'static str = <lattice_config::Magit as ::lattice_config::OptionGroup>::NAME
const GROUP_NAME: &'static str = <lattice_config::Magit as ::lattice_config::OptionGroup>::NAME
"editor", "lsp", …). The macro
pulls this from the group = SomeGroup; directive at the
declaration block’s head.Source§impl OptionDecl for MagitRevisionPreview
impl OptionDecl for MagitRevisionPreview
Source§const NAME: &'static str = MagitRevisionPreview
const NAME: &'static str = MagitRevisionPreview
:set <NAME>=…,
TOML keys, completion candidates, :describe-option.
Internal access is type-driven. The macro derives this
from the option’s identifier (with namespace prefix when
declared via mode_options!); manually-typed NAMEs are
not supported for built-in options.Source§const DOC: &'static str = MagitRevisionPreview
const DOC: &'static str = MagitRevisionPreview
:describe-option, the :customize
form’s per-row help, and :apropos results.Source§const CUSTOMIZABLE: bool = true
const CUSTOMIZABLE: bool = true
true (the default) ⇒ option
appears in :set autocomplete + the :customize group
view. false ⇒ plugin / engine-internal state, hidden
from user surfaces. Equivalent of emacs’s defvar vs
defcustom. (See mode-architecture.md §6.5.3.)Source§type Value = bool
type Value = bool
bool, i64, String, plus any
domain enum that impls [OptionType].Source§fn default_value() -> Self::Value
fn default_value() -> Self::Value
const) so non-const-constructible types like String
can be defaults.Auto Trait Implementations§
impl Freeze for MagitRevisionPreview
impl RefUnwindSafe for MagitRevisionPreview
impl Send for MagitRevisionPreview
impl Sync for MagitRevisionPreview
impl Unpin for MagitRevisionPreview
impl UnsafeUnpin for MagitRevisionPreview
impl UnwindSafe for MagitRevisionPreview
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
§impl<T> Instrument for T
impl<T> Instrument for T
§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more