summaryrefslogtreecommitdiffstats
path: root/screen-write.c
AgeCommit message (Collapse)Author
2018-01-12Do not collect top-bit-set characters in case they need to be replaced.nicm
2017-11-15Completely rewrite the reflow code to correctly handle double widthnicm
characters (previously they were not accounted for).
2017-11-03Support mouse on preview in tree mode.nicm
2017-11-02Make the mode draw function use the parent screen directly rather thannicm
its own to avoid copying twice.
2017-11-02Add a "fast" version of screen_write_copy for tree mode that doesn't donicm
all the checks and selection and marking stuff needed for copy mode.
2017-10-05When writing batches of characters to the screen, we need to clearnicm
padding or later UTF-8 characters could be displayed incorrectly. GitHub issue 1090.
2017-08-09Add -F to choose-tree, choose-client, choose-buffer to specify thenicm
format of each line, as well as adding a couple of formats needed for the default display.
2017-06-30Try to show a better preview of sessions and windows in tree mode.nicm
2017-06-12Need to flush out the linefeed after wrapper. GitHub issue 970.nicm
2017-06-04Typo/style; plus man page escaping from jmc.nicm
2017-05-31Style and spacing nits.nicm
2017-05-30Rewrite of choose mode, both to simplify and tidy the code and to addnicm
some modern features. Now the common code is in mode-tree.c, which provides an API used by the three modes now separated into window-{buffer,client,tree}.c. Buffer mode shows buffers, client mode clients and tree mode a tree of sessions, windows and panes. Each mode has a common set of key bindings plus a few that are specific to the mode. Other changes are: - each mode has a preview pane: for buffers this is the buffer content (very useful), for others it is a preview of the pane; - items may be sorted in different ways ('O' key); - multiple items may be tagged and an operation applied to all of them (for example, to delete multiple buffers at once); - in tree mode a command may be run on the selected item (session, window, pane) or on tagged items (key ':'); - displayed items may be filtered in tree mode by using a format (this is used to implement find-window) (key 'f'); - the custom format (-F) for the display is no longer available; - shortcut keys change from 0-9, a-z, A-Z which was always a bit weird with keys used for other uses to 0-9, M-a to M-z. Now that the code is simpler, other improvements will come later. Primary key bindings for each mode are documented under the commands in the man page (choose-buffer, choose-client, choose-tree). Parts written by Thomas Adam.
2017-05-12Need to store bg for ECH.nicm
2017-05-12Need to clear tty context before using it.nicm
2017-05-12Scrolling needs to use background colour.nicm
2017-05-12ECH needs to use background colour.nicm
2017-05-11Clear to start of screen needs to use background colour.nicm
2017-04-29Fix UTF-8 combining characters in column 0, based on a diff from Keithnicm
Winstein.
2017-04-25Make full width panes try to play more nicely with terminal copy andnicm
paste by avoiding explicit line wraps if we think the terminal will wrap anyway.
2017-04-22Can't collect UTF-8 characters of more than one byte at the moment.nicm
2017-03-07Need to flush before writing out cells we are not collecting, also addnicm
some extra logging.
2017-03-06When redrawing a combined UTF-8 characters in its existing position,nicm
need to save and restore the cursor so that the next character goes into the right place.
2017-02-21Scrolling at least needs to be flushed before sending EL to the terminalnicm
(but it is simpler to flush everything, so do that instead).
2017-02-16Handle insert cells when cursor at edge of screen correctly, and do anicm
full flush before insert.
2017-02-09Combining characters need a full flush.nicm
2017-02-09When an ordinary (not collected) cell is received, we need to flush anynicm
delayed scrolling before drawing it.
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