aboutsummaryrefslogtreecommitdiff
path: root/helix-tui/src
Commit message (Collapse)AuthorAge
* tui: Log keyboard enhancement query timeMichael Davis2023-03-08
| | | | | | In my testing this takes around 3-4ms in terminals that support the enhanced keyboard protocol (Kitty, WezTerm) and a few hundred microseconds in terminals that don't (st, Alacritty).
* tui: Cache the keyboard enhancement checkMichael Davis2023-03-08
| | | | | | | | | | | Wether the host terminal supports keyboard enhancement can be cached for the lifetime of a Helix session. Caching this lookup prevents a potential lockup within crossterm's event reading system where the query for the keyboard enhancement support waits on the next keyboard event, which can happen if the crossterm event stream is checked by `tokio::select!` in another thread.
* Move terminal claim/restore code to helix-tuiMichael Davis2023-03-08
| | | | | | | | | | | | | | | | | | This moves the `Application::claim_term` and `helix-term::application::restore_term` functions into the helix-tui crate. How the terminal should be claimed and restored is a TUI concern and is implemented differently through different TUI backends. This cleans out a lot of crossterm and TUI code in Application and makes it easier to modify claim/restore based on information we query from the terminal host. The child commit will take advantage of this to cache the check for whether the host terminal supports the keyboard enhancement protocol. Without this change, caching that information takes much more code which is not easily reusable for anything else. The code to restore the terminal is somewhat duplicated by this patch: we want to restore the terminal in cases of panics. Panic handler hooks must live for `'static` and the Application's terminal does not.
* Update crossterm to 0.26.1Michael Davis2023-02-28
| | | | | Crossterm 0.26.x includes a breaking change for the command to set the cursor shape. This commit includes a change which uses the new type.
* Fix clippy 1.67 warnings (#5697)Miguel Madrid-Mencía2023-01-27
|
* Replace menu::Item::{row, label} with format()Gokul Soumya2023-01-18
|
* Minimize allocation when converting table rows to stringGokul Soumya2023-01-18
|
* Use upstream implementation of table column calculationGokul Soumya2023-01-18
| | | | Changed in https://github.com/fdehau/tui-rs/commit/a68e38e59e6735c0a99139303b1609669d2c38da.
* Reuse table in pickerGokul Soumya2023-01-18
|
* Detect WezTerm and mark it as undercurl/Smulx capableBlaž Hrastnik2022-12-02
|
* update `x_offset` calculation in Buffer::set_string_truncated (#3839)kristopherbullinger2022-11-17
| | | | when `truncate_start` is `true`, the `x_offset` is now properly updated according to the width of the content or the truncated length.
* Resolve a bunch of upcoming clippy lintsBlaž Hrastnik2022-11-04
|
* Allow the area to be bigger than u16 (width and height remain u16) (#4318)A-Walrus2022-10-26
| | | | Now the editor can fill **very** large terminals. Changed/removed tests which check the truncating behaviour.
* fix terminfo detectionPascal Kuthe2022-10-12
|
* avoid visual artificats on terminal emulators that do not support underline ↵Pascal Kuthe2022-10-06
| | | | colors
* switch to termini for terminfoPascal Kuthe2022-10-06
|
* make underline_style a seperate optionPascal Kuthe2022-10-01
| | | | | | | | | | Underline styles are mutally exclusive and overwrite each other. Therefore implementing as an modifier lead to incorrect behaviour when the underline style is overwritten. For backwards compatability the "underline" modified is retained (but deprecated). Instead the "underline_style" and "underline_color" optios should be used to style underlines.
* Detect extended underline support using terminfoGokul Soumya2022-10-01
| | | | | | | The cxterminfo crate has been used over popular alternatives like `term` since it supports querying for extended capabilities and also for it's small codebase size (which will make it easy to inline it into helix in the future if required).
* Fix failing testsA-Walrus2022-10-01
| | | | Add underline field to doctests, and fix bugs
* Add separate color for underlinesA-Walrus2022-10-01
|
* Support different kinds of underline renderingGokul Soumya2022-10-01
| | | | | | | | | Adds four new modifiers that can be used in themes: - undercurled - underdashed - underdotted - double-underline
* Reuse menu::Item trait in picker (#2814)Gokul Soumya2022-07-02
| | | | | | | | | | | | | | | | | | | | | | | | | | * Refactor menu::Item to accomodate external state Will be useful for storing editor state when reused by pickers. * Add some type aliases for readability * Reuse menu::Item trait in picker This opens the way for merging the menu and picker code in the future, since a picker is essentially a menu + prompt. More excitingly, this change will also allow aligning items in the picker, which would be useful (for example) in the command palette for aligning the descriptions to the left and the keybinds to the right in two separate columns. The item formatting of each picker has been kept as is, even though there is room for improvement now that we can format the data into columns, since that is better tackled in a separate PR. * Rename menu::Item::EditorData to Data * Call and inline filter_text() in sort_text() completion * Rename diagnostic picker's Item::Data
* Add workspace and document diagnostics picker (#2013)Falco Hirschenberger2022-06-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add workspace and document diagnostics picker fixes #1891 * Fix some of @archseer's annotations * Add From<&Spans> impl for String * More descriptive parameter names. * Adding From<Cow<str>> impls for Span and Spans * Add new keymap entries to docs * Avoid some clones * Fix api change * Update helix-term/src/application.rs Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com> * Fix a clippy hint * Sort diagnostics first by URL and then by severity. * Sort diagnostics first by URL and then by severity. * Ignore missing lsp severity entries * Add truncated filepath * Typo * Strip cwd from paths and use url-path without schema * Make tests a doctest * Better variable names Co-authored-by: Falco Hirschenberger <falco.hirschenberger@itwm.fraunhofer.de> Co-authored-by: Bjorn Ove Hay Andersen <bjrnove@gmail.com>
* Refactor Margin for fine grained control (#2727)Gokul Soumya2022-06-21
|
* Make Borders u8Ivan Tham2022-05-22
|
* Refactor Block with Default and bitflagsIvan Tham2022-05-22
| | | | | Specifying empty for bitflags is not recommended, it is now removed and added Default. For BorderType, it now defaults to plain.
* fix typos (#2304)chunghha2022-04-27
|
* Highlight matching text in file picker suggestions (#1635)Ludwig Stecher2022-03-01
| | | | | | | * Highlight matching text in file picker suggestions * Remove cache, specialize highlighting code * Fix outdated comments
* Fix 1.60 lintsBlaž Hrastnik2022-02-25
|
* fix: Revert Block widget change that broke autoinfo backgroundBlaž Hrastnik2022-02-07
|
* Render code actions as a menu, allow adding padding to popupBlaž Hrastnik2022-01-31
|
* Fix Clippy lints in tests (#1563)Omnikar2022-01-23
| | | Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Don't calculate symbol width twiceBlaž Hrastnik2022-01-23
| | | | This is potentially costly so we should avoid calling width()
* Update to rust 1.58, fix a bunch of optional lintsBlaž Hrastnik2022-01-16
|
* Fix panics when resizing (#1408)Mathis Brossier2022-01-16
| | | | | | | | | | | * Change buffer.get & buffer.get_mut to return Option, Implement Trait Index & IndexMut to panic * Prevent FilePicker from drawing outside buffer (rust panics) * apply suggestion * add function in_bounds to avoid useless calculations Co-authored-by: mathis <mathis.brossier@universite-paris-saclay.fr>
* Bump rust to 1.57, fix new lint failuresBlaž Hrastnik2021-12-03
|
* Truncate the starts of file paths instead of the ends in picker (#951)Omnikar2021-11-04
| | | | | | | | | | | | | * Truncate the starts of file paths in picker * Simplify the truncate implementation * Break loop at appropriate point * Fix alignment and ellipsis presence * Remove extraneous usage of `x_offset` Co-authored-by: Blaž Hrastnik <blaz@mxxn.io>
* Add ctrl-z to suspendIvan Tham2021-08-03
|
* Calculate completion popup sizingBlaž Hrastnik2021-07-19
| | | | Fixes #220
* Apply suggestions from blaz for infoboxIvan Tham2021-07-04
|
* Address nightly clippy warningsBlaž Hrastnik2021-06-27
|
* Trait width method use refactorIvan Tham2021-06-26
|
* Use unicode_width to correctly truncate picker charsGokul Soumya2021-06-25
|
* reverse the dependency between helix-tui and helix-view (#366)Keith Simmons2021-06-25
| | | | | | | | | * reverse the dependency between helix-tui and helix-view by moving a fiew types to view * fix tests * clippy and format fixes Co-authored-by: Keith Simmons <keithsim@microsoft.com>
* Add … when chars are truncated in pickerGokul Soumya2021-06-25
|
* Merge branch 'master' of github.com:helix-editor/helix into ↵Nathan Vegdahl2021-06-20
|\ | | | | | | | | | | | | line_ending_detection Rebasing was making me manually fix conflicts on every commit, so merging instead.
| * Fix doc warningsIvan Tham2021-06-20
| |
| * Fix tests failing on cargo test --releaseBlaž Hrastnik2021-06-20
| |
* | Work on moving code over to LineEnding instead of assuming '\n'.Nathan Vegdahl2021-06-20
|/ | | | Also some general cleanup and some minor fixes along the way.
* Add other cursor shapeIvan Tham2021-06-15
|