aboutsummaryrefslogtreecommitdiff
path: root/src/grid
Commit message (Collapse)AuthorAge
...
* Fix scrollback history size 0 bugChristian Duerr2018-06-02
| | | | | | | | | | | | | | | | | | There was an issue where alacritty would panic whenever the scrollback history size is set to 0, this fixes that issue. The panic was caused by a substraction with unsigned integers which was underflowing, this has been fixed to use `saturating_sub`. After that was fixed there was still a bug where scrollback would not behave correctly because the number of lines in the grid was decided at startup. This has been adapted so whenever the size of the terminal changes, the scrollback history and grid adapts to make sure the number of lines in the terminal is always the number of visible lines plus the amount of scrollback lines configured in the config file. This fixes #1150.
* Add documentation to explain the processChristian Duerr2018-06-02
|
* Fix cursor not showing in first columnChristian Duerr2018-06-02
| | | | | | | | | | | | There was a bug in the display iterator where the first column was never reached after the top line because it was instantly incremented to 1 after it was reset when iterator column reached the end of the terminal width. This has been fixed by making sure that the column is never incremented when the column is reset due to a change in terminal line. This fixes #1198.
* Fix BCE ref testsJoe Wilm2018-06-02
| | | | | BCE was broken in attempt to optimize row clearing. The fix is to revert to passing in the current cursor state when clearing.
* Fix grid scroll testsJoe Wilm2018-06-02
|
* Make tests compile againJoe Wilm2018-06-02
| | | | | | | | | | | Some tests are still not passing, though. A migration script was added to migrate serialized grids from pre-scrollback to the current format. The script is included with this commit for completeness, posterity, and as an example to be used in the future. A few tests in grid/tests.rs were removed due to becoming irrelevant.
* Fix regression with scrolling regionsJoe Wilm2018-06-02
| | | | Resolves #1154
* Replace scrolling methods with enumChristian Duerr2018-06-02
| | | | | | | | | The different scrolling methods added a bunch of boilerplate where the call was just forwarded to the next struct, this has been removed by making the scroll amount into a struct. Now everything is called through one method and the parameter decides how far the viewport should be scrolled.
* Add scrollback hotkeysChristian Duerr2018-06-02
| | | | | | | | | | | | | This offers a few additional hotkeys that can be used in combination with scrollback. None of these are used by default yet. This implements the following bindings: - ScrollPageUp: Scroll exactly one screen height up - ScrollPageDown: Scroll exactly one screen height down - ScrollToTop: Scroll as far up as possible - ScrollToBottom: Scroll as far down as possible This fixes #1151.
* Fix crash when selection leaves viewportChristian Duerr2018-06-02
| | | | | | | | | | | | | | | | | There was an issue where alacritty tries to convert the lines in a selection to the on-screen lines even when the selection is not on the screen. This results in a crash. To prevent this from happening the selection now is not shown if it is off the screen. There currently still is a bug that when the selection is at the top of the screen but still half visible, it will not show the top line as selected but start in the second line. This bug should be resolved with https://github.com/jwilm/alacritty/pull/1171. This fixes #1148.
* Support selections with scrolling bufferJoe Wilm2018-06-02
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Selections now *mostly* work. They move as the buffer scrolls, copying works as it should, and it looks like the different selection modes behave properly as well. The new Selection implementation uses buffer coordinates instead of screen coordinates. This leads to doing a transform from mouse input to update the selection, and back to screen coordinates when displaying the selection. Scrolling the selection is fast because the grid is already operating in buffer coordinates. There are several bugs to address: * A _partially_ visible selection will lead to a crash since the drawing routine converts selection coordinates to screen coordinates. The solution will be to clip the coordinates at draw time. * A selection scrolling off the buffer in either direction leads to indexing out-of-bounds. The solution again is to clip, but this needs to be done within Selection::rotate by passing a max limit. It may also need a return type to indicate that the selection is no longer visible and should be discarded. * A selection scrolling out of a logical scrolling region is not clipped. A temporary and robust workaround is to simply discard the selection in the case of scrolling in a region. wip selections fix issue with line selection selection mostly working need to support selection not being on the screen at draw time Fix selection_to_string Uncomment tests
* Move selection into GridJoe Wilm2018-06-02
| | | | | | | | | | | Supporting selections with scrollback has two major components: 1. Grid needs access to Selection so that it may update the scroll position as the terminal text changes. 2. Selection needs to be implemented in terms of buffer offsets -- NOT lines -- and be updated when Storage is rotated. This commit implements the first part.
* Fix scrolling backwards in tmuxJoe Wilm2018-06-02
|
* Make number of scrollback lines configurableJoe Wilm2018-06-02
|
* Scroll to bottom on character receivedJoe Wilm2018-06-02
|
* wip fix scroll_downJoe Wilm2018-06-02
|
* Fir cursor not scrollingJoe Wilm2018-06-02
|
* Add scrolling limit and update on grow linesJoe Wilm2018-06-02
|
* checkpoint: very basic scrolling worksJoe Wilm2018-06-02
| | | | | | | Things that do not work - Limiting how far back in the buffer it's possible to scroll - Selections (need to transform to buffer offsets)
* wip scrollbackJoe Wilm2018-06-02
|
* Remove some unused implsJoe Wilm2018-06-02
|
* Minor improvementsJoe Wilm2018-06-02
|
* WIP optimize scroll in regionJoe Wilm2018-06-02
| | | | | | | | | This intends to optimize the case where the top of the scrolling region is the top of the screen. In theory, scrolling in this case can be optimized to shifting the start/end of the visible region, and then rearranging any lines that were not supposed to be scrolled (at the bottom of the region). However, this didn't produce quite the speedup I expected.
* Use memcpy for resetting row contentsJoe Wilm2018-06-02
| | | | | | In addition to a marginal performance improvement, this simplifies some logic in the Term implementation since now the Grid fully handles row recycling.
* Remove some unused methods and implsJoe Wilm2018-06-02
|
* Eliminate ClearRegion traitJoe Wilm2018-06-02
|
* Move grid Row and tests into submodulesJoe Wilm2018-06-02
This is part of some cleanup for the grid module as a whole.