summaryrefslogtreecommitdiffstats
path: root/screen-write.c
AgeCommit message (Collapse)Author
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.
2012-09-24Use ACS characters for choose-tree arrows based on diff from RomainNicholas Marriott
Francoise.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-03-17Revert screen-write.c r1.54 and fix the bug properly. After wrapping aNicholas Marriott
line in a pane, the cursor needs to move to the next line unless it scrolled.
2012-03-14Store context off before moving the cursor when wrapping, to fix longNicholas Marriott
standing bug drawing over the status line.
2012-03-03Support "bracketed paste" mode. This adds a -p flag to paste-buffer - ifNicholas Marriott
this is used and the application has requested bracketed pastes, then tmux surrounds the pasted text by \033[200~ and \033[201~. Applications like vim can (apparently) use this to avoid, for example, indenting the text. From Ailin Nemui.
2012-01-21Add a -R flag to send-keys to reset the terminal. Written ages ago andNicholas Marriott
Suggested by someone, I forget who.
2011-10-23Support for \e[3J to clear the history. Also send the correspondingNicholas Marriott
terminfo code (E3) before locking.
2011-05-18Support setting the xterm clipboard when copying from copy mode usingNicholas Marriott
the xterm escape sequence for the purpose (if xterm is configured to allow it). Written by and much discussed Ailin Nemui, guidance on xterm/termcap/terminfo from Thomas Dickey.
2011-04-17Fix character position check, from Tiago Resende.Nicholas Marriott
2011-03-26Fix to properly wrap wide characters, from Micah Cowan.Nicholas Marriott
2011-03-07Support passing through escape sequences to the underlying terminal byNicholas Marriott
using DCS with a "tmux;" prefix. Escape characters in the sequences must be doubled. For example: $ printf '\033Ptmux;\033\033]12;red\007\033\\' Will pass \033]12;red\007 to the terminal (and change the cursor colour in xterm). From Kevin Goodsell.
2011-01-25When clearing the entire screen, clear lines that are used into theNicholas Marriott
history like xterm does. Requested ages ago by someone I've forgotten.
2011-01-03Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262Nicholas Marriott
and supports larger terminals than the older way. If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all UTF-8 terminals. The option defaults to on if LANG etc are set in the same manner as the utf8 option. With help and based on code from hsim at gmx.li.
2010-12-29Support all four of the xterm mouse modes. Based on a diff from hsim atNicholas Marriott
gmx.li.
2010-06-21Ensure we overwrite UTF-8 wide characters properly, and never overwriteNicholas Marriott
characters we weren't overlapping. Fixes "disappearing wide characters" glitch. From Micah Cowan.
2010-04-06Merge copy mode and output mode, dropping the latter. Idea and code fromNicholas Marriott
Micah Cowan.
2009-12-03Massive spaces->tabs and trailing whitespace cleanup, hopefully for the lastNicholas Marriott
time now I've configured emacs to make them displayed in really annoying colours...
2009-11-26Remove a couple of unused arguments where possible, and add /* ARGSUSED */ toNicholas Marriott
the rest to reduce lint output.
2009-11-18Cleanup by moving various (mostly horrible) little bits handling UTF-8 gridNicholas Marriott
data into functions in a new file, grid-utf8.c, and use sizeof intead of UTF8_DATA. Also nuke trailing whitespace from tmux.1, reminded by jmc.
2009-11-16A screen can be one cell wide; don't crash if that is the case.Nicholas Marriott
2009-11-11Add an explicit zero-length check for UTF-8 input data, prompted by a reportNicholas Marriott
from parfait via deraadt. While here, add a statement to set the width when filling with _s if not enough space (width should never be high enough at the moment anyway), and wrap some long lines.
2009-10-20Try to reduce the UTF-8 mess.Nicholas Marriott
Get rid of passing around u_char[4]s and define a struct utf8_data which has character data, size (sequence length) and width. Move UTF-8 character collection into two functions utf8_open/utf8_append in utf8.c which fill in this struct and use these functions from input.c and the various functions in screen-write.c. Space for rather more data than is necessary for one UTF-8 sequence is in the utf8_data struct because screen_write_copy is still nasty and needs to reinject the character (after combining) into screen_write_cell.