Skip to content
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

add --readonly flag to enter readonly mode #7128

Closed
wants to merge 13 commits into from
Prev Previous commit
Next Next commit
Merge remote-tracking branch 'upstream/master' into readonly
  • Loading branch information
ds-cbo committed Sep 1, 2023
commit 429aa29418c4379c99dd020893264fd4e1b2b0c0
9 changes: 3 additions & 6 deletions helix-term/src/ui/picker.rs
Original file line number Diff line number Diff line change
Expand Up @@ -427,12 +427,9 @@ impl<T: Item + 'static> Picker<T> {
(size, _) if size > MAX_FILE_SIZE_FOR_PREVIEW => {
CachedPreview::LargeFile
}
_ => {
// TODO: enable syntax highlighting; blocked by async rendering
Document::open(path, None, None, editor.config.clone(), false)
.map(|doc| CachedPreview::Document(Box::new(doc)))
.unwrap_or(CachedPreview::NotFound)
}
_ => Document::open(path, None, None, editor.config.clone(), false)
.map(|doc| CachedPreview::Document(Box::new(doc)))
.unwrap_or(CachedPreview::NotFound),
},
)
.unwrap_or(CachedPreview::NotFound);
Expand Down
Loading
You are viewing a condensed version of this merge commit. You can view the full changes here.