summaryrefslogtreecommitdiffstats
path: root/window-copy.c
AgeCommit message (Collapse)Author
2009-09-10Permit options such as status-bg to be configured using the entire 256 colourNicholas Marriott
palette by setting "colour0" to "colour255".
2009-09-07Give each paste buffer a size member instead of requiring them to beNicholas Marriott
zero-terminated.
2009-08-21When moving up or down in copy mode, save the cursor position and size of theNicholas Marriott
last line with content (width != 0) and use it to determine if the cursor should be at the end of the line. Fixes problem of the cursor always jumping to the end of the line when scrolling past a blank line.
2009-08-19Don't read beyond the edge of the screen when searching (dies with debugNicholas Marriott
enabled).
2009-08-18Nuke unnecessary assignment.Nicholas Marriott
2009-08-18Add a "delete line" key when editing in the status line or the search up/downNicholas Marriott
prompt. C-u with emacs keys, d with vi.
2009-08-18Add (naive) searching and goto line in copy mode. Searching is C-r and C-s withNicholas Marriott
emacs keys, / and ? with vi; n repeats the search again with either key set. All searching wraps the top/bottom. Goto line is g for both emacs and vi. The search prompts don't have full line editing, just simple append and delete characters. Also sort the mode keys list in tmux.1.
2009-08-13vi(1)-style half page scroll in copy and scroll modes. Move the vi full pageNicholas Marriott
scroll key to C-b instead of C-u and use C-u/C-d for half page scrolling with vi keys. In emacs mode, half page scrolling is bound to M-Up and M-Down. Suggested by merdely (about a year ago :-)).
2009-08-13Scroll by two less than the number of lines in the screen, like emacs, ratherNicholas Marriott
than by the entire screen, to make it easier to pull things out from under the line indicator. Suggested by claudio.
2009-08-13Allowing copy mode to scroll left and right is annoying, so limit it to theNicholas Marriott
real screen width. To indicate the cursor is at the end of the line rather than the cell before, put a '$' in the last cell. Also clear the selection when the terminal is resized to avoid tmux getting confused.
2009-08-13Redraw the screen after resizing.Nicholas Marriott
2009-08-08Add a flags member to the grid_line struct and use it to differentiate linesNicholas Marriott
wrapped at the screen edge from those terminated by a newline. Then use this when copying to combine wrapped lines together into one.
2009-08-08Change the way the grid is stored, previously it was:Nicholas Marriott
- 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 containts 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-08-05If colours are not supported by the terminal, try to emulate a colouredNicholas Marriott
background by setting or clearing the reverse attribute. This makes a few applications which don't use the reverse attribute themselves a little happier, and allows the status, message and mode options to have default attributes and fg/bg options that work as expected when set as reverse.
2009-07-30Add a mode-mouse option to prevent tmux taking over the mouse in choice or copyNicholas Marriott
modes.
2009-07-28Next step towards customisable mode keys: build each default table of keys intoNicholas Marriott
a named tree on start and use that for lookups. Also add command to string translation tables and modify list-keys to show the the mode key bindings (new -t argument).
2009-07-27Remove an unused entry in the mode keys command enum and renameNicholas Marriott
MODEKEYCOPY_QUIT to _CANCEL to match the others.
2009-07-27Change mode key bindings from big switches into a set of tables. Rather thanNicholas Marriott
lumping them all together, split editing keys from those used in choice/more mode and those for copy/scroll mode. Tidier and clearer, and the first step towards customisable mode keys.
2009-07-27Get rid of empty mode_key_free function.Nicholas Marriott
2009-07-27Change previous-word behavior to move to the beginning of the word (matchesNicholas Marriott
emacs and vi). From Kalle Olavi Niemitalo.
2009-07-23Redraw after starting selection to correctly remove any existing selection.Nicholas Marriott
2009-07-12Add a "back to indentation" key in copy mode to move the cursor to the firstNicholas Marriott
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another from Kalle Olavi Niemitalo, thanks.
2009-07-12Merge three copies of identical code to move the cursor x position into aNicholas Marriott
single function, from Kalle Olavi Niemitalo.
2009-07-11Copy was using the real line length which after resize can be larger than theNicholas Marriott
screen width. When built with -DDEBUG, this made the grid bounds checking code kill the server. Restrict copying to the actual width. From Kalle Olavi Niemitalo, thanks.
2009-07-09Stop in the right place so all the lines selected are copied. Reported by KalleNicholas Marriott
Olavi Niemitalo, thanks.
2009-07-02Fix two copy/paste bugs: forbid zero-length buffers to prevent a fatal errorNicholas Marriott
when trying to paste them, found by me, and miscalculation of the start/end causing random fatal errors when copying in copy-mode, reported by sthen. ok sthen "put it in" deraadt
2009-06-01Import tmux, a terminal multiplexor allowing (among other things) a singleNicholas Marriott
terminal to be switched between several different windows and programs displayed on one terminal be detached from one terminal and moved to another. ok deraadt pirofti