aboutsummaryrefslogtreecommitdiff
path: root/window-copy.c
Commit message (Collapse)AuthorAge
* Add static in window-*.c and move some internal functions out of tmux.h.nicm2016-10-11
|
* Support double and triple clicks (they are cumulative, so double isnicm2016-10-11
| | | | | fired then triple), and use for select-word and select-line in copy mode. Inspired by a different solution from Omar Sandoval.
* Fundamental change to how copy mode key bindings work:nicm2016-10-11
| | | | | | | | | | | | | | | | | | | | | | | | | The vi-copy and emacs-copy mode key tables are gone, and instead copy mode commands are bound in one of two normal key tables ("copy-mode" or "copy-mode-vi"). Keys are bound to "send-keys -X copy-mode-command". So: bind -temacs-copy C-Up scroll-up bind -temacs-copy -R5 WheelUpPane scroll-up Becomes: bind -Tcopy-mode C-Up send -X scroll-up bind -Tcopy-mode WheelUpPane send -N5 -X scroll-up This allows the full command parser and command set to be used - for example, we can use the normal command prompt for searching, jumping, and so on instead of a custom one: bind -Tcopy-mode C-r command-prompt -p'search up' "send -X search-backward '%%'" command-prompt also gets a -1 option to only require on key press, which is needed for jumping. The plan is to get rid of mode keys entirely, so more to come eventually.
* Use xsnprintf not snprintf for the prompt in window_copy_write_linenicm2016-10-09
| | | | | because we don't care if it is truncated to the screen width, we don't want it to be fatal.
* Remove some dead code in cmd-move-window.c and make a load of localnicm2016-10-03
| | | | functions static.
* Allow repeat count to be specified in mode key tables with bind-key -R,nicm2016-09-12
| | | | | and set the default repeat count to 5 for WheelUp and WheelDown in copy-mode.
* Remove unused variable, from Ben Boeckel.nicm2016-05-23
|
* Some tidying of copy mode search functions, based on a diff from Lukasznicm2016-05-03
| | | | Piatkowski (initial changes to help some more to come).
* Use the same code for half page scrolling as full, from Michal Mazurek.nicm2016-05-01
|
* Add next/previous paragraph, from J Raynor.nicm2016-04-27
|
* Make scrolling behaviour more sensible and maintain cursor position, asnicm2016-03-18
| | | | if the same had been done line-by-line. From Michal Mazurek.
* When a mouse drag is finished, fire a MouseUp key press, instead ofnicm2016-03-01
| | | | doing the drag end in code. From Stephen Coakley.
* Do not wrap cursor at start or end of history, from Michal Mazurek.nicm2016-02-05
|
* I no longer use my SourceForge address so replace it.nicm2016-01-19
|
* Add cmdq as an argument to format_create and add a format for thenicm2015-12-11
| | | | command name (will also be used for more later).
* Remove format_create_flags and just pass flags to format_create.nicm2015-12-08
|
* Use __unused rather than rolling our own.nicm2015-11-18
|
* Long overdue change to the way we store cells in the grid: now, insteadnicm2015-11-13
| | | | | | | | | | | | | | | 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.
* Nuke the utf8 and status-utf8 options and make tmux only a UTF-8nicm2015-11-12
| | | | | 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).
* Support UTF-8 key bindings by expanding the key type from int tonicm2015-11-12
| | | | | | uint64_t and converting UTF-8 to Unicode on input and the reverse on output. (This allows key bindings, there are still omissions - the largest being that the various prompts do not accept UTF-8.)
* Because pledge(2) does not allow us to pass directory file descriptorsnicm2015-10-31
| | | | | | | | | around, we can't use file descriptors for the working directory because we will be unable to pass it to a privileged process to tell it where to read or write files or spawn children. So move tmux back to using strings for the current working directory. We try to check it exists with access() when it is set but ultimately fall back to ~ if it fails at time of use (or / if that fails too).
* Move struct options into options.c.nicm2015-10-27
|
* Format for scroll position, from Jorge Morante.nicm2015-10-23
|
* Style nit, int for flags not u_int.nicm2015-09-14
|
* Add copy-mode -e to exit copy mode when scrolling off the bottom, usefulnicm2015-09-13
| | | | for quick view of history, from Cam Hutchison.
* Move struct paste_buffer out of tmux.h.nicm2015-08-29
|
* Give clock mode its own timer.nicm2015-08-28
|
* Set working directory for run-shell and if-shell.nicm2015-04-24
|
* cmd_mouse_pane can return NULL, check for that.nicm2015-04-21
|
* Remove unused-but-set variables, from Thomas Adam.nicm2015-04-20
|
* Make jump-to-backward/jump-to-forward repeatable withnicm2015-04-20
| | | | jump-reverse/jump-again, from Jacob Niehus.
* Rewrite of tmux mouse support which was a mess. Instead of havingnicm2015-04-19
| | | | | | | | | | | | | | | | | | | | | | | | | options for "mouse-this" and "mouse-that", mouse events may be bound as keys and there is one option "mouse" that turns on mouse support entirely (set -g mouse on). See the new MOUSE SUPPORT section of the man page for description of the key names and new flags (-t= to specify the pane or window under mouse as a target, and send-keys -M to pass through a mouse event). The default builtin bindings for the mouse are: bind -n MouseDown1Pane select-pane -t=; send-keys -M bind -n MouseDown1Status select-window -t= bind -n MouseDrag1Pane copy-mode -M bind -n MouseDrag1Border resize-pane -M To get the effect of turning mode-mouse off, do: unbind -n MouseDrag1Pane unbind -temacs-copy MouseDrag1Pane The old mouse options are now gone, set-option -q may be used to suppress warnings if mixing configuration files.
* Add a -x flag to copy-selection, append-selection and start-named-buffernicm2015-04-10
| | | | | to prevent it exiting copy mode after copying. From J Raynor with a few tweaks by me.
* Fix some format specifier nits, from Ben Boeckel.nicm2015-03-31
|
* Wrap all the individual format_* calls in a single format_defaultsnicm2015-02-05
| | | | functions.
* Shorten some long lines.nicm2015-01-15
|
* Only redraw affected lines when selection changes with mouse. Fromnicm2014-12-15
| | | | Michael Graczyk.
* Expand formats in copy-pipe command, suggested by Suraj N Kurapati.nicm2014-11-09
|
* Wrap when copy mode is used for output, from Balazs Kezes.nicm2014-11-06
|
* Add V for select line with vi(1) keys. From Juho Pohjala.nicm2014-11-06
|
* Fix some spacing nits.nicm2014-10-22
|
* Add xreallocarray and remove nmemb argument from xrealloc.nicm2014-10-08
|
* Copy ACS characters as UTF-8, from Balazs Kezes.nicm2014-10-02
|
* Various minor style and spacing nits.nicm2014-09-01
|
* No need to repeat other-end more than once, from Juho Pohjala. Also addnicm2014-08-11
| | | | it to the commands list while here.
* Fix two copy mode problems:nicm2014-08-11
| | | | | | | | | 1. In vi mode the selection doesn't include the last character if you moved the cursor up or left. 2. In emacs mode the selection includes the last character if you moved the cursor to the left. From Balazs Kezes.
* Copy newline when at EOL in vi(1) mode, from Balazs Kezes.nicm2014-06-19
|
* Simplify copy lines, from Keith Amling.nicm2014-05-14
|
* Add a copy mode key binding to copy to a named buffer. From J Raynor.nicm2014-05-13
|
* Add support for named buffers. If you don't name a buffer, things worknicm2014-05-13
| | | | | | | | much as before - buffers are automatically named "buffer0000", "buffer0001" and so on and ordered as a stack. Buffers can be named explicitly when creating ("loadb -b foo" etc) or renamed ("setb -b buffer0000 -n foo"). If buffers are named explicitly, they are not deleted when buffer-limit is reached. Diff from J Raynor.