helix-mods/helix-term/src/ui
diegodox 70d21a903f
Prevent preview binary or large file (#939)
* Prevent preview binary or large file (#847)

* fix wrong method name

* fix add use trait

* update lock file

* rename MAX_PREVIEW_SIZE from MAX_BYTE_PREVIEW

* read small bytes to determine cotent type

* [WIP] add preview struct to represent calcurated preveiw

* Refactor content type detection

- Remove unwraps
- Reuse a single read buffer to avoid 1kb reallocations between previews

* Refactor preview rendering so we don't construct docs when not necessary

* Replace unwarap whit Preview::NotFound

* Use index access to hide unwrap

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>

* fix Get and unwarp equivalent to referce of Index acess

* better preview implementation

* Rename Preview enum and vairant

Co-authored-by: Gokul Soumya <gokulps15@gmail.com>

* fixup! Rename Preview enum and vairant

* simplify long match

* Center text, add docs, fix formatting, refactor

Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
2021-11-04 12:24:52 +09:00
..
completion.rs Ensure coords in screen depends on char width (#885) 2021-11-03 12:02:29 +09:00
editor.rs Extract a clear_completion method 2021-10-29 16:48:41 +09:00
info.rs info component style config use ui.info ui.info.text (#643) 2021-08-24 09:58:19 +09:00
markdown.rs syntax: Properly handle injection-regex for language injections 2021-09-16 15:50:14 +09:00
menu.rs move_up will select last item, when no item selected (#907) 2021-10-26 09:42:23 +09:00
mod.rs First stab at ignoring compressed files from picker (#767) 2021-10-22 10:02:05 +09:00
picker.rs Prevent preview binary or large file (#939) 2021-11-04 12:24:52 +09:00
popup.rs ui: Trigger recalculate_size per popup render so contents can readjust 2021-09-13 17:44:50 +09:00
prompt.rs fix: When cycling through prompt history, update event needs to trigger 2021-10-27 18:23:17 +09:00
spinner.rs Add a Spinner 2021-06-21 12:59:06 +09:00
text.rs ui: Trigger recalculate_size per popup render so contents can readjust 2021-09-13 17:44:50 +09:00