summaryrefslogtreecommitdiffstats
path: root/window-choose.c
AgeCommit message (Collapse)Author
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-11-12Support UTF-8 key bindings by expanding the key type from int tonicm
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.)
2015-10-27Move struct options into options.c.nicm
2015-08-28Give clock mode its own timer.nicm
2015-06-05Similarly, for sessions use a callback to free rather than checkingnicm
every loop.
2015-05-08window_choose_mode_item can move into window-choose.c.nicm
2015-05-07array.h can be local to window-choose.c now.nicm
2015-05-04Use the right index when expanding/collapsing tree, from Thomas Adam.nicm
2015-04-19Rewrite of tmux mouse support which was a mess. Instead of havingnicm
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.
2015-03-31Fix some format specifier nits, from Ben Boeckel.nicm
2015-02-05Wrap all the individual format_* calls in a single format_defaultsnicm
functions.
2015-01-15Remove an unnecessary variable and shorten a line.nicm
2014-11-30Remove dead code, from Thomas Adam.nicm
2014-10-22Fix some spacing nits.nicm
2014-10-08Add xreallocarray and remove nmemb argument from xrealloc.nicm
2014-05-08Instead of forcing mouse scroll to 1 in choose mode, scale it downnicm
instead. Means modifier keys still increase the line count, just not as much. Based on a diff from Marcel Partap.
2014-04-17Only scroll by one line at a time in choose mode, lists are generallynicm
pretty small.
2014-04-03Work out mouse scroll wheel effect when the mouse is first detected andnicm
store it in struct mouse_event, reduce the scroll size the 3 but allow shift to reduce it to 1 and meta and ctrl to multiply by 3 if the terminal supports them, also support wheel in choose mode. From Marcel Partap.
2014-03-31Add start-of-list, end-of-list, top-line and bottom-line in choice mode,nicm
from madmaverick9 at roxxmail dot eu, similar diff a few days later from Marcel Partap.
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.
2014-01-09Style and comment fixes from Tiago Cunha.nicm
2013-10-10choose-tree: Reset top when toggling itemsnicm
When choose-tree is told to expand/collapse items (especially when first rendering collapsed to just show sessions), ensure that in addition to setting the selected item, that the item itself appears on the bottom of the screen, rather than off screen. This was causing rendering glitches when a very small tmux window tried to render a list of items in choose-tree much larger than itself, and the selected item appeared off screen, and didn't show the selection until the selection had wrapped around to the top of the screen.
2013-04-22When using choose-tree -u, start with the current windowNicholas Marriott
highlighted. From Thomas Adam.
2013-03-25Rename session idx to session id throughout and add $ prefix to targetsNicholas Marriott
to use it, extended from a diff from George Nachman.
2013-03-24Add a command queue to standardize and simplify commands that call otherNicholas Marriott
commands and allow a command to block execution of subsequent commands. This allows run-shell and if-shell to be synchronous which has been much requested. Each client has a default command queue and commands are consumed one at a time from it. A command may suspend execution from the queue by returning CMD_RETURN_WAIT and then resume it by calling cmd_continue() - for example run-shell does this from the callback that is fired after the job is freed. When the command queue becomes empty, command clients are automatically exited (unless attaching). A callback is also fired - this is used for nested commands in, for example, if-shell which can block execution of the client's cmdq until a new cmdq becomes empty. Also merge all the old error/info/print functions together and lose the old curclient/cmdclient distinction - a cmdq is bound to one client (or none if in the configuration file), this is a command client if c->session is NULL otherwise an attached client.
2013-03-22Need to set clients in context before changing their reference count.Nicholas Marriott
2013-03-22Remove unnecessary initializers of cmd_ctx.Nicholas Marriott
2013-03-22Don't hang when clearing line in choose mode now that the cursor staysNicholas Marriott
at the end with wrap.
2013-03-22No more lint means no more ARGSUSED.Nicholas Marriott
2013-03-21Do not crash when calling choose-tree with a command that changes the mode.Nicholas Marriott
2013-03-21Allow choose commands to be used outside tmux, so long as at least oneNicholas Marriott
client is attached.
2013-02-05Automatically reflow wrapped lines when a pane is resized, requested byNicholas Marriott
many over the years and finally implemented by Richard Woodbury.
2012-12-24Add -T option to select-window to toggle to last window if alreadyNicholas Marriott
current, from Raghavendra D Prabhu.
2012-10-26Make mouse event structure clearer by defining events (up, click, drag)Nicholas Marriott
and simplifying how buttons and wheels are represented, from Ailin Nemui. Should be no functional changes.
2012-10-11Fix a use-after-free when collapsing the tree in choose mode, fromNicholas Marriott
Carl Henrik Lunde.
2012-10-02Allow session tree (C-b s) to expand and collapse sessions withNicholas Marriott
left/right/space keys. From Thomas Adam.
2012-09-03add cmd-choose-list to allow arbitrary options to be selected. FromNicholas Marriott
Thomas Adam.
2012-08-27Instead of requiring a prompt to enter all numbers >10, go back toNicholas Marriott
0-9a-z and add A-Z and enter the prompt when M-0 to M-9 are pressed (like in copy mode). Prompted by request from mcbride@, help from Thomas Adam.
2012-08-14Boldify windows with alerts in choose-* list.Nicholas Marriott
2012-08-12Simplify width calculation (all numbers always sequential) and don'tNicholas Marriott
rely on uninitialized data, from Thomas Adam.
2012-08-11Instead of numbering choose mode items 0-9a-z and then nothing, numberNicholas Marriott
them all and if there are more than 10 use a prompt when 0-9 is pressed. From Thomas Adam.
2012-07-10xfree is not particularly helpful, remove it. From Thomas Adam.Nicholas Marriott
2012-06-25Provide common helper function for adding windows and sessions to chooseNicholas Marriott
lists and expand %% in command before using it rather than at callback time. From Thomas Adam.
2012-06-25Clean up and simplify the choose mode code, from Thomas Adam.Nicholas Marriott
2012-04-23Use a helper function to fire choose callback.Nicholas Marriott
2010-12-29Support all four of the xterm mouse modes. Based on a diff from hsim atNicholas Marriott
gmx.li.
2010-05-23Pass in the session, rather than the client, to window modes' key()Nicholas Marriott
function. We were only ever using the client to find the session anyway. This allows send-key to work properly for manipulating copy mode from outside tmux. From Micah Cowan.
2010-02-01Add scroll-up/scroll-down for choose/more mode, from Micah Cowan.Nicholas Marriott
2010-01-11key should be an int not a char.Nicholas Marriott
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...