Commit Graph

618 Commits

Author SHA1 Message Date
d8da761d54 Merge branch 'obsd-master' 2017-01-31 00:01:12 +00:00
3408595f77 When a flag option is used in a format, it should use the number form
not string.
2017-01-30 21:41:17 +00:00
7e110b9d99 Merge branch 'obsd-master' 2017-01-16 15:36:02 +00:00
68db958477 getopt() has a struct option so just return to using options_entry. 2017-01-16 14:49:14 +00:00
c9fcb76651 Merge branch 'obsd-master' 2017-01-15 22:01:11 +00:00
2b0bc9f1c5 Major tidy up and rework of options tree and set-option/show-options
commands this pushes more of the code into options.c and ties it more
closely to the options table rather than having an unnecessary
split. Also add support for array options (will be used later). Only
(intentional) user visible change is that show-options output is now
passed through vis(3) with VIS_DQ so quotes are escaped.
2017-01-15 20:48:41 +00:00
d87ab0cadf Merge branch 'obsd-master' 2017-01-11 18:01:13 +00:00
bf6a5c056d Add a format for terminal type. 2017-01-11 16:09:57 +00:00
2c862b04af Merge branch 'obsd-master' 2017-01-09 22:01:12 +00:00
36619607ba Add a format for the version. 2017-01-09 21:44:19 +00:00
844f2eacf4 Add simple comparisons in formats: #{==:a,b} and #{!=:a,b} ("a" and "b"
are expanded so can compare formats). And expand the condition to
#{?a,b,c} (the "a" part) if it doesn't work as a simple lookup.

Also add FORMAT_NOJOBS flag to disable jobs in a format.
2017-01-09 21:03:25 +00:00
442e49f51c Merge branch 'obsd-master' 2016-11-17 12:01:10 +00:00
3cf19d6dd0 Key running commands for #() by the unexpanded command, and run them
again if the expanded form changes (otherwise at most once per second as
usual). Fixes issues reported by Gregory Pakosz.
2016-11-17 10:06:08 +00:00
1a6e696b08 Merge branch 'obsd-master' 2016-10-16 22:01:14 +01:00
3f35b5299f Provide a way for hooks to tag formats onto the commands they fire so
that the user can get at additional information - now used for the
"hook" format, more to come.
2016-10-16 19:36:37 +00:00
b342bd0b46 Mass rename struct cmd_q to struct cmdq_item and related. 2016-10-16 19:04:05 +00:00
c67b702588 Merge branch 'obsd-master' 2016-10-16 20:01:10 +01:00
ddc4512d2e Rewrite command queue handling. Each client still has a command queue,
but there is also now a global command queue. Instead of command queues
being dispatched on demand from wherever the command happens to be
added, they are now all dispatched from the top level server
loop. Command queues may now also include callbacks as well as commands,
and items may be inserted after the current command as well as at the end.

This all makes command queues significantly more predictable and easier
to use, and avoids the complex multiple nested command queues used by
source-file, if-shell and friends.

A mass rename of struct cmdq to a better name (cmdq_item probably) is
coming.
2016-10-16 17:55:14 +00:00
0f7d39c410 Add missing function protype 2016-10-12 09:49:16 +01:00
b9dc855016 Merge branch 'obsd-master'
Conflicts:
	format.c
	osdep-openbsd.c
2016-10-12 09:45:49 +01:00
5c49e1d0c1 Some other stuff that can be local to one file. 2016-10-11 13:45:47 +00:00
c426e485e5 Loads more static, except for cmd-*.c and window-*.c. 2016-10-10 21:29:23 +00:00
05ec232f3e Merge branch 'obsd-master' 2016-05-24 00:01:09 +01:00
95a4cc3bce Use a fixed buffer for strftime() because there is no portable way to
tell if the buffer is too small, and an expanding buffer is overkill
anyway.
2016-05-23 20:39:26 +00:00
ba9f32b464 Merge branch 'obsd-master' 2016-04-29 16:01:12 +01:00
0d84fdd953 Final parts of command hooks, add before- and after- hooks to each command. 2016-04-29 14:05:24 +00:00
5fce21728e Merge branch 'obsd-master' 2016-01-31 12:01:09 +00:00
8028560f82 Support negative trim values (#{=-10:pane_title}) to trim from the end,
suggested by Kevin Brubeck Unhammer.
2016-01-31 09:54:46 +00:00
dc42c35f1f Merge branch 'obsd-master' 2016-01-19 18:01:15 +00:00
995af0e2b7 I no longer use my SourceForge address so replace it. 2016-01-19 15:59:12 +00:00
845a664bb2 Merge branch 'obsd-master' 2015-12-12 20:01:15 +00:00
5ed17e84fa Add key-table option to set the default key table for a session, allows
different key bindings for different sessions and a few other things.
2015-12-12 18:32:24 +00:00
4909a70174 Merge branch 'obsd-master' 2015-12-11 13:24:45 +00:00
01831da5f5 Add cmdq as an argument to format_create and add a format for the
command name (will also be used for more later).
2015-12-11 12:27:36 +00:00
af8134a6ff Merge branch 'obsd-master' 2015-12-08 10:01:16 +00:00
e0f26dcda3 Remove format_create_flags and just pass flags to format_create. 2015-12-08 08:34:18 +00:00
890d8da2e3 Merge branch 'obsd-master'
Conflicts:
	log.c
	proc.c
	tmux.c
2015-11-25 16:37:30 +00:00
1e2df2d464 Remove the -I part of show-messages which isn't really that useful; the
server start time can now be accessed with a new start_time format (use:
tmux display -p '#{t:start_time}')
2015-11-24 21:52:06 +00:00
7fe8edc396 Merge branch 'obsd-master' 2015-11-18 16:01:23 +00:00
577c0e3e5a Use __unused rather than rolling our own. 2015-11-18 14:27:44 +00:00
5a5b950e8b Add s/foo/bar/: prefix for formats to substitute bar for foo. 2015-11-18 14:13:55 +00:00
45a10dde95 Merge branch 'obsd-master' 2015-11-13 14:01:10 +00:00
88aa1c8dc3 Two spacing and spelling nits. 2015-11-13 12:18:52 +00:00
e2917b2627 Merge branch 'obsd-master' 2015-11-13 10:43:07 +00:00
3df4959f51 Merge branch 'obsd-master'
Conflicts:
	Makefile
2015-11-13 10:42:45 +00:00
531869bd92 Add window_visible_layout which ignores zoomed panes and use it for
control mode (which needs to know all panes), from George Nachman.
2015-11-13 10:00:26 +00:00
c5689a5a40 Long overdue change to the way we store cells in the grid: now, instead
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.
2015-11-13 08:09:28 +00:00
5f483499f3 Merge branch 'obsd-master' 2015-11-12 12:01:17 +00:00
1b86f520ea Nuke the utf8 and status-utf8 options and make tmux only a UTF-8
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-12 11:09:11 +00:00
a0f3999ce7 Remove the mouse_utf8_flag format as well. 2015-11-12 11:07:10 +00:00