summaryrefslogtreecommitdiffstats
path: root/screen-write.c
AgeCommit message (Collapse)Author
2017-02-08Add support for scroll up escape sequence (CSI S) and use it whennicm
possible instead of sending individual line feeds.
2017-02-08Collect sequences of printable ASCII characters and process themnicm
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).
2017-02-08Some other tidying bits.nicm
2017-02-08Trying to avoid the occasional newline by saving the last cell on screennicm
is not actually helping us much and just adds complexity, so don't bother.
2017-02-06Add BCE for clear to start of screen, which was somehow missed.nicm
2017-02-06Only redraw the modified character when adding combining characters, notnicm
the whole line.
2017-01-12Fix setting the palette of aixterm colours (90-97).nicm
2017-01-05Highlight all occurrences of search string after searching in copy mode.nicm
2016-12-09Spacing nits.nicm
2016-10-18Zero dirty count after flushing.nicm
2016-10-13Add support for BCE (background colour erase). This makes various escapenicm
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.
2016-10-12Fix a couple of problems with insert mode: flush dirty cells before wenicm
modify the screen, not after; and use grid_view_insert_cells to make space not grid_move_cells.
2016-10-12Redraw selection in tty_draw_line, so it appears when redrawing wholenicm
pane. Reported by Theo Buehler.
2016-10-05screen_write_copy tried to be clever and clear the line if it reachednicm
the end of the source, but it was wrong and causes problems that are only showing up now we are more aggressive about skipping redundant screen updates. Remove the optimization entirely as more trouble than it is worth to fix (and it'll have to go when BCE is done anyway).
2016-10-05Wrap some long lines in screen-write.c.nicm
2016-09-29Check padding when writing any character with width > 1, in case theynicm
overlap after the first character (for example with cells xy and ab, y is replacing a).
2016-09-02Remember the number of lines scrolled into the history (versus clearednicm
into the history) and when resizing only use scrolled lines and not cleared lines (which are probably not intended to reappear). From Chaoren Lin.
2016-07-15Don't update cells in each block of data read from a pane immediately,nicm
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).
2016-06-06Cache selected state so that cells going from selected to unselected are notnicm
skipped, reported by Omar Sandoval.
2016-05-30Do not draw character to screen if it has not changed, and do not savenicm
last character if it won't be used. This (and last few commits) prompted by a report from Hubert depesz Lubaczewski.
2016-05-27Padding cell is always the same so use a static.nicm
2016-05-27Break the save-last-cell code into a separate function (so it can benicm
called conditionally later).
2016-04-29Make the grid_cell passed into screen_write_* const.nicm
2016-01-31Clear RGB flags during selection.nicm
2016-01-19I no longer use my SourceForge address so replace it.nicm
2015-12-11Style nits and line wrapping of function declarations.nicm
2015-11-23Partly revert previous, it is harmless to keep support for UTF-8 mousenicm
mode inside tmux, just no longer support it for tmux itself.
2015-11-23Remove support for the UTF-8 mouse extension. This was a briefly used,nicm
poor idea that was fairly quickly replaced by SGR mouse input (which is now widespread). It is impossible to tell the difference between UTF-8 and non-UTF-8 mouse input; since the mouse-utf8 option was removed tmux has not handled it correctly in any case; and it is ridiculous to have three different forms of mouse input.
2015-11-18Use __unused rather than rolling our own.nicm
2015-11-14All these return values from utf8_* are confusing, use an enum.nicm
2015-11-14Be more strict about invalid UTF-8.nicm
2015-11-13Long overdue change to the way we store cells in the grid: now, insteadnicm
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.
2015-11-12Rename overly-long utf8data to ud throughout.nicm
2015-11-12Nuke the utf8 and status-utf8 options and make tmux only a UTF-8nicm
terminal. We still support non-UTF-8 terminals outside tmux, but inside it is always UTF-8 (as when the utf8 and status-utf8 options were on).
2015-09-14Remove some extra blank lines.nicm
2015-07-13Revert to marking lines as wrapped on newlines, fixes problems withnicm
capturep -J.
2014-11-08Two improvements to reflow from Balazs Kezes:nicm
- Don't extend the line to full width on insert/delete character which means leaves extra spaces when reflowing. - Only mark a line wrapped when the cursor actually goes off the end, not on newlines which can be used for positioning.
2014-10-20Better format for printf format attributes.nicm
2014-10-02Copy ACS characters as UTF-8, from Balazs Kezes.nicm
2014-04-17Some more long lines.nicm
2014-01-28Allow replacing each of the many sets of separate foo-{fg,bg,attr}nicm
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.
2013-05-15RIS should reset focus reporting, from Hayaki Saito.Nicholas Marriott
2013-03-27Move the cursor back into the last column on CUU/CUD to match xtermNicholas Marriott
behaviour. From George Nachman.
2013-03-22Unbreak line wrapping.Nicholas Marriott
2013-03-22Implement DECAWM (SM/RM 7) using existing MODE_WRAP flag.Nicholas Marriott
2013-03-22Support the latest theory for mouse input, this is enabled/disabled withNicholas Marriott
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or \033[b;x;ym. From Egmont Koblinger.
2013-03-21Instead of loads of little screen_write_*_on and off functions whichNicholas Marriott
just change mode flags, just have screen_write_mode_set and screen_write_mode_clear.
2013-01-18Rather than having two grids for each pane, one for ASCII and one forNicholas Marriott
UTF-8, collapse the two together. Simplifies the code at the expense of more memory (which can probably be reduced again later).
2013-01-15Implement ECH (erase character, CSI X). Reported by Christian Neukirchen.Nicholas Marriott
2012-12-08Handle resetting 256-colours properly when parsing #[default],Nicholas Marriott
#[fg=default] and #[bg=default] styles.