aboutsummaryrefslogtreecommitdiff
path: root/grid.c
Commit message (Collapse)AuthorAge
...
* Instead of overloading the line clear function to mean free ifnicm2017-08-30
| | | | | | | background is default (8), introduce an explicit free function and use it where a free alone is needed. Likewise, use memmove directly rather than grid_move_lines where it makes sense. Based on a memory leak fix by Dan Aloni in GitHub issue 1051.
* Line length and spaces to tabs.nicm2017-05-16
|
* Some other unused variables.nicm2017-05-13
|
* When expanding a line in order to clear it, we need to use the defaultnicm2017-05-12
| | | | | background colour - there may be portions that we do not want to clear with the new background colour.
* Scrolling needs to use background colour.nicm2017-05-12
|
* When we write out the grid including escape sequences, an SGR 0 needs tonicm2017-04-25
| | | | | cause the colours to be written again. Also treat colours separately from attributes so that RGB colours will work.
* Style nits and a missing cast.nicm2017-04-19
|
* Add support for the strikethrough attribute (SGR 9), using the new smxxnicm2017-03-22
| | | | | terminfo capability. This means there are now nine attribute bits, so anything above 0xff uses an extended cell.
* If moving cells outside the current used count, update it.nicm2017-03-07
|
* Minor bits: fix an array size, add comment, make grid_cell_entry static.nicm2017-02-22
|
* Collected cells may still need to be extended for RGB colours.nicm2017-02-13
|
* Collect sequences of printable ASCII characters and process themnicm2017-02-08
| | | | | | | | | | | | | | | together instead of handling them one by one. This is significantly faster. Sequences are terminated when we reach the end of the line, fill the internal buffer, or a different character is seen by the input parser (an escape sequence, or UTF-8). Rather than writing collected sequences out immediately, hold them until it is necessary (another screen modification, or we consume all available data). This means we can discard changes that would have no effect (for example, lines that would just be scrolled off the screen or cleared). This reduces the total amount of data we write out to the terminal - not important for fast terminals, but a big help with slow (like xterm).
* Add a helper to store a cell, and some tidying.nicm2017-02-08
|
* Tweak how much we expand lines by.nicm2017-02-08
|
* Expand lines more aggressively to reduce rate of allocations.nicm2017-02-03
|
* Clear cell entry with grid_default_entry not grid_default_cell.nicm2016-10-18
|
* Make grid_clear_cell set up the entry properly for 256 and RGB cells.nicm2016-10-18
|
* Add support for BCE (background colour erase). This makes various escapenicm2016-10-13
| | | | | | | | | | | | sequences (notable EL and ED but also IL, DL, ICH, DCH) create blank cells using the current background colour rather than the default colour. On modern systems BCE doesn't really have many benefits, but most other terminals now support it, some (lazy) applications rely on it, and it is not hard to include now that we have pane background colours anyway. Mostly written by Sean Haugh.
* Add static in window-*.c and move some internal functions out of tmux.h.nicm2016-10-11
|
* Loads more static, except for cmd-*.c and window-*.c.nicm2016-10-10
|
* Remember the number of lines scrolled into the history (versus clearednicm2016-09-02
| | | | | | into the history) and when resizing only use scrolled lines and not cleared lines (which are probably not intended to reappear). From Chaoren Lin.
* Don't update cells in each block of data read from a pane immediately,nicm2016-07-15
| | | | | | instead track them as change (dirty) and update them once at the end, saves much time if repeatedly writing the same cell. Also fix comparison of cells being equal in a few places (memcmp is not enough).
* Add RGB escape sequences for capture-pane -e.nicm2016-01-31
|
* Support for RGB colour, using the extended cell mechanism to avoidnicm2016-01-29
| | | | | | | | wasting unnecessary space. The 'Tc' flag must be set in the external TERM entry (using terminal-overrides or a custom terminfo entry), if not tmux will map to the closest of the 256 or 16 colour palettes. Mostly from Suraj N Kurapati, based on a diff originally by someone else.
* I no longer use my SourceForge address so replace it.nicm2016-01-19
|
* Don't leak extddata, memset after freeing it, not before. From Patricknicm2015-11-22
| | | | Palka.
* Long overdue change to the way we store cells in the grid: now, insteadnicm2015-11-13
| | | | | | | | | | | | | | | of storing a full grid_cell with UTF-8 data and everything, store a new type grid_cell_entry. This can either be the cell itself (for ASCII cells), or an offset into an extended array (per line) for UTF-8 data. This avoid a large (8 byte) overhead on non-UTF-8 cells (by far the majority for most users) without the complexity of the shadow array we had before. Grid memory without any UTF-8 is about half. The disadvantage that cells can no longer be modified in place and need to be copied out of the grid and back but it turned out to be lot less complicated than I expected.
* grid_put_utf8 is unused, remove it.nicm2015-11-12
|
* Free the history when it is cleared, based on a diff from Carlo Cannas.nicm2015-09-25
|
* Fix indentation of grid_string_cells_fg.nicm2015-09-02
|
* In grid_duplicate_lines, if the line is empty (cellsize == 0) then clearnicm2015-08-24
| | | | | | the destination celldata pointer rather than leaving a stale copy of the source pointer (which may later be freed). Fixes a crash found by Kuang-che Wu.
* Remove some stuff that accidentally ended up here from portable, andnicm2015-05-08
| | | | remove a little-used debug function.
* use reallocarray instead of calloc; avoid the zero before infillderaadt2015-04-23
| | | | ok nicm
* Add xreallocarray and remove nmemb argument from xrealloc.nicm2014-10-08
|
* Use xrealloc(NULL, n, m) instead of xmalloc(n * m) to get overflownicm2014-10-08
| | | | check.
* Fix some comments (c -> colour) and join unnecessary line splits.nicm2014-09-17
|
* Various minor style and spacing nits.nicm2014-09-01
|
* Memory leak in error path and unnecessary assignment, from clang.nicm2014-04-16
|
* GRID_DEBUG is no longer needed.nicm2014-03-31
|
* Style nit - no space between function name and bracket.nicm2014-02-14
|
* Allow replacing each of the many sets of separate foo-{fg,bg,attr}nicm2014-01-28
| | | | | | | | | | | | | | | | | | | | | | | | | options with a single foo-style option. For example: set -g status-fg yellow set -g status-bg red set -g status-attr blink Becomes: set -g status-style fg=yellow,bg=red,blink The -a flag to set can be used to add to rather than replace a style. So: set -g status-bg red Becomes: set -ag status-style bg=red Currently this is fully backwards compatible (all *-{fg,bg,attr} options remain) but the plan is to deprecate them over time. From Tiago Cunha.
* Couple of fixes from cppcheck via Tiago Cunha.nicm2014-01-15
|
* Style and comment fixes from Tiago Cunha.nicm2014-01-09
|
* Trivial style and spacing nits.nicm2013-10-10
|
* Only include actual trailing spaces not unused cells with capturep -J,nicm2013-10-10
| | | | from George Nachman.
* Allow lastgc to be NULL in grid_string_cells so find-window doesn'tNicholas Marriott2013-03-25
| | | | crash, problem reported by eugene everson.
* Add -C and -J to capture pane to escape control sequences and to joinNicholas Marriott2013-03-22
| | | | wrapped line, based on a diff from George Nachman.
* Rework reflow code so it does not do so much allocation which should beNicholas Marriott2013-03-21
| | | | faster with large histories.
* Automatically reflow wrapped lines when a pane is resized, requested byNicholas Marriott2013-02-05
| | | | many over the years and finally implemented by Richard Woodbury.
* Rather than having two grids for each pane, one for ASCII and one forNicholas Marriott2013-01-18
| | | | | UTF-8, collapse the two together. Simplifies the code at the expense of more memory (which can probably be reduced again later).