summaryrefslogtreecommitdiffstats
path: root/usr.bin/tmux/window-copy.c (follow)
Commit message (Collapse)AuthorAgeFilesLines
...
* Add (naive) searching and goto line in copy mode. Searching is C-r and C-s withnicm2009-08-181-15/+391
| | | | | | | | | | 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.
* vi(1)-style half page scroll in copy and scroll modes. Move the vi full pagenicm2009-08-131-1/+19
| | | | | | | 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 :-)).
* Scroll by two less than the number of lines in the screen, like emacs, rathernicm2009-08-131-5/+13
| | | | | than by the entire screen, to make it easier to pull things out from under the line indicator. Suggested by claudio.
* Allowing copy mode to scroll left and right is annoying, so limit it to thenicm2009-08-131-200/+69
| | | | | | | | 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.
* Redraw the screen after resizing.nicm2009-08-131-1/+2
|
* Add a flags member to the grid_line struct and use it to differentiate linesnicm2009-08-081-12/+26
| | | | | wrapped at the screen edge from those terminated by a newline. Then use this when copying to combine wrapped lines together into one.
* Change the way the grid is stored, previously it was:nicm2009-08-081-2/+2
| | | | | | | | | | | - 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.
* If colours are not supported by the terminal, try to emulate a colourednicm2009-08-051-5/+5
| | | | | | | | 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.
* Add a mode-mouse option to prevent tmux taking over the mouse in choice or copynicm2009-07-301-2/+3
| | | | modes.
* Next step towards customisable mode keys: build each default table of keys intonicm2009-07-281-3/+3
| | | | | | 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).
* Remove an unused entry in the mode keys command enum and renamenicm2009-07-271-2/+2
| | | | MODEKEYCOPY_QUIT to _CANCEL to match the others.
* Change mode key bindings from big switches into a set of tables. Rather thannicm2009-07-271-18/+22
| | | | | | | 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.
* Get rid of empty mode_key_free function.nicm2009-07-271-3/+1
|
* Change previous-word behavior to move to the beginning of the word (matchesnicm2009-07-271-36/+21
| | | | emacs and vi). From Kalle Olavi Niemitalo.
* Redraw after starting selection to correctly remove any existing selection.nicm2009-07-231-1/+2
|
* Add a "back to indentation" key in copy mode to move the cursor to the firstnicm2009-07-121-1/+32
| | | | | non-whitespace character. ^ with vi and M-m with emacs key bindings. Another from Kalle Olavi Niemitalo, thanks.
* Merge three copies of identical code to move the cursor x position into anicm2009-07-121-82/+36
| | | | single function, from Kalle Olavi Niemitalo.
* Copy was using the real line length which after resize can be larger than thenicm2009-07-111-1/+9
| | | | | | | 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.
* Stop in the right place so all the lines selected are copied. Reported by Kallenicm2009-07-091-2/+2
| | | | Olavi Niemitalo, thanks.
* Fix two copy/paste bugs: forbid zero-length buffers to prevent a fatal errornicm2009-07-021-2/+2
| | | | | | | 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
* Import tmux, a terminal multiplexor allowing (among other things) a singlenicm2009-06-011-0/+968
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