summaryrefslogtreecommitdiffstats
path: root/grid.c
AgeCommit message (Collapse)Author
2010-04-05Merge output (more) and copy modes into one single mode (called copy).Micah Cowan
2009-12-04Sync OpenBSD patchset 581:Tiago Cunha
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last time now I've configured emacs to make them displayed in really annoying colours...
2009-11-19Sync OpenBSD patchset 547:Tiago Cunha
Cleanup by moving various (mostly horrible) little bits handling UTF-8 grid 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-10-15Sync OpenBSD patchset 409:Tiago Cunha
Move lines into the history when scrolling even if the scroll region is not the entire screen. Allows ircII users to see history, prompted by naddy.
2009-09-15Sync OpenBSD patchset 328:Tiago Cunha
Stick line length to what is actually used (removing an optimization that allowed it to be bigger), and use clear line/EOL sequences rather than spaces in copy/scroll mode. This fixes xterm copy/paste from tmux which treats trailing spaces differently from clearing a line with the escape sequences. Reported by martynas@.
2009-08-21Sync OpenBSD patchset 283:Tiago Cunha
Fix grid_expand_line so it actually works when the required size is bigger than 2 * the current size.
2009-08-21Sync OpenBSD patchset 282:Tiago Cunha
A few trivial optimisations: no need to check for zero size if calling buffer_ensure in buffer.c; expand grid lines by a greater increase than one each time; and don't read UTF-8 data unless it actually needs to be checked when overwriting a cell.
2009-08-10Sync OpenBSD patchset 239:Tiago Cunha
Use the right source and destination lines in grid_duplicate_lines.
2009-08-09Sync OpenBSD patchset 226:Tiago Cunha
Change the way the grid is stored, previously it was: - a two-dimensional array of cells; - a two-dimensional array of utf8 data; - an array of line lengths. Now it is a single array of a new struct grid_line each of which represents a line and contains the length and an array of cells and an array of utf8 data. This will make it easier to add additional per-line members, such as flags.
2009-07-22Sync OpenBSD patchset 153:Tiago Cunha
Remove a couple of unused functions and fix a type ("FALLTHOUGH"), found by lint.
2009-07-17Stupid cvsps.Nicholas Marriott
2009-07-17Typo in grid_duplicate_lines (sy for dy) causing it to write into the wrongNicholas Marriott
place when copying UTF-8 data. Found by Dan Colish.
2009-07-16Typo in grid_duplicate_lines (sy for dy) causing it to write into the wrongNicholas Marriott
place when copying UTF-8 data. Found by Dan Colish.
2009-07-14Support "alternate screen" mode (terminfo smcup/rmcup) typically used by fullNicholas Marriott
screen interactive programs to preserve the screen contents. When activated, it saves a copy of the visible grid and disables scrolling into and resizing out of the history; when deactivated the visible data is restored and the history reenabled.
2009-07-14If it exist, load a system-wide configuration file /etc/tmux.conf before anyNicholas Marriott
user-specified one.
2009-07-12Limit the history to hlimit not hlimit - 1. This makes a history-limit settingNicholas Marriott
of 0 work as expected.
2009-06-25Whitespace and more syncing.Nicholas Marriott
2009-06-25Restore $Id$ and add script to do so.Nicholas Marriott
2009-06-25Miscellaneous unused functions, including one which was basically aNicholas Marriott
duplicate. Found by lint.
2009-06-25Change find-window and monitor-content to use fnmatch(3). For convenience andNicholas Marriott
compatibility, *s are implicitly added at the start and end of the pattern.
2009-06-25Add a dedicated function to convert a line into a string and use it to ↵Nicholas Marriott
simplify the search window function.
2009-05-04Space trimmage mega-diff.Nicholas Marriott
2009-03-30Add UTF-8 to grid_compare..Nicholas Marriott
2009-03-28Better UTF-8 support, including combined characters. Unicode data is now storedNicholas Marriott
as UTF-8 in a separate array, the code does a lookup into this every time it gets to a UTF-8 cell. Zero width characters are just appended onto the UTF-8 data for the previous cell. This also means that almost no bytes extra are wasted non-Unicode data (yay). Still some oddities, such as copy mode skips over wide characters in a strange way, and the code could do with some tidying.
2009-03-28_fill functions are no longer needed. Nuke them.Nicholas Marriott
2009-03-28Whoops. Missed a few changes.Nicholas Marriott
2009-03-28Step 2 of the Grand Plan To Make UTF-8 Better.Nicholas Marriott
Split grid into two arrays, one containing grid attributes/flags/colours (keeps the name grid_cell for now) and a separate with the character data (called text). The text is stored as a u_short but is treated as a uint64_t elsewhere; eventually the grid will have two arrays. I'm not happy with the naming so that might change. Still need to decide where to go from here. I'm not sure whether to combine the peek/set functions together, and also whether to continue to treat the text as a uint64_t (and convert to/from Unicode) or make it a char array (of size one when UTF-8 disabled, eight when enabled) and keep everything as UTF-8. Also since UTF-8 will eventually become an attribute of the grid itself it might be nice to move all the padding crap into grid.c.
2009-03-28struct grid_data -> struct grid. Stage 1 of the Grand Plan To Make UTF-8 Better.Nicholas Marriott
2009-02-16Don't leak top line of history and status screen.Nicholas Marriott
2009-02-10Don't redraw status line unless it has actually changed. Stops extraneousNicholas Marriott
updates between clock/#() changes and doesn't require manual status-interval 0 when no updates are occuring.
2009-01-17Tidy a few warnings.Nicholas Marriott
2009-01-11Correct comment.Nicholas Marriott
2009-01-10Trim spaces.Nicholas Marriott
2009-01-08Don't die when out of bounds if non-DEBUG. Stops people hitting me when bugs ↵Nicholas Marriott
kill their long-running sessions in release versions.
2008-09-28Calculate y properly.Nicholas Marriott
2008-09-26Trim.Nicholas Marriott
2008-09-25Internal screen data rewrite for better 256 colour/UTF-8 support.Nicholas Marriott