Commit graph

17 commits

Author SHA1 Message Date
Pascal Kuthe
71ee589bbc
make underline_style a seperate option
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.
2022-10-01 19:29:46 +02:00
A-Walrus
79a39c1063
Fix failing tests
Add underline field to doctests, and fix bugs
2022-10-01 17:00:35 +02:00
A-Walrus
3ad7d543ca
Add separate color for underlines 2022-10-01 17:00:34 +02:00
chunghha
3a398eec56
fix typos (#2304) 2022-04-27 14:21:20 -05:00
Ludwig Stecher
59c691d2db
Highlight matching text in file picker suggestions (#1635)
* Highlight matching text in file picker suggestions

* Remove cache, specialize highlighting code

* Fix outdated comments
2022-03-01 10:30:02 +09:00
Blaž Hrastnik
ac81b47a41 Don't calculate symbol width twice
This is potentially costly so we should avoid calling width()
2022-01-23 16:04:26 +09:00
Mathis Brossier
f5b0821860
Fix panics when resizing (#1408)
* 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>
2022-01-16 10:55:28 +09:00
Blaž Hrastnik
34f46e7502 Bump rust to 1.57, fix new lint failures 2021-12-03 12:48:07 +09:00
Omnikar
5b5d1b9dff
Truncate the starts of file paths instead of the ends in picker (#951)
* 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>
2021-11-04 12:24:05 +09:00
Ivan Tham
9effe71b7d Apply suggestions from blaz for infobox 2021-07-04 18:01:59 +09:00
Ivan Tham
ed1a745442 Trait width method use refactor 2021-06-26 08:52:22 -07:00
Gokul Soumya
e8d2f3612f Use unicode_width to correctly truncate picker chars 2021-06-25 16:09:05 -07:00
Keith Simmons
4418e17547
reverse the dependency between helix-tui and helix-view (#366)
* 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>
2021-06-25 12:58:15 +09:00
Gokul Soumya
18beda38ac Add … when chars are truncated in picker 2021-06-25 09:28:24 +09:00
Blaž Hrastnik
4f108ab1b2 Fix tests failing on cargo test --release 2021-06-20 10:44:00 +09:00
Blaž Hrastnik
ff4c1d05de Replace the Clear widget with buffer.clear/clear_with. 2021-05-09 18:13:50 +09:00
Blaž Hrastnik
35606a3daa Inline tui as helix-tui fork.
We only rely on some of the rendering primitives and implement our
Cursive-style compositor on top.
2021-05-09 17:52:55 +09:00