aboutsummaryrefslogtreecommitdiff
path: root/helix-view/src/view.rs
Commit message (Collapse)AuthorAge
* Refactor new Rect construction (#575)Gokul Soumya2021-08-21
| | | | | | | | | | * Refactor new Rect construction Introduces methods that can be chained to construct new Rects out of pre-existing ones * Clamp x and y to edges in Rect chop methods * Rename Rect clipping functions
* Extract view.inner_area(), simplify render_focused_view_elementsBlaž Hrastnik2021-08-19
|
* Refactor view.first_line/first_col into view.offset (Position)Blaž Hrastnik2021-08-19
|
* Show file preview in split pane in fuzzy finder (#534)Gokul Soumya2021-08-12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Add preview pane for fuzzy finder * Fix picker preview lag by caching * Add picker preview for document symbols * Cache picker preview per document instead of view * Use line instead of range for preview doc * Add picker preview for buffer picker * Fix render bug and refactor picker * Refactor picker preview rendering * Split picker and preview and compose The current selected item is cloned on every event, which is undesirable * Refactor out clones in previewed picker * Retrieve doc from editor if possible in filepicker * Disable syntax highlight for picker preview Files already loaded in memory have syntax highlighting enabled * Ignore directory symlinks in file picker * Cleanup unnecessary pubs and derives * Remove unnecessary highlight from file picker * Reorganize buffer rendering * Use normal picker for code actions * Remove unnecessary generics and trait impls * Remove prepare_for_render and make render mutable * Skip picker preview if screen small, less padding
* fix: Adjust scroll offset/padding calculation to prevent wobbleBlaž Hrastnik2021-08-11
| | | | Fixes #324
* config: Rename [terminal] to [editor] and pass it into EditorBlaž Hrastnik2021-08-08
|
* Add more unit tests for pos_at_screen_coords.Nathan Vegdahl2021-07-31
| | | | | Specifically, test cases for double-width characters and grapheme clusters.
* mouse: Remove verify_screen_coords, refactor primary selection modificationBlaž Hrastnik2021-07-30
|
* Mouse selection support (#509)Dmitry Sharshakov2021-07-30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Initial mouse selection support Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Disable mouse event capture if editor crashes Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Translate screen coordinates to view position Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Select full lines by dragging on line numbers Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * editor: don't register dragging as a jump Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Count graphemes correctly Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Do not select lines when dragging on the line number bar Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Split out verify_screen_coords Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Do not iterate over the graphemes twice Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Switch view by clicking on it Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Add disable-mouse config option Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Support multiple selections with mouse Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Remove unnecessary check Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Refactor using match expression Co-authored-by: Gokul Soumya <gokulps15@gmail.com> Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Rename local variable Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Rename mouse option Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Refactor code Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Fix dragging selection Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Fix crash when clicking past last line Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Count characters better Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Remove comparison not needed anymore Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Validate coordinates before resolving position Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Tidy up references to editor tree Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Better way to determine line end and avoid overflow Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Fix for last line Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> * Add unit tests for text_pos_at_screen_coords Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com> Co-authored-by: Gokul Soumya <gokulps15@gmail.com>
* Address some PR comments.Nathan Vegdahl2021-07-26
|
* Collect some common patterns into methods on `Range`.Nathan Vegdahl2021-07-26
|
* Fixes for misc bugs with view movement.Nathan Vegdahl2021-07-21
|
* Fixed primary cursor position calculation to use 1-width semantics.Nathan Vegdahl2021-07-19
| | | | | This had a bunch of knock-on effects that were buggy, such as bracket match highlighting.
* Properly fix `last_line` view calculation.Nathan Vegdahl2021-07-19
| | | | | Turned out to be simpler than I thought. Didn't even need to change the other use-sites.
* 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 alternate file (#223)Robin2021-06-12
| | | | | | | | | | | | | * add alternate file inspired by vim ctrl-6/kak ga commands. the alternate file is kept per view * apply feedback from #223 * rename to last_accessed * add ga doc * add fail message for ga
* Derive debug without featureIvan Tham2021-06-10
| | | | Note that this also removed those `finish_non_exhaustive()`.
* Implement Debug for data structure as a featurenotoria2021-06-10
|
* Fix jump behavior, goto_implementation now jumpIvan Tham2021-06-10
| | | | | Better jump behavior since we override the first jump if it's on the first document. At the same time, ctrl-i is now working with gd jumps.
* Fix Unicode (#135)Kirawi2021-06-08
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * init * wip * wip * fix unicode break * fix unicode break * Update helix-core/src/transaction.rs Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu> * clippy * fix * add changes * added test * wip * wip * wip * wip * fix * fix view * fix #88 Co-authored-by: Benoît Cortier <benoit.cortier@fried-world.eu>
* Fixing Multiple Panics (#121)Kirawi2021-06-05
| | | | | | | * init * wip * wip
* Fix panic when buffer larger than terminal widthRowan Herbert2021-06-02
|
* View::new is infallible, so is editor.switch/new_file.Blaž Hrastnik2021-05-07
|
* Fix the last line calculation inside ensure_cursor_in_viewBlaž Hrastnik2021-04-14
|
* Adjust scroll() to match kakoune: only scroll the view if cursor in bounds.Blaž Hrastnik2021-04-14
|
* Horizontal scrolling! It only took a year to get around to it.Blaž Hrastnik2021-04-09
|
* Weave through view_id references so that views into one file have ↵Blaž Hrastnik2021-03-31
| | | | independent selects.
* Store intra-files jumps (goto) on the jumplist.Blaž Hrastnik2021-03-29
|
* Trivial jumplist implementation.Blaž Hrastnik2021-03-24
|
* Derive a separate ViewId type.Blaž Hrastnik2021-03-24
|
* Drop refcell use, make view simply ref doc.id.Blaž Hrastnik2021-03-23
|
* Store Document on the Editor type, make View reference it.Blaž Hrastnik2021-03-22
|
* Add tab_width and indent_unit config.Blaž Hrastnik2021-03-22
|
* minor: TODO comment cleanupBlaž Hrastnik2021-03-16
|
* Cleanup: use doc.selection() instead of doc.state.selection().Blaž Hrastnik2021-03-14
|
* commands: Improve scroll functions.Blaž Hrastnik2021-03-04
| | | | | Followed kakoune's implementation, it's no longer janky and can scroll all the way in either direction.
* ui: Make editor more resilient about being shrunk too small.Blaž Hrastnik2021-03-01
|
* minor: Simplify some code.Blaž Hrastnik2021-02-24
|
* Allow closing individual views.Blaž Hrastnik2021-02-19
|
* treewide: &RopeSlice -> RopeSlice. It's Copy so no reason to pass by refBlaž Hrastnik2021-02-18
|
* Implement vertical split calculations.Blaž Hrastnik2021-02-09
|
* popup: wip work on completion popupsBlaž Hrastnik2021-02-09
|
* View tree implementation: render multiple split views.Blaž Hrastnik2021-02-03
| | | | | Cursors are still a bit buggy and we should render in focus statusbar differently than in the other pane.
* clippy lintBlaž Hrastnik2020-12-03
|
* Refactor: Document type as a wrapper around barebones State.Blaž Hrastnik2020-12-03
|
* Reroute LSP notification events into the main app event loop.Blaž Hrastnik2020-12-03
|
* Move theme from view to editor, support multiple views in editor.Blaž Hrastnik2020-12-03
|
* separated statusline and promptJan Hrastnik2020-10-16
|
* Share the padding definition too.Blaž Hrastnik2020-10-14
|
* Share tab width definitions.Blaž Hrastnik2020-10-14
|