Thomas Adam
80d9964a30
Update CHANGES and configure.ac for 1.9a release
2014-02-22 20:55:59 +00:00
Thomas Adam
150ef86800
Merge branch 'obsd-master'
2014-02-22 20:48:44 +00:00
nicm
315d45a0eb
Fix crash due to uninitialized lastwp member of layout_cell, reported by
...
Balazs Kezes.
2014-02-22 18:01:10 +00:00
Nicholas Marriott
2a412fad04
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2014-02-22 17:36:17 +00:00
Nicholas Marriott
fe6f520054
FAQ about xterm-keys in emacs and vim, from Mark Oteiza.
2014-02-22 17:35:41 +00:00
nicm
c7f3599ebc
Fix -fg/-bg/-style with 256 colour terminals.
2014-02-22 01:38:47 +00:00
Thomas Adam
b7589750a1
Correct Linux-specific manpage sections
...
Some of the man page locations on Linux differ to those on *BSD. Noticed by
Christopher Meng.
2014-02-21 09:27:28 +00:00
Nicholas Marriott
c310212d28
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2014-02-21 08:03:42 +00:00
Nicholas Marriott
94d99d5462
Put each command on its own line and remove duplicates, from Daniel Hahler.
2014-02-21 08:02:48 +00:00
Thomas Adam
9120df33ef
dist: Call clean target before any other action
...
In case 'make dist' is invoked from a dirty tree which hasn't had its object
files cleaned up, clean out the tree first before tarring up the files for a
release.
2014-02-20 23:20:17 +00:00
Thomas Adam
1ab0745f8e
Working on 1.10
2014-02-20 21:44:33 +00:00
Thomas Adam
c5d2de7ec0
Update CHANGES and configure.ac for 1.9 release
2014-02-20 21:32:42 +00:00
Thomas Adam
ca1d78f523
Merge branch 'obsd-master'
2014-02-19 15:05:07 +00:00
nicm
6daf06b1ad
Fix memory leaks with paste_replace, based on changes from J Raynor.
2014-02-17 23:07:03 +00:00
nicm
69b7c496ac
Be consistent and allow only mouse down and mouse wheel for any pane
...
with mouse-select-pane rather than just in copy mode, reported by Balazs
Kezes.
2014-02-17 22:42:20 +00:00
nicm
1e981f4c6d
Don't crash when given a invalid colour, reported by Felix Rosencrantz,
...
fix from Thomas Adam.
2014-02-17 18:12:47 +00:00
Nicholas Marriott
d325104d10
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2014-02-17 18:09:25 +00:00
Thomas Adam
b3de4a3dec
Merge branch 'obsd-master'
...
Conflicts:
tmux.1
tmux.c
2014-02-16 23:02:07 +00:00
nicm
81db6bab91
Leftovers from removing 88 colour support, from Theo Buehler.
2014-02-16 12:45:17 +00:00
nicm
f2e54e1e2f
If the terminfo entry has colors#256, assume that setaf and setab work
...
and use them for the 256 colour set. If the terminfo entry doesn't have
colors#256 and the user gives -2 to the client, use a \033[38;5;Xm
sequence as before. Should allow fbterm to work with it's weird setaf
and setab.
2014-02-14 14:37:08 +00:00
nicm
e9d32f901a
Make status-interval of zero work as indented.
2014-02-14 14:00:18 +00:00
nicm
f835be4bb2
Style nit - no space between function name and bracket.
2014-02-14 13:59:01 +00:00
Nicholas Marriott
3aadc9d665
Missing *.
2014-02-14 13:56:39 +00:00
nicm
bfb700cf41
Do not need to call winlink_find_by_window, from Filip Moc.
2014-02-14 12:44:45 +00:00
nicm
d0accdba88
Check for NULL session and whatnot in status_replace, from Thomas Adam.
2014-02-14 12:37:54 +00:00
nicm
f58721a9e8
Make C-j the same as C-m, from Simon Nicolussi.
2014-02-14 12:35:58 +00:00
nicm
325396046a
Avoid use of uninitialized variable, from Thomas Adam.
2014-02-12 20:26:13 +00:00
nicm
c52548f6fd
The last fix to xterm keys meant that some keys such as \033OA were
...
being wrongly treated as partial matches. So both check xterm keys after
standard keys and only wildcard the minimum required ('1' to
'8'). Problems reported by Ralf Horstmann and Tim van der Molen.
2014-02-10 11:20:41 +00:00
Ben Boeckel
8edbbb9865
Sort and organize option names in tmux.vim
...
Also update with the latest options and remove the to-be-deprecated
{-attr,-bg,-fg} options.
Signed-off-by: Ben Boeckel <mathstuf@gmail.com >
2014-02-05 19:14:12 +00:00
Ben Boeckel
73c125f248
Sort and organize commands in tmux.vim
...
Signed-off-by: Ben Boeckel <mathstuf@gmail.com >
2014-02-05 19:13:11 +00:00
Thomas Adam
1721056f35
Remove references to 88colour support
...
Tmux doesn't directly support terminals with 88 colours directly anymore.
2014-02-05 10:51:25 +00:00
Thomas
6eef24c37a
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2014-02-05 10:47:57 +00:00
jmc
973de5a704
fix some minor formatting glitches;
2014-02-02 08:48:48 +00:00
Nicholas Marriott
57332be8da
Tidy up TODO list.
2014-02-01 00:47:04 +00:00
Thomas Adam
44737b06db
Fixup BSD specific things from last merge
...
There's entries for header files we don't use, and the cvsimport doesn't
like removing files automatically, etc., and it won't have known to have
done this from autoconf's POV, so define that in the correct place, hence
the removal of the previously committed Makefile.
2014-01-31 21:47:54 +00:00
Thomas Adam
d50e47fc4a
Merge branch 'obsd-master'
...
Conflicts:
Makefile
cmd-server-info.c
cmd-start-server.c
2014-01-31 21:39:56 +00:00
nicm
9f02feb9d0
Break up and simplify screen_redraw_screen.
2014-01-31 14:19:24 +00:00
nicm
72d1be5ddd
Fix partial matches with xterm-keys on, from m0viefreak dot cm at
...
googlemail dot com.
2014-01-31 11:20:28 +00:00
nicm
1935eb5c1e
Add \033[18t window operations from J Raynor.
2014-01-31 11:17:20 +00:00
nicm
62e0ed5d7e
Fix missing argument, stupid last minute changes...
2014-01-28 23:11:44 +00:00
nicm
945339b443
Allow replacing each of the many sets of separate foo-{fg,bg,attr}
...
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-28 23:07:09 +00:00
nicm
c930fd5ff6
Remember the last active pane in the top-bottom or left-right cell so
...
that it can be restored when moving back to that cell with selectp
-L/-R/etc. From Suraj N Kurapati.
2014-01-28 22:19:17 +00:00
nicm
dda70d4ef1
Merge start-server into kill-server.
2014-01-27 23:57:35 +00:00
nicm
7d3d996383
Support paste key in copy mode input (for search etc). Also clamp length
...
to screen width.
2014-01-22 22:32:15 +00:00
nicm
d23561f381
Merge server-info into show-messages and remove some not useful output.
2014-01-22 14:43:42 +00:00
Nicholas Marriott
cbf9224c5f
Add AC_PROG_MKDIR_P.
2014-01-22 14:03:16 +00:00
Nicholas Marriott
c965870585
+ to TODO.
2014-01-22 14:02:32 +00:00
nicm
9ee93b3ea3
Do not permit periods in session names (colons are already banned). From
...
J Raynor.
2014-01-22 14:00:08 +00:00
nicm
df680d7257
Only exit copy mode at the bottom if no selection in progress, from
...
Benoit Pierre.
2014-01-22 13:57:49 +00:00
Thomas
d02c4bda3a
Merge branch 'obsd-master'
2014-01-20 10:48:12 +00:00
nicm
938768ed3d
Do not attempt to read .tmux.conf if we can't figure out a home
...
directory, from Tiago Cunha.
2014-01-15 11:46:28 +00:00
nicm
3368b602a8
Couple of fixes from cppcheck via Tiago Cunha.
2014-01-15 11:44:18 +00:00
nicm
b185449d07
Fix a memory/fd leak reported by Tiago Cunha.
2014-01-09 21:20:45 +00:00
nicm
c2cac69a22
Similar to attach-session, make switch-client -t accept a window and
...
pane. From Johannes Jakobsson.
2014-01-09 14:28:14 +00:00
nicm
1a0d3cd5d3
Allow attach-session -t to accept a window and pane to select them on
...
attach. Based on a diff from J Raynor.
2014-01-09 14:20:55 +00:00
nicm
adc1f21eae
Three small changes from Tiago Cunha:
...
- Check for truncation when copying path.
- Don't need to use a temporary buffer in screen_set_title.
- Include strerror in output when connecting to server fails.
2014-01-09 14:05:55 +00:00
nicm
994cb872cf
Style and comment fixes from Tiago Cunha.
2014-01-09 13:58:06 +00:00
nicm
66829ee12e
Simplify args_set, from Tiago Cunha.
2014-01-09 13:51:57 +00:00
nicm
1751da76d5
Remove unnecessary calls to va_start/va_end, from Tiago Cunha.
2014-01-09 13:46:12 +00:00
Nicholas Marriott
ba014c1a60
NetBSD broke strnvis when they added it, check for that.
2014-01-06 15:16:57 +00:00
Nicholas Marriott
886c282679
Use 0 if O_DIRECTORY is missing, reported by Dagobert Michelsen.
2014-01-06 15:12:05 +00:00
Nicholas Marriott
ccf39fcdc1
+.
2013-12-09 23:27:42 +00:00
Nicholas Marriott
ee65bde130
Note libevent version.
2013-12-09 22:53:17 +00:00
Nicholas Marriott
b091790622
+.
2013-11-30 17:56:49 +00:00
Nicholas Marriott
a352570e9f
+.
2013-11-30 17:18:25 +00:00
nicm
d459314517
Add comments to ACS table matching terminfo(5).
2013-11-24 19:38:32 +00:00
nicm
1286c56188
Replace ## by # in format.
2013-11-24 11:29:09 +00:00
nicm
40982a01fb
With -k, kill window after using it to work out -c path. Reported by
...
jmacristovao at gmail dot com.
2013-11-23 09:18:29 +00:00
nicm
7aeb4473ad
Handle empty current directory more gracefully.
2013-11-22 20:58:36 +00:00
deraadt
72a4602b88
missing unsigned char casts areound tolower()
...
ok nicm
2013-11-20 17:01:23 +00:00
okan
30275bc610
Include unistd.h as it is the standard location for getopt().
...
OK millert@
2013-11-17 20:19:36 +00:00
Thomas Adam
3e498cdb49
Merge branch 'obsd-master'
2013-11-14 07:51:26 +00:00
benno
7624800ddc
from nicm: : handle msgbuf_write() returning EAGAIN
2013-11-13 20:43:36 +00:00
nicm
f0ed61f53c
Support case insensitive searching in the same manner as emacs - all
...
lowercase means case insensitive, any uppercase means case
sensitive. From J Raynor.
2013-11-09 00:48:57 +00:00
nicm
a6cd84869e
Correctly redraw the top two lines in copy mode when they are selected -
...
the selection was being updated before the redraw so the markings were
lost. Based on a fix from J Raynor.
2013-11-08 12:39:20 +00:00
nicm
7fa55b0419
Key to swap to other end of selection (bound to o with vi keys), from J
...
Raynor.
2013-10-23 11:31:03 +00:00
nicm
bf35441608
Do not run any command line command from the client which starts the
...
server until after the configuration file completes. This prevents it
racing against run-shell or if-shell in .tmux.conf that run in the
background.
2013-10-20 17:28:43 +00:00
nicm
f52eac6225
Don't turn on modifyOtherKeys by default, it is annoying if tmux is
...
killed and it's left on and we can't turn it on and off like we do for
attributes. It's not hard to enable in .Xresources or .Xdefaults anyway.
2013-10-20 09:37:50 +00:00
Thomas Adam
2c08a3a559
Merge branch 'obsd-master'
2013-10-15 08:06:56 +01:00
nicm
2eb6d6e31b
Fix detach -a by skipping clients where the session is NULL.
2013-10-15 00:15:11 +00:00
Thomas Adam
334c28afe7
Fix previous
...
cwd is a char*, not a u_int.
2013-10-11 19:41:43 +01:00
Thomas Adam
5944230c50
Fix up missing cwd definition
...
This went walkies during the merge.
2013-10-11 19:38:40 +01:00
Nicholas Marriott
8bcdd8fc21
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
...
Conflicts:
cmd-split-window.c
cmd-unbind-key.c
format.c
osdep-openbsd.c
2013-10-11 16:52:39 +01:00
Thomas
d518067be6
Forward-declarations for osdep-linux
2013-10-11 14:55:57 +01:00
Thomas
f703a30dfe
Fixup osdep-* specific code
...
get_proc_name() is osdep_get_name() outside of OpenBSD.
2013-10-11 14:39:22 +01:00
Nicholas Marriott
1a0951959f
Add destroy entry to TODO.
2013-10-11 14:36:28 +01:00
Nicholas Marriott
b347a994fd
+ to TODO.
2013-10-11 14:36:28 +01:00
Nicholas Marriott
6126fa0995
+ to TODO.
2013-10-11 14:36:28 +01:00
Nicholas Marriott
85df418728
++ to TODO.
2013-10-11 14:36:28 +01:00
Nicholas Marriott
558e5639d0
Remove from TODO.
2013-10-11 14:36:28 +01:00
Nicholas Marriott
d8d746b4b8
Set EVENT_NOEPOLL on Linux again.
2013-10-11 14:36:28 +01:00
Nicholas Marriott
570028e9c0
Add entry about smaller clients based on text from Thomas Adam.
2013-10-11 14:36:28 +01:00
Thomas Adam
7c3e7d6535
Add subdir-objects to shut automake up
...
automake 1.14 onwards has started emitting lots of warnings about this
option:
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the
'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding
output
automake: object file(s) will be placed in the top-level directory.
However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same
subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout
your
automake: project, to avoid future incompatibilities.
So enable this in AM_INIT_AUTOMAKE.
This doesn't seem to break older automake versions.
2013-10-11 14:36:28 +01:00
Thomas Adam
5b065e93b3
Check setupterm() in libtinfo also
...
Some ncurses packages have build time configuration options to separate its
different parts into separate libraries. Some Linux distributions in
particular separate out the terminfo routines in to libtinfo.
This change teaches configure that setupterm() can also be found there.
2013-10-11 14:36:28 +01:00
Thomas Adam
d3f37566e2
Ignore .dirstamp files
...
GNU automake 1.14+ uses these files for subdir-option detection. We don't
want to accidentally commit these. They're not useful to us.
2013-10-11 14:36:28 +01:00
Nicholas Marriott
b8b31ad53e
Add openat() to compat.
2013-10-11 14:36:28 +01:00
Thomas
7f479ffdce
Merge branch 'obsd-master' into mtemp
2013-10-11 14:33:29 +01:00
nicm
4901d9ddc8
Don't leak file descriptors in the rare MSG_VERSION case. From Chris
...
Johnsen.
2013-10-11 08:07:12 +00:00
nicm
ffba21a60c
Remove stray return, from Chris Johnsen.
2013-10-11 08:06:03 +00:00
nicm
98b81e9834
And get it right this time... don't leak if it is an empty string either.
2013-10-11 08:03:43 +00:00
nicm
17ec688ced
Bracket in the wrong place in description of c0-change-trigger.
2013-10-10 23:31:28 +00:00
nicm
0b77d17b35
Fix leak in format_get_command.
2013-10-10 23:31:03 +00:00
nicm
d0566a474a
Remove the KERN_PROC_CWD the proc_current_path format (which is the only
...
thing that uses it now).
2013-10-10 12:39:24 +00:00
nicm
99e3cbc526
Use format_get_command() and some spacing tweaks.
2013-10-10 12:35:30 +00:00
nicm
b85de1ddb3
Pass -1 for cwd now not NULL.
2013-10-10 12:29:53 +00:00
nicm
c1ccefc62d
We accidentally haven't been using $TMUX to work out the session for a
...
while and in fact it is less useful that using the client ttyname. So
don't bother and don't pass it from the client. If we need it in future
it is in c->environ.
2013-10-10 12:29:35 +00:00
nicm
6ac7abe8f0
Remove now unused cmd_get_default_path.
2013-10-10 12:28:56 +00:00
nicm
909e1c1a86
Don't boke when figuring out working directory from configuration file.
2013-10-10 12:28:38 +00:00
nicm
7936ce3874
Show session name in detached message. Requested by somebody a few
...
months ago who didn't bother testing it. But it works for me anyway.
2013-10-10 12:28:08 +00:00
nicm
b8b85fbb0c
Don't look at string[length - 1] if length == 0.
2013-10-10 12:27:38 +00:00
nicm
282c5f9644
Alter how tmux handles the working directory to internally use file
...
descriptors rather than strings.
- Each session still has a current working directory.
- New sessions still get their working directory from the client that
created them or its attached session if any.
- New windows are created by default in the session working directory.
- The -c flag to new, neww, splitw allows the working directory to be
overridden.
- The -c flag to attach let's the session working directory be changed.
- The default-path option has been removed.
To get the equivalent to default-path '.', do:
bind c neww -c $PWD
To get the equivalent of default-path '~', do:
bind c neww -c ~
This also changes the client identify protocol to be a set of messages rather
than one as well as some other changes that should make it easier to make
backwards-compatible protocol changes in future.
2013-10-10 12:26:34 +00:00
nicm
165aa59760
Make tilde expansion in command strings work even if it isn't terminated by /.
2013-10-10 12:14:09 +00:00
nicm
10c38436aa
Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048.
2013-10-10 12:13:56 +00:00
nicm
a0404b6902
retcode -> retval for exit message.
2013-10-10 12:12:54 +00:00
nicm
eb26dbd072
Merge IDENTIFY_* flags with CLIENT_* flags.
2013-10-10 12:12:08 +00:00
nicm
6c093010e0
Remove CMD_SENDENVIRON.
2013-10-10 12:09:34 +00:00
nicm
d2160e3f83
mouse-resize-pane: Only resize on border select
...
The current behaviour of mouse-resize-pane is such that if the mouse
button is held down and a selection takes place within a pane, that if
the mouse pointer then hits a border edge, that pane-resize would
initiate.
This seems counter-intuitive; instead, check for a resize condition if
the border of a pane is selected, and in the case of mouse selection
within a pane, no longer resize the pane if edge of the border is hit.
By Thomas Adam.
2013-10-10 12:08:14 +00:00
nicm
b822d24b15
Support -c for new-session, based on code from J Raynor.
2013-10-10 12:07:36 +00:00
nicm
fc54bfe6b0
Make cmdq->client_exit a tristate (-1 means "not set") so that if
...
explicitly set it can be copied from child to parent cmdq by if-shell
and source-file. This fixes using attach or new. From Chris Johnsen.
2013-10-10 12:04:38 +00:00
nicm
1a49ebaa9f
First period not last for host_short, from Michael Scholz.
2013-10-10 12:04:01 +00:00
nicm
e4dc1568ce
Don't treat TMUX_TMPDIR as a potential file
...
The point of setting TMUX_TMPDIR is to then make any labels from -L go
to that directory. In the case of makesocketpath() with no TMUX_TMPDIR
set, would set both the path and the default socket to a file. The
checking of the permissions on the file worked fine in that case, but
when TMUX_TMPDIR is set, won't work on a directory.
This fixes the problem by ensuring the check on the permissions is
performed on directories only.
By Thomas Adam.
2013-10-10 12:03:22 +00:00
nicm
1bd0851ee8
Mark flags as optional and mutually exclusive. From Tiago Cunha.
2013-10-10 12:02:55 +00:00
nicm
1b7c2dd056
Trivial style and spacing nits.
2013-10-10 12:01:14 +00:00
nicm
d45c12b6c9
Remove the barely-used and unnecessary command check() function.
2013-10-10 12:00:18 +00:00
nicm
90ae7682ed
Clear window->flags when clearing winlinks
...
When clearing WINLINK_ALERTFLAGS for all sessions, we must also, for
that window, clear the window->flags as well, otherwise sessions may
well still see flags for winlinks long since cleared.
This therefore introduces WINDOW_ALERTFLAGS to help with this.
2013-10-10 11:59:23 +00:00
nicm
e6af0ad23e
choose-tree: Reset top when toggling items
...
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-10-10 11:58:52 +00:00
nicm
34674bb180
Renumber windows: Lookup lastw via window not index
...
When calling 'movew -r' on a session to reorder the winlinks, ensure
when adding back in the information for the lastw stack that we look up
the winlink based on the window and not its index.
Using the index doesn't make sense here because when comparing it to the
old set, it will never match since the winlink has been renumbered.
Bug reported by Ben Boeckel. Patch by Thomas Adam.
2013-10-10 11:58:24 +00:00
nicm
784b711393
Assign mouse x/y coords before checking them. When receiving mouse
...
inputs, we should set the x/y coordinates earlier than we currently do,
so that we aren't off-by-one in the case when the statusbar is at the
top of the screen. By Thomas Adam.
2013-10-10 11:57:52 +00:00
nicm
81a548bcc4
Accept multiple parameters to SM/RM/DECSET/DECRST, based on a diff from
...
Hayaki Saito.
2013-10-10 11:57:14 +00:00
nicm
fd1750af49
Add automatic-rename-format option allowing automatic rename to use
...
something other than pane_current_command.
2013-10-10 11:56:50 +00:00
nicm
2bf2f5d58e
Allow nested format expansion.
2013-10-10 11:50:36 +00:00
nicm
40811eb8d4
Add length limit operator for formats.
2013-10-10 11:50:20 +00:00
nicm
2756d12750
Handle input mouse positions <33 (we already can generate them).
2013-10-10 11:49:42 +00:00
nicm
7839993fe7
Only include actual trailing spaces not unused cells with capturep -J,
...
from George Nachman.
2013-10-10 11:49:29 +00:00
nicm
47a4a9992c
Allow the file descriptor received from the client to be -1.
2013-10-10 11:49:07 +00:00
nicm
d75dd2ab1c
Add formats for window flags.
2013-10-10 11:47:52 +00:00
nicm
6e665708fc
Missing space in refresh-client synopsis.
2013-10-10 11:46:47 +00:00
nicm
d3830e622f
Grouped sessions were being leaked on destroy, correctly free them.
2013-10-10 11:46:28 +00:00
nicm
0538676aa3
Make recalculate_sizes() handle an empty window with no active
...
pane. This can happen when a window is in two sessions - it isn't
destroyed immediately when the pane goes away but is left until the last
session is destroyed. Fixes problems with grouped sessions reported by
Daniel Ralston.
2013-10-10 11:46:00 +00:00
nicm
4c9f41f1ad
Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can
...
be NULL. Avoids crash when a command in a command client can't be
parsed.
2013-10-10 11:45:28 +00:00
Nicholas Marriott
e588ddb5d6
Add openat() to compat.
2013-10-10 10:27:23 +01:00
Nicholas Marriott
f3ec8693e3
Pass -1 for cwd now not NULL.
2013-10-06 22:44:24 +01:00
Nicholas Marriott
e9b09faab2
We accidentally haven't been using $TMUX to work out the session for a while
...
and in fact it is less useful that using the client ttyname. So don't bother
and don't pass it from the client. If we need it in future it is in c->environ.
2013-10-06 22:38:33 +01:00
Nicholas Marriott
5ea6148362
Remove now unused cmd_get_default_path.
2013-10-06 21:35:44 +01:00
Nicholas Marriott
9e0d7bddc0
Don't boke when figuring out working directory from configuration file.
2013-10-06 21:31:55 +01:00
Nicholas Marriott
aa0a57fd56
Show session name in detached message. Requested by somebody a few months ago
...
who didn't bother testing it. But it works for me anyway.
2013-10-06 21:21:52 +01:00
Nicholas Marriott
d86c70af96
Don't look at string[length - 1] if length == 0.
2013-10-06 21:20:11 +01:00
Nicholas Marriott
4538c269d0
Alter how tmux handles the working directory to internally use file descriptors
...
rather than strings.
- Each session still has a current working directory.
- New sessions still get their working directory from the client that created
them or its attached session if any.
- New windows are created by default in the session working directory.
- The -c flag to new, neww, splitw allows the working directory to be
overridden.
- The -c flag to attach let's the session working directory be changed.
- The default-path option has been removed.
To get the equivalent to default-path '.', do:
bind c neww -c $PWD
To get the equivalent of default-path '', do:
bind c neww -c '#{pane_current_path}'
The equivalent of default-path '~' is left as an exercise for the reader.
This also changes the client identify protocol to be a set of messages rather
than one as well as some other changes that should make it easier to make
backwards-compatible protocol changes in future.
2013-10-06 21:02:23 +01:00
Nicholas Marriott
446eb11cde
Make tilde expansion in command strings work even if it isn't terminated by /.
2013-10-06 09:06:07 +01:00
Nicholas Marriott
fa1375c09f
Similarly for MSG_COMMAND - allow full imsg limit not arbitrary 2048.
2013-10-06 00:48:24 +01:00
Nicholas Marriott
f141e9b37a
Instead of fixed size buffers for some messages, send only the string length.
2013-10-06 00:28:35 +01:00
Nicholas Marriott
3fba377ddd
retcode -> retval for exit message.
2013-10-06 00:18:00 +01:00
Nicholas Marriott
01a4752503
Merge IDENTIFY_* flags with CLIENT_* flags.
2013-10-06 00:10:40 +01:00
Nicholas Marriott
d66cbf20f7
Bump protocol version and add new message types.
2013-10-06 00:06:01 +01:00
Nicholas Marriott
7e4314eccb
Remove CMD_SENDENVIRON.
2013-10-06 00:02:52 +01:00
nicm
7c71c3e27d
Change the default for the default-path option to ~. This is a quick
...
change to turn off the KERN_PROC_CWD code which is unpredictable. Later
it will go away and there may be other changes to how this works.
2013-10-05 13:56:48 +00:00
Thomas Adam
5eeee39cc1
Ignore .dirstamp files
...
GNU automake 1.14+ uses these files for subdir-option detection. We don't
want to accidentally commit these. They're not useful to us.
2013-10-05 12:45:24 +01:00
Thomas Adam
796974ddf6
Check setupterm() in libtinfo also
...
Some ncurses packages have build time configuration options to separate its
different parts into separate libraries. Some Linux distributions in
particular separate out the terminfo routines in to libtinfo.
This change teaches configure that setupterm() can also be found there.
2013-10-05 12:44:29 +01:00
Thomas Adam
75f5b3dab6
Add subdir-objects to shut automake up
...
automake 1.14 onwards has started emitting lots of warnings about this
option:
automake: warning: possible forward-incompatibility.
automake: At least a source file is in a subdirectory, but the
'subdir-objects'
automake: automake option hasn't been enabled. For now, the corresponding
output
automake: object file(s) will be placed in the top-level directory.
However,
automake: this behaviour will change in future Automake versions: they will
automake: unconditionally cause object files to be placed in the same
subdirectory
automake: of the corresponding sources.
automake: You are advised to start using 'subdir-objects' option throughout
your
automake: project, to avoid future incompatibilities.
So enable this in AM_INIT_AUTOMAKE.
This doesn't seem to break older automake versions.
2013-10-05 12:44:09 +01:00
nicm
9f330897a8
Fix previous not to leak fd on failure, whoops.
2013-10-05 10:40:49 +00:00
Nicholas Marriott
710eeb2a33
Fix previous not to lead fd on failure.
2013-10-05 11:40:47 +01:00
Nicholas Marriott
3493b7dac7
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-10-05 09:14:35 +01:00
Nicholas Marriott
d51b4f92d7
Use open(".")/fchdir() to save and restore current directory rather than
...
getcwd()/chdir().
2013-10-05 09:14:11 +01:00
nicm
3d8a8ea0c6
Use open(".")/fchdir() to save and restore current directory rather than
...
getcwd()/chdir().
2013-10-05 08:12:39 +00:00
Thomas Adam
2057812c8f
mouse-resize-pane: Only resize on border select
...
The current behaviour of mouse-resize-pane is such that if the mouse button
is held down and a selection takes place within a pane, that if the mouse
pointer then hits a border edge, that pane-resize would initiate.
This seems counter-intuitive; instead, check for a resize condition if the
border of a pane is selected, and in the case of mouse selection within a
pane, no longer resize the pane if edge of the border is hit.
2013-10-02 06:53:47 +01:00
Nicholas Marriott
13360ad541
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-10-01 23:50:24 +01:00
Nicholas Marriott
9389cfbec9
Support -c for new-session, based on code from J Raynor.
2013-10-01 23:48:03 +01:00
Nicholas Marriott
7be152412e
Make cmdq->client_exit a tristate (-1 means "not set") so that if explicitly
...
set it can be copied from child to parent cmdq by if-shell and
source-file. This fixes using attach or new. From Chris Johnsen.
2013-10-01 23:31:09 +01:00
Nicholas Marriott
d0fa48db1e
Restore missing key binding for %, from Chris Johnsen.
2013-10-01 23:27:36 +01:00
Nicholas Marriott
884a21d0f5
First period not last for host_short, from Michael Scholz.
2013-10-01 23:24:39 +01:00
Thomas
21bca549d3
layout-resize-pane-mouse: Consider visible panes only
...
When a pane is maximized, and text is selected, we end up checking if a pane
switch is needed. This therefore means we might end up selecting panes
which aren't visible.
2013-09-30 15:26:43 +01:00
Thomas
bda970b3b1
Don't treat TMUX_TMPDIR as a potential file
...
The point of setting TMUX_TMPDIR is to then make any labels from -L go to
that directory. In the case of makesocketpath() with no TMUX_TMPDIR set,
would set both the path and the default socket to a file. The checking of
the permissions on the file worked fine in that case, but when TMUX_TMPDIR
is set, won't work on a directory.
This fixes the problem by ensuring the check on the permissions is performed
on directories only.
2013-09-30 15:26:32 +01:00
Tiago Cunha
75ec17f0b5
Mark flags as optional and mutually exclusive.
2013-08-31 11:16:47 +01:00
Nicholas Marriott
d62121e7bb
Add entry about smaller clients based on text from Thomas Adam.
2013-08-31 10:42:09 +01:00
Nicholas Marriott
06d101657f
No space in lsw -a targets.
2013-08-28 12:59:13 +01:00
Nicholas Marriott
2f7ffab0e8
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-08-23 15:58:46 +01:00
Nicholas Marriott
3ed5e56a39
Set EVENT_NOEPOLL on Linux again.
2013-08-23 15:25:05 +01:00
Nicholas Marriott
a0802dd486
A couple of manpage fixes from Tiago Cunha.
2013-08-22 00:32:55 +01:00
Nicholas Marriott
f2675cdf04
Trivial style and spacing nits.
2013-08-21 18:35:01 +01:00
Nicholas Marriott
e3864c383f
Remove from TODO.
2013-08-21 18:33:34 +01:00
Nicholas Marriott
25c0dc5e6e
++ to TODO.
2013-08-21 18:30:27 +01:00
Nicholas Marriott
8954d01f96
+ to TODO.
2013-08-21 18:28:31 +01:00
Nicholas Marriott
b2fe9bff3f
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-08-21 18:03:07 +01:00
Nicholas Marriott
a36da3a878
Remove the barely-used and unnecessary command check() function.
2013-08-21 18:01:40 +01:00
Thomas
c103f2fbcb
Clear window->flags when clearing winlinks
...
When clearing WINLINK_ALERTFLAGS for all sessions, we must also, for that
window, clear the window->flags as well, otherwise sessions may well still
see flags for winlinks long since cleared.
This therfore introduces WINDOW_ALERTFLAGS to help with this.
2013-08-20 13:03:53 +01:00
Thomas
aa4920fea3
choose-tree: Reset top when toggling items
...
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-08-20 00:05:28 +01:00
Thomas Adam
5532766b19
Renumber windows: Lookup lastw via window not index
...
When calling 'movew -r' on a session to reorder the winlinks, ensure when
adding back in the information for the lastw stack that we look up the
winlink based on the window and not its index.
Using the index doesn't make sense here because when comparing it to the old
set, it will never match since the winlink has been renumbered.
Bug reported by Ben Boeckel.
2013-08-20 00:04:07 +01:00
Thomas
5dbf3cb036
Assign mouse x/y coords before checking them
...
When receiving mouse inputs, we should set the x/y coordinates earlier than
we currently do, so that we aren't off-by-one in the case when the statusbar
is at the top of the screen.
2013-08-20 00:02:38 +01:00
Nicholas Marriott
ddf929390e
Accept multiple parameters to SM/RM/DECSET/DECRST, based on a diff from Hayaki
...
Saito.
2013-08-19 22:31:38 +01:00
Nicholas Marriott
23519fc0b4
Add automatic-rename-format option allowing automatic rename to use something
...
other than pane_current_command.
2013-08-19 22:16:11 +01:00
Nicholas Marriott
04288fcd4c
Allow nested format expansion.
2013-08-19 22:14:55 +01:00
Nicholas Marriott
84c22d053b
Add length limit operator for formats.
2013-08-03 21:06:38 +01:00
Nicholas Marriott
7581762c8e
+ to TODO.
2013-08-02 13:53:17 +01:00
Nicholas Marriott
7673732c0f
Handle input mouse positions <33 (we already can generate them).
2013-08-02 08:51:57 +01:00
Nicholas Marriott
2dfd3fbd71
Only include actual trailing spaces not unused cells with capturep -J, from
...
George Nachman.
2013-08-01 23:47:45 +01:00
Nicholas Marriott
3a13e066ba
Allow the file descriptor received from the client to be -1 - it can be on
...
Cygwin when stdin is not a terminal. Reported by A Young, SF bug 52.
2013-08-01 23:42:39 +01:00
Nicholas Marriott
bcd9bcae2a
Add formats for window flags.
2013-08-01 23:41:39 +01:00
Nicholas Marriott
939f796f08
Don't leak formats if they are added multiple times.
2013-08-01 23:40:44 +01:00
Nicholas Marriott
27364345bf
Don't add client formats when they are NULL.
2013-08-01 23:39:09 +01:00
Nicholas Marriott
35c19ffc28
Missing space in refresh-client synopsis.
2013-08-01 23:38:53 +01:00
Nicholas Marriott
b0b5cad496
Grouped sessions were being leaked on destroy, correctly free them.
2013-08-01 23:38:35 +01:00
Nicholas Marriott
965edf8a5c
Make recalculate_sizes() handle an empty window with no active pane. This can
...
happen when a window is in two sessions - it isn't destroyed immediately when
the pane goes away but is left until the last session is destroyed. Fixes
problems with grouped sessions reported by Daniel Ralston.
2013-08-01 23:37:45 +01:00
Nicholas Marriott
1c271852fc
Pass flags into cmdq_guard as an argument since sometimes cmdq->cmd can be
...
NULL. Avoids crash when a command in a command client can't be parsed.
2013-08-01 23:35:03 +01:00
Nicholas Marriott
7ea560261c
Add destroy entry to TODO.
2013-07-27 19:57:21 +01:00
schwarze
304ea079d2
use .Mt for email addresses; from Jan Stary <hans at stare dot cz>; ok jmc@
2013-07-16 00:07:52 +00:00
Thomas Adam
c190c73240
Merge branch 'obsd-master'
2013-07-13 16:57:51 +01:00
Nicholas Marriott
e8567098a4
Add support for Cgywin, apparently it is enough just to open the tty again in
...
the server and fd passing is not necessary. Needs some ifdefs unfortunately but
no way around that and some of them can go next time we're willing to do a
protocol bump. Patch from J Raynor jxraynor at gmail dot com.
2013-07-12 22:21:42 +01:00
Nicholas Marriott
a9ebb62d54
Make next-word-end work properly with vi(1) keys, reported by patrick
...
keshishian.
2013-07-12 09:52:36 +00:00
Thomas Adam
bdea2f9eda
Merge branch 'obsd-master'
2013-07-06 11:18:49 +01:00
Nicholas Marriott
f5b041e394
Add pane_synchronized format, from Romain Francoise.
2013-07-05 15:27:14 +00:00
Nicholas Marriott
e496a548d7
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-07-05 16:24:13 +01:00
Nicholas Marriott
3d39b18e31
Section on clipboard, from Thomas Adam.
2013-07-05 16:23:33 +01:00
Nicholas Marriott
a96a8a1aab
Clarify error messages when setting options, from Thomas Adam.
2013-07-05 15:10:38 +00:00
Nicholas Marriott
064124cc5f
When the session option renumber-window is used, ensure we iterate over
...
all sessions in that group when the winlinks are reordered, otherwise
the winlink lists are out of sync with one another. From Thomas Adam.
2013-07-05 14:52:33 +00:00
Nicholas Marriott
7af5fec038
Whitespace nits, from Ben Boeckel.
2013-07-05 14:44:06 +00:00
Nicholas Marriott
f884fff869
Implement s, S, C mode switch commands in vi(1) mode, from Ben Boeckel.
2013-07-05 14:38:23 +00:00
Nicholas Marriott
c7a121cfc0
Focus events can cause trouble if left on and they can't be turned off
...
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
2013-06-28 20:55:16 +01:00
Nicholas Marriott
777be296ee
Always push a focus event when the application turns it on, prompted by
...
discussion with Hayaki Saito a while ago.
2013-06-28 20:55:16 +01:00
Nicholas Marriott
a0172a6ae5
Mark control commands specially so the client can identify them, based
...
on a diff from George Nachman a while back.
2013-06-28 20:55:16 +01:00
Nicholas Marriott
1099442c0a
+strings.h in compat/.
2013-06-25 09:57:49 +01:00
Nicholas Marriott
18989cd430
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-06-25 09:49:14 +01:00
Nicholas Marriott
828145456c
Don't set TMUX_CONF in tmux.h.
2013-06-25 09:48:09 +01:00
Nicholas Marriott
097a046e4a
Use _XPG6 on Solaris with GCC because the headers are insane and don't like GCC
...
with -std=gnu99 and _XPG4_2. We should not really be using _XPG* at all but
there doesn't seem to be a magic define that says "give me the latest
standard", and things are further confused by the CMSG_DATA check in
configure.ac which sets _XOPEN_SOURCE _XOPEN_SOURCE_EXTENDED.
While here add COPYING to EXTRA_DIST.
2013-06-25 09:35:42 +01:00
Nicholas Marriott
3977dba761
Focus events can cause trouble if left on and they can't be turned off
...
during idle periods (like the other states are) because we'd miss
events. So add a server option to control them. Defaults to off.
2013-06-23 13:10:46 +00:00
Nicholas Marriott
a41cd8d75b
Always push a focus event when the application turns it on, prompted by
...
discussion with Hayaki Saito a while ago.
2013-06-23 12:51:28 +00:00
Nicholas Marriott
662d471215
Mark control commands specially so the client can identify them, based
...
on a diff from George Nachman a while back.
2013-06-23 12:41:54 +00:00
Thomas Adam
06b5805479
Merge branch 'obsd-master'
2013-06-13 18:12:49 +01:00
Stuart Henderson
d6debc21c7
revert r1.156 "Add support for focus notifications when tmux pane changes"
...
beck@ found annoying beeps if a machine was shutdown while tmux is running
and you then focus in/out of an xterm; kettenis tracked it down to 1.156.
2013-06-11 19:18:02 +00:00
Jason McIntyre
ddb52a2b15
escape "Ss", becuase groff thinks it has found a macro;
2013-06-02 14:40:17 +00:00
Nicholas Marriott
13441e8cb8
The actual terminfo entries we ended up with for cursor changes are Cs,
...
Ce, Ss and Se (not Cc, Ce, Cs, Csr). So use and document these instead
of the ones we were using earlier.
2013-06-02 07:52:15 +00:00
Thomas Adam
a97d5b8e60
Amend tmux.1 handling in .gitignore
...
Now that tmux.1 is used as the canonical source for man page documentation,
ensure that we ignore tmux.1.{mdoc,man} instead.
2013-06-01 10:58:39 +01:00
Thomas Adam
399d7380a5
Merge branch 'obsd-master'
2013-05-31 21:44:42 +01:00
Nicholas Marriott
c231381aa3
Demote the old single-character replacement variables (#S and friends)
...
to aliases of formats. From Tiago Cunha.
2013-05-31 19:56:05 +00:00
Nicholas Marriott
c30d60f7ae
Add host_short format, from Tiago Cunha.
2013-05-31 19:46:42 +00:00
Nicholas Marriott
9fb9f78e43
Use u_char for the send-keys string to avoid mangling top-bit-set
...
characters when they are promoted to int and passed to
window_pane_key. Reported by Jacob Bang.
2013-05-31 12:50:05 +00:00
Nicholas Marriott
a0cf65db77
Instead of eating 1024 bytes or so for the arguments of each command,
...
save memory by using an RB tree. From Tiago Cunha.
2013-05-31 12:19:34 +00:00
Nicholas Marriott
2ee9c4df12
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-05-31 13:00:11 +01:00
Nicholas Marriott
e6c77e7afb
Add a COPYING file, suggested by Dagobert Michelsen.
2013-05-31 12:59:17 +01:00
Thomas Adam
76cb088d16
Merge branch 'obsd-master'
...
Conflicts:
tmux.h
2013-05-25 11:48:12 +01:00
Nicholas Marriott
907ad00300
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
...
Conflicts:
Makefile.am
2013-05-15 16:50:15 +01:00
Nicholas Marriott
88a4da9747
Don't let cursor position overflow when reflowing, from Christopher
...
Collins.
2013-05-15 15:39:51 +00:00
Nicholas Marriott
25c430b1cd
Reserve space for \0 in cmd_print, from George Nachman.
2013-05-15 15:34:09 +00:00
Nicholas Marriott
772d61f3ed
RIS should reset focus reporting, from Hayaki Saito.
2013-05-15 15:32:14 +00:00
Nicholas Marriott
5b1cf02f2e
Rename tmux.1.in back to tmux.1 and generate tmux.1.{mdoc,man} instead.
2013-05-15 16:27:30 +01:00
Nicholas Marriott
66f4c60a84
Don't limit width and height to 222 in standard mouse mode.
2013-05-07 11:00:16 +00:00
Nicholas Marriott
fce095665c
Use $(srcdir) for generating tmux.1, reported by fasta_ on IRC.
2013-04-28 15:37:02 +01:00
Nicholas Marriott
2555ac58cc
.Op Fl b not .Fl b for run-shell synopsis, from Ben Boeckel.
2013-04-24 10:15:47 +00:00
Nicholas Marriott
e323101ede
Rename global configuration define.
2013-04-24 10:01:32 +00:00
Nicholas Marriott
ce52e45d44
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-04-24 11:00:32 +01:00
Nicholas Marriott
4f3c31a6b6
Use sysconfdir for the location of global tmux.conf (but default it to /etc),
...
based on changes from Dagobert Michelsen.
2013-04-24 10:57:03 +01:00
Thomas Adam
70bc8ef845
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-04-23 08:26:51 +01:00
Thomas Adam
cd60e57b6a
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2013-04-23 08:26:04 +01:00
Nicholas Marriott
3d2b7d5bce
When using choose-tree -u, start with the current window
...
highlighted. From Thomas Adam.
2013-04-22 22:17:29 +00:00
Nicholas Marriott
04f54ab38f
Get session of -t window rather than client's window.
2013-04-22 16:34:53 +00:00
Nicholas Marriott
46c7dbef0f
Call recalculate_sizes() after killing window in case it is in a grouped
...
session, from Daniel Ralston.
2013-04-22 13:35:18 +00:00
Nicholas Marriott
11b90bc959
Pass tmux.1.in to awk on stdin rather than as an argument.
2013-04-22 14:04:40 +01:00
Nicholas Marriott
792e2856c9
Add compat for cfmakeraw, from Dagobert Michelsen.
2013-04-22 09:44:15 +01:00
Nicholas Marriott
d89b35e682
Use lockf which is more portable than flock, from Dagobert Michelsen.
2013-04-22 08:42:19 +00:00
Nicholas Marriott
a46ccbd883
-paths.h. Fixes Solaris, from Dagobert Michelsen.
2013-04-22 09:39:21 +01:00
Nicholas Marriott
5dda1abc32
Don't let server_client_check_focus use a dead bufferevent, from Romain
...
Francoise.
2013-04-21 21:32:00 +00:00
Theo Deraadt
55640a31b3
(long long) and %lld for time_t output
...
ok nicm
2013-04-17 14:52:31 +00:00
Nicholas Marriott
88428cff3a
%zu format for size_t.
2013-04-17 08:41:41 +00:00
Nicholas Marriott
c24b58e2ee
Generate tmux.1 using mdoc2man.awk on Solaris, issue brought up and changes
...
tested by Dagobert Michelsen.
2013-04-16 11:33:53 +01:00
Nicholas Marriott
9e537c808b
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-04-16 10:39:48 +01:00
Thomas Adam
2c4543b9e9
Add back missing -V flag
...
This went walkies from a previous git commit.
2013-04-14 18:07:08 +01:00
Thomas Adam
b58bca9a72
Merge branch 'obsd-master'
...
Conflicts:
tmux.c
2013-04-13 17:05:49 +01:00
Nicholas Marriott
27dcf470dc
Remove some Korean characters from the zero-width list that apparently
...
shouldn't be there, from Jeong Mok Cho.
2013-04-12 12:50:36 +00:00
Nicholas Marriott
caa8290510
Copy the client into the new cmdq in source-file so commands that work
...
on it (such as new-session) can work. Fixes issue reported by oss-adv at
users dot sf dot net.
2013-04-12 12:44:31 +00:00
Nicholas Marriott
7f9b225cc2
Call setlocale(LC_TIME) at startup.
2013-04-11 21:52:18 +00:00
Nicholas Marriott
4ccb2e2c21
TODO tweaks.
2013-04-11 22:45:05 +01:00
Nicholas Marriott
cbee283c26
Send an SGR0 after turning on modifyOtherKeys to fix Terminal.app which
...
treats \033[>4;1m and \033[4;1m (bold+underline). Reported & tested by
otto@.
2013-04-11 07:27:27 +00:00
Nicholas Marriott
9fcda95a6f
Set EV_WRITE for jobs or run/if-shell jobs can hang. From Chris Johnsen.
2013-04-10 12:20:35 +00:00
Nicholas Marriott
7ada64d5f8
Fix bug where end guard in control mode was not printed after session
...
destroyed, from George Nachman.
2013-04-10 12:15:36 +00:00
Nicholas Marriott
20f0d917be
Missed -o from set-window-option, from Ben Boeckel.
2013-04-10 12:07:18 +00:00
Nicholas Marriott
e312db1408
Add wait-for to tmux.vim from Ben Boeckel.
2013-04-10 13:04:19 +01:00
Nicholas Marriott
743bd1275f
Need errno.h, reported by Swaroop M S.
2013-04-10 12:52:40 +01:00
Nicholas Marriott
69c86379e3
Remove some code not needed on OpenBSD.
2013-04-10 11:51:16 +00:00
Nicholas Marriott
46b3c1a025
Use proc_bsdinfo which works on older OS X versions, from OZAKI Kiichi.
2013-04-10 12:46:29 +01:00
Nicholas Marriott
3ea893464f
TODO changes.
2013-04-10 12:43:08 +01:00
Nicholas Marriott
738e789dbd
If -s to swap-pane is not given, use the current pane.
2013-03-28 15:08:12 +00:00
Nicholas Marriott
66afcf5be0
Make copy-mode -u still scroll up if already in copy mode, handy for
...
people who bind it with -n.
2013-03-28 15:07:42 +00:00
Nicholas Marriott
4b0ed56e32
Tidy up and trim down TODO file.
2013-03-28 12:42:00 +00:00
Nicholas Marriott
dc2af8347b
New code doesn't build on old versions of OS X so only support 10.7 and
...
later. Reported by Jared Scheel and tested by Chris Johnsen.
2013-03-28 08:36:34 +00:00
Nicholas Marriott
64ea8829af
Add define for timersub to compat.h.
2013-03-28 00:00:13 +00:00
Nicholas Marriott
629cfec8a3
Trivial typo fixes in changes.
2013-03-27 23:37:05 +00:00
Nicholas Marriott
7f63658709
Add TMUX_TMPDIR variable to put the socket directory outside
...
TMPDIR. From Ben Boeckel.
2013-03-27 11:24:18 +00:00
Nicholas Marriott
5e4d9a3197
Move the cursor back into the last column on CUU/CUD to match xterm
...
behaviour. From George Nachman.
2013-03-27 11:19:19 +00:00
Nicholas Marriott
982354765b
Remove tmux's (already minimal) 88 colour support. Such terminals are
...
few and unnecessary.
2013-03-27 11:17:12 +00:00
Thomas Adam
5fe0576dcb
Working on 1.9
2013-03-26 20:33:10 +00:00
Thomas Adam
1b083aa0fd
Update CHANGES and configure.ac for 1.8 release.
2013-03-26 20:19:04 +00:00
Thomas
399a15b9fc
Merge branch 'obsd-master'
2013-03-26 16:59:37 +00:00
Nicholas Marriott
dfac36b6c3
Only accept partial keys if the timer has not expired, fixes infinite
...
loop when Escape is pressed the wrong number of times.
2013-03-26 14:14:08 +00:00
Nicholas Marriott
771d7db3a6
Fix compiler warnings, missing #include. From Thomas Adam.
2013-03-26 10:54:48 +00:00
Thomas
00af2df102
Merge branch 'obsd-master'
2013-03-25 16:30:37 +00:00
Nicholas Marriott
be390c1991
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-25 16:13:22 +00:00
Nicholas Marriott
2fd0cb7600
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
...
Conflicts:
TODO
cmd-queue.c
cmd-server-info.c
cmd-wait-for.c
tmux.1
2013-03-25 16:11:22 +00:00
Thomas Adam
5f5d413408
Remove compat/vis.h from cmd-save-buffer.
...
The include for compat.h in tmux.h takes care of this.
BUG-ID: N/A
2013-03-25 16:09:34 +00:00
Nicholas Marriott
972da2d498
Try to establish client for run-shell and if-shell if no -t.
2013-03-25 16:04:07 +00:00
Nicholas Marriott
e44bd9f750
Revert the command-prefix change which breaks sequences of commands.
2013-03-25 15:59:57 +00:00
Nicholas Marriott
777edd0269
Add to TODO.
2013-03-25 15:47:16 +00:00
Nicholas Marriott
855d6fe1fe
Add to TODO.
2013-03-25 15:47:10 +00:00
Nicholas Marriott
b625ad6d8b
Use -std=gnu99 not c99 with GCC.
2013-03-25 15:33:23 +00:00
Thomas Adam
97b5df35b1
Portability fix-ups
...
* Ammend the Makefile to include newer commands.
* "compat/vis.h" versus <vis.h>
* Removal of cmd-send-prefix.c and cmd-show-buffer.c
* osdep-* for processes.
BUG-ID: N/A
2013-03-25 15:32:02 +00:00
Thomas Adam
7a87c7eff6
Fixup Makefile
2013-03-25 15:00:56 +00:00
Thomas Adam
f90eb43fcb
Merge branch 'obsd-master'
2013-03-25 14:59:29 +00:00
Nicholas Marriott
a09d8e88fc
Use -std=gnu99 not c99 with GCC.
2013-03-25 12:16:03 +00:00
Nicholas Marriott
b5fda7ad2a
Spacing, warning nits.
2013-03-25 12:00:30 +00:00
Nicholas Marriott
58bb6f8c56
Set pane resize flag when needed.
2013-03-25 11:55:01 +00:00
Nicholas Marriott
673eb160d4
Sort includes and fix spaces.
2013-03-25 11:53:54 +00:00
Nicholas Marriott
e97e0d7e54
Man page fixes.
2013-03-25 11:49:54 +00:00
Nicholas Marriott
4119c476aa
b comes before t.
2013-03-25 11:46:28 +00:00
Nicholas Marriott
e2295014d9
Process ^[ as meta when a partial key is found.
2013-03-25 11:44:16 +00:00
Nicholas Marriott
43fb9835fa
Add -P and -F to new-session.
2013-03-25 11:44:00 +00:00
Nicholas Marriott
599dd2a560
Create a new context when copying instead of using the input
...
context. The input context may not exist yet. Fixes crash when copying
from config file errors.
2013-03-25 11:43:33 +00:00
Nicholas Marriott
d28a39d01d
Extend jobs to support writing and use that for copy-pipe instead of
...
popen, from Chris Johnsen.
2013-03-25 11:43:01 +00:00
Nicholas Marriott
270d90ce1e
Handle empty pending output (not a failure) and add \n. From George
...
Nachman.
2013-03-25 11:42:19 +00:00
Nicholas Marriott
0c969a7dfd
Handle no client better in display-message.
2013-03-25 11:42:01 +00:00
Nicholas Marriott
111d993e75
When only two panes in a window, only draw half the separating line as
...
active.
2013-03-25 11:41:49 +00:00
Nicholas Marriott
0ef24f9912
Only send end guard if begin was sent, from George Nachman.
2013-03-25 11:41:16 +00:00
Nicholas Marriott
87fe1c0b0e
Include prefix on ids, from George Nachman.
2013-03-25 11:40:54 +00:00
Nicholas Marriott
114d822d27
Don't zoom windows with one pane, from Romain Francoise.
2013-03-25 11:39:11 +00:00
Nicholas Marriott
88b92df849
We ignore SIGWINCH until ready, so send a MSG_RESIZE immediately when
...
becoming ready.
2013-03-25 11:38:57 +00:00
Nicholas Marriott
e4c0730bf1
Use single stdout and stderr for control clients.
2013-03-25 11:36:59 +00:00
Nicholas Marriott
8a40e10d55
Add time and a command count to control mode guards, based on code from
...
George Nachman.
2013-03-25 11:35:55 +00:00
Nicholas Marriott
e0961dfdf4
Fix handling of short (< 4 character) checksums and a bug with parsing
...
old-style custom layouts. Based on fix from Chris Johnsen.
2013-03-25 11:35:30 +00:00
Nicholas Marriott
446fb0cb9c
Do not redraw panes if invisible.
2013-03-25 10:12:01 +00:00
Nicholas Marriott
6fee3e9e4b
Rename session idx to session id throughout and add $ prefix to targets
...
to use it, extended from a diff from George Nachman.
2013-03-25 10:11:45 +00:00
Nicholas Marriott
748acdc77c
Add wait-for -L and -U for lock and unlock, from Thiago Padilha.
2013-03-25 10:09:35 +00:00
Nicholas Marriott
410a3abbef
Add a wait-for command which blocks a client on a named channel until it
...
is woken up again (with wait-for -S). From Thiago Padilha.
2013-03-25 10:09:05 +00:00
Nicholas Marriott
304336a591
Allow lastgc to be NULL in grid_string_cells so find-window doesn't
...
crash, problem reported by eugene everson.
2013-03-25 10:07:40 +00:00
Nicholas Marriott
35452b3e55
Do not leak command in formats, from Romain Francoise.
2013-03-25 10:07:21 +00:00
Nicholas Marriott
ebd9c615c8
Add some additional debug logging.
2013-03-25 10:06:13 +00:00
Nicholas Marriott
e9cef8bf30
Continue the parent cmdq after sourcing a file.
2013-03-25 10:05:58 +00:00
Nicholas Marriott
e85f764f23
Preserve trailing spaces with capture-pane -J, from George Nachman.
2013-03-25 10:05:35 +00:00
Nicholas Marriott
e2e85650ac
tty.path can be NULL, don't dereference it. From George Nachman.
2013-03-25 10:04:44 +00:00
Nicholas Marriott
2c14a771a8
Remove some unused/unnecessary control notifications, from George Nachman.
2013-03-25 10:04:23 +00:00
Nicholas Marriott
d39b1a87a5
Add -q flags to shut up errors to capture-pane and show-options, from
...
George Nachman.
2013-03-25 10:04:04 +00:00
Nicholas Marriott
62db3c8efe
Send DSC 1000p at the beginning of a -CC client's lifetime and ST and
...
the end, from George Nachman.
2013-03-25 10:03:24 +00:00
Nicholas Marriott
efa06643b0
Remove previous.
2013-03-25 10:03:00 +00:00
Nicholas Marriott
14fad6a5cc
Add -A flag to new-session to make it behave like attach-session if the
...
session exists. If -A is used, -D behaves like -d to attach-session.
2013-03-24 09:58:40 +00:00
Nicholas Marriott
c71844de63
Add resize-pane -Z to temporary zoom the active pane to occupy the full
...
window or unzoom (restored to the normal layout) if it already zoomed,
bound to C-b z by default. The pane is unzoomed on pretty much any
excuse whatsoever.
We considered making this a new layout but the requirements are quite
different from layouts so decided it is better as a special case. Each
current layout cell is saved, a temporary one-cell layout generated and
all except the active pane set to NULL.
Prompted by suggestions and scripts from several. Thanks to Aaron Jensen
and Thiago Padilha for testing an earlier version.
2013-03-24 09:57:59 +00:00
Nicholas Marriott
a05b8c4143
Add a -o option to set-option to prevent setting an option already set,
...
from Thiago Padilha.
2013-03-24 09:55:02 +00:00
Nicholas Marriott
20636d956d
Add a command queue to standardize and simplify commands that call other
...
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-24 09:54:10 +00:00
Nicholas Marriott
66edb3392b
Expand format variables in the run-shell and if-shell shell commands,
...
from Thiago Padilha.
2013-03-24 09:33:35 +00:00
Nicholas Marriott
86adcd4b26
Add pane_tabs format to format_window_pane based on code from George
...
Nachman.
2013-03-24 09:29:40 +00:00
Nicholas Marriott
a60687f9ba
Handle focus events from the terminal, from Aaron Jensen.
2013-03-24 09:28:59 +00:00
Nicholas Marriott
bb8457b166
Fix error reporting for client commands by adding a flag to
...
cmd_find_client to tell it whether or not to show errors, sometimes it's
needed and sometimes not.
2013-03-24 09:27:19 +00:00
Nicholas Marriott
3eae71b5b2
Do pane resize ioctls once at the end of the server loop rather than
...
immediately.
2013-03-24 09:25:04 +00:00
Nicholas Marriott
8094e82287
Add option command-prefix which is automatically prepended to any
...
command (apart from a naked default-shell). The default is "exec ".
2013-03-24 09:21:27 +00:00
Nicholas Marriott
1ec4354998
Add support for focus notifications when tmux pane changes, based on
...
work by Aaron Jensen.
2013-03-24 09:18:16 +00:00
Nicholas Marriott
ac1fe83596
Couple of fixes pointed out by jmc.
2013-03-22 18:45:36 +00:00
Nicholas Marriott
c7d1849e1c
Process ^[ as meta when a partial key is found.
2013-03-22 17:02:12 +00:00
Nicholas Marriott
7f191c7951
Add -P and -F to new-session.
2013-03-22 17:01:15 +00:00
Nicholas Marriott
702ab8bab0
Add a load of miscellaneous pane formats, from George Nachman.
2013-03-22 16:03:35 +00:00
Nicholas Marriott
eaaeb28cda
Add session_set_current helper function, extracted from a diff from
...
Aaron Jensen.
2013-03-22 16:00:26 +00:00
Nicholas Marriott
295d86911e
Add -C and -J to capture pane to escape control sequences and to join
...
wrapped line, based on a diff from George Nachman.
2013-03-22 15:56:11 +00:00
Nicholas Marriott
c519f9a84c
evbuffer_readline returns allocated storage, don't leak it.
2013-03-22 15:55:22 +00:00
Nicholas Marriott
2243cfbe75
Need to set clients in context before changing their reference count.
2013-03-22 15:54:29 +00:00
Nicholas Marriott
d644e5143f
Fix so capture-pane/save-buffer can work in control clients, from George
...
Nachman.
2013-03-22 15:53:24 +00:00
Nicholas Marriott
58932295fc
Add copy-pipe mode command to copy selection and also pipe to a command.
2013-03-22 15:52:40 +00:00
Nicholas Marriott
8478895eeb
Add -e flag to capture-pane to include embedded ANSI SGR escape
...
sequences, from George Nachman.
2013-03-22 15:51:54 +00:00
Nicholas Marriott
8a6fbfa148
Don't use a target-client for stdout, just always cmdclient.
2013-03-22 15:51:15 +00:00
Nicholas Marriott
a1722d5c2e
Remove unnecessary initializers of cmd_ctx.
2013-03-22 15:50:42 +00:00
Nicholas Marriott
0ff9275ad7
load_cfg can actually use the same context now they are reference counted.
2013-03-22 15:50:13 +00:00
Nicholas Marriott
d1e6ce2672
Add functions to allocate and free command contexts rather than doing it
...
all on the stack.
2013-03-22 15:49:55 +00:00
Nicholas Marriott
0ccd84d2ef
Instead of skipping del_curterm on FreeBSD < 7, skip it on ncurses < 5.7. It
...
looks like 5.6 on Linux has the problem too. Reported by Myles Dear.
2013-03-22 15:36:45 +00:00
Nicholas Marriott
29613f2f31
Prevent lock on control clients, not on others.
2013-03-22 10:42:55 +00:00
Nicholas Marriott
8c545bbfa8
Don't try to print unterminated strings when loading configuration file.
2013-03-22 10:41:57 +00:00
Nicholas Marriott
f19836550b
Unbreak line wrapping.
2013-03-22 10:41:01 +00:00
Nicholas Marriott
79f5fe6f5b
Use tty_raw on stop, not tty_puts.
2013-03-22 10:40:22 +00:00
Nicholas Marriott
2f5fa4ee9d
Don't hang when clearing line in choose mode now that the cursor stays
...
at the end with wrap.
2013-03-22 10:38:33 +00:00
Nicholas Marriott
db66d85176
Fix double space in sessions template.
2013-03-22 10:38:13 +00:00
Nicholas Marriott
f0efa576e0
Add resize-pane -x and -y for absolute pane size (much requested).
2013-03-22 10:37:39 +00:00
Nicholas Marriott
ad5df9bc2f
Implement DECAWM (SM/RM 7) using existing MODE_WRAP flag.
2013-03-22 10:36:53 +00:00
Nicholas Marriott
22a2949bd2
Correctly handle UTF8 mouse option being toggled, from Egmont Koblinger.
2013-03-22 10:34:46 +00:00
Nicholas Marriott
67b4d5b609
Support the latest theory for mouse input, this is enabled/disabled with
...
SM/RM 1006 and is similar in style to SGR input: \033[<b;x;yM or
\033[b;x;ym. From Egmont Koblinger.
2013-03-22 10:33:50 +00:00
Nicholas Marriott
ad760b3bf7
Add client_session and client_last_session formats.
2013-03-22 10:32:36 +00:00
Nicholas Marriott
8d59b189cc
No more lint means no more ARGSUSED.
2013-03-22 10:31:22 +00:00
Nicholas Marriott
306a3b8d80
In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence
...
and handle the most common set. Pass them through if xterm-keys is on.
2013-03-22 10:30:04 +00:00
Nicholas Marriott
041a911c43
Create a new context when copying instead of using the input context. The input
...
context may not exist yet.
2013-03-21 23:57:21 +00:00
Nicholas Marriott
10682b9e7e
Instead of loads of little screen_write_*_on and off functions which
...
just change mode flags, just have screen_write_mode_set and
screen_write_mode_clear.
2013-03-21 18:47:56 +00:00
Nicholas Marriott
c5504af4a6
Add various checks to turn off bits that can't work in control mode
...
(such as lock).
2013-03-21 18:47:01 +00:00
Nicholas Marriott
49ac5b5fe0
Do not include status line in size calculations in control mode.
2013-03-21 18:46:12 +00:00
Nicholas Marriott
d4785fe798
Don't set key KEYC_NONE on xterm_keys_find match()
...
When calling xterm_keys_find(); if we get a complete match, don't set
the key to unknown before calling the action to complete the binding;
otherwise non-prefixed bindings will not work.
From Thomas Adam
2013-03-21 18:45:38 +00:00
Nicholas Marriott
3d24c75d0f
Include the \033 in the key tree and adjust key matching for this change.
2013-03-21 18:44:47 +00:00
Nicholas Marriott
78543cce30
Support capture-pane -p to send to stdout.
2013-03-21 18:43:34 +00:00
Jason McIntyre
55bf2ecc68
tweak previous; ok nicm
2013-03-21 17:42:36 +00:00
Nicholas Marriott
51ac2a3202
Fix a couple of memory leaks, from Romain Francoise.
2013-03-21 16:54:37 +00:00
Nicholas Marriott
48291f0eeb
Make choose-tree actually work again.
2013-03-21 16:53:12 +00:00
Nicholas Marriott
d5139d1401
Fix a comment for new key table names.
2013-03-21 16:52:02 +00:00
Nicholas Marriott
3665be7c44
Tidy by splitting default key tables into two.
2013-03-21 16:50:22 +00:00
Nicholas Marriott
801d64a16e
Add -c to refresh-client to set client size in control mode, based on
...
code from George Nachman.
2013-03-21 16:49:37 +00:00
Nicholas Marriott
dd46c95e23
Aargh. Spaces -> tabs.
2013-03-21 16:25:08 +00:00
Nicholas Marriott
4920306486
Clarify choose-tree entry in man page.
2013-03-21 16:23:46 +00:00
Nicholas Marriott
66414029a1
Run session command before window in choose-tree.
2013-03-21 16:23:07 +00:00
Nicholas Marriott
51d989f5df
Do not crash when calling choose-tree with a command that changes the mode.
2013-03-21 16:22:48 +00:00
Nicholas Marriott
c982279950
Fix constness of cmd_template_replace, window_choose_add_item and
...
window_choose_add_window.
2013-03-21 16:19:25 +00:00
Nicholas Marriott
0c0953f3bd
Add user options, prefixed with @. May be set to any arbitrary string.
2013-03-21 16:17:01 +00:00
Nicholas Marriott
69fe5ca567
Add -v to set and setw to show only option value.
2013-03-21 16:15:52 +00:00
Nicholas Marriott
63b4fd5cac
Add a format client_prefix which is 1 if prefix key has been
...
pressed, used for example #{?client_prefix,X,Y}. Also a few extra
server_client_status needed.
2013-03-21 16:14:09 +00:00
Nicholas Marriott
dd76497ab0
Show alias in lscm output.
2013-03-21 16:12:50 +00:00
Nicholas Marriott
9b7e18f166
Rework reflow code so it does not do so much allocation which should be
...
faster with large histories.
2013-03-21 16:12:10 +00:00
Nicholas Marriott
180faf73af
Allow choose commands to be used outside tmux, so long as at least one
...
client is attached.
2013-03-21 16:09:59 +00:00
Nicholas Marriott
6ddb06d372
Extend jobs to support writing and use that for copy-pipe instead of popen,
...
from Chris Johnsen.
2013-03-21 14:24:33 +00:00
Nicholas Marriott
69d97f6d4b
Handle empty pending output (not a failure) and add \n. From George Nachman.
2013-03-19 09:34:00 +00:00
Nicholas Marriott
f5de847a0c
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-17 23:45:19 +00:00
Nicholas Marriott
6bdc947f6b
Handle no client better in display-message.
2013-03-14 16:02:33 +00:00
Nicholas Marriott
919bde7cb1
When only two panes in a window, only draw half the separating line as active.
2013-03-14 12:08:26 +00:00
Nicholas Marriott
3d974b7267
Don't let display-message crash if no client, from George Nachman.
2013-03-14 07:31:20 +00:00
Nicholas Marriott
c5ad47ee7c
Only send end guard if begin was sent, from George Nachman.
2013-03-13 07:31:36 +00:00
Nicholas Marriott
4d38b6d1fa
Include prefix on ids, from George Nachman.
2013-03-13 07:28:12 +00:00
Nicholas Marriott
9e879b4aab
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-12 22:49:56 +00:00
Nicholas Marriott
99934bf998
Write escaped output in control mode rather than hex, from George Nachman.
2013-03-12 22:48:58 +00:00
Nicholas Marriott
8840f2d629
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-12 14:59:27 +00:00
Nicholas Marriott
d32a546d6e
Clarify zoom/unzoom, from Romain Francoise.
2013-03-12 14:58:48 +00:00
Nicholas Marriott
8aa40ec1c7
Don't zoom windows with one pane, from Romain Francoise.
2013-03-12 12:18:52 +00:00
Nicholas Marriott
543420ccd2
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-11 21:31:46 +00:00
Nicholas Marriott
064022548b
We ignore SIGWINCH until ready, so send a MSG_RESIZE immediately when becoming
...
ready.
2013-03-11 21:30:48 +00:00
Nicholas Marriott
7c00950967
Don't add prefix to %output pane id.
2013-03-11 15:28:34 +00:00
Nicholas Marriott
b5516771d3
Clean up capture-pane and add -P option to dump pending output, based on code
...
from George Nachman.
2013-03-11 13:47:29 +00:00
Nicholas Marriott
7b4084a15a
Document control mode in the manpage, from George Nachman.
2013-03-11 13:06:30 +00:00
Nicholas Marriott
412ac6bc3a
Use single stdout and stderr for control clients.
2013-03-11 09:46:18 +00:00
Nicholas Marriott
a6ad44f111
Fix if-shell and run-shell if there are no sessions. Batted around through
...
several people, finished off by Chris Johnsen.
2013-03-11 09:43:56 +00:00
Nicholas Marriott
97620bb5be
Add a home and end as modified by xterm in keypad mode, from Chris Johnsen.
2013-03-11 09:37:52 +00:00
Nicholas Marriott
49ed75d883
Fix a warning.
2013-03-11 09:37:16 +00:00
Nicholas Marriott
c41d92d27a
Add time and a command count to control mode guards, based on code from George
...
Nachman.
2013-03-11 09:35:44 +00:00
Nicholas Marriott
a060aa2bf0
Fix handling of short (< 4 character) checksums and a bug with parsing
...
old-style custom layouts. Based on fix from Chris Johnsen.
2013-03-10 23:41:59 +00:00
Nicholas Marriott
2ac6501698
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-09 21:33:28 +00:00
Nicholas Marriott
06ac399ce6
Zoom script is no longer needed.
2013-03-09 21:32:47 +00:00
Nicholas Marriott
dde5d49a5e
Do not redraw panes if invisible.
2013-03-09 17:29:22 +00:00
Nicholas Marriott
89d3f13945
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-07 10:09:13 +00:00
Nicholas Marriott
f47a063841
Rename session idx to session id throughout and add $ prefix to targets to use
...
it, extended from a diff from George Nachman.
2013-03-07 10:07:22 +00:00
Nicholas Marriott
e964ff70e6
Fix --disable-static, reported by Shea Levy.
2013-03-06 14:58:48 +00:00
Nicholas Marriott
bc3580fa06
Add wait-for -L and -U for lock and unlock, from Thiago Padilha.
2013-03-06 11:00:55 +00:00
Nicholas Marriott
7fd4d49d56
Add a wait-for command which blocks a client on a named channel until it is
...
wokrn up again (with wait-for -S). From Thiago Padilha.
2013-03-06 09:57:26 +00:00
Nicholas Marriott
ec75f9d1a3
Allow lastgc to be NULL in grid_string_cells so find-window doesn't crash,
...
problem reported by eugene everson.
2013-03-06 09:56:31 +00:00
Nicholas Marriott
6405fceee2
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-03-05 20:02:47 +00:00
Nicholas Marriott
f9e46a373f
Do not leak command in formats, from Romain Francoise.
2013-03-05 20:01:16 +00:00
Nicholas Marriott
d05debbe19
Unzoom on last-pane and fix a typo, from Romain Francoise.
2013-03-05 18:00:14 +00:00
Nicholas Marriott
f8c86a9515
Add some additional debug logging.
2013-03-05 17:17:59 +00:00
Nicholas Marriott
2c9cddd876
Continue the parent cmdq after sourcing a file.
2013-03-05 17:14:19 +00:00
Nicholas Marriott
aaeee34c32
Preserve trailing spaces with capture-pane -J, from George Nachman.
2013-03-04 11:03:03 +00:00
Nicholas Marriott
70397e4a95
Print %%error not %%end guard on error, from George Nachman.
2013-03-04 09:09:07 +00:00
Nicholas Marriott
43d904dbf3
tty.path can be NULL, don't dereference it. From George Nachman.
2013-03-04 09:02:32 +00:00
Nicholas Marriott
1da64bf786
Remove some unused/unnecessary control notifications, from George Nachman.
2013-03-04 09:01:30 +00:00
Nicholas Marriott
1cb1fb5bd4
Add -q flags to shut up errors to capture-pane and show-options, from George
...
Nachman.
2013-03-04 09:00:24 +00:00
Nicholas Marriott
208881a735
Send DSC 1000p at the beginning of a -CC client's lifetime and ST and the end,
...
from George Nachman..
2013-03-04 08:52:41 +00:00
Thomas Adam
a2f52d4224
Remove previous
2013-02-25 18:25:37 +00:00
Thomas Adam
2ccb67cae4
Plug small memory leak in run-shell
...
Don't potentially leak the command to run were it to fail.
2013-02-25 07:33:21 +00:00
Nicholas Marriott
b2a61348dd
Add -a to capture-pane to capture alternate screen, from George Nachman.
2013-02-24 07:52:03 +00:00
Nicholas Marriott
234f6d27c1
Use \\ not \ for escaping \.
2013-02-24 07:49:54 +00:00
Nicholas Marriott
f339cfd315
Add -A flag to new-session to make it behave like attach-session if the session
...
exists. If -A is used, -D behaves like -d to attach-session.
2013-02-24 00:43:28 +00:00
Nicholas Marriott
c5239c5984
Add resize-pane -Z to temporary zoom the active pane to occupy the full window
...
or unzoom (restored to the normal layout) if it already zoomed, bound to C-b z
by default. The pane is unzoomed on pretty much any excuse whatsoever.
We considered making this a new layout but the requirements are quite different
from layouts so decided it is better as a special case. Each current layout
cell is saved, a temporary one-cell layout generated and all except the active
pane set to NULL.
Prompted by suggestions and scripts from several. Thanks to Aaron Jensen and
Thiago Padilha for testing an earlier version.
2013-02-24 00:25:03 +00:00
Nicholas Marriott
be13479f09
Add a -o option to set-option to prevent setting an option already set, from
...
Thiago Padilha.
2013-02-23 23:22:03 +00:00
Nicholas Marriott
69a8d64716
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
...
Conflicts:
cmd-if-shell.c
cmd-run-shell.c
tmux.1
2013-02-23 22:42:49 +00:00
Nicholas Marriott
3964309c67
Add a command queue to standardize and simplify commands that call other
...
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-02-23 22:25:58 +00:00
Nicholas Marriott
243244d285
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-23 19:26:12 +00:00
Nicholas Marriott
497b27dafb
Expand format variables in the run-shell and if-shell shell commands, from
...
Thiago Padilha.
2013-02-23 19:24:42 +00:00
Nicholas Marriott
ca6d9f799e
Tidy TODO and nuke stuff that is done in some form or not going to happen.
2013-02-23 15:52:56 +00:00
Nicholas Marriott
f1aa5f6a1d
Add to TODO.
2013-02-23 15:43:13 +00:00
Nicholas Marriott
dc50de782a
The visit -> Visit
2013-02-23 15:15:20 +00:00
Nicholas Marriott
2e85eeea37
www Project Page -> SourceForge Page
2013-02-23 14:51:56 +00:00
Nicholas Marriott
357da035b9
Merge send-prefix into send-keys.
2013-02-23 14:41:07 +00:00
Nicholas Marriott
5aa54c863d
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-23 14:23:59 +00:00
Nicholas Marriott
42735d446e
Merge show-buffer into save-buffer.
2013-02-23 14:23:35 +00:00
Nicholas Marriott
57eb334d5b
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-23 13:03:47 +00:00
Nicholas Marriott
5f904aa350
Add pane_tags format to format_window_pane based on code from George Nachman.
2013-02-23 13:02:52 +00:00
Nicholas Marriott
ee0f8adfac
Handle focus events from the terminal, from Aaron Jensen.
2013-02-23 10:01:34 +00:00
Nicholas Marriott
1ed37385c6
Use -O2 without debugging.
2013-02-22 23:37:55 +00:00
Nicholas Marriott
3a2e9d805a
Fix error reporting for client commands by adding a flag to cmd_find_client to
...
tell it whether or not to show errors, sometimes it's needed and sometimes not.
2013-02-22 23:04:53 +00:00
Nicholas Marriott
911ef4e69a
Allow display-message with no curclient.
2013-02-22 22:57:26 +00:00
Nicholas Marriott
1994ae4640
Missing PANE_RESIZE define.
2013-02-22 21:47:34 +00:00
Nicholas Marriott
dbd8e47846
Do pane resize ioctls once at the end of the server loop rather than
...
immediately.
2013-02-22 21:35:29 +00:00
Nicholas Marriott
ce7bf1083e
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-22 16:25:50 +00:00
Nicholas Marriott
1db4ec6e63
Add pane_current_command format.
2013-02-22 16:25:21 +00:00
Nicholas Marriott
1c82cf7660
Remove a couple of FAQ bits that are out of date and not frequent.
2013-02-22 14:53:00 +00:00
Nicholas Marriott
e43fc6f08a
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-22 14:32:33 +00:00
Nicholas Marriott
31407b70e0
Add option command-prefix which is automatically prepended to any command
...
(apart from a naked default-shell). The default is "exec ".
2013-02-22 14:31:38 +00:00
Nicholas Marriott
7d3c1016ce
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-22 07:25:38 +00:00
Nicholas Marriott
4c9f9438ff
Add support for focus notifications when tmux pane changes, based on work by
...
Aaron Jensen.
2013-02-22 07:23:11 +00:00
Nicholas Marriott
374dae6635
Add a load of miscellaneous pane formats, from George Nachman.
2013-02-21 19:44:27 +00:00
Nicholas Marriott
8c50f625b0
Add session_set_current helper function, extracted from a diff from Aaron
...
Jensen.
2013-02-21 16:54:13 +00:00
Nicholas Marriott
6fc96978c2
Add to TODO.
2013-02-21 16:43:04 +00:00
Nicholas Marriott
8e3767e344
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-21 09:37:06 +00:00
Nicholas Marriott
b8b5631d9d
Add -C and -J to capture pane to escape control sequences and to join wrapped
...
line, based on a diff from George Nachman.
2013-02-21 09:35:01 +00:00
Nicholas Marriott
c577b47cd5
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-20 23:16:53 +00:00
Nicholas Marriott
cb6f36655e
evbuffer_readline returns allocated storage, don't leak it.
2013-02-20 23:15:21 +00:00
Nicholas Marriott
7905f4600d
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-20 14:58:23 +00:00
Nicholas Marriott
41c39e9bd9
Remove stray blank line.
2013-02-20 13:01:59 +00:00
Nicholas Marriott
f81d723264
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-20 10:59:02 +00:00
Nicholas Marriott
afd5e978cf
Need to set clients in context before changing their reference count.
2013-02-20 10:25:15 +00:00
Nicholas Marriott
e68b9abd04
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-20 10:20:44 +00:00
Nicholas Marriott
e487b87f6f
Clear last attributes after reset in string_cells, from George Nachman.
2013-02-20 09:34:21 +00:00
Nicholas Marriott
1e20153b6e
Fix so capture-pane/save-buffer can work in control clients, from George
...
Nachman.
2013-02-20 09:32:52 +00:00
Nicholas Marriott
4621a52183
Include ML and IRC in the text.
2013-02-20 00:16:00 +00:00
Nicholas Marriott
e90a742db8
Tweak bold link.
2013-02-20 00:06:01 +00:00
Nicholas Marriott
b219d54503
Simplify main www page.
2013-02-20 00:03:59 +00:00
Nicholas Marriott
3108d80b7e
Move NOTES->README, move Vim syntax file documentation to the file itself and
...
otherwise tweak some bits.
2013-02-19 23:31:04 +00:00
Nicholas Marriott
8a7d463b87
Prevent lock on control clients, not on others.
2013-02-19 21:11:32 +00:00
Nicholas Marriott
c3859d1df1
Add copy-pipe mode command to copy selection and also pipe to a command.
2013-02-19 17:49:53 +00:00
Nicholas Marriott
5a5e285be8
Don't try to print unterminated strings when loading configuration file.
2013-02-19 17:28:21 +00:00
Nicholas Marriott
4d1d4d6e8e
Add -e flag to capture-pane to include embedded ANSI SGR escape sequences, from
...
George Nachman.
2013-02-19 09:55:02 +00:00
Nicholas Marriott
a96dd1932a
Don't use a target-client for stdout, just always cmdclient.
2013-02-19 09:51:04 +00:00
Nicholas Marriott
693244795c
Remove unnecessary initializers of cmd_ctx.
2013-02-18 23:38:57 +00:00
Nicholas Marriott
255a4f8ce3
load_cfg can actually use the same context now they are reference counted.
2013-02-18 23:35:54 +00:00
Nicholas Marriott
e2b26d910c
Unbreak line wrapping.
2013-02-18 23:31:23 +00:00
Nicholas Marriott
293e331d69
Add functions to allocate and free command contexts rather than doing it all on
...
the stack.
2013-02-18 23:20:21 +00:00
Nicholas Marriott
2a91025581
Use tty_raw on stop, not tty_puts.
2013-02-18 17:35:53 +00:00
Nicholas Marriott
37d34b6b83
Don't hang when clearing line in choose mode now that the cursor stays at the
...
end with wrap.
2013-02-18 17:23:08 +00:00
Nicholas Marriott
44452823b7
Fix double space in sessions template.
2013-02-18 17:12:58 +00:00
Nicholas Marriott
e4bb87032e
Add resize-pane -x and -y for absolute pane size.
2013-02-18 17:00:35 +00:00
Nicholas Marriott
a6c4c2cca0
Implement DECAWM (SM/RM 7) using existing MODE_WRAP flag.
2013-02-18 15:57:46 +00:00
Nicholas Marriott
ba3b8ccc1d
Correctly turn handle UTF8 mouse option being toggled, from Egmont Koblinger.
2013-02-18 15:03:50 +00:00
Nicholas Marriott
e5eee7de0c
Support the latest theory for mouse input, this is enabled/disabled with SM/RM
...
1006 and is similar in style to SGR input: \033[<b;x;yM or \033[b;x;ym. From
Egmont Koblinger.
2013-02-18 14:52:27 +00:00
Nicholas Marriott
d8261019f1
Add client_session and client_last_session formats.
2013-02-18 14:23:40 +00:00
Nicholas Marriott
9d165df18a
No more lint means no more ARGSUSED.
2013-02-17 23:15:38 +00:00
Nicholas Marriott
7d1a8f7e9e
Remove stray test code which would convert abc to x.
2013-02-17 23:05:57 +00:00
Nicholas Marriott
8df3ec612a
In terminals with XT, turn on modifyOtherKeys=1 with the escape sequence and
...
handle the most common set. Pass them through if xterm-keys is on.
2013-02-17 22:56:12 +00:00
Nicholas Marriott
4c91c153cb
I strongly suspect it is possible for tmux to block on detach in tty_raw, so
...
make the fd blocking again much later and have tty_raw just retry the write a
few times.
2013-02-17 22:28:11 +00:00
Nicholas Marriott
cf2c0237f4
Instead of loads of little screen_write_*_on and off functions which just
...
change mode flags, just have screen_write_mode_set and screen_write_mode_clear.
2013-02-17 10:43:35 +00:00
Nicholas Marriott
3d9fd1c7f2
Add various checks to turn off bits that can't work in control mode (such as
...
lock).
2013-02-17 10:12:55 +00:00
Nicholas Marriott
d1e8fb33da
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-17 10:04:59 +00:00
Nicholas Marriott
1e3a4f2331
Do not include status line in size calculations in control mode.
2013-02-17 10:04:26 +00:00
Thomas Adam
2ac1d46f46
Don't set key KEYC_NONE on xterm_keys_find match()
...
When calling xterm_keys_find(); if we get a complete match, don't set the
key to unknown before calling the action to complete the binding; otherwise
non-prefixed bindings will not work.
2013-02-16 21:04:48 +00:00
Nicholas Marriott
77a2174685
Fix a couple of memory leaks, from Romain Francoise.
2013-02-16 19:35:49 +00:00
Nicholas Marriott
3e270af17a
Don't omit half the default table (!= not ==).
2013-02-16 13:29:40 +00:00
Nicholas Marriott
10db7ec51b
Include the \033 in the key tree and adjust key matching for this change.
2013-02-16 13:21:14 +00:00
Nicholas Marriott
4f01bfc4bc
Make choose-tree actually work again.
2013-02-15 12:57:13 +00:00
Nicholas Marriott
1d591ada76
Support capture-pane -p to send to stdout.
2013-02-15 09:31:45 +00:00
Nicholas Marriott
2bdc59fac8
Fix a comment for new key table names.
2013-02-15 02:38:15 +00:00
Nicholas Marriott
784a74df0b
Fix function parameter to tty_keys_free.
2013-02-15 02:18:38 +00:00
Nicholas Marriott
82355d2f2d
Tidy by splitting default key tables into two.
2013-02-15 02:16:41 +00:00
Nicholas Marriott
97a99d8718
Add -c to refresh-client to set client size in control mode, based on code from
...
George Nachman.
2013-02-15 01:54:48 +00:00
Nicholas Marriott
755d4863c8
Spaces -> tabs.
2013-02-14 12:22:14 +00:00
Nicholas Marriott
28544391f5
Do not leak formats in status_replace.
2013-02-14 12:20:17 +00:00
Nicholas Marriott
931b0103cd
Clarify choose-tree entry in man page.
2013-02-13 11:07:21 +00:00
Nicholas Marriott
6e03b50771
Run session command before window in choose-tree.
2013-02-13 11:05:10 +00:00
Nicholas Marriott
362c460767
Do not crash when calling choose-tree with a command that changes the mode.
2013-02-13 11:01:26 +00:00
Nicholas Marriott
f4c815a1d9
Fix constness again, sigh.
2013-02-13 10:41:12 +00:00
Nicholas Marriott
fc6f08d5b7
No more need for freefn.
2013-02-13 10:27:49 +00:00
Nicholas Marriott
68e370574a
Fix constness of window_choose_add_item and _window.
2013-02-13 10:25:37 +00:00
Nicholas Marriott
544c80d715
Fix constness of cmd_template_replace.
2013-02-13 10:19:43 +00:00
Nicholas Marriott
36fe146a74
Fix choose-tree usage.
2013-02-13 09:55:37 +00:00
Nicholas Marriott
caa29af2a9
Add user options, prefixed with @. May be set to any arbitrary string.
2013-02-13 09:54:24 +00:00
Nicholas Marriott
0f31d231db
Return error for --foo when using compat/getopt.c.
2013-02-12 20:36:22 +00:00
Nicholas Marriott
102cb77435
Add -v to set and setw to show only option value.
2013-02-12 20:12:10 +00:00
Nicholas Marriott
7360ff4496
Use proc_pidinfo on Darwin for process name too, from OZAKI Kiichi.
2013-02-12 09:40:22 +00:00
Nicholas Marriott
a6fd92bd8d
Remove stray change accidentally committed.
2013-02-10 19:15:49 +00:00
Nicholas Marriott
06ac4b628d
Add a format client_prefix which is 1 if prefix key has been pressed, used for
...
example #{?client_prefix,X,Y}. Also a few extra server_client_status needed.
2013-02-10 18:58:05 +00:00
Nicholas Marriott
6c53a1ed68
Allow formats in status options.
2013-02-10 18:53:25 +00:00
Nicholas Marriott
6ad2c5c40f
Show alias in lscm output.
2013-02-10 18:26:22 +00:00
Nicholas Marriott
99cc0015f8
Rework reflow code so it does not do so much allocation which should be faster
...
with large histories.
2013-02-10 18:15:30 +00:00
Nicholas Marriott
f1ce95915c
Allow choose commands to be used outside tmux, so long as at least one client
...
is attached.
2013-02-10 17:52:51 +00:00
Nicholas Marriott
aadc87f5a7
Remove free callback for window_choose_data objects.
2013-02-10 17:36:58 +00:00
Nicholas Marriott
4d382ae8e6
Miscellaneous tidying of choose API, including:
...
- rename client and session to start_client and start_session in
window_choose_data struct. also add TREE_OTHER define and reorder the
struct
- rename window_choose_ctx to window_choose_data_run
- don't pass a cmd_ctx into window_choose_create (will let it use a
different client later). instead take type, session, client
- add window_choose_data_free and use it to dispose of wcd rather than
each cmd-*.c doing it individually
- change so ref counting is done by wcd_add and wcd_free rather than
callers. this means 1 ref for each item but what of it :-)
- also add a ref to tree_session - not sure if this is needed?
- all the callbacks except choose-client and find-window are the same so
remove them and add window_choose_default_callback
- reorder/rename some other bits and pieces for tidyness
2013-02-10 17:32:58 +00:00
Nicholas Marriott
418ba99078
Add to TODO.
2013-02-09 16:21:20 +00:00
Nicholas Marriott
648ce2f56a
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-02-09 14:53:51 +00:00
Nicholas Marriott
0648c58716
Add to TODO list.
2013-02-09 14:52:11 +00:00
Thomas Adam
01da28efb1
Minor update to .gitignore
...
Now ignores: corefiles, stray patches and tags file.
2013-02-09 10:26:57 +00:00
Thomas Adam
6d6e1581b5
Use osdep_get_cwd() for format change
2013-02-07 13:06:31 +00:00
Thomas Adam
64da762c15
Merge branch 'obsd-master'
2013-02-07 12:08:55 +00:00
Nicholas Marriott
8903c1f167
Automatically reflow wrapped lines when a pane is resized, requested by
...
many over the years and finally implemented by Richard Woodbury.
2013-02-05 11:08:59 +00:00
Nicholas Marriott
a5521597b0
Don't set some string formats if the string is NULL.
2013-02-05 11:01:45 +00:00
Thomas Adam
fe00607816
Only set AUTO{MAKE,CONF}_VERSION on OpenBSD
...
OpenBSD requires the presence of AUTOMAKE_VERSION and AUTOCONF_VERSION for
bootstrapping purposes. Setting these on any other system requires that
explicit version to be used, rather than what might already be installed.
Therefore, only do this when the platform is OpenBSD and ignore everything
else.
2013-01-31 00:14:59 +00:00
Thomas Adam
6e6d756109
Corrections to SYNCING
...
* Reflow some paragraphs due to repo-naming pushing the line length over 80
chaacters.
* Correct path to git clone commands for each repo.
2013-01-30 23:28:38 +00:00
Nicholas Marriott
85531fd404
Unused variable/type nit from Thomas Adam.
2013-01-30 17:00:17 +00:00
Nicholas Marriott
c4c98df4f2
Add -Wdeclaration-after-statement.
2013-01-30 16:35:00 +00:00
Thomas Adam
a3f4eb7b24
Merge branch 'obsd-master'
...
Conflicts:
Makefile
grid-utf8.c
2013-01-30 15:27:19 +00:00
Nicholas Marriott
fdbfc7e349
Rather than having two grids for each pane, one for ASCII and one for
...
UTF-8, collapse the two together. Simplifies the code at the expense of
more memory (which can probably be reduced again later).
2013-01-18 02:16:21 +00:00
Nicholas Marriott
c2e2107063
Style nits - return (x) not return x.
2013-01-18 02:10:29 +00:00
Thomas Adam
2ca8b7f359
Merge branch 'obsd-master'
2013-01-17 22:14:18 +00:00
Nicholas Marriott
3a09e01a8e
Do not allow cursor colours to be set beginning with ? as that will
...
report the colour, from Hayaki Saito.
2013-01-17 20:30:43 +00:00
Nicholas Marriott
d31315884c
Fix some blank line nits.
2013-01-17 03:51:21 +00:00
Nicholas Marriott
57ca428975
Merge branch 'master' of ssh://git.code.sf.net/p/tmux/tmux-code
2013-01-17 02:09:18 +00:00
Nicholas Marriott
b0e2ef1a7d
Update www for new SF URLs.
2013-01-17 02:08:58 +00:00
Thomas Adam
b237d9dd95
Updated SYNCING
2013-01-17 02:02:04 +00:00
Thomas Adam
de194016ec
Merge branch 'obsd-master'
2013-01-17 01:38:21 +00:00
Nicholas Marriott
e33ba57c13
Remove the layout undo/redo code which never really worked.
2013-01-17 00:11:22 +00:00
Nicholas Marriott
44f8e1caff
Implement ECH (erase character, CSI X). Reported by Christian Neukirchen.
2013-01-15 23:18:55 +00:00
Nicholas Marriott
bc2e4a36df
If timing between keys is less than (by default) 1 millisecond, assume
...
the text is being pasted. assume-paste-time option changes the value (0
disables). Based on a diff from Marcin Kulik.
2013-01-15 22:55:29 +00:00
Thomas Adam
675c6b3773
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-12-31 18:50:37 +00:00
Tiago Cunha
f4472c16b2
Fix keyword matching.
...
Per the documentation in *:syn-keyword* (in particular *E789*), the
optional characters inside the square brackets can only be used in the
end. Therefore, unfold some keywords which were being wrongly
recognised.
Noticed by Bruce Wolk.
2012-12-24 17:18:35 +00:00
Nicholas Marriott
854e8ae04d
Add ^ and $ special command targets to select lowest and highest
...
numbered windows, from Raghavendra D Prabhu.
2012-12-24 12:38:57 +00:00
Nicholas Marriott
3e6d45acf6
Add -T option to select-window to toggle to last window if already
...
current, from Raghavendra D Prabhu.
2012-12-24 12:34:32 +00:00
Nicholas Marriott
a2c8af97e9
Add missing function prototype.
2012-12-24 12:33:05 +00:00
Nicholas Marriott
b18ff67646
Add a -u flag to choose-tree to start uncollapsed, from Raghavendra D
...
Prabhu.
2012-12-24 12:25:52 +00:00
millert
6a5adfc0ba
We no longer use struct eproc for kinfo_proc in sysctl.h so there
...
is no direct need for sys/proc.h or sys/resource.h. Some consumers
of kinfo_proc need these for the proc flags and rlimit defines like
RLIM_INF so add the appropriate includes to them.
OK deraadt@ sthen@
2012-12-18 21:28:45 +00:00
Nicholas Marriott
9714880283
Change load_cfg to fix a crash reported by jasper.
2012-12-13 15:36:16 +00:00
Nicholas Marriott
3a0016a78a
Use the CMD_*_USAGE defines consistently, from Thomas Adam.
2012-12-09 23:17:35 +00:00
Thomas Adam
fb83914bd7
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-12-08 20:29:37 +00:00
Thomas Adam
d5de489dc4
.+
2012-12-08 19:16:45 +00:00
Nicholas Marriott
3fa4f691e3
Handle resetting 256-colours properly when parsing #[default],
...
#[fg=default] and #[bg=default] styles.
2012-12-08 17:05:57 +00:00
Nicholas Marriott
8600fe054b
Use strlcat not strncat in load_cfg and some other trivial tidying from
...
Tiago Cunha.
2012-12-06 13:06:05 +00:00
Nicholas Marriott
8378be03d1
Fix argument order in a log statement.
2012-12-06 12:49:13 +00:00
Nicholas Marriott
51a1dbfe09
Simplify command string parsing with a helper function from Tiago Cunha.
2012-12-06 12:47:48 +00:00
Nicholas Marriott
8264e92b37
Fix return value of load_cfg, from Thomas Adam.
2012-11-27 22:59:34 +00:00
Thomas Adam
739a76634c
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-11-27 22:24:00 +00:00
Nicholas Marriott
47c097cb51
Support middle-click paste, based on a diff from Ailin Nemui.
2012-11-27 20:22:12 +00:00
Nicholas Marriott
24d7d073ff
Support the 47 and 1047 SM and RM sequences (alternate screen without
...
cursor), requested by I forget who ages ago.
2012-11-27 20:08:42 +00:00
Thomas Adam
39631edb98
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-11-27 18:12:04 +00:00
Nicholas Marriott
9b8998aeec
Correctly aggregate together errors from nested config files (with
...
source-file). Fix by Thomas Adam, reported by Sam Livingstone-Gray
2012-11-27 16:12:29 +00:00
Nicholas Marriott
4aa4e9fb26
Allow cmd-run-shell to accept -t to specify the pane to display the
...
output, requested by Alexander Tsepkov.
2012-11-27 15:09:35 +00:00
Nicholas Marriott
1fcc7f50ac
When scrolling in copy mode with the mouse, scroll screen rather than
...
moving cursor. This change from Ailin Nemui, alternative to a change
from Stephen Hicks.
2012-11-27 14:42:56 +00:00
Nicholas Marriott
6ef4f8e16c
Revert last, after discussion it isn't necessary.
2012-11-27 14:26:48 +00:00
Nicholas Marriott
93224260ae
Add window-status-last-* options, from Boris Faure.
2012-11-27 13:52:23 +00:00
Nicholas Marriott
991bfcf443
Fix session choice so that preferring unattached sessions actually
...
works, reported by Drew Frank.
2012-11-27 09:20:03 +00:00
Nicholas Marriott
d762ced298
Call realpath earlier on the socket directory path rather than on the
...
socket file path because the latter may not exist yet and in that case
realpath is allowed to fail. From Romain Francoise.
2012-11-26 11:35:28 +00:00
Thomas Adam
1bc910a963
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-11-22 22:19:04 +00:00
Nicholas Marriott
63f451965c
Merge branch 'master' of ssh://tmux.git.sourceforge.net/gitroot/tmux/tmux
2012-11-22 16:48:50 +00:00
Nicholas Marriott
260419f48e
Put helper function back, will be needed in a bit.
2012-11-22 14:41:11 +00:00
Thomas Adam
c04aa90207
Merge branch 'obsd-master'
...
Sync from OpenBSD.
* obsd-master:
Add halfpage commands to mode command string table (missed by accident), from Thomas Adam.
Clarify some points about config files, notably that they are only read at server start. From Thomas Adam.
Use a utility function for common code to show errors in config file, from Thomas Adam.
2012-11-22 13:24:14 +00:00
Nicholas Marriott
0679eb6a6d
Add halfpage commands to mode command string table (missed by accident),
...
from Thomas Adam.
2012-11-19 10:51:25 +00:00
Nicholas Marriott
9a7e5bd1d3
Clarify some points about config files, notably that they are only read
...
at server start. From Thomas Adam.
2012-11-19 10:50:24 +00:00
Nicholas Marriott
827b311c81
Use a utility function for common code to show errors in config file,
...
from Thomas Adam.
2012-11-19 10:38:06 +00:00
Thomas Adam
e4679172e3
Sanitise additional .mailmap entries
...
This sanitises multiple author addresses some more, mapping them back to one
common entity.
2012-11-08 21:39:35 +00:00
Thomas Adam
be10e8eee6
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-11-08 21:27:40 +00:00
Thomas Adam
cb4553bd06
Add .mailmap for commit author translations
...
Because it's not possible to enumerate up-front all of the committers to
tmux coming from OpenBSD, at the time a commit is imported in to git from
the OpenBSD CVS repository, the author information is not known to Git,
necessarily.
But it's possible to alter for output the respective author after the fact,
via Git's .mailmap file. It is this file which will therefore provide a new
mapping of OpenBSD commiter to an actual real name and real email address.
2012-11-08 21:14:32 +00:00
Nicholas Marriott
c68efec6c0
Show last client activity time in default choose-client list.
2012-11-05 13:13:04 +00:00
Thomas Adam
a75801320d
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-11-04 01:27:57 +00:00
okan
241a746f32
fix an off-by-one
...
ok nicm@
2012-10-31 19:11:18 +00:00
Thomas Adam
47fbf87185
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-10-26 20:28:58 +01:00
Nicholas Marriott
d210d99cce
Make mouse event structure clearer by defining events (up, click, drag)
...
and simplifying how buttons and wheels are represented, from Ailin
Nemui. Should be no functional changes.
2012-10-26 14:35:42 +00:00
Thomas Adam
31f93d8445
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-10-25 23:32:14 +01:00
Nicholas Marriott
2a609b332f
Add ability to active pane in list-windows and find-window formats, from
...
Carl Henrik Lunde.
2012-10-25 11:26:47 +00:00
Nicholas Marriott
18236c1c1b
Fix BELL_NONE which had been broken in some code reorganisation or other
...
also don't redraw unnecessarily. From Seiji Ohashi.
2012-10-25 11:16:53 +00:00
Nicholas Marriott
596e9d8068
Fix bad size in memcpy from Romain Francoise.
2012-10-25 11:14:46 +00:00
Nicholas Marriott
589b4b8c6a
Fix typo bell->bells from Thomas Adam.
2012-10-25 11:11:58 +00:00
Nicholas Marriott
60808bbded
+.
2012-10-23 18:47:52 +01:00
Thomas Adam
d4dc52ec84
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-10-16 18:30:36 +01:00
Nicholas Marriott
c695c0c085
Fix some function prototypes from Helmut Tessarek.
2012-10-15 21:53:30 +00:00
Nicholas Marriott
a91c598971
Link to git instructions from index.html.
2012-10-15 18:25:44 +01:00
Thomas Adam
bf45619441
Don't push all tags when releasing tmux
...
Pushing all tags with "git push --tags" will also transfer tags from the
tmux-openbsd repository which isn't what we want to do!
Therefore, just specify the newly created tag to push instead for the next
release.
2012-10-13 13:35:35 +01:00
Thomas Adam
9b2aabb752
Merge branch 'master' of ssh://tmux.git.sourceforge.net/gitroot/tmux/tmux
2012-10-13 12:25:08 +01:00
Thomas Adam
c0fb5edff9
Update website.
2012-10-13 12:22:11 +01:00
Thomas Adam
5cdc9591d3
Working on 1.8
2012-10-13 12:12:43 +01:00
Thomas Adam
2b5c3fc49f
Update NOTES, CHANGES, configure.ac for 1.7 release
2012-10-13 11:56:14 +01:00
Thomas Adam
b4ad1759b8
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-10-11 17:52:23 +01:00
Nicholas Marriott
6589120667
Fix a use-after-free when collapsing the tree in choose mode, from
...
Carl Henrik Lunde.
2012-10-11 08:53:50 +00:00
Thomas Adam
0cdcae3532
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-10-09 20:47:28 +01:00
Nicholas Marriott
0e87430462
Add tree keys to vi mode too, missed by accident.
2012-10-09 18:08:21 +00:00
Thomas Adam
43d2b6a648
Remove references to PATCHES file
2012-10-07 10:57:11 +01:00
Nicholas Marriott
8249fbfb60
Make some tweaks to NOTES and add a paragraph on git rather than huge PATCHES
...
file.
2012-10-05 09:05:44 +01:00
Thomas Adam
3a545376f0
Reference PATCHES document from TODO file
...
In terms of submitting patches via the TODO file from the tmux portable
repository, mention the PATCHES file in passing.
2012-10-05 00:19:53 +01:00
Thomas Adam
5cc9380bfa
Add PATCHES document
...
This describes how to send patches against the portable tmux version as
hosted on souceforge, using Git.
2012-10-05 00:18:50 +01:00
Thomas Adam
ca84659ca1
Add explanatory sections to TODO file
...
This restructures the TODO file slightly, separating out the
terminal-specific tasks from the tmux user interface tasks.
2012-10-04 23:57:31 +01:00
Thomas Adam
8dc78377d1
+.
2012-10-04 22:45:22 +01:00
Thomas Adam
64deb34c3b
Add choose-list to tmux.vim
2012-10-02 18:13:13 +01:00
Thomas Adam
8b05d84ece
Update TODO list.
...
Keeping this in sync with work done.
2012-10-02 13:02:30 +01:00
Thomas Adam
619ffe1f4f
Merge branch 'obsd-master'
...
Sync from OpenBSD.
* obsd-master:
Allow session tree (C-b s) to expand and collapse sessions with left/right/space keys. From Thomas Adam.
Remove some out of date text from man page, from Thomas Adam.
2012-10-02 10:47:16 +01:00
Nicholas Marriott
9107b0c69a
Allow session tree (C-b s) to expand and collapse sessions with
...
left/right/space keys. From Thomas Adam.
2012-10-02 08:16:28 +00:00
Nicholas Marriott
ea289bc457
Remove some out of date text from man page, from Thomas Adam.
2012-10-02 08:02:21 +00:00
Thomas Adam
9763282dc1
Merge branch 'obsd-master'
2012-10-01 13:32:52 +01:00
Nicholas Marriott
44dccf7ea2
Do not test client flags against TTY_FREEZE bit, reported by Tom Ryder.
2012-09-29 06:57:56 +00:00
Thomas
80b5c0e076
Merge branch 'obsd-master'
...
Sync from OpenBSD.
* obsd-master:
Do not leak file descriptor if not a tty, reported by Sebastien Marie.
2012-09-27 11:55:55 +01:00
Nicholas Marriott
7a3ec77dbd
Do not leak file descriptor if not a tty, reported by Sebastien Marie.
2012-09-27 10:02:56 +00:00
Thomas Adam
48750022c0
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-09-25 17:05:36 +01:00
Nicholas Marriott
ce0b285aad
Fix up missing bits.
2012-09-25 08:54:01 +01:00
Nicholas Marriott
17bbf90393
Add notification for input from a pane, from George Nachman.
2012-09-25 07:41:22 +00:00
Nicholas Marriott
0d0b3cf9a4
Fix search forward so it can match strings on the last line, SF bug
...
3571114 from "LiJunLe".
2012-09-25 07:39:28 +00:00
Nicholas Marriott
149f5bac05
Merge branch 'master' of ssh://tmux.git.sourceforge.net/gitroot/tmux/tmux
...
Conflicts:
cmd.c
format.c
osdep-openbsd.c
2012-09-25 08:07:39 +01:00
Thomas Adam
253f1395a0
Don't rely on "-s ours" for merging
...
The ours strategy assumes one subsumes the other -- which isn't the case for
the portable version, so for now -- just go back to using the default merge
strategy of recursive, and fix-up any conflicts manually.
2012-09-24 18:05:34 +01:00
Thomas Adam
e342304134
Merge branch 'obsd-master'
...
Conflicts:
cmd.c
format.c
osdep-openbsd.c
tmux.h
2012-09-24 17:55:06 +01:00
Nicholas Marriott
d785c37ee2
Fix some UTF-8 Japanese issue on OS X, SF bug 3566884.
2012-09-24 17:53:15 +01:00
Nicholas Marriott
69683ba7b4
Use ACS characters for choose-tree arrows based on diff from Romain
...
Francoise.
2012-09-24 17:53:10 +01:00
Thomas
7b189f1ad7
Merge branch 'obsd-master'
...
* obsd-master:
Use pgrp of pty fd not pid of immediate child when recovering current working directory (like current process). From Marcel Partap.
Use ACS characters for choose-tree arrows based on diff from Romain Francoise.
2012-09-24 14:56:56 +01:00
Nicholas Marriott
84612a8196
Add control_write_buffer, from George Nachman.
2012-09-24 13:39:10 +00:00
Nicholas Marriott
5d60bc7f7c
Use pgrp of pty fd not pid of immediate child when recovering current working
...
directory (like current process). From Marcel Partap.
2012-09-24 14:05:38 +01:00
Nicholas Marriott
42272dfbd5
Use pgrp of pty fd not pid of immediate child when recovering current
...
working directory (like current process). From Marcel Partap.
2012-09-24 13:05:10 +00:00
Nicholas Marriott
5b85efeb93
Fix some UTF-8 Japanese issue on OS X, SF bug 3566884.
2012-09-24 13:56:32 +01:00
Nicholas Marriott
eb0ad181e9
Use ACS characters for choose-tree arrows based on diff from Romain
...
Francoise.
2012-09-24 12:53:55 +00:00
Thomas Adam
dc3df931d7
Merge branch 'master' of ssh://tmux.git.sourceforge.net/gitroot/tmux/tmux
...
Conflicts:
SYNCING
2012-09-20 23:02:49 +01:00
Thomas Adam
d3d48fa3e7
Add release instructions for new tmux versions
...
Document how actual releases will happen. Largely based on tcunha's
original notes. Tweaked by me slightly to adapt to git.
2012-09-20 22:59:08 +01:00
Thomas Adam
73f29094d0
.+ SYNCING.
2012-09-19 09:50:39 +01:00
Thomas Adam
a043b975ca
Add SYNCING document
...
This explains how to keep the tmux and tmux-openbsd repositories in sync
with one another during the course of tmux development.
2012-09-16 22:53:58 +01:00
Thomas Adam
68cc635ed5
Merge branch 'obsd-master'
...
Sync from OpenBSD.
2012-09-15 12:23:25 +01:00
Nicholas Marriott
b2a9f4115f
Handle empty list properly in choose-list, based on fix from Thomas Adam.
2012-09-05 10:14:21 +00:00
Nicholas Marriott
b433886840
We can't tell what the terminal has done with a DCS string, so reset the
...
cursor and attributes afterwards.
2012-09-05 09:59:41 +00:00
Thomas Adam
248cd423a1
Fixup Makefile.am
...
Since this is just Makefile in the OpenBSD directory, pull in those trivial
changes to the templated one for use in autotools.
2012-09-04 22:50:16 +01:00
Nicholas Marriott
b79f86e32a
Trivial code simplification from Tim Ruehsen.
2012-09-04 22:37:31 +01:00
Nicholas Marriott
40505e59f1
Remove xterm CRA support - support is patchy and it will be done better
...
using margins.
2012-09-04 22:37:31 +01:00
Nicholas Marriott
a1cd0eee1b
Use the right index when adding item in choose-tree, from Thomas Adam.
2012-09-04 22:37:31 +01:00
Nicholas Marriott
c914fcfacb
When choosing a pane found by find-window, switch to that pane rather
...
than just the window. Also use a helper function for the inner loop.
2012-09-04 22:37:31 +01:00
Nicholas Marriott
4d7967de7a
Rename variables to something a but more understandable.
2012-09-04 22:37:31 +01:00
Nicholas Marriott
28fd3a3835
add cmd-choose-list to allow arbitrary options to be selected. From
...
Thomas Adam.
2012-09-04 22:37:29 +01:00
Nicholas Marriott
996a636713
Remove an unused variable.
2012-09-04 22:36:56 +01:00
Nicholas Marriott
41a448193f
Send notifications to control clients. Also don't redraw client when
...
suspended.
2012-09-04 22:36:47 +01:00
Nicholas Marriott
0304555184
Change format of choose-tree arrows slightly, from Romain Francoise.
2012-09-04 22:35:52 +01:00
Nicholas Marriott
f536dc47c4
If stdin in the client is enable immediately, tmux will eat anything
...
sent to stdin before it is needed, which can be inconvenient (eg pasting
commands). Instead, start with stdin disabled and reuse MSG_STDIN from
server->client to mean that stdin should be enabled. Based on a diff
from Chris Johnsen.
2012-09-04 22:35:52 +01:00
Nicholas Marriott
d6066552ee
Can't call evtimer_pending on uninitialized events, call
...
evtimer_initialized first. Reported by Vladimir Lomov, fix from Thomas
Adam slightly modified by me.
2012-09-04 22:35:52 +01:00
Nicholas Marriott
59c760dfcd
Trivial code simplification from Tim Ruehsen.
2012-09-04 13:24:50 +00:00
Nicholas Marriott
c06b2e4fb9
.gitignore + Makefile Makefile.in configure
2012-09-04 09:26:54 +01:00
Thomas Adam
1f29f6ac4d
Add .gitignore
...
Tell git not to consider certain files, such as object files.
2012-09-04 09:21:09 +01:00
Thomas Adam
3ad812cbd5
Make autogen.sh executable
2012-09-04 08:19:12 +01:00
Nicholas Marriott
53c430eced
Change WWW links to Git not Subverson.
2012-09-04 08:00:34 +01:00
Nicholas Marriott
6307d63715
Remove xterm CRA support - support is patchy and it will be done better
...
using margins.
2012-09-03 15:47:40 +00:00
Nicholas Marriott
4f8a6867fa
Use the right index when adding item in choose-tree, from Thomas Adam.
2012-09-03 12:24:25 +00:00
Nicholas Marriott
9e7bbc7281
When choosing a pane found by find-window, switch to that pane rather
...
than just the window. Also use a helper function for the inner loop.
2012-09-03 12:20:17 +00:00
Nicholas Marriott
c96a2a3c9e
Rename variables to something a but more understandable.
2012-09-03 10:02:39 +00:00
Nicholas Marriott
7263fa36eb
add cmd-choose-list to allow arbitrary options to be selected. From
...
Thomas Adam.
2012-09-03 09:57:57 +00:00
Nicholas Marriott
adc9fad4ac
Remove an unused variable.
2012-09-03 09:36:07 +00:00
Nicholas Marriott
9247c90d69
Send notifications to control clients. Also don't redraw client when
...
suspended.
2012-09-03 09:32:38 +00:00
Nicholas Marriott
a679a4a708
Change format of choose-tree arrows slightly, from Romain Francoise.
2012-09-03 09:01:16 +00:00
Nicholas Marriott
2e43372d0b
If stdin in the client is enable immediately, tmux will eat anything
...
sent to stdin before it is needed, which can be inconvenient (eg pasting
commands). Instead, start with stdin disabled and reuse MSG_STDIN from
server->client to mean that stdin should be enabled. Based on a diff
from Chris Johnsen.
2012-09-03 08:48:57 +00:00
Nicholas Marriott
473911fb73
Can't call evtimer_pending on uninitialized events, call
...
evtimer_initialized first. Reported by Vladimir Lomov, fix from Thomas
Adam slightly modified by me.
2012-09-03 06:26:48 +00:00
Tiago Cunha
686d461144
Sync OpenBSD patchset 1168:
...
Change a log to fprintf that was missed last time around, from Tiago Cunha.
2012-08-31 09:25:19 +00:00
Tiago Cunha
554f19eb05
Sync OpenBSD patchset 1167:
...
Instead of requiring a prompt to enter all numbers >10, go back to
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-31 09:24:51 +00:00
Tiago Cunha
fc8d3f7a56
Sync OpenBSD patchset 1166:
...
xterm won't reach version 500 for a while so set that as the upper limit.
2012-08-31 09:22:50 +00:00
Tiago Cunha
56e37487a8
Sync OpenBSD patchset 1165:
...
Fix up window reference counting and don't crash if the rename timer
fires while the window is dead but still referenced. Fixes problem
reported by Michael Scholz.
2012-08-31 09:22:08 +00:00
Tiago Cunha
674545f7e6
Sync OpenBSD patchset 1164:
...
Boldify windows with alerts in choose-* list.
2012-08-31 09:20:47 +00:00
Tiago Cunha
35690fb3a5
Sync OpenBSD patchset 1163:
...
Tidy up tty_write, from Sean Estabrooks.
2012-08-31 09:20:09 +00:00
Tiago Cunha
1c608031b5
Sync OpenBSD patchset 1162:
...
Use a separate define for each default format template and strip clutter
from the choose-tree defaults.
2012-08-31 09:18:50 +00:00
Nicholas Marriott
84a4007b06
Change a log to fprintf that was missed last time around, from Tiago Cunha.
2012-08-27 21:35:11 +00:00
Nicholas Marriott
753775033a
Instead of requiring a prompt to enter all numbers >10, go back to
...
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-27 21:29:23 +00:00
Nicholas Marriott
d39c58c01c
xterm won't reach version 500 for a while so set that as the upper limit.
2012-08-21 10:08:11 +00:00
Nicholas Marriott
58e8e0eac8
Fix up window reference counting and don't crash if the rename timer
...
fires while the window is dead but still referenced. Fixes problem
reported by Michael Scholz.
2012-08-21 10:00:33 +00:00
Nicholas Marriott
d50f157f7e
+.
2012-08-14 09:38:34 +00:00
Nicholas Marriott
a1e4908ed7
Boldify windows with alerts in choose-* list.
2012-08-14 09:17:14 +00:00
Nicholas Marriott
f61fc576d9
Tidy up tty_write, from Sean Estabrooks.
2012-08-14 08:58:25 +00:00
Nicholas Marriott
73c6785538
Use a separate define for each default format template and strip clutter
...
from the choose-tree defaults.
2012-08-14 08:51:53 +00:00
Nicholas Marriott
6804d5841e
Add a patch missed during a merge sometime to use
...
TAILQ_FOREACH_SAFE. From Tiago Cunha.
2012-08-14 08:15:00 +00:00
Tiago Cunha
96aaa87df6
Remove osdep include.
2012-08-12 19:34:57 +00:00
Tiago Cunha
454e7d9c3a
Sync OpenBSD patchset 1160:
...
Simplify width calculation (all numbers always sequential) and don't
rely on uninitialized data, from Thomas Adam.
2012-08-12 19:31:26 +00:00
Tiago Cunha
db27dc82f0
Sync OpenBSD patchset 1159:
...
Remove dead code, from Sean Estabrooks.
2012-08-12 19:30:54 +00:00
Tiago Cunha
061027fefc
Sync OpenBSD patchset 1158:
...
Another missing format from sam at sltosis.org.
2012-08-12 19:30:11 +00:00
Tiago Cunha
45d68963ab
Sync OpenBSD patchset 1157:
...
Fix a return type.
2012-08-12 19:29:05 +00:00
Tiago Cunha
200b0e5821
Sync OpenBSD patchset 1156:
...
Instead of numbering choose mode items 0-9a-z and then nothing, number
them all and if there are more than 10 use a prompt when 0-9 is
pressed. From Thomas Adam.
2012-08-12 19:28:20 +00:00
Tiago Cunha
30b801decf
Sync OpenBSD patchset 1155:
...
Add some missing formats from Samuel Le Thiec.
2012-08-12 19:25:15 +00:00
Tiago Cunha
ca3f92e78c
Sync OpenBSD patchset 1154:
...
Document pane_index variable, from sam at sltosis dot org.
2012-08-12 19:24:31 +00:00
Tiago Cunha
c8849ac990
Sync OpenBSD patchset 1153:
...
Add a queue of notifys and a way to turn them off and on (we do not want
notifys to happen during some commands). Based on code from George
Nachman.
2012-08-12 19:23:01 +00:00
Nicholas Marriott
44307712ed
Add to TODO.
2012-08-12 18:56:25 +00:00
Nicholas Marriott
20129b7bf9
Simplify width calculation (all numbers always sequential) and don't
...
rely on uninitialized data, from Thomas Adam.
2012-08-12 06:22:26 +00:00
Nicholas Marriott
a194430e5d
Remove dead code, from Sean Estabrooks.
2012-08-11 07:32:16 +00:00
Nicholas Marriott
cf2e65c0e2
Another missing format from sam at sltosis.org.
2012-08-11 07:10:01 +00:00
Nicholas Marriott
8889a48f9b
Fix a return type.
2012-08-11 06:46:47 +00:00
Nicholas Marriott
a3dec6bece
Instead of numbering choose mode items 0-9a-z and then nothing, number
...
them all and if there are more than 10 use a prompt when 0-9 is
pressed. From Thomas Adam.
2012-08-11 06:45:33 +00:00
Nicholas Marriott
ff4097e02c
Add some missing formats from Samuel Le Thiec.
2012-08-11 05:55:12 +00:00
Tiago Cunha
c081af2963
Sync with reality.
2012-07-16 22:19:13 +00:00
Nicholas Marriott
89a96b05fa
Document pane_index variable, from sam at sltosis dot org.
2012-07-15 06:51:57 +00:00
Nicholas Marriott
5385a9bb34
Add a queue of notifys and a way to turn them off and on (we do not want
...
notifys to happen during some commands). Based on code from George
Nachman.
2012-07-13 06:27:41 +00:00
Tiago Cunha
d697b5ef20
Sync OpenBSD patchset 1152:
...
Nuke unused variable from Thomas Adam.
2012-07-12 21:14:46 +00:00
Tiago Cunha
81858d7891
Now that the queue _SAFE macros are available, use them instead of rolling
...
our own. This is analogous to the recent changes to the detach-client and
kill-{session,window} commands.
2012-07-12 21:04:43 +00:00
Tiago Cunha
7a583b1e54
Sync with OpenBSD. Mostly because of the added _SAFE macros which is
...
needed by an upcoming change.
2012-07-12 20:59:39 +00:00
Nicholas Marriott
35a8a61254
Nuke unused variable from Thomas Adam.
2012-07-12 13:03:42 +00:00
Tiago Cunha
513bd8f62d
Remove remaining xfree calls from the portable version.
2012-07-11 19:50:46 +00:00
Tiago Cunha
1f5e6e35d5
Sync OpenBSD patchset 1151:
...
Make command exec functions return an enum rather than -1/0/1 values and
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence. Most of the
work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
2012-07-11 19:37:32 +00:00
Tiago Cunha
a432fcd306
Sync OpenBSD patchset 1150:
...
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-11 19:34:16 +00:00
Tiago Cunha
06d27e94b2
Sync OpenBSD patchset 1149:
...
Move a NULL check inside a function, from Tiago Cunha.
2012-07-11 19:30:01 +00:00
Tiago Cunha
188be9718e
Sync OpenBSD patchset 1148:
...
Fix choose-tree usage string.
2012-07-11 17:16:25 +00:00
Tiago Cunha
bbd3e822c7
Sync OpenBSD patchset 1147:
...
remove extraneous line;
2012-07-11 17:15:53 +00:00
Tiago Cunha
45a2e2d6c6
Update list of sources to reflect the recent changes introduced by the
...
choose-tree command.
2012-07-11 17:15:23 +00:00
Tiago Cunha
a10143a2d1
Sync OpenBSD patchset 1146:
...
Add choose-tree command to show windows and sessions in the same
list. Change choose-window and -session to use the same code. From
Thomas Adam.
2012-07-11 17:13:55 +00:00
Tiago Cunha
38530de622
Sync OpenBSD patchset 1144:
...
Clear flags across all sessions, from Thomas Adam.
2012-07-11 17:06:11 +00:00
Nicholas Marriott
f040bc249f
Add.
2012-07-11 09:28:11 +00:00
Nicholas Marriott
ede8312d59
Make command exec functions return an enum rather than -1/0/1 values and
...
add a new value to mean "leave client running but don't attach" to fix
problems with using some commands in a command sequence. Most of the
work by Thomas Adam, problem reported by "jspenguin" on SF bug 3535531.
2012-07-11 07:10:15 +00:00
Nicholas Marriott
df912e3540
xfree is not particularly helpful, remove it. From Thomas Adam.
2012-07-10 11:53:01 +00:00
Nicholas Marriott
3886f60671
+.
2012-07-09 20:46:41 +00:00
Nicholas Marriott
a3391692ad
Move a NULL check inside a function, from Tiago Cunha.
2012-07-09 09:55:57 +00:00
Nicholas Marriott
91f54b59ac
Fix choose-tree usage string.
2012-07-09 07:08:03 +00:00
Jason McIntyre
b0f4f94b5b
remove extraneous line;
2012-07-08 17:24:29 +00:00
Nicholas Marriott
f20c6fe009
Add choose-tree command to show windows and sessions in the same
...
list. Change choose-window and -session to use the same code. From
Thomas Adam.
2012-07-08 16:04:38 +00:00
Nicholas Marriott
191a92c0c6
Sort SRCS list.
2012-07-08 15:24:08 +00:00
Nicholas Marriott
adba3d35b1
+ entry to show default options, suggested by Thomas Adam.
2012-07-08 13:32:09 +00:00
Nicholas Marriott
63f5c38023
Clear flags across all sessions, from Thomas Adam.
2012-07-08 07:27:32 +00:00
Tiago Cunha
7e02d2f459
Sync OpenBSD patchset 1143:
...
Provide common helper function for adding windows and sessions to choose
lists and expand %% in command before using it rather than at callback
time. From Thomas Adam.
2012-07-04 11:03:20 +00:00
Tiago Cunha
5761712799
Sync OpenBSD patchset 1142:
...
Clean up and simplify the choose mode code, from Thomas Adam.
2012-07-04 11:01:00 +00:00
Tiago Cunha
9bb97522d5
Sync OpenBSD patchset 1141:
...
Trim a blank line.
2012-07-04 10:55:22 +00:00
Tiago Cunha
f4053bc217
Sync OpenBSD patchset 1140:
...
Remove a couple of unused variables from redbrain at gcc dot gnu dot org.
2012-07-04 10:54:45 +00:00
Nicholas Marriott
67b926cf3c
Provide common helper function for adding windows and sessions to choose
...
lists and expand %% in command before using it rather than at callback
time. From Thomas Adam.
2012-06-25 14:27:25 +00:00
Nicholas Marriott
5b6f78186c
Clean up and simplify the choose mode code, from Thomas Adam.
2012-06-25 14:08:55 +00:00
Nicholas Marriott
39abca401a
Trim a blank line.
2012-06-25 13:49:16 +00:00
Nicholas Marriott
a7917430d8
Remove a couple of unused variables from redbrain at gcc dot gnu dot org.
2012-06-20 12:55:55 +00:00
Tiago Cunha
202c04414c
More ifdef goo is needed due to NOKERNINFO.
2012-06-18 16:23:42 +00:00
Tiago Cunha
bc47596313
Sync OpenBSD patchset 1139:
...
Actually write all the data to stdout/stderr.
2012-06-18 15:25:23 +00:00
Tiago Cunha
dfc845e7f9
Add control.c to the list of sources.
2012-06-18 15:24:17 +00:00
Tiago Cunha
0159c74a32
Sync OpenBSD patchset 1138:
...
Add a skeleton mode to tmux (called "control mode") that let's tmux
commands be sent and output received on stdout. This can be used to
integrate with other terminal emulators and should allow some other
things to be made simpler later. More to come so doesn't do much yet and
deliberately not documented.
2012-06-18 15:23:01 +00:00
Tiago Cunha
a401420273
Sync OpenBSD patchset 1137:
...
Tidy up bell code, from Thomas Adam.
2012-06-18 15:17:55 +00:00
Tiago Cunha
fce30422f3
Sync OpenBSD patchset 1136:
...
Add a couple of NULL pointer checks to key binding functions, from
jspenguin on SF bug 3535531.
2012-06-18 15:15:32 +00:00
Tiago Cunha
2a36a0a067
Sync OpenBSD patchset 1135:
...
Do not crash when the current session has no window, fixes a bug
reported by Giorgio Lando. Fix from Thomas Adam.
2012-06-18 15:14:48 +00:00
Tiago Cunha
1c15848c47
Sync OpenBSD patchset 1134:
...
Add -a for kill-session, from Thomas Adam.
2012-06-18 15:12:54 +00:00
Tiago Cunha
4a634a7da4
Sync OpenBSD patchset 1133:
...
Add -a flag for detach-client, from Thomas Adam.
2012-06-18 15:11:35 +00:00
Tiago Cunha
576f2694b1
Sync OpenBSD patchset 1132:
...
Simplify references to alerts in the man page, from Thomas Adam.
2012-06-18 15:10:40 +00:00
Nicholas Marriott
0f00c3b47a
Actually write all the data to stdout/stderr.
2012-06-18 13:34:56 +00:00
Nicholas Marriott
2942eca895
Add a skeleton mode to tmux (called "control mode") that let's tmux
...
commands be sent and output received on stdout. This can be used to
integrate with other terminal emulators and should allow some other
things to be made simpler later. More to come so doesn't do much yet and
deliberately not documented.
2012-06-18 13:16:42 +00:00
Nicholas Marriott
7c39850d1f
Tidy up bell code, from Thomas Adam.
2012-06-18 10:58:44 +00:00
Nicholas Marriott
a13b4a819a
Add a couple of NULL pointer checks to key binding functions, from
...
jspenguin on SF bug 3535531.
2012-06-18 09:58:02 +00:00
Nicholas Marriott
a4a2c68fa9
Do not crash when the current session has no window, fixes a bug
...
reported by Giorgio Lando. Fix from Thomas Adam.
2012-06-18 09:20:19 +00:00
Nicholas Marriott
2113115cdd
Add -a for kill-session, from Thomas Adam.
2012-06-18 09:16:15 +00:00
Nicholas Marriott
038e8b770d
Add -a flag for detach-client, from Thomas Adam.
2012-06-18 09:15:22 +00:00
Nicholas Marriott
04ac61ecd7
Simplify references to alerts in the man page, from Thomas Adam.
2012-06-18 09:13:12 +00:00
Nicholas Marriott
eed7d9b473
Do not use stderr for log file and don't call log_close when not needed.
2012-05-30 15:01:57 +00:00
Nicholas Marriott
021e95b09f
Do not use stderr for log file and don't call log_close when not needed.
2012-05-30 15:01:21 +00:00
Tiago Cunha
bf4b02cea2
Sync OpenBSD patchset 1130:
...
Add pane title to choose-window template and use the right index for the
pane, from Romain Francoise.
2012-05-30 13:49:45 +00:00
Tiago Cunha
e96d514247
Sync OpenBSD patchset 1129:
...
Use RB_FOREACH_SAFE as winlinks are being removed, from Chris Johnsen.
2012-05-30 13:49:05 +00:00
Tiago Cunha
bcda6eed63
Sync OpenBSD patchset 1128:
...
Use session from -t for killw -a, from Chris Johnsen.
2012-05-30 13:48:16 +00:00
Tiago Cunha
2e3a260315
Sync OpenBSD patchset 1127:
...
Use default-shell not _PATH_BSHELL to spawn commands, pointed out by
Dennis G?nnewig and Thomas Adam.
2012-05-30 13:47:33 +00:00
Tiago Cunha
b24829a99c
Sync OpenBSD patchset 1126:
...
Trim a double space from template.
2012-05-30 13:46:25 +00:00
Tiago Cunha
7c7bd14c61
Sync OpenBSD patchset 1125:
...
Strip layout from choose-windows again (leave in list-windows),
suggested by Romain Francoise, diff from Thomas Adam.
2012-05-30 13:45:16 +00:00
Tiago Cunha
30b23baaf5
Sync OpenBSD patchset 1124:
...
Fix client templates, from Romain Francoise.
2012-05-30 13:44:13 +00:00
Tiago Cunha
169d362945
Sync OpenBSD patchset 1123:
...
Simplify logging and just fprintf(stderr, ...) for early errors.
2012-05-30 13:42:57 +00:00
Tiago Cunha
c6fc8771a9
Sync OpenBSD patchset 1122:
...
Use a predefined structure for not-space cells used to set attributes.
2012-05-30 13:41:58 +00:00
Nicholas Marriott
626c8aa8e7
Add a simple zoom script from Juan Ignacio Pumarino.
2012-05-30 10:33:20 +00:00
Nicholas Marriott
db20f2d907
Add pane title to choose-window template and use the right index for the
...
pane, from Romain Francoise.
2012-05-29 08:15:45 +00:00
Nicholas Marriott
63d109fb7f
Use RB_FOREACH_SAFE as winlinks are being removed, from Chris Johnsen.
2012-05-29 08:12:13 +00:00
Nicholas Marriott
226f9fa012
Use session from -t for killw -a, from Chris Johnsen.
2012-05-29 08:11:34 +00:00
Nicholas Marriott
f51c55c3f0
Use default-shell not _PATH_BSHELL to spawn commands, pointed out by
...
Dennis G?nnewig and Thomas Adam.
2012-05-28 08:55:43 +00:00
Nicholas Marriott
fbf2bd865c
Trim a double space from template.
2012-05-28 08:00:46 +00:00
Nicholas Marriott
1845800651
Strip layout from choose-windows again (leave in list-windows),
...
suggested by Romain Francoise, diff from Thomas Adam.
2012-05-28 07:59:07 +00:00
Nicholas Marriott
993f1b96a3
Fix client templates, from Romain Francoise.
2012-05-27 21:43:57 +00:00
Nicholas Marriott
196710e2d3
Simplify logging and just fprintf(stderr, ...) for early errors.
2012-05-25 08:28:10 +00:00
Nicholas Marriott
ed85c5a198
Remove an extraneous word.
2012-05-23 20:08:14 +00:00
Nicholas Marriott
1f23f6d686
Use a predefined structure for not-space cells used to set attributes.
2012-05-23 19:19:40 +00:00
Tiago Cunha
17da2f7d5f
Sync OpenBSD patchset 1121:
...
Store client in tty struct directly instead of using a callback function
pointer.
2012-05-22 21:05:30 +00:00
Tiago Cunha
fff7c0b276
Sync OpenBSD patchset 1120:
...
Store mouse data in tty structure not on the stack.
2012-05-22 21:04:25 +00:00
Tiago Cunha
5cc4961fd2
Sync OpenBSD patchset 1119:
...
Switch all of the various choose- and list- commands over to the format
infrastructure, from Thomas Adam.
2012-05-22 21:03:25 +00:00
Tiago Cunha
baafc17a1e
Sync OpenBSD patchset 1118:
...
Add a helper function to send ready message.
2012-05-22 20:59:58 +00:00
Tiago Cunha
49b2a255b6
Sync OpenBSD patchset 1117:
...
Use tty_pane_full_width macro in some more places.
2012-05-22 20:59:12 +00:00
Tiago Cunha
d9cb07df3b
Sync OpenBSD patchset 1116:
...
If there are any terminals with insert mode but not ich1, they can go
through the slow path. Tidies code slightly.
2012-05-22 20:58:33 +00:00
Tiago Cunha
a97f22ff2b
Sync OpenBSD patchset 1115:
...
Move some common code to repeat spaces into a function.
2012-05-22 20:57:47 +00:00
Tiago Cunha
ffab6dbc9a
Sync OpenBSD patchset 1114:
...
Instead of passing stdin/stdout/stderr file descriptors over imsg and
handling them in the server, handle them in the client and pass buffers
over imsg. This is much tidier for some upcoming changes and the
performance hit isn't critical.
The tty fd is still passed to the server as before.
This bumps the tmux protocol version so new clients and old servers are
incompatible.
2012-05-22 20:56:35 +00:00
Tiago Cunha
04bf0d8efc
Sync OpenBSD patchset 1113:
...
Ignore line continuation when escaped as \\, from Simon Nicolussi.
2012-05-22 20:50:51 +00:00
Tiago Cunha
3604b31b6f
Sync OpenBSD patchset 1112:
...
Use -t for move-window with -r rather than dying. Reported by Ben
Boeckel and Thomas Adam.
2012-05-22 20:50:03 +00:00
Nicholas Marriott
84c708f355
Store client in tty struct directly instead of using a callback function
...
pointer.
2012-05-22 14:32:28 +00:00
Nicholas Marriott
fe4f00834d
Store mouse data in tty structure not on the stack.
2012-05-22 14:11:30 +00:00
Nicholas Marriott
ebf94bc9cb
Switch all of the various choose- and list- commands over to the format
...
infrastructure, from Thomas Adam.
2012-05-22 11:35:37 +00:00
Nicholas Marriott
682884edc5
Add a helper function to send ready message.
2012-05-22 10:56:48 +00:00
Nicholas Marriott
82b053a811
Use tty_pane_full_width macro in some more places.
2012-05-22 09:37:54 +00:00
Nicholas Marriott
2f93affb98
If there are any terminals with insert mode but not ich1, they can go
...
through the slow path. Tidies code slightly.
2012-05-22 09:36:12 +00:00
Nicholas Marriott
243d12752c
Move some common code to repeat spaces into a function.
2012-05-22 09:09:16 +00:00
Nicholas Marriott
7a4679a17f
Instead of passing stdin/stdout/stderr file descriptors over imsg and
...
handling them in the server, handle them in the client and pass buffers
over imsg. This is much tidier for some upcoming changes and the
performance hit isn't critical.
The tty fd is still passed to the server as before.
This bumps the tmux protocol version so new clients and old servers are
incompatible.
2012-05-21 18:27:42 +00:00
Nicholas Marriott
d61c572c92
+/- from Thomas Adam.
2012-05-20 11:09:17 +00:00
Nicholas Marriott
cae8d02b2e
Add FAQ entry on terminal scrollback, from Andrew Pimlott.
2012-05-17 23:30:20 +00:00
Nicholas Marriott
ac7e2f13e9
Ignore line continuation when escaped as \\, from Simon Nicolussi.
2012-05-17 21:21:31 +00:00
Nicholas Marriott
50cefec497
Use -t for move-window with -r rather than dying. Reported by Ben
...
Boeckel and Thomas Adam.
2012-05-13 07:33:31 +00:00
Tiago Cunha
1340c012b0
Sync OpenBSD patchset 1111:
...
Add a helper function to open the terminal for attach-/new-session.
2012-05-12 15:00:19 +00:00
Tiago Cunha
2f0db58777
Sync OpenBSD patchset 1110:
...
Only enter copy mode on scroll up, from Ailin Nemui.
2012-05-12 14:59:17 +00:00
Tiago Cunha
470f521410
Sync OpenBSD patchset 1109:
...
Tidy up by adding a macro for the pane being the full screen width, from
Ailin Nemui.
2012-05-12 14:58:43 +00:00
Tiago Cunha
8f29eeaae6
Sync OpenBSD patchset 1108:
...
Missing ()s in macros.
2012-05-12 14:57:36 +00:00
Tiago Cunha
f2f9bc0181
Sync OpenBSD patchset 1107:
...
Pull CRA out into a separate function and add ERA, from Ailin Nemui.
2012-05-12 14:57:02 +00:00
Tiago Cunha
5f92f62ac3
Sync OpenBSD patchset 1106:
...
Make unbind-key -a work with -t, based on a diff from Kazuhiko Sakaguchi.
2012-05-12 14:56:10 +00:00
Nicholas Marriott
673b1abe5f
+.
2012-05-10 06:04:31 +00:00
Nicholas Marriott
37f9bb46d8
Add a helper function to open the terminal for attach-/new-session.
2012-05-06 07:38:17 +00:00
Nicholas Marriott
218b692221
Only enter copy mode on scroll up, from Ailin Nemui.
2012-05-05 18:48:31 +00:00
Nicholas Marriott
96a34a0c0a
Tidy up by adding a macro for the pane being the full screen width, from
...
Ailin Nemui.
2012-05-05 18:45:55 +00:00
Nicholas Marriott
132403b6be
Missing ()s in macros.
2012-05-05 18:31:09 +00:00
Nicholas Marriott
3e6454f2d6
Pull CRA out into a separate function and add ERA, from Ailin Nemui.
2012-05-05 18:17:59 +00:00
Nicholas Marriott
f66b105c21
Make unbind-key -a work with -t, based on a diff from Kazuhiko Sakaguchi.
2012-05-05 17:40:47 +00:00
Tiago Cunha
b74b875f25
Sync OpenBSD tree.h due to patchset 1104.
...
Prompted by ore on #tmux.
2012-05-03 20:39:42 +00:00
Tiago Cunha
e79c647052
Sync OpenBSD patchset 1105:
...
default-path has the same possibilities as new-window -c now.
2012-05-03 17:53:50 +00:00
Tiago Cunha
b728970c65
Sync OpenBSD patchset 1104:
...
Add a flag to move-window to renumber the windows in a session (closing
any gaps) and add an option to do this automatically each time a window
is killed. From Thomas Adam.
2012-05-03 17:51:04 +00:00
Tiago Cunha
e45dc6ae59
Sync OpenBSD patchset 1103:
...
Use int not u_char for colours from options since they may have bit 8
set to mark them as 256-colour. Reported by Chris Johnson.
2012-05-03 17:12:38 +00:00
Tiago Cunha
d0907861f9
Sync OpenBSD patchset 1102:
...
Add a buffer with all input from last ground state, will be used for
control mode. From George Nachman.
2012-05-03 16:55:48 +00:00
Nicholas Marriott
cc979bda0f
default-path has the same possibilities as new-window -c now.
2012-05-02 19:29:13 +00:00
Nicholas Marriott
a6c22d650b
Add a flag to move-window to renumber the windows in a session (closing
...
any gaps) and add an option to do this automatically each time a window
is killed. From Thomas Adam.
2012-04-29 17:20:01 +00:00
Nicholas Marriott
e60f48ab09
Use int not u_char for colours from options since they may have bit 8
...
set to mark them as 256-colour. Reported by Chris Johnson.
2012-04-29 07:33:41 +00:00
Nicholas Marriott
ff5155f719
Add a buffer with all input from last ground state, will be used for
...
control mode. From George Nachman.
2012-04-25 21:12:49 +00:00
Tiago Cunha
714416074a
Sync OpenBSD patchset 1101:
...
Add missing prototype.
2012-04-24 16:24:37 +00:00
Tiago Cunha
bea5155fee
Sync OpenBSD patchset 1100:
...
Use an enum for client exit reasons, from George Nachman.
2012-04-24 16:24:03 +00:00
Tiago Cunha
995c9a50ab
Sync OpenBSD patchset 1099:
...
Do not return a buffer on the stack, mentioned by jsg a while ago.
2012-04-24 16:22:28 +00:00
Tiago Cunha
c8c6a23d66
Sync OpenBSD patchset 1098:
...
Use a helper function to fire choose callback.
2012-04-24 16:21:43 +00:00
Tiago Cunha
6df8953f4f
Sync OpenBSD patchset 1097:
...
Add window-status-separator option, from Thomas Adam.
2012-04-24 16:20:18 +00:00
Tiago Cunha
00e2e35740
Sync OpenBSD patchset 1096:
...
Add -a flag to kill-window, from Thomas Adam.
2012-04-24 16:19:27 +00:00
Tiago Cunha
31cf5314ee
Sync OpenBSD patchset 1095:
...
Fix printing commands with no arguments, from Benjamin Poirier.
2012-04-24 16:18:35 +00:00
Tiago Cunha
bdfbb52951
Sync OpenBSD patchset 1094:
...
Handle partial keys properly by making sure the timer has actually
expired, fixes problems with mintty reported by Michael Simpson.
2012-04-24 16:17:57 +00:00
Nicholas Marriott
94795eb48e
Add missing prototype.
2012-04-23 23:25:02 +00:00
Nicholas Marriott
d3e432069b
Use an enum for client exit reasons, from George Nachman.
2012-04-23 23:18:43 +00:00
Nicholas Marriott
0f9e0d1cfe
Do not return a buffer on the stack, mentioned by jsg a while ago.
2012-04-23 22:43:09 +00:00
Nicholas Marriott
48e6ebbe1e
Use a helper function to fire choose callback.
2012-04-23 22:40:47 +00:00
Nicholas Marriott
e02d1bce98
Add window-status-separator option, from Thomas Adam.
2012-04-23 22:23:14 +00:00
Nicholas Marriott
ed58b2d353
Add -a flag to kill-window, from Thomas Adam.
2012-04-23 22:10:45 +00:00
Nicholas Marriott
5cbca2e70f
Fix printing commands with no arguments, from Benjamin Poirier.
2012-04-22 05:24:05 +00:00
Nicholas Marriott
e8dff68588
Handle partial keys properly by making sure the timer has actually
...
expired, fixes problems with mintty reported by Michael Simpson.
2012-04-22 05:21:40 +00:00
Tiago Cunha
e65c5ad56c
Sync OpenBSD patchset 1093:
...
Turn automatic-rename off properly if turned off by renaming a
window. Reported by Romain Francoise.
2012-04-12 12:44:26 +00:00
Tiago Cunha
bae2701289
Sync OpenBSD patchset 1092:
...
Stop accepting new clients for 1 second on EMFILE/ENFILE. Based on
ongoing fixes to other daemons by Theo.
2012-04-12 12:43:40 +00:00
Nicholas Marriott
c6e0af9bdb
Turn automatic-rename off properly if turned off by renaming a
...
window. Reported by Romain Francoise.
2012-04-11 07:45:30 +00:00
Nicholas Marriott
6703ca8d26
Stop accepting new clients for 1 second on EMFILE/ENFILE. Based on
...
ongoing fixes to other daemons by Theo.
2012-04-11 06:16:14 +00:00
Tiago Cunha
ce67a44a94
Sync OpenBSD patchset 1091:
...
Do not fire name timer when automatic-rename is off, from Tim Ruehsen a
while ago.
2012-04-10 09:57:08 +00:00
Tiago Cunha
14e5cdf02e
Sync OpenBSD patchset 1090:
...
Fix comment for mouse bits.
2012-04-10 09:56:04 +00:00
Tiago Cunha
21f62c2cee
Sync OpenBSD patchset 1089:
...
Fix some indentation.
2012-04-10 09:55:27 +00:00
Tiago Cunha
bd6153195f
Sync OpenBSD patchset 1088:
...
Simplify mouse input function.
2012-04-10 09:54:59 +00:00
Tiago Cunha
e5b3858944
Sync OpenBSD patchset 1087:
...
Minor style nits - return ().
2012-04-10 09:54:29 +00:00
Tiago Cunha
09e6b7c137
Sync OpenBSD patchset 1086:
...
Turn some errors down to info.
2012-04-10 09:53:52 +00:00
Tiago Cunha
36ece3fcf5
Sync OpenBSD patchset 1085:
...
Fix option name.
2012-04-10 09:53:14 +00:00
Tiago Cunha
f99de22808
Sync OpenBSD patchset 1084:
...
Add a layout history which can be stepped through with select-layout -u
and -U commands (bound to 'u' and 'U' by default).
2012-04-10 09:52:45 +00:00
Tiago Cunha
b58d7f78a1
Adjust OpenBSD patchset 1083 to the portable version.
2012-04-10 09:50:32 +00:00
Tiago Cunha
2ce636a315
Sync OpenBSD patchset 1083:
...
Add pane_current_path format, suggested by Mikolaj Kucharski.
2012-04-10 09:49:04 +00:00
Tiago Cunha
2c4e8b92ab
Sync OpenBSD patchset 1082:
...
Only exit mouse mode on scroll wheel when actually reaching the end of
the history, from James Nylen.
2012-04-10 09:45:41 +00:00
Tiago Cunha
86c1335452
Sync OpenBSD patchset 1081:
...
Only find each window once no matter how many panes, from Jonathan
Daugherty.
2012-04-10 09:44:58 +00:00
Nicholas Marriott
631d6b59fd
Do not fire name timer when automatic-rename is off, from Tim Ruehsen a
...
while ago.
2012-04-08 06:47:26 +00:00
Nicholas Marriott
ed54f01d2f
Fix comment for mouse bits.
2012-04-01 21:45:48 +00:00
Nicholas Marriott
711d2205dd
Fix some indentation.
2012-04-01 21:07:35 +00:00
Nicholas Marriott
18d3498fb2
Simplify mouse input function.
2012-04-01 20:56:47 +00:00
Nicholas Marriott
c829bdf537
Minor style nits - return ().
2012-04-01 20:53:47 +00:00
Nicholas Marriott
20d10c608d
Turn some errors down to info.
2012-04-01 13:27:18 +00:00
Nicholas Marriott
e1273fb6a1
Fix option name.
2012-04-01 13:21:38 +00:00
Nicholas Marriott
85f5485cb5
Add a layout history which can be stepped through with select-layout -u
...
and -U commands (bound to 'u' and 'U' by default).
2012-04-01 13:18:38 +00:00
Nicholas Marriott
b831f86354
Add pane_current_path format, suggested by Mikolaj Kucharski.
2012-04-01 10:42:39 +00:00
Nicholas Marriott
c11da7ca88
Only exit mouse mode on scroll wheel when actually reaching the end of
...
the history, from James Nylen.
2012-04-01 09:23:31 +00:00
Nicholas Marriott
f881ff1c18
+.
2012-04-01 08:39:19 +00:00
Nicholas Marriott
cd8e536c43
Only find each window once no matter how many panes, from Jonathan
...
Daugherty.
2012-04-01 08:10:56 +00:00
Tiago Cunha
58e5442d37
Sync OpenBSD patchset 1080:
...
Add sys/file.h.
2012-03-29 21:10:41 +00:00
Tiago Cunha
faf51d748e
Sync OpenBSD patchset 1079:
...
Accept an argument to show-environment to show one variable, based on a
diff from Kazuhiko Sakaguchi.
2012-03-29 21:10:10 +00:00
Tiago Cunha
407f66ccbc
Sync OpenBSD patchset 1078:
...
Some terminals respond to secondary DA with primary (they ignore the
intermediate character). So ignore the possible responses to primary DA.
2012-03-29 21:09:19 +00:00
Tiago Cunha
bfc9f475c6
Sync OpenBSD patchset 1077:
...
Fix save-buffer usage, from Kazuhiko Sakaguchi.
2012-03-29 21:08:44 +00:00
Tiago Cunha
8121b541e0
Sync OpenBSD patchset 1076:
...
Remove a stale comment.
2012-03-29 21:08:14 +00:00
Tiago Cunha
65748fb197
Sync OpenBSD patchset 1075:
...
Add -C -N -T flags to find-window to find in content, name, title. From
Jonathan Daugherty.
2012-03-29 21:07:28 +00:00
Tiago Cunha
37e5b5d947
Sync OpenBSD patchset 1074:
...
Check changes_timer with event_initialized before event_del.
2012-03-29 21:06:25 +00:00
Tiago Cunha
8ff20a5c6d
Sync OpenBSD patchset 1073:
...
50 is a too low trigger default on larger terminals, bump to 250.
2012-03-29 21:05:53 +00:00
Tiago Cunha
f9f6eea444
Sync OpenBSD patchset 1072:
...
Add a simple form of output rate limiting by counting the number of
certain C0 sequences (linefeeds, backspaces, carriage returns) and if it
exceeds a threshold (current default 50/millisecond), start to redraw
the pane every 100 milliseconds instead of making each change as it
comes. Two configuration options - c0-change-trigger and
c0-change-interval.
This makes tmux much more responsive under very fast output (for example
yes(1) or accidentally cat'ing a large file) but may not be perfect on
all terminals and connections - feedback very welcome, particularly
where this change has a negative rather than positive effect (making it
off by default is a possibility).
After much experimentation based originally on a request Robin Lee
Powell (which ended with a completely different solution), this idea
from discussion with Ailin Nemui.
2012-03-29 21:05:16 +00:00
Tiago Cunha
621fa0a686
Sync OpenBSD patchset 1071:
...
Move MSG_IDENTIFY to the last sent by the client, this will be needed by
control clients and irrelevant for others.
2012-03-29 21:02:34 +00:00
Nicholas Marriott
0edaa34bfd
Add sys/file.h.
2012-03-24 11:23:19 +00:00
Nicholas Marriott
c0cfbe12e4
Accept an argument to show-environment to show one variable, based on a
...
diff from Kazuhiko Sakaguchi.
2012-03-22 11:11:57 +00:00
Nicholas Marriott
7c9d003e99
Some terminals respond to secondary DA with primary (they ignore the
...
intermediate character). So ignore the possible responses to primary DA.
2012-03-21 21:28:03 +00:00
Nicholas Marriott
49ce38b09a
Fix save-buffer usage, from Kazuhiko Sakaguchi.
2012-03-21 19:16:07 +00:00
Nicholas Marriott
b1e4b8769b
Remove a stale comment.
2012-03-20 23:20:08 +00:00
Nicholas Marriott
90bf560fe4
Add -C -N -T flags to find-window to find in content, name, title. From
...
Jonathan Daugherty.
2012-03-20 17:09:48 +00:00
Nicholas Marriott
5672f2ce6b
Check changes_timer with event_initialized before event_del.
2012-03-20 14:06:44 +00:00
Nicholas Marriott
01f2b5d64b
50 is a too low trigger default on larger terminals, bump to 250.
2012-03-20 11:23:12 +00:00
Nicholas Marriott
f59971276a
Add a simple form of output rate limiting by counting the number of
...
certain C0 sequences (linefeeds, backspaces, carriage returns) and if it
exceeds a threshold (current default 50/millisecond), start to redraw
the pane every 100 milliseconds instead of making each change as it
comes. Two configuration options - c0-change-trigger and
c0-change-interval.
This makes tmux much more responsive under very fast output (for example
yes(1) or accidentally cat'ing a large file) but may not be perfect on
all terminals and connections - feedback very welcome, particularly
where this change has a negative rather than positive effect (making it
off by default is a possibility).
After much experimentation based originally on a request Robin Lee
Powell (which ended with a completely different solution), this idea
from discussion with Ailin Nemui.
2012-03-20 11:01:00 +00:00
Nicholas Marriott
2e2c9bd623
+.
2012-03-20 10:24:12 +00:00
Nicholas Marriott
bf9e7a1c68
Move MSG_IDENTIFY to the last sent by the client, this will be needed by
...
control clients and irrelevant for others.
2012-03-19 08:42:06 +00:00
Tiago Cunha
df31f1dfc9
Sync OpenBSD patchset 1070:
...
On xterm 271 and later, put the terminal into SCL 5 and use DECCRA for
scrolling the region in panes (if the large region check isn't
hit). With help from Ailin Nemui.
2012-03-18 02:25:26 +00:00
Tiago Cunha
0f9f30de2e
Add notify.c to the list of sources.
2012-03-18 02:24:33 +00:00
Tiago Cunha
f41efd9d89
Sync OpenBSD patchset 1069:
...
Add notify hooks for various events, the functions are currently empty
stubs but will be filled in for control mode later. From George Nachman.
2012-03-18 02:22:09 +00:00
Tiago Cunha
ba7278373d
Sync OpenBSD patchset 1067:
...
Use snprintf for constructing attribute string, from Tim Ruehsen.
2012-03-18 02:17:20 +00:00
Tiago Cunha
e4eb43ec71
Sync OpenBSD patchset 1066:
...
Add a wrap-search option to turn off wrapping of searches in copy
mode. From Jacobo de Vera.
2012-03-18 02:12:24 +00:00
Tiago Cunha
dc83ba0372
Sync OpenBSD patchset 1065:
...
Michael Krysiak points out that some terminals (eg mintty) have cursor
styles 5 and 6 too, so allow them to be set.
2012-03-18 02:11:27 +00:00
Tiago Cunha
cf8faa3b33
Sync OpenBSD patchset 1064:
...
Need to call recalculate_sizes() when changing window with the mouse,
from marcel partap.
2012-03-18 02:10:50 +00:00
Tiago Cunha
68ba5377e3
Sync OpenBSD patchset 1063:
...
Add -q option to set-option to turn off info message, from marcel partap.
2012-03-18 02:09:51 +00:00
Tiago Cunha
be4d77e60f
Sync OpenBSD patchset 1062:
...
Break out termios initialization into a separate function, from George
Nachman.
2012-03-18 02:03:15 +00:00
Tiago Cunha
bde45cdd9c
Sync OpenBSD patchset 1061:
...
Do not clear to end of line if the line is full, fixes missing last
character in rightmost pane.
2012-03-18 02:02:18 +00:00
Tiago Cunha
a7c615a794
Sync OpenBSD patchset 1060:
...
Use the region lower not the pane size to work out where the bottom line
is.
2012-03-18 02:01:46 +00:00
Tiago Cunha
92c522228b
Sync OpenBSD patchset 1059:
...
Tweak last fix to actually hit the right end of pane.
2012-03-18 02:01:16 +00:00
Tiago Cunha
3a902f4196
Sync OpenBSD patchset 1058:
...
Fix warnings. Doh.
2012-03-18 02:00:39 +00:00
Tiago Cunha
0987d55231
Sync OpenBSD patchset 1057:
...
Check event_initialized before event_del if event may not have been set
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
2012-03-18 01:59:34 +00:00
Tiago Cunha
5aa28473dd
Sync OpenBSD patchset 1056:
...
Redirect libevent logging to tmux's log.
2012-03-18 01:58:09 +00:00
Tiago Cunha
21ab66569c
Sync OpenBSD patchset 1055:
...
Revert screen-write.c r1.54 and fix the bug properly. After wrapping a
line in a pane, the cursor needs to move to the next line unless it
scrolled.
2012-03-18 01:57:01 +00:00
Tiago Cunha
070d266aae
Sync OpenBSD patchset 1054:
...
Send secondary DA to terminals with XT in terminfo when starting up and
parse it to work out the xterm version.
2012-03-18 01:55:45 +00:00
Tiago Cunha
3b990ef6b2
Sync OpenBSD patchset 1053:
...
Respond to secondary DA requests.
2012-03-18 01:48:04 +00:00
Tiago Cunha
e920fa3e36
Sync OpenBSD patchset 1052:
...
Fix a warning. Doh.
2012-03-18 01:47:11 +00:00
Tiago Cunha
84207f06b7
Sync OpenBSD patchset 1051:
...
Add a helper function for enabling an optimization to make some code
clearer.
2012-03-18 01:46:37 +00:00
Tiago Cunha
c7f078dcbc
Sync OpenBSD patchset 1050:
...
Store context off before moving the cursor when wrapping, to fix long
standing bug drawing over the status line.
2012-03-18 01:40:26 +00:00
Tiago Cunha
3893cc17a4
Sync OpenBSD patchset 1049:
...
Add -P/-F flags to break-pane too, from George Nachman.
2012-03-18 01:38:27 +00:00
Tiago Cunha
4d1c513968
Sync OpenBSD patchset 1048:
...
Erm, use EL in a way that actually works...
2012-03-18 01:37:26 +00:00
Tiago Cunha
14d6a4ab26
Sync OpenBSD patchset 1047:
...
Use EL to clear to end of line if possible.
2012-03-18 01:36:49 +00:00
Tiago Cunha
e678ba3943
Sync OpenBSD patchset 1046:
...
Always remember last cursor position when moving up or down, not just
for if crossing zero length lines. From Itay Perl.
2012-03-18 01:35:39 +00:00
Tiago Cunha
166681eee9
Sync OpenBSD patchset 1045:
...
Remove some bits leftover from unused backoff code.
2012-03-18 01:33:56 +00:00
Tiago Cunha
1fdac2adf1
Sync OpenBSD patchset 1044:
...
Add a missing call to window_set_name, from George Nachman.
2012-03-18 01:28:56 +00:00
Tiago Cunha
40b1d64ce7
Sync OpenBSD patchset 1043:
...
Use a lock file and flock() to serialize server start, avoids problems
when running a bunch of tmux from cron at the same time. Based on a diff
from Tim Ruehsen.
2012-03-18 01:28:10 +00:00
Nicholas Marriott
d8805af66b
On xterm 271 and later, put the terminal into SCL 5 and use DECCRA for
...
scrolling the region in panes (if the large region check isn't
hit). With help from Ailin Nemui.
2012-03-17 22:56:04 +00:00
Nicholas Marriott
46210344a6
Add notify hooks for various events, the functions are currently empty
...
stubs but will be filled in for control mode later. From George Nachman.
2012-03-17 22:35:09 +00:00
Nicholas Marriott
4f480c901d
$Id$ -> $OpenBSD$.
2012-03-17 22:34:12 +00:00
Nicholas Marriott
50f5d2a7ec
Use snprintf for constructing attribute string, from Tim Ruehsen.
2012-03-17 21:45:25 +00:00
Nicholas Marriott
95f48a219a
Add a wrap-search option to turn off wrapping of searches in copy
...
mode. From Jacobo de Vera.
2012-03-17 21:40:53 +00:00
Nicholas Marriott
87d092d226
Michael Krysiak points out that some terminals (eg mintty) have cursor
...
styles 5 and 6 too, so allow them to be set.
2012-03-17 21:37:36 +00:00
Nicholas Marriott
e87d4b43ab
Need to call recalculate_sizes() when changing window with the mouse,
...
from marcel partap.
2012-03-17 21:34:34 +00:00
Nicholas Marriott
f152379e5a
Add -q option to set-option to turn off info message, from marcel partap.
2012-03-17 21:33:33 +00:00
Nicholas Marriott
889fe42e11
Break out termios initialization into a separate function, from George
...
Nachman.
2012-03-17 21:27:51 +00:00
Nicholas Marriott
164e85cca7
Do not clear to end of line if the line is full, fixes missing last
...
character in rightmost pane.
2012-03-17 19:29:46 +00:00
Nicholas Marriott
0b34fefe6e
Use the region lower not the pane size to work out where the bottom line
...
is.
2012-03-17 19:18:37 +00:00
Nicholas Marriott
928f40615c
Tweak last fix to actually hit the right end of pane.
2012-03-17 18:51:50 +00:00
Nicholas Marriott
7ad052583a
Fix warnings. Doh.
2012-03-17 18:38:58 +00:00
Nicholas Marriott
d3c842d367
Check event_initialized before event_del if event may not have been set
...
up; libevent2 complains about this. Reported by Moriyoshi Koizumi.
2012-03-17 18:24:07 +00:00
Nicholas Marriott
a597e3546c
Redirect libevent logging to tmux's log.
2012-03-17 18:23:03 +00:00
Nicholas Marriott
0489213b1b
Revert screen-write.c r1.54 and fix the bug properly. After wrapping a
...
line in a pane, the cursor needs to move to the next line unless it
scrolled.
2012-03-17 17:36:03 +00:00
Nicholas Marriott
9b8fc982ec
+.
2012-03-16 21:10:39 +00:00
Nicholas Marriott
92a720157b
+.
2012-03-16 07:37:19 +00:00
Nicholas Marriott
c8c0d68128
Send secondary DA to terminals with XT in terminfo when starting up and
...
parse it to work out the xterm version.
2012-03-15 10:36:00 +00:00
Nicholas Marriott
523ed3873d
Respond to secondary DA requests.
2012-03-15 10:05:49 +00:00
Nicholas Marriott
005566f915
Fix a warning. Doh.
2012-03-15 09:22:31 +00:00
Nicholas Marriott
698361ccde
Add a helper function for enabling an optimization to make some code
...
clearer.
2012-03-15 09:10:33 +00:00
Nicholas Marriott
71df37c247
Store context off before moving the cursor when wrapping, to fix long
...
standing bug drawing over the status line.
2012-03-14 23:29:07 +00:00
Nicholas Marriott
21c11c7f48
+.
2012-03-12 13:58:11 +00:00
Nicholas Marriott
4e05a2c0ae
Add -P/-F flags to break-pane too, from George Nachman.
2012-03-12 13:31:09 +00:00
Nicholas Marriott
575bfa4b4b
Erm, use EL in a way that actually works...
2012-03-12 12:43:18 +00:00
Nicholas Marriott
31ddae7735
Use EL to clear to end of line if possible.
2012-03-12 12:38:42 +00:00
Nicholas Marriott
33fac234c0
Fix trailing \, pointed out by Romain Francoise and a few others.
2012-03-11 23:04:19 +00:00
Nicholas Marriott
1bbb793263
Always remember last cursor position when moving up or down, not just
...
for if crossing zero length lines. From Itay Perl.
2012-03-11 23:01:19 +00:00
Nicholas Marriott
799f437eff
Remove some bits leftover from unused backoff code.
2012-03-09 21:42:13 +00:00
Nicholas Marriott
be63fef872
Add a missing call to window_set_name, from George Nachman.
2012-03-09 21:11:28 +00:00
Nicholas Marriott
ac9ebc29a2
Use a lock file and flock() to serialize server start, avoids problems
...
when running a bunch of tmux from cron at the same time. Based on a diff
from Tim Ruehsen.
2012-03-09 09:57:40 +00:00
Tiago Cunha
3307813a07
Sync OpenBSD patchset 1042:
...
free -> xfree.
2012-03-07 13:40:08 +00:00
Tiago Cunha
3d98adaf91
Sync OpenBSD patchset 1041:
...
Add -F format to new-window and split-window to use with the -P flag,
from George Nachman.
2012-03-07 13:39:29 +00:00
Tiago Cunha
cf11809cd4
Sync OpenBSD patchset 1040:
...
Accept hex values as keys, needed for send-keys, based on a diff from
George Nachman.
2012-03-07 13:38:26 +00:00
Tiago Cunha
32a6092f71
Sync OpenBSD patchset 1039:
...
Add A and I keys for vi status line editing.
2012-03-07 13:37:44 +00:00
Tiago Cunha
e7c7024907
Sync OpenBSD patchset 1038:
...
Terminate strftime buffer properly and free format string, whoops. From
Tiago Cunha.
2012-03-07 13:36:57 +00:00
Tiago Cunha
3275e9bd5b
Sync OpenBSD patchset 1037:
...
Support "bracketed paste" mode. This adds a -p flag to paste-buffer - if
this is used and the application has requested bracketed pastes, then
tmux surrounds the pasted text by \033[200~ and \033[201~. Applications
like vim can (apparently) use this to avoid, for example, indenting the
text. From Ailin Nemui.
2012-03-07 13:36:19 +00:00
Tiago Cunha
9d79a56402
Sync OpenBSD patchset 1036:
...
The wlmouse offset should be part of the client, not the server. From
Ailin Nemui.
2012-03-07 13:35:03 +00:00
Nicholas Marriott
18012f5b18
free -> xfree.
2012-03-04 20:52:05 +00:00
Nicholas Marriott
03dca66ae2
Add -F format to new-window and split-window to use with the -P flag,
...
from George Nachman.
2012-03-04 20:50:53 +00:00
Nicholas Marriott
178a20718c
Accept hex values as keys, needed for send-keys, based on a diff from
...
George Nachman.
2012-03-04 20:40:54 +00:00
Nicholas Marriott
30f4c30ca3
Add A and I keys for vi status line editing.
2012-03-04 07:38:11 +00:00
Nicholas Marriott
8b68ea1462
Terminate strftime buffer properly and free format string, whoops. From
...
Tiago Cunha.
2012-03-03 09:45:41 +00:00
Nicholas Marriott
f4fdddc930
Support "bracketed paste" mode. This adds a -p flag to paste-buffer - if
...
this is used and the application has requested bracketed pastes, then
tmux surrounds the pasted text by \033[200~ and \033[201~. Applications
like vim can (apparently) use this to avoid, for example, indenting the
text. From Ailin Nemui.
2012-03-03 09:43:22 +00:00
Tiago Cunha
e4f1fbd008
Sync OpenBSD patchset 1035:
...
Add move-pane command (like join-pane but allows the same window). Also
-b flag to join-pane and move-pane to place the pane to the left or
above. From George Nachman.
2012-03-03 09:19:40 +00:00
Tiago Cunha
89ab147093
Sync OpenBSD patchset 1034:
...
Add printf attribute to a couple of functions, from Tim Ruehsen.
2012-03-03 09:17:30 +00:00
Tiago Cunha
95f427c34e
Sync OpenBSD patchset 1032:
...
Allow a single option to be specified to show-options to show just that
option.
2012-03-03 09:16:52 +00:00
Tiago Cunha
e0d2221879
Sync OpenBSD patchset 1031:
...
Use format for display-message, based on a diff from George Nachman.
2012-03-03 09:14:21 +00:00
Nicholas Marriott
4b8bb7770f
The wlmouse offset should be part of the client, not the server. From
...
Ailin Nemui.
2012-03-03 08:55:56 +00:00
Nicholas Marriott
07ac16807f
Add move-pane command (like join-pane but allows the same window). Also
...
-b flag to join-pane and move-pane to place the pane to the left or
above. From George Nachman.
2012-03-03 08:31:18 +00:00
Nicholas Marriott
82f4db0d10
ANSIfy function prototypes, from Tim Ruehsen.
2012-03-02 11:23:51 +00:00
Nicholas Marriott
4d9ccd3229
Add printf attribute to a couple of functions, from Tim Ruehsen.
2012-03-02 11:16:44 +00:00
Nicholas Marriott
b801118fe5
+book at http://pragprog.com/book/bhtmux/tmux
2012-03-01 17:16:49 +00:00
Nicholas Marriott
952ffdd288
Remove accidentally committed option.
2012-02-29 21:10:51 +00:00
Nicholas Marriott
4e7de210e4
Allow a single option to be specified to show-options to show just that
...
option.
2012-02-25 12:57:42 +00:00
Nicholas Marriott
aaf0bfccf4
Use format for display-message, based on a diff from George Nachman.
2012-02-23 22:40:58 +00:00
Nicholas Marriott
a870a596bc
+.
2012-02-21 08:56:18 +00:00
Tiago Cunha
88f25bb677
Sync OpenBSD patchset 1030:
...
Sort some entries, from Ben Boeckel.
2012-02-15 19:32:39 +00:00
Tiago Cunha
290636bc86
Sync OpenBSD patchset 1029:
...
Add a wrapper function tty_set_size from George Nachman.
2012-02-15 19:32:12 +00:00
Tiago Cunha
3e94fa70f9
Sync OpenBSD patchset 1028:
...
Don't die if fail to get root directory, from Ben Boeckel.
2012-02-15 19:31:35 +00:00
Tiago Cunha
cfa6ac9161
Sync OpenBSD patchset 1026:
...
Check for the right return value from sscanf.
2012-02-15 19:30:51 +00:00
Tiago Cunha
6e6e8046ba
Sync OpenBSD patchset 1026:
...
Document option values, particularly that omitting on|off for a flag is
a toggle.
2012-02-15 19:30:17 +00:00
Nicholas Marriott
d7ea1ac847
Update, from Ben Boeckel.
2012-02-15 18:48:52 +00:00
Nicholas Marriott
fe055c89f5
Sort some entries, from Ben Boeckel.
2012-02-15 18:44:49 +00:00
Nicholas Marriott
fddbd44c18
Add a wrapper function tty_set_size from George Nachman.
2012-02-15 17:25:02 +00:00
Nicholas Marriott
67949de0a1
Don't die if fail to get root directory, from Ben Boeckel.
2012-02-06 17:29:29 +00:00
Nicholas Marriott
3f49137f90
Check for the right return value from sscanf.
2012-02-05 22:23:13 +00:00
Nicholas Marriott
fe7cf0ba90
Document option values, particularly that omitting on|off for a flag is
...
a toggle.
2012-02-02 22:33:05 +00:00
Tiago Cunha
94e46dd724
Sync OpenBSD patchset 1025:
...
Add -l flag to send-keys to send input literally (without translating
key names). From Frank Terbeck.
2012-02-02 02:01:18 +00:00
Tiago Cunha
c82e06804e
Sync OpenBSD patchset 1024:
...
Move window name changes into wrapper function window_set_name, from
George Nachman.
2012-02-02 02:00:12 +00:00
Tiago Cunha
509a7e8b73
Sync OpenBSD patchset 1023:
...
Do not change pane when changing window with mouse on status line,
pointed out by Romain Francoise.
2012-02-02 01:58:47 +00:00
Tiago Cunha
98e24b9f70
Sync OpenBSD patchset 1022:
...
Get client_width and client_height the right way round, from Stephen
Thirlwall.
2012-02-02 01:58:16 +00:00
Tiago Cunha
0fd0030a2a
Adjust function name to the portable version.
2012-02-02 01:57:14 +00:00
Tiago Cunha
4bb01c1768
Sync OpenBSD patchset 1021:
...
Provide defined ways to set the various default-path possibilities: ~
for home directory, . for server start directory, - for session start
directory and empty for the pane's working directory (the default). All
can also be used as part of a relative path (eg -/foo). Also provide -c
flags to neww and splitw to override default-path setting.
Based on a diff from sthen. ok sthen
2012-02-02 01:55:34 +00:00
Nicholas Marriott
efb639e1d2
Add -l flag to send-keys to send input literally (without translating
...
key names). From Frank Terbeck.
2012-02-02 00:15:28 +00:00
Nicholas Marriott
8363d19307
Move window name changes into wrapper function window_set_name, from
...
George Nachman.
2012-02-02 00:10:11 +00:00
Nicholas Marriott
fdeaa73342
Do not change pane when changing window with mouse on status line,
...
pointed out by Romain Francoise.
2012-02-02 00:04:54 +00:00
Nicholas Marriott
d1ae2d9757
Get client_width and client_height the right way round, from Stephen
...
Thirlwall.
2012-02-02 00:03:45 +00:00
Nicholas Marriott
908a22e41c
Provide defined ways to set the various default-path possibilities: ~
...
for home directory, . for server start directory, - for session start
directory and empty for the pane's working directory (the default). All
can also be used as part of a relative path (eg -/foo). Also provide -c
flags to neww and splitw to override default-path setting.
Based on a diff from sthen. ok sthen
2012-01-31 15:52:21 +00:00
Tiago Cunha
c2176afe9c
Sync OpenBSD patchset 1020:
...
Add pane id to each pane in layout description (while still accepting
the old form). Based on diff from George Nachman.
2012-01-31 12:03:56 +00:00
Tiago Cunha
6b3988b749
Sync OpenBSD patchset 1019:
...
id -> ID; ok nicm
2012-01-31 12:03:00 +00:00
Tiago Cunha
896c55291f
Sync OpenBSD patchset 1018:
...
Don't print double spaces in list output.
2012-01-31 12:02:24 +00:00
Tiago Cunha
2ee0d851d9
Sync OpenBSD patchset 1017:
...
Give each window a unique id, like panes but prefixed with @. Based on
work from George Nachman.
2012-01-31 12:01:43 +00:00
Tiago Cunha
c08a532440
Sync OpenBSD patchset 1016:
...
Enforce history-limit option when clearing the screen, memory leak
spotted by R I Pienaar.
2012-01-31 11:58:55 +00:00
Nicholas Marriott
49a5a587ec
Add pane id to each pane in layout description (while still accepting
...
the old form). Based on diff from George Nachman.
2012-01-30 20:57:02 +00:00
Jason McIntyre
677ed3e5f0
id -> ID; ok nicm
2012-01-30 20:48:28 +00:00
Nicholas Marriott
f188345b33
Don't print double spaces in list output.
2012-01-30 20:39:56 +00:00
Nicholas Marriott
0e59bc75fd
Give each window a unique id, like panes but prefixed with @. Based on
...
work from George Nachman.
2012-01-30 09:39:34 +00:00
Nicholas Marriott
937173ff11
Enforce history-limit option when clearing the screen, memory leak
...
spotted by R I Pienaar.
2012-01-29 21:31:11 +00:00
Tiago Cunha
e4a7cefe0c
Sync OpenBSD patchset 1015:
...
Add an option to move the status line to the top of the screen,
requested by many.
2012-01-29 12:57:01 +00:00
Tiago Cunha
e23df3af5a
Sync OpenBSD patchset 1014:
...
Call bufferevent_free before closing file descriptor associated with it
or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers
in a twist. From Dylan Alex Simon.
2012-01-29 12:53:33 +00:00
Tiago Cunha
9c1d3046ca
Sync OpenBSD patchset 1013:
...
Terminate strftime buffer properly even if a really long format string
is given, from Tiago Cunha.
2012-01-29 12:52:16 +00:00
Tiago Cunha
c846298747
Sync OpenBSD patchset 1012:
...
Fix memory leak in error path, from Tiago Cunha.
2012-01-29 12:51:43 +00:00
Nicholas Marriott
230d0fbc9e
Add an option to move the status line to the top of the screen,
...
requested by many.
2012-01-29 09:37:02 +00:00
Nicholas Marriott
9bbc63ed65
Call bufferevent_free before closing file descriptor associated with it
...
or bugs in $EventMechanism on $OtherOS makes libevent get it's knickers
in a twist. From Dylan Alex Simon.
2012-01-29 02:22:11 +00:00
Nicholas Marriott
ad2cc63412
Fill in osdep_get_cwd on Darwin, from Alex Ernst.
2012-01-27 09:01:06 +00:00
Nicholas Marriott
a7a44bfcd9
Terminate strftime buffer properly even if a really long format string
...
is given, from Tiago Cunha.
2012-01-26 09:05:54 +00:00
Nicholas Marriott
d2d2df1365
Fix memory leak in error path, from Tiago Cunha.
2012-01-26 09:03:09 +00:00
Tiago Cunha
224255cb89
Create a debug build by default.
2012-01-23 13:20:14 +00:00
Tiago Cunha
74b2eaa73e
Working on 1.7.
2012-01-23 13:19:08 +00:00
Nicholas Marriott
678e67437f
Remove unused backoff code that doesn't do any good.
2012-01-21 23:51:34 +00:00
Nicholas Marriott
b92e81a1aa
Show pane size in top right of display panes mode.
2012-01-21 23:45:44 +00:00
Nicholas Marriott
e870a3f3ec
it's -> its.
2012-01-21 20:40:28 +00:00
Nicholas Marriott
8ed9124f3f
Use RB trees not SPLAY.
2012-01-21 11:12:13 +00:00
Nicholas Marriott
535286c05a
Drop the ability to have a list of keys in the prefix in favour of two
...
separate options, prefix and prefix2. This simplifies the code and gets
rid the data options type which was only used for this one option.
Also add a -2 flag to send-prefix to send the secondary prefix key,
fixing a cause of minor irritation.
People who want three prefix keys are out of luck :-).
2012-01-21 08:40:09 +00:00
Nicholas Marriott
7f24020cbe
Add strings to allow the aixterm bright colours to be used when
...
configuring colours, requested by Elliott Cable a few months ago.
2012-01-21 08:23:12 +00:00
Nicholas Marriott
be7b56a613
One day I will actually fix ALL the warnings before I commit...
2012-01-21 08:12:03 +00:00
Nicholas Marriott
66f04514cf
Add a -R flag to send-keys to reset the terminal. Written ages ago and
...
Suggested by someone, I forget who.
2012-01-21 08:10:21 +00:00
Nicholas Marriott
cd10f7322a
Only hide flags on the current window when the session is attached, from
...
Roland Walker.
2012-01-21 06:13:16 +00:00
Nicholas Marriott
8332413305
Add some const and fix a warning.
2012-01-20 19:54:07 +00:00
Nicholas Marriott
8cf19ab770
Add some trivial additional status line attributes from jwcxz at users
...
dot sourceforge dot net.
2012-01-20 19:51:28 +00:00
Nicholas Marriott
199d148740
Remove trailing spaces.
2012-01-20 19:16:16 +00:00
Nicholas Marriott
dcad13155b
Add an option to disable the window rename escape sequence, from Romain
...
Francoise.
2012-01-20 19:15:40 +00:00
Nicholas Marriott
e6519d3e27
Add space movement keys for vi mode in the status line from Ben Boeckel.
2012-01-20 19:10:29 +00:00
Nicholas Marriott
299a8fd4a3
Calculate last position correctly for UTF-8 wide characters, reported by
...
Matthias Lederhofer.
2012-01-15 19:39:42 +00:00
Nicholas Marriott
eeaf92ad06
Add a man page section on window names and pane titles, from Felix
...
Rosencrantz.
2011-12-31 03:40:15 +00:00
Stuart Henderson
16f9667620
Show how to set default-path to revert to tmux's old behaviour of opening
...
new windows in the current working directory at the time tmux was started,
it's not obvious. naddy@ agrees this is a useful inclusion.
2011-12-30 14:59:13 +00:00
Nicholas Marriott
92aef64c5a
Add CNL and CPL escape sequences.
2011-12-29 08:06:24 +00:00
Stefan Sperling
fdd1d0b72e
Allow $HOME as default-path in tmux.conf so the same config file can be used
...
on different machines regardless of where the user's home directory is.
ok nicm
2011-12-27 14:07:20 +00:00
Nicholas Marriott
d377a68593
Add \033[s and \033[u to save and restore cursor position.
2011-12-27 14:06:19 +00:00
Nicholas Marriott
5db593e5c2
Extend history that can be captured to INT_MIN rather than
...
SHRT_MIN. From Chris Johnsen.
2011-12-27 13:46:26 +00:00
Nicholas Marriott
d71e4b9aca
Reset flags on every loop or it is displayed too often, from Chris
...
Johnsen.
2011-12-27 13:41:50 +00:00
Jason McIntyre
da145e7c20
formatting errors, found using freebsd's "igor";
2011-12-24 08:46:48 +00:00
Nicholas Marriott
d655566ce7
Fix so that when mouse-select-pane and mouse-select-window are both
...
enabled, clicking on the status line does not change the current
pane. From Romain Francoise.
2011-12-24 08:26:59 +00:00
Nicholas Marriott
f308ba93aa
Change the way the working directory for new processes is discovered. If
...
default-path isn't empty, it is used. Otherwise:
1) If tmux neww is run from the command line, the working directory of the
client is used.
2) Otherwise sysctl KERN_PROC_CWD is used to retrieve the current
working directory of the process in the active pane.
3) If that fails, the directory where the session was created is used.
Support code by Romain Francois, OpenBSD specific bits by me.
Note this requires a recent userland and kernel with KERN_PROC_CWD.
2011-12-09 16:28:18 +00:00
Nicholas Marriott
e04d13f6a6
Support "jump to" like vi in copy mode using t and T keys. Also add x
...
and X for delete in edit mode.
From Ben Boeckel, thanks.
2011-12-04 16:18:01 +00:00
Nicholas Marriott
c44d2d854f
Log terminal overrides.
2011-12-01 23:47:08 +00:00
Nicholas Marriott
31f13e49d8
Add home and end keys for command prompt, from Matthias Lederhofer.
2011-12-01 20:44:12 +00:00
Nicholas Marriott
2397083f7e
Make M-f and M-b work the same at the command prompt as in copy mode,
...
pointed out by Romain Francoise.
2011-12-01 20:42:31 +00:00
Nicholas Marriott
fc5f8804ec
Add word movement and editing command for command prompt editing, from
...
Ben Boeckel.
2011-11-15 23:34:12 +00:00
Nicholas Marriott
fd25d35868
Move word-separators to be a session rather than window option, from Ben
...
Boeckel.
2011-11-15 23:24:04 +00:00
Nicholas Marriott
7c9bc377a3
Add a pane_index format string and use it, from Ben Boeckel.
2011-11-15 23:21:52 +00:00
Nicholas Marriott
57df442916
Make window_pane_index work the same as window_index, from Ben Boeckel.
2011-11-15 23:19:51 +00:00
Nicholas Marriott
9f738dd2fe
Fix a trivial copy-and-paste error (sx->sy), from Chris Johnsen.
2011-11-09 12:02:07 +00:00
Nicholas Marriott
6c1c304fc3
Missing bits for new keys and buffer indexes, from Tiago Cunha
2011-11-05 09:13:00 +00:00
Nicholas Marriott
e5bf63cb59
Option to change status line (message) background when using vi keys and
...
in command mode. From Ben Boeckel.
2011-11-05 09:06:31 +00:00
Jason McIntyre
e5d6df8979
minor formatting fix;
2011-10-27 23:33:35 +00:00
Nicholas Marriott
b2ee98b8d7
Add screen*:XT to terminal-overrides for tmux-in-tmux, from Romain
...
Francoise.
2011-10-27 22:54:06 +00:00
Nicholas Marriott
0ff42d975b
Missing -o on usage for pipe-pane, from Tiago Cunha.
2011-10-27 22:41:03 +00:00
Nicholas Marriott
5ed3daf28b
Didn't really think the else behaviour through - requiring argv to
...
contain "else" is silly so just omit that, also some manpage
tweaks. From Tiago Cunha.
2011-10-27 22:40:15 +00:00
Nicholas Marriott
f5a73c5433
When copying, make repeat count indicate buffer to replace if used.
2011-10-23 23:38:16 +00:00
Nicholas Marriott
e3225bc4e3
Alias NPage/PPage as PageDown/PgDn/PageUp/PgUp to reduce occasional
...
confusion.
2011-10-23 10:19:26 +00:00
Nicholas Marriott
f0aad68aee
Support for \e[3J to clear the history. Also send the corresponding
...
terminfo code (E3) before locking.
2011-10-23 10:16:14 +00:00
Nicholas Marriott
7ff4cf9405
Try to resolve relative paths for loadb and saveb (first using client
...
working directory if any then default-path or session wd).
2011-10-23 08:34:01 +00:00
Nicholas Marriott
179d0686d7
For initial session, use size of command client even if detached.
2011-10-23 08:10:11 +00:00
Nicholas Marriott
b32254acda
Ignore LC_ALL and LC_CTYPE if they are empty as well as unset.
2011-10-23 08:03:27 +00:00
Nicholas Marriott
16d75a6bf2
Add client formats, from Ben Boeckel.
2011-10-23 01:12:46 +00:00
Nicholas Marriott
e63909655c
Plug a memory leak and update some comments, from Tiago Cunha.
2011-10-23 00:49:25 +00:00
Nicholas Marriott
6821ccc882
Add an else clause for if-shell, from "arno-" on SourceForge.
2011-10-18 08:57:01 +00:00
Nicholas Marriott
49ef0b4af3
Add a few more formats for panes (tty, pid, start cmd/cwd).
2011-10-02 06:55:48 +00:00
Nicholas Marriott
b1ed2d5bd9
Add -S option to refresh-client to redraw status line, from Marco Beck.
2011-09-28 20:11:21 +00:00
Nicholas Marriott
e6a59c4bee
Reject $SHELL if it is not a full path.
2011-09-25 18:53:04 +00:00
Nicholas Marriott
f14da260c8
Tweaks to the format parts, from Tiago Cunha.
2011-09-23 18:33:43 +00:00
Nicholas Marriott
b6bd9515ea
Fix typo: ) -> }.
2011-09-23 12:23:24 +00:00
Nicholas Marriott
5985143813
Mark dead panes with some text saying they are dead, suggested by and
...
with help from Randy Stauner.
2011-09-05 23:40:51 +00:00
Nicholas Marriott
9800eaa63f
Another memory leak from Tiago Cunha.
2011-08-30 09:20:17 +00:00
Nicholas Marriott
423649b2c6
Plug memory leak, from Tiago Cunha.
2011-08-30 09:18:52 +00:00
Jason McIntyre
2888843a18
tweak previous;
2011-08-26 13:07:49 +00:00
Nicholas Marriott
4a5dff3f11
Add initial framework for more powerful formatting of command output and
...
use it for list-{panes,windows,sessions}. This allows more descriptive
replacements (such as #{session_name}) and conditionals.
Later this will be used for status_replace and list-keys and other
places.
2011-08-26 10:53:16 +00:00
Nicholas Marriott
4697b35d4f
-lm is no longer needed, from Tiago Cunha.
2011-08-25 10:52:23 +00:00
Nicholas Marriott
0588168a64
Support \ for line continuation in the configuration file, from Julius
...
Plenz.
2011-08-24 10:46:01 +00:00
Nicholas Marriott
f01b7191a3
Add pane-base-index option, from Ben Barbour.
2011-08-24 10:29:57 +00:00
Nicholas Marriott
029c34ce6b
Add a tty_bell wrapper function, from Dylan Alex Simon.
2011-08-24 09:58:44 +00:00
Nicholas Marriott
47d41d0203
There is no need to use sqrt()/INFINITY here which simplifies the code
...
and makes it more portable, from Havard Eidnes.
2011-08-22 10:14:15 +00:00
Nicholas Marriott
3657aa675e
Fix a couple of memory leaks, from marcel partap.
2011-08-20 20:37:30 +00:00
Nicholas Marriott
88e9079870
Add a -r flag to switch-client to toggle the client read-only flag. From
...
Johan Commelin.
2011-08-16 10:00:52 +00:00
Nicholas Marriott
f95f792ddf
Add up/down/left/right keys in vi edit mode. From "livibetter" SF bug
...
3385651.
2011-08-16 09:47:18 +00:00
Nicholas Marriott
2fc84c7c34
Use key_bindings_remove for unbind-key -a to allow it to work from key
...
bindings. From "miaout17" SF bug 3392063.
2011-08-16 09:37:48 +00:00
Nicholas Marriott
6b734d1074
Correctly skip existing numbers when generating the name for a new
...
session.
2011-08-16 09:36:23 +00:00
Jason McIntyre
cf90f2a29c
fix error in previous;
2011-07-30 18:27:57 +00:00
Nicholas Marriott
cc5bcbfb59
Extend the mode-mouse option to add a third choice which means the mouse
...
does not enter copy mode. Patch from SF bug 3374493.
In future the mode-mouse option is likely to die and be broken into
several smaller options.
2011-07-30 18:01:26 +00:00
Nicholas Marriott
be179f6d7e
Do not require a client here, or pipe-pane will not work from the
...
command line.
2011-07-30 17:52:32 +00:00
Nicholas Marriott
0252796a57
Sort options alphabetically, from Tiago Cunha.
2011-07-25 09:57:28 +00:00
Nicholas Marriott
7e423ea491
Unused variable.
2011-07-09 01:37:00 +00:00
Nicholas Marriott
9dacc1700b
Pass the right size to calloc (* not **).
2011-07-09 01:36:42 +00:00
Nicholas Marriott
d5269a2eed
Do not continue to send data to suspended/locked clients or there will
...
be a huge rush of it after they are resumed/unlocked. The main output
path was fine but status line updates and the terminal state reset code
were missed.
2011-07-08 21:51:40 +00:00
Nicholas Marriott
a8e9654b65
flags[] should be initialized. From Thomas Adam.
2011-07-08 15:18:20 +00:00
Nicholas Marriott
2de9b1e005
Make confirm-before prompt customizable with -p option like
...
command-prompt. Also move responsibility for calling status_replace into
status_prompt_{set,update} and add #W and #P to the default kill-window
and kill-pane prompts. By Tiago Cunha.
2011-07-08 06:37:57 +00:00
Nicholas Marriott
b4b3d9c936
Fix a couple of comments.
2011-07-08 06:28:05 +00:00
Nicholas Marriott
26aa0689a5
Show full targets for lsp/lsw -a.
2011-07-04 14:04:40 +00:00
Nicholas Marriott
a70379d8f9
Use screen_reinit for respawn-pane to keep history and call input_init
...
for respawn-window to break out of waiting for DCS/OSC to finish.
2011-07-04 13:35:37 +00:00
Nicholas Marriott
5e90476b25
Change the list-keys format so that it shows the keys using actual tmux
...
commands which should be able to be directly copied into the config
file. From Markus Schnalke, tweaked by me.
2011-07-04 00:31:57 +00:00
Nicholas Marriott
f12158bc25
Add an option to trigger the terminal bell when there is an alert, from
...
Marco Beck.
2011-07-03 19:07:54 +00:00
Nicholas Marriott
94f86edfee
Include the existing window and session name in the prompt when renaming
...
and add a new key binding ($) for rename session. From Tiago Cunha.
2011-07-03 18:18:15 +00:00
Nicholas Marriott
ad60a2c952
Allow the initial context on prompts to be set with the new -I option to
...
command-prompt. From Tiago Cunha.
2011-07-02 21:05:44 +00:00
Nicholas Marriott
1202284f37
PANE_FREEZE doesn't do anything anymore, so remove it.
2011-06-27 00:04:49 +00:00
Nicholas Marriott
0503f83c64
Add a couple of extra xterm-style keys that gnome terminal provides,
...
from Dustin Kirkland.
2011-06-23 10:02:49 +00:00
Nicholas Marriott
65177b82be
Add a respawn-pane command, from Marcel Partap.
2011-06-05 11:19:03 +00:00
Nicholas Marriott
2b60c648c4
Get rid of the layout string code which tries to walk through the layout
...
hierarchy and instead just look at what panes are actually in the window.
2011-06-05 10:53:05 +00:00
Nicholas Marriott
f537870909
Fix a typo, spotted by Michal Mazurek..
2011-05-30 21:02:28 +00:00
Nicholas Marriott
34e5ec1807
Trim another useless if statement, from Ailin Nemui.
2011-05-26 07:08:48 +00:00
Nicholas Marriott
480e48aa66
Memory leak in error path, from Tiago Cunha.
2011-05-25 17:51:31 +00:00
Nicholas Marriott
70d232289b
Nuke a redundant if statement, from Tiago Cunha.
2011-05-25 17:50:52 +00:00
Jason McIntyre
240cae4c92
tweak the TERMINFO section; ok nicm
2011-05-21 10:04:17 +00:00
Nicholas Marriott
1af2021de6
Pass prompts through status_replace so that they can be more helpful
...
(such as showing the previous session name when renaming). From Tiago
Cunha.
2011-05-20 19:29:13 +00:00
Nicholas Marriott
3ea5e06bfb
Support DECSCUSR sequence to set the cursor style with two new
...
terminfo(5) extensions, Cs and Csr. Written by Ailin Nemui.
2011-05-20 19:17:39 +00:00
Nicholas Marriott
944b5e6fa0
Support xterm(1) cursor colour change sequences through terminfo(5) Cc
...
(set) and Cr (reset) extensions. Originally by Sean Estabrooks, tweaked
by me and Ailin Nemui.
2011-05-20 19:03:58 +00:00
Nicholas Marriott
96e7f33da3
Support setting the xterm clipboard when copying from copy mode using
...
the xterm escape sequence for the purpose (if xterm is configured to
allow it).
Written by and much discussed Ailin Nemui, guidance on
xterm/termcap/terminfo from Thomas Dickey.
2011-05-18 20:24:29 +00:00
Nicholas Marriott
58908fd8c5
Add three new copy-mode commands - select-line, copy-line,
...
copy-end-of-line. From Dave Disser and Randy Stauner a while back.
2011-05-18 18:06:36 +00:00
Nicholas Marriott
f702dbfea2
Use xfree not free, from Tiago Cunha.
2011-05-18 08:07:44 +00:00
Nicholas Marriott
fb527c1bad
Use button mouse mode not any for copy mode, fixes issues with
...
putty. From Ailin Nemui.
2011-05-18 08:04:47 +00:00
Nicholas Marriott
ec3efab01e
Reset last pane properly when using break-pane as well, fixes a problem
...
reported to Debian by Hannes von Haugwitz (bug 622677).
2011-05-08 21:30:00 +00:00
Nicholas Marriott
583c885d68
Reset last pane on swap-pane across windows, fixes crash noticed by hsim
...
at gmx.li.
2011-05-08 21:12:52 +00:00
Nicholas Marriott
acfabf3a50
Only select pane on click, not drag. From hsim at gmx.li.
2011-05-08 20:45:35 +00:00
Nicholas Marriott
538af37c35
Fix a couple of memory leaks, from Tiago Cunha.
2011-05-08 20:37:04 +00:00
Nicholas Marriott
6f08472049
Fix a memory leak if cmd_pane_session succeeds, from Tiago Cunha.
2011-05-08 20:35:58 +00:00
Nicholas Marriott
f3741f0653
Add a new option, mouse-resize-pane. When on, panes may be resized by
...
dragging their borders. From hsim at gmx.li.
2011-05-08 20:34:12 +00:00
Nicholas Marriott
295ace6820
Use the tsl and fsl terminfo(5) capabilities to update terminal title
...
and automatically fill them in on terminals with the XT capability
(which means their title setting is xterm-compatible). From hsim at
gmx.li.
2011-05-08 19:53:06 +00:00
Nicholas Marriott
b0a88ebead
Change window with mouse wheel over status line if mouse-select-window
...
is on, from marcel partap.
2011-05-04 18:10:28 +00:00
Nicholas Marriott
a70df70d20
Don't need vis.h anymore.
2011-05-04 17:43:35 +00:00
Nicholas Marriott
b1dfc740a3
Don't use strnvis for the title as it breaks UTF-8. set-titles is now
...
off by default and we have to trust the terminal can understand what we
send it anyway so there isn't any harm.
2011-05-04 17:43:11 +00:00
Nicholas Marriott
7dddf56c08
Check if mouse-select-pane is ON not off when setting mouse flags,
...
reported by oga.
2011-05-04 17:40:32 +00:00
Nicholas Marriott
075816eb72
Only redraw the status line on command update, not the entire client
...
(big DOH).
2011-04-29 07:07:31 +00:00
Nicholas Marriott
eb288aae32
Provide #h for short hostname (no domain) from Michal Mazurek.
2011-04-24 21:32:07 +00:00
Nicholas Marriott
dc8fb9fb23
Tweak copy behaviour slightly in vi mode to be closer to real vi. From
...
Tiago Resende.
2011-04-24 21:06:12 +00:00
Nicholas Marriott
8738141913
When mode-mouse is on (it is off by default), automatically enter copy
...
mode when the mouse is dragged or the mouse wheel is used. Also exit
copy mode when the mouse wheel is scrolled off the bottom. Discussed
with and written by hsim at gmx dot li.
2011-04-19 21:31:33 +00:00
Matthew Dempsky
3970853feb
POSIX only guarantees uname() will return a non-negative value on
...
success.
ok nicm@
2011-04-19 20:12:47 +00:00
Nicholas Marriott
0f97ac4221
The mouse should only work in copy mode if mode-mouse is set, not just
...
mouse-select-pane.
2011-04-18 20:57:16 +00:00
Nicholas Marriott
0bb2119781
Add an option (mouse-select-window) which allows the mouse to be used by
...
clicking on the status line, written by hsim at gmx dot li.
2011-04-18 19:49:05 +00:00
Jason McIntyre
4e75e82cc3
new sentence, new line;
2011-04-17 20:39:44 +00:00
Nicholas Marriott
f4432030ee
Add -t to list-clients, based on a diff from Zac Sprackett.
2011-04-17 19:28:09 +00:00
Nicholas Marriott
044c0f978f
Fix character position check, from Tiago Resende.
2011-04-17 19:21:19 +00:00
Nicholas Marriott
3dc7b805d3
-s comes before -t and also add -s to command syntax. Prompted by jmc.
2011-04-11 16:44:36 +00:00
Nicholas Marriott
735f87bc66
Add -s option to detach all clients attached to a session, from Zac
...
Sprackett.
2011-04-11 06:44:39 +00:00
Philip Guenther
98d450ac3a
Switch back from KERN_PROC2/kinfo_proc2 to KERN_PROC/kinfo_proc now
...
that we've got name we want for the API we want
"ZAP!" deraadt@
2011-04-10 03:20:59 +00:00
Nicholas Marriott
48a1169f4e
Since buffers are now global, bump the default buffer-limit a bit higher
...
to 20 rather than 9.
2011-04-09 20:00:29 +00:00
Nicholas Marriott
0a09d04e1b
If the terminal supports sitm for italics, use it instead of standout
...
(smso). From Tiago Resende.
2011-04-09 07:48:08 +00:00
Nicholas Marriott
ec89eb9552
Change so that an empty session name always means the current sessions
...
even if given with, for example, -t '', and explicitly forbid empty
session names and those containing a : when they are created.
2011-04-06 21:51:31 +00:00
Miod Vallat
c8a14def9f
Avoid using NULL in non-pointer contexts: use 0 for integer values and '\0'
...
for chars.
2011-04-06 11:36:26 +00:00
Nicholas Marriott
5d519ba526
Add a flag to cmd_find_session so that attach-session can prefer
...
unattached sessions when choosing the most recently used (if -t is not
given). Suggested by claudio@.
2011-04-05 19:37:01 +00:00
Nicholas Marriott
f16ea60cc0
Bind C-u to delete-line in vi mode like ksh does, suggested by thib.
2011-04-05 18:55:38 +00:00
Nicholas Marriott
f8a218882a
"or" should be on a line on its own here so it is not emphasised as
...
well.
2011-04-01 16:59:11 +00:00
Nicholas Marriott
f7e9aedf10
For convenience, work out what type of option is being set by name
...
regardless of the -s or -w flags (these remain documented however).
2011-03-29 21:09:13 +00:00
Nicholas Marriott
beb6db9b5f
Checking for particular options and redrawing is not necessary as we
...
already redraw unconditionally.
2011-03-29 21:07:08 +00:00
Nicholas Marriott
25d551e8b2
Update an out-of-date and inaccurate comment.
2011-03-29 20:31:22 +00:00
Nicholas Marriott
d88c20e718
Change -t on display-message to be target-pane for the #[A-Z]
...
replacements and add -c as target-client.
2011-03-29 19:30:16 +00:00
Nicholas Marriott
f19a4bf9d1
Add -a and -s options to lsp to list all panes in the server or session
...
respectively. Likewise add -s to lsw. From Ben Boeckel.
2011-03-28 23:13:00 +00:00
Nicholas Marriott
82e0165c49
Allow a start and end line to be specified for capture-pane which may be
...
negative to capture part of the history. Prompted by request from Victor
J Orlikowski.
2011-03-28 20:17:39 +00:00
Nicholas Marriott
fa6abac98d
Style: uint -> u_int and a missing else.
2011-03-28 19:44:31 +00:00
Nicholas Marriott
71e8e26ccc
Set the terminal blocking again earlier, before sending the reset
...
sequences.
2011-03-27 20:36:19 +00:00
Nicholas Marriott
7ce8fee4f3
Don't include meta twice when working out the flags to output for
...
xterm-style keys - bit 3 is accepted on input but not on output. Also a
style nit in the header.
2011-03-27 20:31:25 +00:00
Nicholas Marriott
808502ac3d
Give each pane created in a tmux server a unique id (starting from 0),
...
put it in the TMUX_PANE environment variable and accept it as a
target. Suggested by and with testing and tweaks from Ben Boeckel.
2011-03-27 20:27:26 +00:00
Nicholas Marriott
d74e5bffba
Fix to properly wrap wide characters, from Micah Cowan.
2011-03-26 19:07:33 +00:00
Nicholas Marriott
54456d5602
Fix an incorrect test which was always true (oupper is always < olower),
...
from Yusuke ENDOH.
2011-03-08 19:23:49 +00:00
Nicholas Marriott
0a404aabd3
Prevent tiled producing a corrupt layout when only one column is needed,
...
from Karl Ferdinand Ebert.
2011-03-07 23:55:16 +00:00
Nicholas Marriott
79e30daeae
Support passing through escape sequences to the underlying terminal by
...
using DCS with a "tmux;" prefix. Escape characters in the sequences must
be doubled. For example:
$ printf '\033Ptmux;\033\033]12;red\007\033\\'
Will pass \033]12;red\007 to the terminal (and change the cursor colour
in xterm). From Kevin Goodsell.
2011-03-07 23:46:27 +00:00
Nicholas Marriott
d5ed5fb08f
Two fixes by Micah Cowan: make mouse work properly beyond >127 on signed
...
char architectures and properly parse $TMUX by stopping the socket path
at the first comma.
2011-03-04 23:26:44 +00:00
Nicholas Marriott
c36f67a288
Fix a typo that meant we did not reset the background colour when it was
...
omitted in a 256-colour SGR ([48;5m). From Yusuke ENDOH.
2011-03-03 08:53:14 +00:00
Nicholas Marriott
7954126dcd
Add a -P option to detach to HUP the client's parent process (usually
...
causing it to exit as well).
2011-03-03 08:51:47 +00:00
Nicholas Marriott
ce91520e12
Size on split-window is -l not -s. Doh.
2011-02-10 12:12:14 +00:00
Nicholas Marriott
8ec3e5725c
Don't require -d with -x or -y since it could be in the config file.
2011-02-03 20:50:03 +00:00
Nicholas Marriott
7462c03281
Redraw pane borders when switching to last pane.
2011-01-31 20:54:42 +00:00
Nicholas Marriott
567741caf5
Free old argument even if setting to NULL.
2011-01-30 12:09:30 +00:00
Nicholas Marriott
9fc2c34a3b
Accept tcgetattr/tcsetattr failure, fixes problems with fatal() if the
...
terminal disappears while locked.
2011-01-29 08:39:43 +00:00
Nicholas Marriott
b6bb350289
Use input_clear to reset the APC, DCS, OSC state or it could be reused
...
improperly by a later state. From Kevin Goodsell.
2011-01-28 20:39:22 +00:00
Nicholas Marriott
bcc7c689c1
Unused declaration.
2011-01-26 02:55:34 +00:00
Nicholas Marriott
db7a89b1ee
Simplify the way jobs work and drop the persist type, so all jobs are
...
fire-and-forget.
Status jobs now managed with two trees of output (new and old), rather
than storing the output in the jobs themselves. When the status line is
processed any jobs which don't appear in the new tree are started and
the output from the old tree displayed. When a job finishes it updates
the new tree with its output and that is used for any subsequent
redraws. When the status interval expires, the new tree is moved to the
old so that all jobs are run again.
This fixes the "#(echo %H:%M:%S)" problem which would lead to thousands
of identical persistent jobs and high memory use (this can still be
achieved by adding "sleep 30" but that is much less likely to happen by
accident).
2011-01-26 01:54:56 +00:00
Nicholas Marriott
4dfb29fa38
Use LIST_* not SLIST_*.
2011-01-26 00:11:47 +00:00
Nicholas Marriott
ecc22c521d
When clearing the entire screen, clear lines that are used into the
...
history like xterm does. Requested ages ago by someone I've forgotten.
2011-01-25 23:40:26 +00:00
Nicholas Marriott
1270f8fed8
Check if the index is in use and fail before creating the child process,
...
rather than leaving a stray child on failure.
2011-01-25 22:31:50 +00:00
Nicholas Marriott
1df3355438
While here, maximum percentage is 100 not INT_MAX. Oops.
2011-01-23 15:49:10 +00:00
Nicholas Marriott
8820aa9f65
Size is -l not -s.
2011-01-23 15:46:49 +00:00
Nicholas Marriott
3872e24847
Allow top-bit-set characters to be used for key bindings, from Tiago
...
Cunha.
2011-01-23 11:04:25 +00:00
Nicholas Marriott
b8023044c3
Set $TMUX without the session when background jobs are run.
2011-01-23 11:03:43 +00:00
Nicholas Marriott
1377427e70
Fix bind-key -t.
2011-01-15 20:14:41 +00:00
Nicholas Marriott
3de1700f61
Only set a mouse mode for mouse-select-pane if none already set by the
...
mode (any will do).
2011-01-15 00:46:19 +00:00
Nicholas Marriott
8f8e81c0c9
Mouse highlight mode (1001) requires a program to cooperate so
...
supporting it through tmux is not as easy as this, remove it for now.
2011-01-15 00:16:00 +00:00
Nicholas Marriott
4f34e25dd8
Support -x and -y for new-session to specify the initial size of the
...
window if created detached with -d.
2011-01-14 23:49:23 +00:00
Nicholas Marriott
9ad9e8c5dd
The maximum history-limit was accidentally reduced, fix it back to INT_MAX.
2011-01-13 13:38:57 +00:00
Nicholas Marriott
fa4a75cdab
Clarify alternate-screen description a little.
2011-01-13 09:50:11 +00:00
Nicholas Marriott
2d82567070
Er, fix next and previous session functions to actually work, part 2.
2011-01-13 02:08:14 +00:00
Nicholas Marriott
588ebb5393
Fix next and previous session functions to actually work.
2011-01-13 02:07:06 +00:00
Nicholas Marriott
96ab50a701
Log termios backspace for each client since it is used to recognise
...
backspace input.
2011-01-13 00:54:32 +00:00
Nicholas Marriott
b3438c86bf
Use TMPDIR if set, from Han Boetes.
2011-01-12 22:23:58 +00:00
Nicholas Marriott
47e18f4cea
unbind-key -a is allowed no arguments.
2011-01-10 21:28:47 +00:00
Nicholas Marriott
17f1cd5be8
Remove a bit of text that makes exit-unattached description unclear.
2011-01-09 18:46:46 +00:00
Nicholas Marriott
c3041eb9f0
Add missing arguments to some options.
2011-01-09 18:42:19 +00:00
Nicholas Marriott
69cb1f830e
Move all calls to fcntl(...O_NONBLOCK) into a function and clear the
...
flag on the stdio file descriptors before closing them (fixes things
like "tmux ls && cat").
2011-01-08 01:52:36 +00:00
Nicholas Marriott
703160b5d6
Accept colours of the hex form #ffffff and translate to the nearest from
...
the xterm(1) 256-colour set.
2011-01-08 00:48:54 +00:00
Nicholas Marriott
64f02dab7c
Whoops, command-prompt can take 0 or 1 argument.
2011-01-05 22:38:28 +00:00
Nicholas Marriott
96c37fa80a
Now that parsing is common, merge some of the small, related commands
...
together to use the same code.
Also add some arguments (such as -n and -p) to some commands to match
existing commands.
2011-01-04 02:03:41 +00:00
Nicholas Marriott
55346b0d10
argc will be 1 not 2 with no option value.
2011-01-04 01:58:12 +00:00
Nicholas Marriott
7502cb3adb
Clean up and simplify tmux command argument parsing.
...
Originally, tmux commands were parsed in the client process into a
struct with the command data which was then serialised and sent to the
server to be executed. The parsing was later moved into the server (an
argv was sent from the client), but the parse step and intermediate
struct was kept.
This change removes that struct and the separate parse step. Argument
parsing and printing is now common to all commands (in arguments.c) with
each command left with just an optional check function (to validate the
arguments at parse time), the exec function and a function to set up any
key bindings (renamed from the old init function).
This is overall more simple and consistent.
There should be no changes to any commands behaviour or syntax although
as this touches every command please watch for any unexpected changes.
2011-01-04 00:42:46 +00:00
Nicholas Marriott
ac3b78a841
Support for UTF-8 mouse input (\033[1005h). This was added in xterm 262
...
and supports larger terminals than the older way.
If the new mouse-utf8 option is on, UTF-8 mouse input is enabled for all
UTF-8 terminals. The option defaults to on if LANG etc are set in the
same manner as the utf8 option.
With help and based on code from hsim at gmx.li.
2011-01-03 23:35:21 +00:00
Nicholas Marriott
5158dd9a8d
Handle a # at the end of a replacement string (such as status-left)
...
correctly. Found by Thomas Adam.
2011-01-03 21:30:49 +00:00
Nicholas Marriott
3e8124009f
Move the user-visible parts of all options (names, types, limit, default
...
values) together into one set of tables in options-table.c. Also clean
up and simplify cmd-set-options.c and move a common print function into
option-table.c.
2011-01-01 16:51:21 +00:00
Nicholas Marriott
a4515ce138
suspend-client has used -t for the client target (like everything else)
...
for ages, fix the usage string and man page and trim some leftover code.
2011-01-01 11:24:45 +00:00
Nicholas Marriott
f833b885a1
Last few tables that should be const.
2011-01-01 03:43:20 +00:00
Nicholas Marriott
67ee86085c
Sprinkle a little more const.
2011-01-01 03:39:21 +00:00
Nicholas Marriott
5d0cfe079b
Another table that should be const.
2011-01-01 03:32:28 +00:00
Nicholas Marriott
1c86713afd
Key table should be const.
2011-01-01 02:16:25 +00:00
Nicholas Marriott
b6950ed8aa
Add a -P option to new-window and split-window to print the new window
...
or pane index in target form (useful to pass it into other commands).
2011-01-01 01:33:07 +00:00
Nicholas Marriott
04b32fa734
Don't reset the activity timer for unattached sessions every second,
...
this screws up the choice of most-recently-used. Instead, break the time
update into a little function and do it when the session is attached.
Pointed out by joshe@.
2011-01-01 01:12:09 +00:00
Nicholas Marriott
91218f8714
Remove unused variable.
2011-01-01 00:44:24 +00:00
Jason McIntyre
1a1efd5bc9
fix trailing whitespace;
2010-12-31 00:41:11 +00:00
Nicholas Marriott
4fb1045f5a
Remove some unused defines.
2010-12-30 23:20:13 +00:00
Nicholas Marriott
2b3c2fd852
Fix BUFFERS section now they are global.
2010-12-30 23:17:41 +00:00
Nicholas Marriott
cc42614fa9
Change from a per-session stack of buffers to one global stack which is
...
much more convenient and also simplifies lot of code. This renders
copy-buffer useless and makes buffer-limit now a server option.
By Tiago Cunha.
2010-12-30 23:16:18 +00:00
Nicholas Marriott
2231e72968
Add a function to create window flags rather than doing the same thing
...
in two places. From Thomas Adam.
2010-12-30 21:35:17 +00:00
Nicholas Marriott
f7c42c21ba
Support all four of the xterm mouse modes. Based on a diff from hsim at
...
gmx.li.
2010-12-29 21:49:06 +00:00
Nicholas Marriott
230e39ec35
Allow the config file parser and source-file to return "don't exit" to
...
the client to let attach work from configuration files.
2010-12-29 21:28:32 +00:00
Jason McIntyre
efa8c93664
tweak previous;
2010-12-27 19:57:31 +00:00
Nicholas Marriott
3e0bc052e1
Add a missing .Pp and sort options alphabetically, from Tiago Cunha.
2010-12-27 18:22:25 +00:00
Nicholas Marriott
d3d25365f1
server_kill_window can modify the RB tree so don't use RB_FOREACH, fixes
...
crash seen by Dan Harnett.
2010-12-23 21:56:38 +00:00
Nicholas Marriott
6fd2b5b87f
Style tweaks.
2010-12-23 20:18:39 +00:00
Nicholas Marriott
acf13ce978
Store sessions in an RB tree by name rather than a list, this is tidier
...
and allows them to easily be shown sorted in various lists
(list-sessions/choose-sessions).
Keep a session index which is used in a couple of places internally but
make it an ever-increasing number rather than filling in gaps with new
sessions.
2010-12-21 22:37:59 +00:00
Nicholas Marriott
1b8488ee75
Fix another stray addition that was too early. Oops.
2010-12-20 01:28:18 +00:00
Nicholas Marriott
6fcdc714b6
Undo a change to next/previous session that got mixed in prematurely.
2010-12-20 00:43:24 +00:00
Nicholas Marriott
8705c6b435
Dead sessions are never on the active sessions list, so the SESSION_DEAD
...
flag is effectively unused. Remove it.
2010-12-20 00:19:20 +00:00
Nicholas Marriott
9358cfaf4a
Use pointer rather than index for the client's last session.
2010-12-20 00:17:22 +00:00
Nicholas Marriott
a51dcdc430
Unify the way sessions are used by callbacks - store the address and use
...
the reference count, then check it is still on the global sessions list
in the callback.
2010-12-20 00:03:55 +00:00
Nicholas Marriott
c65d4220f0
Don't nuke the index counter when a session group comes up.
2010-12-19 22:35:54 +00:00
Nicholas Marriott
c198664d15
Add other-pane-height and other-pane-width options, allowing the width
...
or height of the smaller panes in the main-horizontal and main-vertical
layouts to be set. Mostly from David Goodlad.
2010-12-19 18:35:08 +00:00
Nicholas Marriott
8715247a43
Read ${X} environment variables in strings and $HOME from the global
...
environment rather than getenv, this allows them to be updated during
the configuration file.
2010-12-13 22:53:14 +00:00
Nicholas Marriott
51487ed22f
Track the last session for a client and add a flag to switch-client and
...
a key binding (L) to move a client back to its last session.
2010-12-11 18:39:25 +00:00
Nicholas Marriott
20ed20ea1e
Fix rectangle copy to behave like emacs - the cursor is not part of the
...
selection on the right edge but on the left it is.
2010-12-11 17:56:01 +00:00
Nicholas Marriott
9802fea615
Oops, these functions return a const char *, so make the local variable
...
const as well.
2010-12-11 16:13:15 +00:00
Nicholas Marriott
7ce77ffc9c
Make the prompt history global for all clients which is much more useful than per-client history.
2010-12-11 16:05:57 +00:00
Nicholas Marriott
6be32c89c5
Rephrase a confusing sentence.
2010-12-10 21:01:38 +00:00
Nicholas Marriott
1f18523565
In the built-in layouts, distribute the panes more evenly. Set the
...
default value of main-pane-width to 80, rather than 81. By Micah Cowan.
2010-12-08 19:57:03 +00:00
Nicholas Marriott
e26a351865
Add an option to alert (monitor) for silence (lack of activity) in a
...
window. From Thomas Adam.
2010-12-06 22:51:02 +00:00
Nicholas Marriott
ebd0eb4fb4
If VISUAL or EDITOR contains "vi", configure mode-keys and status-keys
...
to vi.
Based on a diff from martynas@, previously requested by a couple of
other people.
2010-11-29 19:45:58 +00:00
Nicholas Marriott
ef9b2eb566
There is somewhere that WINDOW_HIDDEN is getting set when it shouldn't
...
be and I can't find it, but the flag itself is a useless optimisation
that only applies to automatic-resize windows, so just dispose of it
entirely.
Fixes problems reported by Nicholas Riley.
2010-11-22 21:13:13 +00:00
Nicholas Marriott
9a1b4f9ed3
Show more window and pane flags in list-* output, and put layout on the
...
same line.
2010-11-15 06:52:11 +00:00
Nicholas Marriott
7e542d119b
Update man page for update-environment.
2010-11-14 09:04:22 +00:00
Nicholas Marriott
503edae26f
Don't allow last and active window to become the same - a very bad move
...
when the active window is closed and freed. Reported by sthen@.
2010-11-14 08:58:25 +00:00
Nicholas Marriott
e4e728664b
Add XAUTHORITY to update-environment, requested by Andreas Kloeckner.
2010-11-11 21:06:09 +00:00
Nicholas Marriott
17b56562c4
Flag to flush all key bindings from Rob Paisley.
2010-11-11 20:54:06 +00:00
Nicholas Marriott
c7fccfa299
Declaration in header should be extern.
2010-11-11 20:51:30 +00:00
Nicholas Marriott
023137a891
Typo, from Rob Paisley.
2010-11-01 20:59:45 +00:00
Nicholas Marriott
34d05ea7cd
We now send argv to the server after parsing it in the client to get the
...
command, so the client should not modify it. Instead, take a copy. Fixes
parsing command lists, reported by mcbride@.
2010-10-29 20:11:57 +00:00
Nicholas Marriott
5de84eca3d
Add a last-pane command (bound to ; by default). Requested ages ago by
...
somebody whose name I have forgotten.
2010-10-23 13:04:34 +00:00
Nicholas Marriott
a3efd2ab5a
When removing a pane, don't change the active pane unless the active
...
pane is actually the one being removed.
2010-10-23 12:51:51 +00:00
Nicholas Marriott
139754b9fe
Mark repeating keys with "(repeat)" in the key list.
2010-10-20 18:20:36 +00:00
Nicholas Marriott
248fb14f08
Merge the before and after attach client code into one in client.c
...
(instead of two in tmux.c and client.c).
2010-10-18 20:00:02 +00:00
Nicholas Marriott
31954339d1
Make stdio blocking again before calling shell command with -c.
2010-10-16 08:42:35 +00:00
Nicholas Marriott
f56b4ec2ff
Trying to set FD_CLOEXEC on every fd is a lost cause, just use
...
closefrom() before exec.
2010-10-16 08:31:55 +00:00
Nicholas Marriott
6c42f1a89e
Fall back on normal session choice method if $TMUX exists but is invalid
...
rather than rejecting.
2010-10-16 07:57:42 +00:00
Nicholas Marriott
65ff5b00bd
Use an explicit event rather than event_once for the main event so it
...
can be removed when the client becomes ready.
2010-10-14 17:38:39 +00:00
Nicholas Marriott
f6cd0342f6
Treat the meta bit in the xterm extended modifier key set as the same as
...
escape (tmux's meta). From Emanuele Giaquinta.
2010-10-14 00:37:51 +00:00
Nicholas Marriott
1580afdfdf
Put "or" on new line from command with .Ic.
2010-10-14 00:30:03 +00:00
Nicholas Marriott
7aef2994e4
Set cause when failing due to linking a window to itself, from Martin
...
Pieuchot.
2010-10-09 12:58:00 +00:00
Nicholas Marriott
08bcd6978c
Skip NULL entries in the sessions list when choosing the next session,
...
from Simon Olofsson.
2010-10-05 17:15:21 +00:00
Nicholas Marriott
4789a4ee1f
Nuke a leftover RB tree declaration spotted by blambert.
2010-09-28 07:15:45 +00:00
Nicholas Marriott
9a7cde0c9b
Two new options:
...
- server option "exit-unattached" makes the server exit when no clients
are attached, even if sessions are present;
- session option "destroy-unattached" destroys a session once no clients
are attached to it.
These are useful for preventing tmux remaining in the background where
it is undesirable and when using tmux as a login shell to keep a limit
on new sessions.
2010-09-26 20:43:30 +00:00
Nicholas Marriott
66152010a7
Modify the permissions on the socket when adding or removing +x to show
...
attached sessions, rather than replacing them.
2010-09-26 18:51:48 +00:00
Nicholas Marriott
2772557d15
detach-on-destroy is a session option, not server.
2010-09-25 20:35:52 +00:00
Nicholas Marriott
ea4487c6da
Ugh. Pass the right type into tty_term_has. Teaches me to make last
...
minute changes :-/.
2010-09-11 16:20:58 +00:00
Nicholas Marriott
cb564bb427
Use UTF-8 line drawing characters on UTF-8 terminals. Fixes some stupid
...
terminals (I'm looking at you, putty) which disable the vt100 ACS mode
switching sequences in UTF-8 mode.
Also on terminals without ACS at all, use ASCII equivalents where
obvious.
2010-09-11 16:19:22 +00:00
Nicholas Marriott
3696cce4ae
Ignore terminal overrides settings without a value.
2010-09-11 15:43:11 +00:00
Nicholas Marriott
c1c5f43a01
When resizing the copy mode screen, don't allow it to end up with the
...
viewable position beyond the size of the history.
2010-09-11 15:39:55 +00:00
Nicholas Marriott
a22a6deda5
Add -n and -p flags to switch-client to move to the next and previous
...
session (yes, it doesn't match window/pane, but so what, nor does
switch-client).
Based on a diff long ago from "edsouza".
2010-09-08 22:02:28 +00:00
Nicholas Marriott
bbf743769b
Do not crash if the screen size is too small for the indicator in copy mode.
2010-09-08 20:36:42 +00:00
Nicholas Marriott
de68c2a7da
Simplify xterm modifier detection by treating as a bitmask + 1. Spotted
...
by and diff from Emanuele Giaquinta.
2010-09-01 21:11:14 +00:00
Nicholas Marriott
5309252053
Reset running jobs when the status line is enabled or disabled as well,
...
some people have it bound to a key.
2010-09-01 21:06:51 +00:00
Nicholas Marriott
8e8e0f1d53
Add missing prototype.
2010-08-31 22:46:59 +00:00
Nicholas Marriott
f69ce39a6c
When destroying a pane, reset any mode (which reenables pane
...
bufferevent) before freeing the bufferevent.
2010-08-25 19:19:43 +00:00
Nicholas Marriott
fc9f08235b
Can't call event_del() without event_set() first - so call event_set()
...
when setting up the client.
2010-08-23 17:36:32 +00:00
Nicholas Marriott
5f5104e782
MSG_EXIT can now have a return code in the message, so check for that
...
size as well. Stops the client fatal()ing on exit.
2010-08-22 16:09:49 +00:00
Nicholas Marriott
e3be9b1951
Do not call event_del() for signals after fork(), just use sigaction()
...
directly instead - calling libevent functions after fork() w/o
event_reinit() is a bad idea, even if in this case it was harmless.
2010-08-19 18:29:01 +00:00
Nicholas Marriott
c2822ca119
Do not need to dup() the tty fd sent from the client because it is
...
already dup()d again later. Fixes a leak seen by espie@.
2010-08-19 17:20:26 +00:00
Nicholas Marriott
828f12b748
Do not allow duplicate session names to be created, reported by Dominik
...
Honnef, patch from Thomas Adam.
2010-08-11 07:45:06 +00:00
Nicholas Marriott
ae70071494
Handle failure to change mode, to avoid dying when switching into copy
...
mode when already in a different mode. Reported by "Florian".
2010-08-11 07:41:05 +00:00
Nicholas Marriott
3999886901
Usage string fixes from Ben Boeckel.
2010-08-11 07:38:00 +00:00
Nicholas Marriott
cc474b4ede
Treat trying to link or move to the same window as an error to avoid
...
removing it accidentally.
2010-08-11 07:36:23 +00:00
Nicholas Marriott
8363e31953
Change the way backoff works. Instead of stopping reading from the pty
...
when the client tty backs up too much, just stop updating the tty and
only update the internal screen. Then when the tty recovers, force a
redraw.
This prevents a dodgy client from causing other clients to go into
backoff while still allowing tmux to be responsive (locally) when seeing
lots of output.
2010-08-11 07:34:43 +00:00
Nicholas Marriott
933dc48de3
Show which pane is active in the list-panes output, suggested by Dominik
...
Honnef.
2010-08-11 07:27:50 +00:00
Theo Deraadt
4274a7ec89
switch back to kqueue for now, since (a) kqueue has been fixed to deal
...
with strange devices and (b) since there appears to be a bull in the
poll code in libevent as well...
requested by nicm who is away
2010-08-04 19:46:13 +00:00
Nicholas Marriott
77f9c49829
dup() the stdin fd so it isn't closed twice (once for stdin, once for tty).
2010-07-28 22:15:15 +00:00
Nicholas Marriott
c87187f913
When changing so that the client passes its stdout and stderr as well as
...
stdin up to the server, I forgot one essential point - the tmux server
could now be both the producer and consumer. This happens when tmux is
run inside tmux, as well as when piping tmux commands together.
So, using stdio(3) was a bad idea - if sufficient data was written, this
could block in write(2). When that happened and the server was both
producer and consumer, it deadlocks.
Change to use libevent bufferevents for the client stdin, stdout and
stderr instead. This is trivial enough for output but requires a
callback mechanism to trigger when stdin is finished.
This relies on the underlying polling mechanism for libevent to work
with whatever devices to which the user could redirect stdin, stdout or
stderr, hence the change to use poll(2) over kqueue(2) for tmux.
2010-07-24 20:11:59 +00:00
Nicholas Marriott
bf09b00fe9
kqueue(2) is currently broken when used with /dev/null and a few other
...
devices.
An upcoming fix for some problems with the client stdout/stderr handling
relies on it working, so make tmux force libevent to use poll(2) via
EVENT_NOKQUEUE, until we have fixed kqueue.
2010-07-24 19:25:31 +00:00
Nicholas Marriott
a97b7ad11c
Fix a crash: if remain-on-exit is set and the pane has exited, the
...
buffers may not be valid, so do not try to disable/enable them when
switching to copy mode.
2010-07-22 21:10:51 +00:00
Nicholas Marriott
2b80ede963
Don't return if in the current window since we may want to report a bell
...
(if bell-action any/current), just clear the flag so the status line
doesn't show the bell.
2010-07-19 21:13:03 +00:00
Nicholas Marriott
2a0f3f0d79
Send the \n to stdout with the message, not stderr... doh.
2010-07-19 18:27:38 +00:00
Jason McIntyre
a471b5de9c
some escapes i missed;
2010-07-15 21:54:20 +00:00
Nicholas Marriott
43355fa75c
Make pane/window wrapping more logical (so with 10 windows, +10 from
...
window 5 stays in the same place), and tidy the code. From Tiago Cunha.
2010-07-14 18:37:49 +00:00
Nicholas Marriott
b9c873cdaa
Return the command client return code with MSG_EXIT now that MSG_ERROR and
...
MSG_PRINT are unused.
New clients should be compatible with old tmux servers but vice versa may print
an error.
2010-07-11 17:06:45 +00:00
Ted Unangst
b4b9b831ee
replace some magic mouse constants with defines for clarity. ok nicm
2010-06-29 05:24:49 +00:00
Nicholas Marriott
552c9cd83f
Custom layouts. list-windows command displays the layout as a string (such as
...
"bb62,159x48,0,0{79x48,0,0,79x48,80,0}") and it can be applied to another
window (with the same number of panes or fewer) using select-layout.
2010-06-29 03:30:13 +00:00
Nicholas Marriott
76bbdeb586
Send all three of stdin, stdout, stderr from the client to the server, so that
...
commands can directly make use of them. This means that load-buffer and
save-buffer can have "-" as the file to read from stdin or write to stdout.
This is a protocol version bump so the tmux server will need to be restarted
after upgrade (or an older client used).
2010-06-28 22:10:42 +00:00
Nicholas Marriott
07a71fd432
Store the current working directory in the session, change the default-path
...
option to default to empty and make that mean that the stored session CWD is
used.
2010-06-27 02:56:59 +00:00
Nicholas Marriott
26524c99f6
New option, detach-on-destroy, to set what happens to a client when the session
...
it is attached to is destroyed. If on (the default), it is detached; if off, it
is switched to the most recently active session.
2010-06-27 00:22:22 +00:00
Nicholas Marriott
34464da8d3
Use server_destroy_session() for kill-session.
2010-06-26 23:55:50 +00:00
Nicholas Marriott
42e2413978
Setting the cmdlist pointer in the bind-key to NULL to prevent it being freed
...
after the command is executing is bogus because it may still be needed if the
same command is going to be executed again (for example if you "bind-key a
bind-key b ..."). Making a copy is hard, so instead add a reference count to
the cmd_list.
While here, also print bind-key -n and the rest of the flags properly.
Fixes problem reported by mcbride@.
2010-06-26 18:20:53 +00:00
Nicholas Marriott
ef7293379f
Add a choose-buffer command for easier use of the paste buffer stack.
2010-06-21 21:44:09 +00:00
Nicholas Marriott
386849edc1
Extend the -t:+ and -t:- window targets for next and previous window to
...
accept an offset such as -t:+2. From Tiago Cunha.
2010-06-21 01:46:36 +00:00
Nicholas Marriott
e63f0546a1
Having a list of winlinks->alerts for each session is stupid, just store
...
the alert flags directly in the winlink itself.
2010-06-21 01:27:46 +00:00
Nicholas Marriott
447a07e9f8
Rename activity->alert in a couple of functions for consistency.
2010-06-21 00:25:32 +00:00
Nicholas Marriott
ad466a69aa
Give tmux sockets (but not the containing folder) group
...
permissions. This allows hardlinks to the sockets to be used more
easily.
2010-06-21 00:18:57 +00:00
Nicholas Marriott
5afb820d23
Ensure we overwrite UTF-8 wide characters properly, and never overwrite
...
characters we weren't overlapping. Fixes "disappearing wide characters"
glitch. From Micah Cowan.
2010-06-21 00:11:12 +00:00
Nicholas Marriott
278d9bc721
Last change erroneously used the target argument for looking up the
...
client which caused pipe-pane to fail when used from the command
line. Instead pass NULL which should use the current client.
Spotted by Tiago Cunha.
2010-06-14 23:06:13 +00:00
Nicholas Marriott
1484eb8a51
Add a missing command and some missing Ic, from Tiago Cunha.
2010-06-14 23:04:44 +00:00
Nicholas Marriott
dcc100f165
Use a macro-based mask for obtaining a key or modifier-set from the
...
combination. Display C-@, etc, as C-Space, in list-keys. By Micah Cowan.
2010-06-06 19:00:13 +00:00
Nicholas Marriott
4e3bed2035
Couple of missing command aliases/flags, from Tiago Cunha.
2010-06-05 16:54:24 +00:00
Nicholas Marriott
510ec3fb9e
Fix problems with window sizing seen by Raghavendra D Prabhu when
...
starting tmux from .xinitrc.
One of the very few things the server relies on the client for now is to
pass through a message on SIGWINCH, but there is a condition where
potentially a SIGWINCH may be lost during the transition from unattached
(main.c) to attached (client.c). So trigger a size change immediately
after the client installs its SIGWINCH handler.
Also, when the terminal is resized, reset the scroll region and cursor
position. Previously, we were clearing our saved idea of these, but in
fact some terminals do not reset them on resize, so this caused problems
during redraw.
While here make a resize to the same size not cause a redraw and rename
the tmux.out output log file to include the tmux PID.
2010-06-05 16:47:11 +00:00
Nicholas Marriott
ceed5cc9a9
Support the status_replace # replacement sequences in the pipe-pane
...
command, thanks to Andrea Barisani.
2010-06-05 16:34:30 +00:00
Nicholas Marriott
0440d325d9
Shut up gcc4 warnings.
2010-06-05 16:32:22 +00:00
Nicholas Marriott
36c0871c23
This ioctl(TIOCGWINSZ) call is no longer necessary, the result is never
...
used and the server now does it later on the tty fd directly.
2010-06-05 16:29:45 +00:00
Nicholas Marriott
b88ec14f0e
Fix binding of C-Space/C-@, from Micah Cowan.
2010-06-05 15:51:53 +00:00
Nicholas Marriott
cc724f327a
Make start-of-line work the same as end-of-line on wrapped lines (jump
...
to real start if at edge of screen). By Micah Cowan.
2010-06-05 15:49:48 +00:00
Nicholas Marriott
43fa9a9ba6
When the mode-mouse option is on, support dragging to make a selection
...
in copy mode.
Also support the scroll wheel, although xterm strangely does not ignore
it in application mouse mode, causing redraw artifacts when scrolling up
(other terminals appear to be better behaved).
2010-05-31 19:51:29 +00:00
Nicholas Marriott
e1e120de1c
Better to say "command key bindings" since we've just called them
...
command keys.
2010-05-30 19:19:42 +00:00
Nicholas Marriott
7b7397241f
There is no real reason not to list all the key bindings here rather
...
than just a selection.
2010-05-30 19:09:50 +00:00
Nicholas Marriott
1618f3eae6
Move imsg into libutil and add a man page.
...
Minor bump for libutil.
Previous versions of this diff and man page looked at by various people.
"you should just commit" deraadt
2010-05-26 16:44:32 +00:00
Nicholas Marriott
c47d66f49b
Rename some imsg bits to make namespace collisions less likely buf to
...
ibuf, buf_read to ibuf_read, READ_BUF_SIZE to IBUF_READ_SIZE.
ok henning gilles claudio jacekm deraadt
2010-05-26 13:56:07 +00:00
Nicholas Marriott
1e8faaa217
Don't die if the client has been detached when the job finishes, just
...
don't display the output.
2010-05-25 20:05:25 +00:00
Nicholas Marriott
608eef731a
Fix an out-of-date comment.
2010-05-25 19:47:30 +00:00
Nicholas Marriott
4f5c5b37b8
Pass in the session, rather than the client, to window modes' key()
...
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-05-23 19:42:19 +00:00
Nicholas Marriott
0ed727a012
Enhance paste-buffer to allow lines to be separated by any string, from
...
Andrea Barisani.
2010-05-19 22:28:14 +00:00
Nicholas Marriott
d91127958d
Colour+attribute options for status line alerts, from Alex Alexander.
2010-05-14 19:03:09 +00:00
Nicholas Marriott
4af4d12475
Accept (and document) "none" instead of "default" for attributes as it
...
is clearer and avoids confusion with default colours.
2010-05-14 18:56:21 +00:00
Nicholas Marriott
e5f01febd7
Use $OpenBSD$.
2010-05-14 14:41:06 +00:00
Joel Sing
72d1afa169
Catch SIGHUP and terminate if running as a client. This prevents clients
...
from being left hanging around when, for example, a SSH session is
disconnected.
ok nicm@
2010-05-12 15:05:39 +00:00
Nicholas Marriott
e0f4697e7c
Identical behaviour to select-prompt can now be obtained with
...
command-prompt, so remove select-prompt and change ' to be bound to
command-prompt -p index "select-window -t :%%".
2010-05-05 23:24:23 +00:00
Nicholas Marriott
c4a2fdf15b
Put this back in with the initialisation in the right order.
2010-05-04 17:28:16 +00:00
Nicholas Marriott
af5e0bd15a
Revert last change, it appears to be broken somehow.
2010-05-04 08:48:06 +00:00
Nicholas Marriott
ec1d37b1b2
Make signal handler setup/teardown two common functions instead of six,
...
and reset SIGCHLD after fork to fix problems with some shells. From
Romain Francois.
2010-05-03 16:06:32 +00:00
Ryan McBride
c919139433
Make C-] and other punctuation-based control key combinations work again.
...
ok nicm
2010-05-03 09:38:03 +00:00
Igor Sobrado
fc09ec3025
sort options.
2010-05-02 15:19:35 +00:00
Nicholas Marriott
99e54f46c7
Make the active pane border have a green foreground instead of
...
background by default.
2010-04-28 18:22:32 +00:00
Nicholas Marriott
2240199dbf
Fix crash when resizing in copy mode, when cursor can end up outside screen.
...
Reported by Romain Francois, fixed by Micah Cowan.
2010-04-28 18:19:16 +00:00
Nicholas Marriott
83e1a33ff5
imsg.h does not need sys/tree.h.
...
ok eric
2010-04-27 21:04:04 +00:00
Nicholas Marriott
d529e7e14e
Add a tiled layout, originally from Liam Bedford a while ago, fixed up
...
by me.
2010-04-25 20:28:13 +00:00
Nicholas Marriott
6769115df2
When converting A-Z into a control character, want to subtract 64 not
...
65... whoops.
2010-04-23 14:27:04 +00:00
Nicholas Marriott
261b6b8615
Mark zombie windows as dead in choose-window list, from Romain Francoise.
2010-04-21 21:41:21 +00:00
Nicholas Marriott
3ae1b82695
Rewrite key string conversions to be readable and to work properly for
...
multiple modifiers.
2010-04-21 21:17:33 +00:00
Nicholas Marriott
67dd5df876
Catch SIGCHLD to avoid a zombie, from patrick keshishian.
2010-04-18 13:41:29 +00:00
Nicholas Marriott
622593a77f
Fix typo in escape state table leading to fatal() when \033} or \033~
...
was entered, from Chris Johnsen.
2010-04-17 23:31:09 +00:00
Nicholas Marriott
a6d52405a8
If remain-on-exit is set, both the error callback and a SIGCHLD could
...
destroy the same pane (because the first one doesn't remove it from the
list of panes), causing the pane bufferevent to be freed twice. So don't
free it if the fd has already been set to -1, from Romain Francoise.
2010-04-17 23:25:16 +00:00
Nicholas Marriott
842bc2b855
Fix use-after-free of the window link when it is part of a grouped
...
session (and hence could have been recreated), from Micah Cowan.
2010-04-17 23:14:17 +00:00
Nicholas Marriott
a2c86dcbf6
Remove XXX comment and just close received fd if calloc() fails.
...
If this happens the imsg may no longer be usable as there may be queued
messages, but this is a) already the case with the code now, and b)
would be the case if recvmsg() fails anyway, so we can document that -1
from imsg_read() invalidates the struct imsgbuf.
discussed with and ok eric
2010-04-07 18:09:39 +00:00
Nicholas Marriott
ac9daf92d7
Merge copy mode and output mode, dropping the latter. Idea and code from
...
Micah Cowan.
2010-04-06 21:35:44 +00:00
Nicholas Marriott
f81190a793
Mention title setting, and the new default.
2010-04-05 17:46:05 +00:00
Bob Beck
6704c86301
rather than using an empty "" as the default window title, put the hostname
...
of the machine we are running on in there.
makes my many green lines easier to deal with without using fiddly options to
set it.
ok nicm@
2010-04-04 23:05:15 +00:00
Jason McIntyre
680f920b55
tweak;
2010-04-04 21:23:20 +00:00
Nicholas Marriott
089c33f5be
Should be -s for src pane.
2010-04-04 19:12:20 +00:00
Nicholas Marriott
46d5c14b17
Dead assignment, found with clang.
2010-04-04 19:04:09 +00:00
Nicholas Marriott
b02cd35354
Run job commands explicitly in the global enviroment (which can be
...
modified with setenv -g) rather than with the environment tmux started
with.
2010-04-04 19:02:09 +00:00
Nicholas Marriott
7425122c1c
Squash a function that is only called in a callback into the callback
...
function.
2010-04-04 18:48:37 +00:00
Nicholas Marriott
56481a46bf
Don't accept keys with modifiers as input. Fixes crash reported by Brian
...
R Landy.
2010-03-31 18:05:14 +00:00
Nicholas Marriott
41f90bd08f
Don't leak job command in #().
2010-03-27 15:06:40 +00:00
Nicholas Marriott
d3d85c3df9
-a flag to insert a window after an existing one, moving other windows
...
up necessary.
2010-03-27 11:46:58 +00:00
Jason McIntyre
d267845cfc
dispense with some wacky escape sequences;
2010-03-26 19:30:40 +00:00
Nicholas Marriott
c550e66e85
Dead functions, lint.
2010-03-22 19:18:46 +00:00
Nicholas Marriott
e16b7b8399
Reset output functions too when changing client after attaching, to
...
avoid crash if a command in a sequence after new/attach causes output.
2010-03-22 19:14:55 +00:00
Nicholas Marriott
9abbe349af
paste-buffer should be per pane, from C. Coutinho.
2010-03-22 19:13:28 +00:00
Nicholas Marriott
509ce7f766
Nuke unused variable.
2010-03-22 19:11:54 +00:00
Nicholas Marriott
0ac6efa6d5
Add vi-style "jump" commands for copy mode, from Micah Cowan.
2010-03-22 19:10:42 +00:00
Nicholas Marriott
6f04866044
Support up, down, left, right movement through panes with -UDLR flags to
...
select-pane.
Also REMOVE the up- and down-pane commands: equivalent behaviour is now
available using -t :.+ and -t :.-.
2010-03-22 19:07:52 +00:00
Nicholas Marriott
021037c419
Accept a full key match (not a partial) even if there is data left in
...
the buffer.
2010-03-22 19:03:52 +00:00
Nicholas Marriott
4baafd8126
New input parser based on http://vt100.net/emu/dec_ansi_parser .
2010-03-22 19:02:54 +00:00
Nicholas Marriott
48dd72005e
Fix a use-after-free when cancelling copy mode, or trying to repeat cancel.
...
ok kettenis
2010-03-14 23:31:23 +00:00
Nicholas Marriott
7bc3f5dd8a
Permit keys in copy mode to be prefixed by a repeat count, entered with
...
[1-9] in vi mode, or M-[1-9] in emacs mode.
From Micah Cowan, tweaked a little by me.
2010-03-02 00:32:41 +00:00
Nicholas Marriott
56a33b157b
Extend the end-of-line key so that in normal mode a second press moves
...
the cursor to the end of a wrapped line (if present) and in rectangle
mode it toggles between the end of the text and the last cell on the
line.
From Micah Cowan.
2010-03-01 23:53:27 +00:00
Nicholas Marriott
c7046b9a0c
Check for colour and attribute modifications early so the translated
...
values can be stored in the cached terminal attributes rather than the
requested (untranslated) values. Prevents tmux clearing and setting the
attributes for every character when using aixterm colours.
2010-03-01 22:44:31 +00:00
Nicholas Marriott
6ac3343617
Typo fix from Tim van der Molen.
2010-02-24 19:13:38 +00:00
Nicholas Marriott
f1dd95650b
Don't set the terminal to nonblocking on detach until we have finished with it
...
entirely.
2010-02-24 19:08:39 +00:00
Nicholas Marriott
6767072c9d
Option to set the characters considered word separators in copy mode, from
...
Micah Cowan.
2010-02-22 20:41:16 +00:00
Nicholas Marriott
efbcf8747d
In load-buffer, read until EOF rather than using stat() and reading a fixed
...
size. Allows use of FIFOs and whatnot. From Tiago Cunha, idea from Fulvio
Ciriaco.
2010-02-22 20:33:12 +00:00
Nicholas Marriott
73b8c3ebf3
Another copy mode fix from Micah Cowan: in rectangle copy mode, the cursor
...
should not wrap at the end of the text on the line but should be allowed to
move freely.
2010-02-22 20:28:21 +00:00
Nicholas Marriott
25211020bf
Display -t argument to new-session, from Tiago Cunha.
2010-02-22 20:19:16 +00:00
Nicholas Marriott
24634b6281
have_arg matches buf so it is no longer necessary, spotted by Tim van der
...
Molen.
2010-02-19 17:14:23 +00:00
Nicholas Marriott
3a89d1ef7f
copy mode uses the real screen as backing and if it is updated while copying,
...
strange things can happen. So, freeze reading from the pty while in copy mode.
2010-02-19 00:03:21 +00:00
Nicholas Marriott
a61b8a2033
Make next-word stop at beginning of word even if it is at the start of the
...
line, from Micah Cowan.
2010-02-17 21:27:18 +00:00
Nicholas Marriott
c164f5886f
Man page additions/improvements, thanks to Robin Lee Powell.
2010-02-17 21:12:06 +00:00
Nicholas Marriott
d285f7fd4d
Don't strip add newline if only copying part of wrapped line. Problem spotted
...
by and fix from Micah Cowan.
2010-02-17 20:58:24 +00:00
Nicholas Marriott
44ded35d5d
Add "N" key to search the opposite way from the last search (reverse of "n"),
...
from Micah Cowan.
2010-02-11 20:39:40 +00:00
Nicholas Marriott
f429057072
Clarify default status-right, from Seth Wright.
2010-02-10 19:17:27 +00:00
Nicholas Marriott
11dedde511
Add an option to disable the smcup/rmcup alternate screen behaviour inside
...
tmux. From clemens fischer.
2010-02-08 00:14:38 +00:00
Nicholas Marriott
2dc74f2e4d
next-layout is bound to Space not C-Space.
2010-02-07 20:33:27 +00:00
Nicholas Marriott
4651180503
Use the array.h code for the causes list.
2010-02-06 23:22:27 +00:00
Nicholas Marriott
bb53c20c18
Support attaching a client read-only with a new -r flag to the attach-session
...
command.
2010-02-06 22:55:31 +00:00
Nicholas Marriott
0a86d3579e
Change nested check to compare server socket path rather than just assuming
...
that if $TMUX is set it is nested. From Micah Cowan.
2010-02-06 18:47:41 +00:00
Nicholas Marriott
4a5017d1d8
Clean up $TMUX parsing, from Micah Cowan, tweaked by me.
2010-02-06 18:29:15 +00:00
Nicholas Marriott
3ef3802629
Rectangle copy support, from Robin Lee Powell.
2010-02-06 17:35:01 +00:00
Nicholas Marriott
8aba77b7be
Instead of bailing out on the first configuration file error, carry on,
...
collecting all the errors, then start with the active window in more mode
displaying them.
2010-02-06 17:15:33 +00:00
Nicholas Marriott
5e6a7c85cc
vi-style B, W and E keys in copy mode to navigate between words treating only
...
spaces as word separators. Also add . to the list of word separators for
standard word navigation.
From Micah Cowan, tweaked slightly by me.
2010-02-04 20:00:26 +00:00
Nicholas Marriott
e7c6f81016
Read the path from $TMUX if it is present and -L and -S are not given. Based on
...
a diff from Micah Cowan.
2010-02-04 18:27:06 +00:00
Nicholas Marriott
604b02cfaa
Option to display the active pane in a different colour with the display-panes
...
command. From Paul Hoffman, thanks.
2010-02-04 18:20:16 +00:00
Nicholas Marriott
d6bd9c0e7f
Fix divide by zero on small windows with main-* layouts.
2010-02-03 22:24:34 +00:00
Nicholas Marriott
9ffe549ab1
If redrawing line 0 of the screen onto the tty, there can't be a wrap flag on
...
the previous line, so move the cursor. Fixes status line redraw issues when
resizing in choose mode and hopefully at other times as well.
2010-02-01 23:06:24 +00:00
Nicholas Marriott
06ce9da32a
Add scroll-up/scroll-down for choose/more mode, from Micah Cowan.
2010-02-01 22:15:51 +00:00
Nicholas Marriott
c29bfd2ff3
Remove unnecessary comparison, pointed out by Tiago Cunha.
2010-01-31 18:47:03 +00:00
Nicholas Marriott
383c682563
Fix DPADD, from Brad.
2010-01-31 11:11:28 +00:00
Nicholas Marriott
8a37a1cc2d
Don't stop parsing command sequences when a command requests the client to
...
stick around (attach-session/new-session).
2010-01-30 19:08:47 +00:00
Nicholas Marriott
65c9004550
Ignore SIGHUP as well.
2010-01-30 19:05:18 +00:00
Nicholas Marriott
6abd984608
Typo, from Micah Cowan.
2010-01-28 19:09:12 +00:00
Nicholas Marriott
f941879c15
Actually bind the new key to e.
2010-01-27 23:26:14 +00:00
Nicholas Marriott
05213e4c8c
Calculate offset correctly, fixes incorrect offset and prevents crash when
...
status-left is empty. From Micah Cowan.
2010-01-27 20:26:42 +00:00
Nicholas Marriott
3e2cc2d2c4
Alter next-word to have vi-like movement behaviour, and add next-word-end with
...
the existing emacs behaviour. From Micah Cowan.
2010-01-27 20:18:52 +00:00
Nicholas Marriott
ba6dedbbbd
Actually use the copy made when no newline is found, from martynas@.
2010-01-26 21:36:53 +00:00
Nicholas Marriott
f26312ffbf
Hugely simplify window_copy_cursor_next_word, which was way overcomplicated.
2010-01-25 22:34:11 +00:00
Nicholas Marriott
e31480cf44
Update the selection properly after goto line or searching.
2010-01-25 21:37:40 +00:00
Nicholas Marriott
1e5a94fdb5
Top/bottom of history mode keys, diff from Micah Cowan, tweaked by me.
2010-01-25 21:33:39 +00:00
Nicholas Marriott
75e13c8977
Redraw properly when scrolling backward and the cursor is on the last
...
line. Based on a fix from Micah Cowan.
2010-01-24 21:05:12 +00:00
Nicholas Marriott
b9ade6e6bb
When a window is destroyed, remove all links to it from each session rather
...
than just the first. Reported by Robin Lee Powell.
2010-01-23 21:07:31 +00:00
Nicholas Marriott
c0d3e4315c
Don't leak if arguments appear multiple times, from Tiago Cunha.
2010-01-23 17:50:56 +00:00
Nicholas Marriott
8865eb2866
Use C-e and C-y for scrolling in vi mode, from Micah Cowan.
2010-01-23 17:49:21 +00:00
Nicholas Marriott
097a501414
Don't leak line, from Tiago Cunha.
2010-01-20 18:30:20 +00:00
Nicholas Marriott
7d75dbbdda
Permit !, + and - to be used for window targets to specify last window (!), or
...
next and previous window by number (+ and -).
Also tidy an if in cmd-new-window.c.
2010-01-19 21:27:47 +00:00
Nicholas Marriott
f569950664
Missing Pp, from Tiago Cunha.
2010-01-18 19:16:04 +00:00
Nicholas Marriott
a4ebd9af33
Document swap-pane -d.
2010-01-14 22:10:47 +00:00
Nicholas Marriott
d5d0a36f66
Permit S- prefix on keys for shift. Relatively few terminals support this
...
(basically xterm only) and even fewer have them in terminfo (kLFT2 and kRIT2).
2010-01-14 21:53:40 +00:00
Nicholas Marriott
8f301ed62d
key should be an int not a char.
2010-01-11 23:46:22 +00:00
Nicholas Marriott
3211bc5f23
$OpenBSD$ not $Id$
2010-01-08 17:44:27 +00:00
Nicholas Marriott
6789088dce
mouse-select-pane has to redraw the borders now too.
2010-01-08 09:14:15 +00:00
Nicholas Marriott
6a45fab608
New command, join-pane, to split and move an existing pane into the space (like
...
splitw then movep, or the reverse of breakp).
2010-01-07 20:52:18 +00:00
Nicholas Marriott
519c6fc7e7
Fix this properly.
2010-01-07 20:30:02 +00:00
Nicholas Marriott
ac46e87685
Don't return the root cell if the string doesn't match.
2010-01-07 20:28:01 +00:00
Nicholas Marriott
526bb6f3e9
Use the specified pane for size calculations. Doh.
2010-01-07 20:02:01 +00:00
Nicholas Marriott
462a11301a
Change split-window to accept a pane target (it should be split-pane but
...
renaming the command would be annoying).
2010-01-07 19:47:10 +00:00
Nicholas Marriott
ad8509f361
Correctly clear 256-colour flag for aixterm colours.
2010-01-06 23:13:52 +00:00
Nicholas Marriott
739b937b74
Fix selection behaviour when the cursor is moved backwards (ie so the selection
...
start is after the end).
2010-01-03 17:12:04 +00:00
Nicholas Marriott
7e4f8b45b6
Options to set the colour of the pane borders, with different colours for the
...
active pane.
2010-01-03 12:51:05 +00:00
Nicholas Marriott
121ba57b55
Use the target print function for copy-mode, spotted by Tiago Cunha.
2010-01-02 22:50:02 +00:00
Nicholas Marriott
9ee979167a
Use tcflush(3) instead of TIOCFLUSH, from Ed Schouten.
2010-01-01 14:29:18 +00:00
Nicholas Marriott
a775107f5f
Fix the logic so that transition from a 256 colour to default works properly.
2009-12-26 11:02:32 +00:00
Nicholas Marriott
cd9b1b1fd3
Nuke some stray debugging.
2009-12-26 10:39:02 +00:00
Philip Guenther
a3715e7867
Use sysctl() KERN_PROC2 instead of KERN_PROC, as the latter's ABI
...
is sensitive to changes in struct proc.
fixes for warnings and ok nicm@
2009-12-24 22:29:15 +00:00
Nicholas Marriott
4feee126b8
Fix a couple of problems with grouped sessions reported by danh: redraw
...
properly and choose the correct last window after a window is killed.
2009-12-22 10:20:08 +00:00
Nicholas Marriott
19ea306606
Allow keys to be replaced and reorder the table so that terminfo-defined keys
...
(or terminal-overrides) take precedence over internally defined.
2009-12-17 17:39:56 +00:00
Nicholas Marriott
0dda866679
Pass through the aixterm bright colours if the terminal supports them (>= 16
...
colours).
2009-12-14 21:33:38 +00:00
Nicholas Marriott
84d2e6c8a0
Add server options to completion as well.
2009-12-14 10:47:11 +00:00
Nicholas Marriott
30962cb200
New server option, escape-time, to set the timeout used to detect if escapes
...
are alone or part of a function key or meta sequence.
2009-12-14 10:43:41 +00:00
Nicholas Marriott
3f58cbaae9
Use quiet variable, and add missing sentinel to options array.
2009-12-11 13:58:48 +00:00
Nicholas Marriott
a4c9a80dac
Add "server options" which are server-wide and not bound to a session or
...
window. Set and displayed with "set -s" and "show -s".
Currently the only option is "quiet" (like command-line -q, allowing it to be
set from .tmux.conf), but others will come along.
2009-12-10 09:16:52 +00:00
Nicholas Marriott
6311bd119e
Permit panes to be referred to as "top", "bottom", "top-left" etc, if the right
...
pane can be identified.
2009-12-08 07:49:31 +00:00
Nicholas Marriott
796eb522ac
vte is buggy and doesn't home the cursor after changing the scroll
...
region. Several people are hitting this, so add a workaround.
2009-12-04 11:01:29 +00:00
Nicholas Marriott
e755475475
Wrap at 80 columns.
2009-12-03 22:54:34 +00:00
Nicholas Marriott
15a64b805e
Massive spaces->tabs and trailing whitespace cleanup, hopefully for the last
...
time now I've configured emacs to make them displayed in really annoying
colours...
2009-12-03 22:50:09 +00:00
Nicholas Marriott
6c9862662f
Eliminate duplicate code and ease the passage for server-wide options by adding
...
a -w flag to set-option and show-options and making setw and showw aliases to
set -w and show -w.
Note: setw and showw are still there, but now aliases for set -w and show -w.
2009-12-03 17:44:02 +00:00
Nicholas Marriott
6bbc92a6f5
Reflect the keypad mode of the application so that numlock works.
2009-12-02 22:13:15 +00:00
Nicholas Marriott
459e9de81a
Close the pane if the process died due to a signal, not just if it exited
...
normally.
2009-12-02 15:06:14 +00:00
Nicholas Marriott
0926a23014
New command, capture-pane, which copies the entire pane contents to a paste
...
buffer. From Jonathan Alvarado.
2009-12-01 18:42:38 +00:00
Nicholas Marriott
f27fefd7b8
Look for mice and xterm keys before standard function keys as they are less
...
likely to be partial versions.
2009-12-01 07:59:40 +00:00
Nicholas Marriott
29a5931c6a
Handle partial xterm function key sequences.
2009-11-30 16:44:03 +00:00
Nicholas Marriott
2182e1badc
Add a couple of comments.
2009-11-27 09:41:03 +00:00
Nicholas Marriott
106ee8f30a
This doesn't need to be u_int.
2009-11-26 23:13:47 +00:00
Nicholas Marriott
1acf066fb9
Make types clearer and lint happier.
2009-11-26 22:56:59 +00:00
Nicholas Marriott
e7f4319ac6
Fix type - attributes should be u_char not int.
2009-11-26 22:47:14 +00:00
Nicholas Marriott
c2eb869f72
Change paranoia check to check for <= 0 and to avoid warning.
2009-11-26 22:32:00 +00:00
Nicholas Marriott
8cb410c63c
Tidy up various bits of the paste code, make the data buffer char * and add
...
comments.
2009-11-26 22:28:24 +00:00
Nicholas Marriott
ba5404d93e
Continue rather than returning if not a mouse key, to avoid hanging on any
...
function key...
2009-11-26 22:26:51 +00:00
Nicholas Marriott
4ca857e0e9
Remove a couple of unused arguments where possible, and add /* ARGSUSED */ to
...
the rest to reduce lint output.
2009-11-26 21:37:13 +00:00
Nicholas Marriott
621dabd44e
Rename a variable to something more helpful.
2009-11-26 21:22:31 +00:00
Nicholas Marriott
3e147967e2
Get a u_char from the string, otherwise it isn't possible to enter \0377 as it
...
is mistaken for EOF (doh).
Also drop an unused argument.
2009-11-26 21:14:30 +00:00
Nicholas Marriott
9c0147915e
Handle the possibility of partial mouse reads, and fix a comment while here.
2009-11-26 15:14:03 +00:00
Nicholas Marriott
d31d4c05cf
Emulate il1, dl1, ich1 to run (albeit slowly) with vt100 feature set.
2009-11-26 14:46:08 +00:00
Nicholas Marriott
094bca5ac3
Output the right keys for application and number keypad modes (they were the
...
wrong way round).
2009-11-25 12:24:31 +00:00
Nicholas Marriott
87821fce0e
Add a -p flag to display-message to print the output rather than displaying in
...
the status line, this allows things like "display -p '#W'" to find the current
window index.
2009-11-24 19:16:11 +00:00
Nicholas Marriott
fce47e2e63
Add cursor keys to the key names list.
2009-11-22 22:52:39 +00:00
Nicholas Marriott
9b9d26f80e
Use home from struct passwd if HOME is empty as well as if it is NULL, and fix
...
a style nit. Both from Tiago Cunha.
2009-11-21 17:52:18 +00:00
Nicholas Marriott
58688c48aa
When -h and -p are given to split-window, calculate the percentage size using
...
the width instead of the height.
2009-11-20 19:12:39 +00:00
Nicholas Marriott
5d56225d95
Display UTF-8 properly in status line messages and prompt. Cursor handling is
...
still way off though.
2009-11-20 07:01:12 +00:00
Nicholas Marriott
070e3b4178
Remove oldest messages from log when limit is hit, not newest.
2009-11-20 06:33:26 +00:00
Nicholas Marriott
2cea9433c2
Get some brackets in the right place so ## works. Also fix a space in a
...
comment.
2009-11-19 21:30:53 +00:00
Nicholas Marriott
33b337f618
Change status line drawing to create the window list in a separate screen and
...
then copy it into the status line screen. This allows UTF-8 in window names and
fixes some problems with #[] in window-status-format.
2009-11-19 19:47:28 +00:00
Nicholas Marriott
543fb99bc6
Two new options, window-status-format and window-status-current-format, which
...
allow the format of each window in the status line window list to be controlled
using similar # sequences as status-left/right.
This diff also moves part of the way towards UTF-8 support in window names but
it isn't quite there yet.
2009-11-19 16:22:10 +00:00
Jason McIntyre
8b8a211185
tweak previous;
2009-11-19 15:00:32 +00:00
Nicholas Marriott
4a38189349
Revert to xterm-keys off by default. It was on as an experiment to see if the
...
option could be removed, but it affects vi, so we have to keep the option, and
a conservative default is better.
2009-11-19 14:06:33 +00:00
Nicholas Marriott
ed781e84ee
Tidy up by breaking the # replacement code into a separate function, also add a
...
few comments.
2009-11-19 11:38:54 +00:00
Nicholas Marriott
ac5b7d518e
Don't interpret #() for display-message, it usually doesn't make sense and may
...
leak commands.
2009-11-19 10:22:06 +00:00
Nicholas Marriott
8d4eae5662
Missed an unused variable :-/.
2009-11-18 17:03:16 +00:00
Nicholas Marriott
a78cc98c8b
Cleanup by moving various (mostly horrible) little bits handling UTF-8 grid
...
data into functions in a new file, grid-utf8.c, and use sizeof intead of
UTF8_DATA.
Also nuke trailing whitespace from tmux.1, reminded by jmc.
2009-11-18 17:02:17 +00:00
Nicholas Marriott
8db145da1e
Add a per-client log of status line messages displayed while that client
...
exists. A new message-limit session option sets the maximum number of entries
and a command, show-messages, shows the log (bound to ~ by default).
This (and prompt history) might be better as a single global log but until
there are global options it is easier for them to be per client.
2009-11-18 13:16:33 +00:00
Nicholas Marriott
68f5c9c72d
Mark -n keys with (no prefix) rather than [].
2009-11-18 10:18:25 +00:00
Nicholas Marriott
a9ca8df8e3
Permit top-bit-set characters to be entered in the status line. They could
...
already be set from the shell and are just passed through when printing (so
invisible characters or displaying on terminals with different character sets
may cause problems).
Note that entering UTF-8 may not work and in any case currently the status line
cannot display it correctly (outside of status-left/status-right).
2009-11-17 13:30:07 +00:00
Nicholas Marriott
67bf0933e2
In choose mode, assign each item a number or lowercase letter from those
...
available and accept that as a shortcut key for the item.
2009-11-17 13:06:11 +00:00
Nicholas Marriott
5d7bff4051
A screen can be one cell wide; don't crash if that is the case.
2009-11-16 13:40:45 +00:00
Nicholas Marriott
9f6d685c05
I made a complete horlicks of the last change, fix it so it doesn't either lead
...
to a double free or free the item after the end of the array.
2009-11-16 11:15:44 +00:00
Nicholas Marriott
10e05f9867
Tweak a comment and add some spacing.
2009-11-13 19:58:32 +00:00
Nicholas Marriott
76ef8770cd
Get rid of the ugly CMD_CHFLAG macro and use a const string (eg "dDU") in the
...
command entry structs and a couple of functions to check/set the flags.
2009-11-13 19:53:28 +00:00
Nicholas Marriott
dafa0f022c
Unreachable statement, found by lint.
2009-11-13 18:59:14 +00:00
Nicholas Marriott
390472566c
Tidy up and fix some types, prompted by lint via deraadt.
2009-11-13 18:13:18 +00:00
Nicholas Marriott
a18a374d51
imsg_read returns ssize_t not int, pointed out by lint via deraadt.
2009-11-13 18:07:52 +00:00
Nicholas Marriott
8e47966225
Destroy panes immediately rather than checking them all every loop.
2009-11-13 17:33:07 +00:00
Nicholas Marriott
1415eb3dd2
Use winlink_remove() to remove old winlinks when synchronizing grouped sessions
...
rather than doing it manually and not adjusted the reference count. Fixes
crash seen by Dan Harnett.
2009-11-13 14:47:31 +00:00
Nicholas Marriott
5d397462e4
Zap unused functions, prompted by deraadt.
2009-11-13 07:00:54 +00:00
Nicholas Marriott
5ae542e7ee
Emulate the ri (reverse index) capability: this allows tmux to at least start
...
on Sun consoles (TERM=sun or sun-color), even if there appear to still be
problems on some boxes (my Blade 100 is fine but edd's Blade 1000 shows odd
screen corruption).
2009-11-12 08:05:23 +00:00
Nicholas Marriott
d9deb4b530
Support rxvt-style keys again, but this time: support all the variations, put
...
them in as raw escape sequences rather than fiddling with the values from
terminfo, put them /after/ the terminfo values so the latter take precedence.
2009-11-12 08:01:02 +00:00
Nicholas Marriott
89763f2ace
Rewrite a confusing loop when freeing the arg array on exit and move the check
...
for argv being NULL, prompted by parfait via deraadt.
Also fix some definite brokenness when assigning multiple environment variables
in arguments (such as "X=1 Y=2").
2009-11-11 18:56:07 +00:00
Nicholas Marriott
9df4e7597d
Add an explicit zero-length check for UTF-8 input data, prompted by a report
...
from parfait via deraadt.
While here, add a statement to set the width when filling with _s if not enough
space (width should never be high enough at the moment anyway), and wrap some
long lines.
2009-11-11 18:53:21 +00:00
Nicholas Marriott
08a8ccf46b
Free the pane bufferevent when the fd is closed (the signal could come before
...
the error callback).
2009-11-11 13:24:42 +00:00
Nicholas Marriott
2756437f4b
Only need to chmod +x or -x the socket when a client is created, lost or
...
attached, rather than every event loop.
2009-11-11 08:00:42 +00:00
Nicholas Marriott
15b9946a40
There is no real standard for modifier plus function keys. Previously, tmux
...
output some from rxvt but in other ways did the same as xterm or other
terminals, but this is a bit inconsistent.
xterm's method is fairly sensible and we already support it (xterm-keys), so
enable it by default instead.
2009-11-10 18:53:11 +00:00
Nicholas Marriott
d9961f40bf
Don't output rxvtisms either.
2009-11-10 18:48:03 +00:00
Nicholas Marriott
05831b52c4
Twiddling the last bit is an rxvtism, so do not support it in the table by
...
default.
2009-11-10 17:59:34 +00:00
Nicholas Marriott
b92fcf23fd
Whoops, this is needed for last commit as well.
2009-11-10 17:41:35 +00:00
Nicholas Marriott
38f64b3da3
Lookup key as a named key (eg 'Space') before checking for single character
...
keys, makes C-Space/M-Space etc resolve to the correct key code.
2009-11-10 17:24:43 +00:00
Nicholas Marriott
9f47c6083a
Don't return 1 unless there was actually a problem (signal/lost server) rather
...
than for all events (normal exit/detach/etc).
2009-11-10 15:47:48 +00:00
Nicholas Marriott
6609093625
Just ignore tty fd errors rather than dying, stops the server dying if the
...
session is disconnected abrubtly (eg ssh ~.).
2009-11-09 22:50:29 +00:00
Nicholas Marriott
591fa23f6e
The input key should be a u_char. Fixes top-bit-set input problem reported by
...
ajacoutot@.
2009-11-09 14:40:06 +00:00
Nicholas Marriott
daf150c38d
Constify buf.
2009-11-09 11:45:10 +00:00
Nicholas Marriott
f98d13e7dc
Don't try enable/disable the event if the window pane is dead (fd == -1), as
...
the event will have been freed.
2009-11-06 10:42:06 +00:00
Nicholas Marriott
bed8153ba0
Clear to the end of the screen from the right starting point when drawing
...
line-by-line (in panes or if ed not supported). Fixes problem spotted by Frank
Terbeck.
2009-11-05 22:35:28 +00:00
Nicholas Marriott
297ebb1160
Old xterm F1-F4 are \033O_P not \033[O_P.
2009-11-05 19:35:16 +00:00
Nicholas Marriott
ff55eb5bfa
Unused variable. Aargh.
2009-11-05 19:32:34 +00:00
Nicholas Marriott
80e0158112
Switch the tty key tree over to an (unbalanced) ternary tree which allows
...
partial matches to be done (they wait for further data or a timer to expire,
like a naked escape).
Mouse and xterm-style keys still expect to be atomic.
2009-11-05 19:29:41 +00:00
Nicholas Marriott
05855393f0
key_string_lookup_key uses a static buffer, so copy its output into the working
...
buffer before calling the command print function which can also use it (eg
send-keys).
2009-11-05 12:04:50 +00:00
Nicholas Marriott
a790e16fa2
Key flags are only used for initialisation so they are not needed in the main
...
tty_key struct.
2009-11-05 10:44:36 +00:00
Nicholas Marriott
25c604fb1c
EVLOOP_ONCE takes care of the wakeup, so no need to call event_loopexit(NULL).
2009-11-05 08:50:32 +00:00
Nicholas Marriott
38e13942ac
Now all timers are events, there is no longer any need to wake up every 50 ms -
...
only wake up when an event happens.
2009-11-05 08:48:15 +00:00
Nicholas Marriott
b58bf49e91
Switch tty key input over to happen on a read event. This is a bit more
...
complicated because of escape input, but in that case instead of processing a
key immediately, schedule a timer and reprocess the bufer when it expires.
This currently assumes that keys will be atomic (ie that if eg F1 is pressed
the entire sequence is present in the buffer). This is usually but not always
true, a change in the tree format so it can differentiate potential (partial)
key sequences will happens soon and will allow this to be fixed.
2009-11-05 08:45:08 +00:00
Nicholas Marriott
80444436f3
Convert the key repeat timer to an event.
2009-11-05 00:05:00 +00:00
Nicholas Marriott
44d6a2c435
Change window name change to use a timer event rather than a gettimeofday()
...
check every loop.
2009-11-04 23:54:57 +00:00
Nicholas Marriott
946ed97273
Move status timer check into the global once-per-second timer, this could maybe
...
be done better but one every second is better than once every 50 ms.
2009-11-04 23:42:51 +00:00
Nicholas Marriott
b1264a7416
Use timeout events for the identify and message timers.
2009-11-04 23:29:42 +00:00
Nicholas Marriott
b3c4956efe
Don't reenlist the client imsg event every loop, instead have a small function
...
to it and call it after the event triggers or after a imsg is added.
2009-11-04 23:12:43 +00:00
Nicholas Marriott
6a6a42aa3a
It would help if I read my own comments... make alt keys work again by sending
...
alt AND the key not alt instead of it.
2009-11-04 23:00:22 +00:00
Nicholas Marriott
862fe15c32
Move some common code into a function.
2009-11-04 22:57:49 +00:00
Nicholas Marriott
fde36fccc3
Tell the client to exit on configuration file error.
2009-11-04 22:47:34 +00:00
Nicholas Marriott
5bebbd81d7
Bye-bye buffer*.c.
2009-11-04 22:44:53 +00:00
Nicholas Marriott
a02c7e804c
Convert the window pane (pty master side) fd over to use a bufferevent.
...
The evbuffer API is very similar to the existing tmux buffer API so this was
remarkably painless. Not many possible ways to do it, I suppose.
2009-11-04 22:43:11 +00:00
Nicholas Marriott
06ffed3216
Call event_init() before loading the config file, since potentially it could
...
set up events.
2009-11-04 22:40:36 +00:00
Nicholas Marriott
91ad830c88
Switch window pane pipe redirect fd over to a bufferevent.
2009-11-04 22:02:38 +00:00
Nicholas Marriott
7342615c7d
Switch tty fds over to a bufferevent.
2009-11-04 21:47:42 +00:00
Nicholas Marriott
abb728684b
Add back JOB_PERSIST checks that got lost.
2009-11-04 21:10:49 +00:00
Nicholas Marriott
4d6091379b
Switch jobs over to use a bufferevent.
2009-11-04 21:04:43 +00:00
Nicholas Marriott
ea8c8c5f33
A couple of minor cosmetic changes.
2009-11-04 20:59:22 +00:00
Nicholas Marriott
abf3a5d50e
Initial changes to move tmux to libevent.
...
This moves the client-side loops are pretty much fully over to event-based only
(tmux.c and client.c) but server-side (server.c and friends) treats libevent as
a sort of clever poll, waking up after every event to run various things.
Moving the server stuff over to bufferevents and timers and so on will come
later.
2009-11-04 20:50:11 +00:00
Nicholas Marriott
f575e39b0a
Unused (but assigned to) variable, found by lint.
2009-11-04 20:35:19 +00:00
Nicholas Marriott
10f58cb1bc
Ignore the colour on space, /not/ the attributes.
2009-11-04 15:59:27 +00:00
Nicholas Marriott
a94535f318
Fix the reverse emulation when a terminal doesn't have setab to use the correct
...
fg/bg (adjusted if spaces) and happen before attribute setting.
2009-11-04 13:34:26 +00:00
Nicholas Marriott
d2dfbef05a
Change declaration and use of malloc_options to be more standard, from Tim van
...
der Molen.
2009-11-04 12:41:43 +00:00
Nicholas Marriott
d8332e6373
Don't backoff based on suspended or deda clients as they are always likely to
...
have data backed up.
2009-11-04 08:35:11 +00:00
Nicholas Marriott
0785f2872f
Add an activity time for clients, like for sessions, and change session and
...
client lookup to pick the most recently used rather than the most recently
created - this is much more useful when used interactively and (because the
activity time is set at creation) should have no effect on source-file.
Based on a problem reported by Jan Johansson.
2009-11-03 22:40:40 +00:00
Nicholas Marriott
5761ab6b55
If it isn't available explicitly, work out the current client in a similar way
...
to the current session - build a list of the possibilities then pick the
newest.
2009-11-03 20:59:22 +00:00
Nicholas Marriott
5289da29ba
Change session and client activity and creation time members to have more
...
meaningful names.
Also, remove the code to try and update the session activity time for the
command client when a command message is received as is pointless because it
des not have a session.
2009-11-03 20:29:47 +00:00
Nicholas Marriott
c95f1d1ff9
tv member of struct paste_buffer is updated but not otherwise used, so remove
...
it.
2009-11-03 17:17:24 +00:00
Nicholas Marriott
01943062b4
Fix vi page up mode key (from naddy), add missing half page keys, and sort.
2009-11-03 06:55:49 +00:00
Nicholas Marriott
86182f33c3
Double the escape timer (the time after a \033 is received before tmux gives up
...
waiting to see if it is part of a key sequence and passes it through) to 500
ms, the previous setting was too fast. Suggested by naddy.
2009-11-02 20:18:22 +00:00
Nicholas Marriott
1c853c6860
When matching the session names with -t, look for exact matches first before
...
trying partial matches.
Avoids problems where two ambiguous matches are present before an exact match
(eg foo1, foo2, foo would give an error on trying -tfoo), reported by Natacha
Port? natbsd at instinctive dot eu.
2009-11-02 16:24:29 +00:00
Nicholas Marriott
2a585dc4ed
Leftover unused variable :-/.
2009-11-02 13:42:25 +00:00
Nicholas Marriott
42fd44f1db
There isn't much point in doing lstat before connect so instead just do connect
...
and handle ENOENT from it which is a little tidier.
2009-11-02 13:41:25 +00:00
Nicholas Marriott
992dd86309
Reorder slightly to tidy code.
2009-11-02 12:48:44 +00:00
Nicholas Marriott
2f813ef75d
Add a flag for jobs that shouldn't be freed after they've died and use it for
...
status jobs, then only kill those jobs when status-left, status-right or
set-titles-string is changed.
Fixes problems with changing options from inside #().
2009-11-01 23:20:37 +00:00
Nicholas Marriott
32299e4010
Missing setenv/showenv aliases.
2009-11-01 19:17:08 +00:00
Nicholas Marriott
e8b25188ad
Missing ;. From eric@ ages ago.
2009-10-29 08:59:17 +00:00
Nicholas Marriott
dc3fdc8dc7
If any client currently displaying a window pane has more than 1 KB of output
...
buffered, don't accept any further data from the process running in the pane.
This makes tmux much more responsive when flooded with output, although other
buffers can still have an impact when running remotely.
Prompted by a query from Ranganathan Sankaralingam.
2009-10-28 22:53:14 +00:00
Nicholas Marriott
1eaefbf169
Add a minor optimisatin: if the character being printed is space, don't worry
...
about setting the background colour or attributes (except reverse).
2009-10-28 08:52:36 +00:00
Nicholas Marriott
5730cbf3e3
Twaek this slightly to avoid confusing use of flags variable.
2009-10-28 08:33:20 +00:00
Nicholas Marriott
eb5f4460d1
Setting SGR0 when setting the fg and bg has problems if only one of the two is
...
meant to be default, so rewrite the code to move this outside, move setting
colours before attributes and generally clean up.
Tested by sthen@, fixes problems he was seeing with mutt and should fix some
existing problems with (rarely) lost attributes.
2009-10-28 08:27:33 +00:00
Nicholas Marriott
37ffdff5ba
Move the poll registration functions into the server-*.c files.
2009-10-27 13:03:33 +00:00
Theo Deraadt
ed62d1263c
tabs are better; ok nicm
2009-10-26 21:42:04 +00:00
Nicholas Marriott
a8b1379ccb
Clear signal flags /before/ taking action and continue afterwards to reduce
...
chance of dropping signals. Pointed out by deraadt@.
2009-10-26 21:38:18 +00:00
Nicholas Marriott
6b804f3a4a
Call fstat() after fopen() rather than stat() before.
2009-10-26 21:25:57 +00:00
Nicholas Marriott
539c73bdb1
Reset the umask right after fopen to avoid leaving it changed on error, noticed
...
by deraadt@.
2009-10-26 21:13:06 +00:00
Nicholas Marriott
6dc6333323
Use strlcpy instead of strncpy, pointed out by deraadt.
2009-10-26 21:10:24 +00:00
Nicholas Marriott
353f2a2ad4
Don't do anything in the client callback if the client has already died to
...
avoid a use-after-free (the callback is used twice, once for the client itself
and once for the tty). Fixes crashes seen by Han Boetes.
2009-10-26 20:47:00 +00:00
Nicholas Marriott
53957dcbaa
Nuke accidentally-committed debugging statement.
2009-10-26 18:16:32 +00:00
Nicholas Marriott
e831649b64
Not all terminals swap CSI and SS3 on ctrl, so remove that.
...
Also mark the rxvt special-cases as such until terminfo is updated to have
kLFT5, kRIT5 etc.
2009-10-26 17:59:46 +00:00
Nicholas Marriott
fd2ef18a70
Rewrite xterm-keys code (both input and output) so that works (doesn't always
...
output the same modifiers, accepts all the possible input keys) and is more
understandable.
2009-10-26 17:46:33 +00:00
Nicholas Marriott
c92c2bfb10
Support the (mostly new) function key+modifier caps (kIC-kIC7). Most of these
...
will be caught (soon) by the xterm keys code in xterm itself but some other
descriptions such as rxvt define them as well.
2009-10-26 16:00:51 +00:00
Nicholas Marriott
bbca6fe5b0
On second thoughts, drop the rxvt output entirely.
2009-10-26 14:30:57 +00:00
Nicholas Marriott
5cce40d4c3
Set the output code for ctrl+cursor keys correctly, and disable (comment)
...
rxvt-style output.
2009-10-26 14:27:13 +00:00
Nicholas Marriott
d0aa883e07
As we always put the cursor keys into application mode, assume keys sent
...
with CSI have ctrl.
Also add a couple of comments.
2009-10-26 13:58:02 +00:00
Nicholas Marriott
fcd3b260ac
Tidy up table.
2009-10-26 13:41:46 +00:00
Nicholas Marriott
a0ec4a11ee
Drop INPUTKEY_CTRL and just handle it as part of the table.
2009-10-26 13:34:26 +00:00
Nicholas Marriott
25d2000625
Add or fix some comments.
2009-10-26 13:29:24 +00:00
Nicholas Marriott
b3604dcf83
Tidy up table.
2009-10-26 13:22:30 +00:00
Nicholas Marriott
db4452d307
Rename keypad keys to something more useful.
2009-10-26 13:13:33 +00:00
Nicholas Marriott
10a656eedb
Remove the xterm-keys code which is broken (a replacement is coming but some
...
more cleanup is needed first).
2009-10-26 13:02:53 +00:00
Nicholas Marriott
3c9619bb0a
Don't try to continue processing a client if the session has been destroyed.
2009-10-25 22:00:15 +00:00
Nicholas Marriott
48b6d18e7f
Remove -d from tmux.1 as well.
2009-10-25 21:12:15 +00:00
Nicholas Marriott
3a7636ff0f
Remove the -d flag to tmux and just use op/AX to detect default colours.
...
Irritatingly, although op can be used to tell if a terminal supports default
colours, it can't be used to set them because in some terminfo descriptions it
resets attributes as a side-effect (acts as sgr0) and in others it doesn't, so
it is not possible to determine reliably what the terminal state will be
afterwards. So if AX is missing and op is present, tmux just sends sgr0.
Anyone using -d for a terminal who finds they actually needed it can replace it
using terminal-overrides, but please let me know as it is probably an omission
from terminfo.
2009-10-25 21:11:21 +00:00
Nicholas Marriott
5bed597e61
+time.h.
2009-10-25 17:51:07 +00:00
Nicholas Marriott
7b4f0398c3
[ is a punctuation character and should be escaped with Ql. Although the
...
current groff version we have seems to handle it fine, other versions are not
so tolerant.
2009-10-25 01:10:57 +00:00
Nicholas Marriott
385236e967
Bring a comment into line with reality.
2009-10-24 21:18:33 +00:00
Nicholas Marriott
df818c1b69
-a option to kill all except current pane. From Tiago Cunha, thanks!
2009-10-24 10:12:39 +00:00
Nicholas Marriott
c2b8f3b55a
Support the bright fg/bg colour SGR 90-97 and 100-107.
...
Reported by Tim Allen.
2009-10-23 15:48:39 +00:00
Nicholas Marriott
1f22a199fb
Redraw checks have to after handling input or pane redraw flags set by key
...
presses will not be acted on.
2009-10-22 21:01:52 +00:00
Nicholas Marriott
9c40a4edc5
The client buffers have to be checked after every event in order to catch the
...
escape timers and properly reset the cursor.
2009-10-22 20:04:21 +00:00
Nicholas Marriott
eddcc3dfa9
Split the server code handling clients, jobs and windows off into separate
...
files from server.c (merging server-msg.c into the client file) and rather than
iterating over each set after poll(), allow a callback to be specified when the
fd is added and just walk once over the returned pollfds calling each callback
where needed.
More to come, getting this in so it is tested.
2009-10-22 19:41:51 +00:00
Nicholas Marriott
fd35b6f836
Only redraw the pane when changing mode, not the entire window.
2009-10-22 12:30:00 +00:00
Nicholas Marriott
eb0c33cba4
Merge prepare_cmd into main as it is short and only called once.
2009-10-22 10:04:07 +00:00
Nicholas Marriott
284b94662a
Tidy identify message send into a separate function.
2009-10-21 21:11:55 +00:00
Nicholas Marriott
d69b364b5f
Don't try to unsuspend a client if it isn't suspended.
2009-10-21 20:16:40 +00:00
Nicholas Marriott
90ad041fa5
Client tidying: get rid of client_ctx struct in favour of two variables in
...
client.c, and move the functions in client-fn.c into other files.
2009-10-21 20:11:47 +00:00
Nicholas Marriott
59e667906f
Unused variable.
2009-10-21 19:27:09 +00:00
Nicholas Marriott
a22c06a2d6
Remove unused function.
2009-10-21 18:20:16 +00:00
Nicholas Marriott
9a4855295b
Nuke dead store.
2009-10-21 18:12:31 +00:00
Nicholas Marriott
dd46f634fe
Now we are correctly not redrawing the whole pane on linefeed, redo the
...
last-cursor-position code to move to the right position when panes reach EOL.
2009-10-21 16:52:30 +00:00
Nicholas Marriott
af2b0f452c
Tweak descriptions for up/down pane to be clearer.
2009-10-21 13:48:27 +00:00
Nicholas Marriott
9b5da97e6f
Don't redraw the scroll region on linefeed/reverse index unless it is necessary
...
(the cursor is at the bottom/top). Should fix slow cursor movement when using
vi in a pane spotted by pirofti@.
2009-10-21 13:42:44 +00:00
Nicholas Marriott
683ddbc466
Some terminals don't correctly clear their let's-wrap flag after changing the
...
scroll region (which moves the cursor to 0,0). This means that if the cursor
was at the edge of the screen, any further output after scroll region change
incorrectly causes a line wrap. Add a workaround to move the cursor to position
0 if it is at the screen edge before changing scroll region.
2009-10-21 09:36:53 +00:00
Nicholas Marriott
7825871d6a
Getting the read and write ends of the pipe the right way round is usually
...
recommended. DOH.
2009-10-21 07:24:23 +00:00
Nicholas Marriott
9afb0d739e
%zu not %u, doh.
2009-10-20 22:17:33 +00:00
Nicholas Marriott
6f2169037e
Sort out stdout before stdin/stderr in case the stdout side of the pipe got one
...
of their fds.
2009-10-20 22:15:32 +00:00
Nicholas Marriott
480f5d3184
Correctly nuke the EOL $ marker when scrolling, reported by martynas@, thanks.
2009-10-20 21:35:25 +00:00
Nicholas Marriott
1af09d6330
Try to reduce the UTF-8 mess.
...
Get rid of passing around u_char[4]s and define a struct utf8_data which has
character data, size (sequence length) and width. Move UTF-8 character
collection into two functions utf8_open/utf8_append in utf8.c which fill in
this struct and use these functions from input.c and the various functions in
screen-write.c.
Space for rather more data than is necessary for one UTF-8 sequence is in the
utf8_data struct because screen_write_copy is still nasty and needs to reinject
the character (after combining) into screen_write_cell.
2009-10-20 19:18:28 +00:00
Nicholas Marriott
62f234ce3b
UTF-8 combined character fixes.
...
Thai can have treble combinations (1 x width=1 then 2 x width=0) so bump the
UTF-8 cell data size to 9 and alter the code to allow this.
Also break off the combining code into a separate function, handle any further
combining beyond the buffer size by replacing the character with _s, and when
redrawing the UTF-8 character don't assume the first part has just been
printed, redraw the entire line.
2009-10-20 17:33:33 +00:00
Nicholas Marriott
387f4d42cc
Move the check for whether to force a line wrapper lower down into the tty code
...
where it has access to the tty width, which is what should have been checked.
2009-10-20 16:32:23 +00:00
Nicholas Marriott
d1e6388fed
Nuke stray blank line.
2009-10-20 14:22:57 +00:00
Nicholas Marriott
2afe395ff2
Stop updating the screen when not in output mode, stops copy mode getting
...
confused.
2009-10-19 13:18:13 +00:00
Nicholas Marriott
daa26079ee
Always move the cursor position on !xenl terminals, since there is no invisible
...
last cursor position.
Also nuke an unused variable.
2009-10-17 08:35:38 +00:00
Nicholas Marriott
fe26b5d25f
Don't print wide characters at screen width - 1. Matches uterm behaviour and
...
is probably a better idea anyway.
2009-10-17 08:32:18 +00:00
Nicholas Marriott
43d62c1ae3
Instead of having a complicated check to see if the cursor is in the last
...
position to avoid an explicit wrap, actually move it there.
Some UTF-8 fixes to come.
2009-10-17 08:24:46 +00:00
Nicholas Marriott
70355021d8
When checking whether the region will scroll and the cursor position is thus
...
unsuitable for using CUD/CUU, check the current cursor position not the target
position.
2009-10-16 19:09:40 +00:00
Nicholas Marriott
dba0d54cf5
The pane pty name isn't useful for anything so show the pane number instead.
2009-10-15 07:05:38 +00:00
Nicholas Marriott
1a3c334c75
cmd_find_client shouldn't die when there is an empty slot in the clients
...
array. DOH.
2009-10-14 20:52:28 +00:00
Nicholas Marriott
adad557499
Don't allow cmd_lookup_client to test clients without a session.
2009-10-14 09:29:10 +00:00
Nicholas Marriott
ad566a86de
Move lines into the history when scrolling even if the scroll region is not
...
the entire screen.
Allows ircII users to see history, prompted by naddy.
2009-10-13 15:38:37 +00:00
Nicholas Marriott
71dc6e04e8
Handle DECCOLM by just emulating its side-effect of clearing the screen.
2009-10-13 15:23:13 +00:00
Nicholas Marriott
38df960e68
Add mode keys to move the cursor to the top, middle and bottom of the screen.
...
H/M/L in vi mode and M-R/M-r in emacs (bottom of screen not bound in emacs).
2009-10-13 13:45:56 +00:00
Nicholas Marriott
0907ca1931
Do this in a better way - print messages when exiting with nonzero.
...
Also remove the login shell information from server-info, only the client
should care about it.
2009-10-13 13:15:26 +00:00
Nicholas Marriott
760e39e405
Don't print exit messages when used as a login shell, requested by martynas@ a
...
while back.
2009-10-13 13:11:06 +00:00
Nicholas Marriott
5d78371628
Don't try to use \n across scroll region when doing \r\n either.
2009-10-13 08:37:15 +00:00
Nicholas Marriott
9294cb099f
When a session is unattached, reset its activity timer to prevent it locking
...
instantly when reattached.
2009-10-13 06:14:08 +00:00
Nicholas Marriott
4dcb5040a0
Instead of using something sort of similar for both newline checks, use
...
something the same. Doesn't fix the bug I'm looking for though :-/.
2009-10-13 00:44:16 +00:00
Nicholas Marriott
d7626cd9d7
When drawing lines that have wrapped naturally, don't force a newline but
...
permit them to wrap naturally again. This allows terminals that use this to
guess where lines start and end for eg mouse selecting (like xterm) to work
correctly.
This was another long-standing issue raised by several people over the last
while.
Thanks to martynas@ for much testing. This was not trivial to get right so
bringing it in for wider testing and adn to fix any further glitches in-tree.
2009-10-12 17:19:47 +00:00
Nicholas Marriott
8608c6970d
When backspace is received at the beginning of a line and the previous line was
...
wrapped, move the cursor back up to the end of the previous line.
Another one of the forgotten persons requested this quite a while ago (I need
to start noting names on todo items...) when it was quite hard to
implement. Now it is easy and I don't see it can do any harm, so hey presto...
2009-10-12 16:59:55 +00:00
Nicholas Marriott
693b3d03e6
Don't run through the column unchanged case if the row was unchanged but there
...
were no suitable optimisations, instead make it an else to fall through to
absolute addressing.
2009-10-12 16:41:02 +00:00
Nicholas Marriott
eb9826f65d
If the vertical cursor movement crosses the scroll region, CUU and CUD
...
shouldn't be used even if VPA isn't present - in that case CUP should be used.
2009-10-12 16:37:43 +00:00
Nicholas Marriott
56157444de
Wrap a couple of long lines.
2009-10-12 16:33:39 +00:00
Nicholas Marriott
0aab5811ca
Use absolute movement if right at the end of the line as it isn't a reliable
...
place to move from relatively.
2009-10-12 14:54:19 +00:00
Nicholas Marriott
687c4a9fab
Use relative cursor movement instead of absolute when possible and when
...
supported by the terminal to reduce the size of the output data (generally
about 10-20%).
2009-10-12 13:01:18 +00:00
Nicholas Marriott
33ae063cae
Permit attributes to be turned off in #[] by prefixing with "no", for example
...
"noblink".
2009-10-12 11:08:02 +00:00
Nicholas Marriott
762459954f
Similarly add a tty_cursor_pane function to tidy up most of the calls.
2009-10-12 09:29:58 +00:00
Nicholas Marriott
972a6f5656
_absolute is redundant, just use tty_region.
2009-10-12 09:16:59 +00:00
Nicholas Marriott
f05b32f7ad
Cleanup: use two functions for region setting, one for absolute and one inside
...
pane.
2009-10-12 09:09:35 +00:00
Nicholas Marriott
0a2a354499
Like linefeed, don't set the scroll region for reverse index unless it will be
...
needed.
While here, also tidy up a couple of long lines and remove an extraneous blank.
2009-10-11 22:35:10 +00:00
Jason McIntyre
b4ef3e5071
punctuation fix;
2009-10-11 14:12:10 +00:00
Nicholas Marriott
fbb030d7f7
Set the current window pointer to NULL when killing a winlink that is to be
...
replaced with link-window -k. This prevents it being pushed onto the last
window stack and causing a use-after-free.
Only took me an hour to find this :-/...
2009-10-11 10:39:27 +00:00
Nicholas Marriott
64b5f39656
Add a pipe-pane command to allow a pane to be piped to a shell command, for
...
example:
pipe-pane 'cat >~/out'
No arguments stops outputing and closes the pipe; the -o flag toggles a pipe
and on and off (useful for key bindings).
Suggested by espie@.
2009-10-11 10:04:27 +00:00
Nicholas Marriott
325e20d76d
Convert if-shell over to the background job framework as well.
2009-10-11 09:10:57 +00:00
Nicholas Marriott
88f3ffe86e
Remove a debugging leftover and add copyright.
2009-10-11 09:04:33 +00:00
Nicholas Marriott
cebc988dd4
Switch run-shell over to queue the command in the background like #().
2009-10-11 08:58:05 +00:00
Nicholas Marriott
abedfa77da
There isn't much point in having a free function if it isn't used.
...
Also allow a NULL tree.
2009-10-11 07:30:07 +00:00
Nicholas Marriott
ff4b4e667a
Collect status from dead jobs and don't invoke the callback until both
...
all input (the socket is closed) and status is available.
2009-10-11 07:20:16 +00:00
Nicholas Marriott
4bc0f6e7e9
Clean up by introducing a wrapper struct for mouse clicks rather than passing
...
three u_chars around.
As a side-effect this fixes incorrectly rejecting high cursor positions
(because it was comparing them as signed char), reported by Tom Doherty.
2009-10-11 07:01:10 +00:00
Nicholas Marriott
f68ade7b1d
Braek some bits out of server_fill_client() that aren't really related to
...
polling into their own function.
2009-10-11 00:53:14 +00:00
Nicholas Marriott
095ecf2d90
Put all jobs on a global all_jobs list and use that in server.c instead of
...
running through all the clients.
2009-10-10 18:42:14 +00:00
Nicholas Marriott
b7c364a853
-scroll mode which is dead.
2009-10-10 17:39:55 +00:00
Nicholas Marriott
5aa49e695e
Split list-panes off from list-windows.
2009-10-10 17:19:38 +00:00
Nicholas Marriott
2988c594cc
Accept key and mouse input for keys in zombified windows if they are in a mode..
2009-10-10 15:29:34 +00:00
Nicholas Marriott
9ed62eeb91
When a window is zombified and automatic-rename is on, append [dead] to the
...
name.
2009-10-10 15:23:13 +00:00
Nicholas Marriott
6bca92db4d
Rather than running status-left, status-right and window title #() with popen
...
immediately every redraw, queue them up and run them in the background,
starting each once every status-interval. The actual status line uses the
output from the last run.
This brings several advantages:
- tmux itself may be called from inside #() without causing the server to hang;
- likewise, sleep or similar doesn't cause the server to block;
- commands aren't run excessively often when redrawing;
- commands shared by status-left and status-right, or used multiple times, will
only be run once.
run-shell and if-shell still use system()/popen() but will be changed over to
use this too later.
2009-10-10 15:03:01 +00:00
Nicholas Marriott
4658c063d5
New option, mouse-select-pane. If on, the mouse may be used to select the
...
current pane.
Suggested by sthen@ and also by someone else ages ago who I have forgotten.
2009-10-10 14:51:16 +00:00
Nicholas Marriott
3a20a05a49
There is no point setting the scroll region up for line feeds unless scrolling
...
is actually going to happen, so don't.
2009-10-10 10:36:46 +00:00
Nicholas Marriott
9dd72b9583
Add "grouped sessions" which have independent name, options, current window and
...
so on but where the linked windows are synchronized (ie creating, killing
windows and so on are mirrored between the sessions). A grouped session may be
created by passing -t to new-session.
Had this around for a while, tested by a couple of people.
2009-10-10 10:02:48 +00:00
Nicholas Marriott
b7d031cc92
Support for individual session idle time locking. May be enabled by turning off
...
the lock-server option (it is on by default). When this is off, each session
locks when it has been idle for the lock-after-time setting. When on, the
entire server locks when ALL sessions have been idle for their individual
lock-after-time settings.
This replaces one global-only option (lock-after-time) with another
(lock-server), but the default behaviour is usually preferable so there don't
seem to be many alternatives.
Diff/idea largely from Thomas Adam, tweaked by me.
2009-10-10 09:46:11 +00:00
Nicholas Marriott
93b353d353
Instead of passing a struct pollfd ** around through various functions, build
...
them into a tree and then convert into a flat poll array before and after poll.
This adds a little code but should reduce annoying problems with ordering when
adding new things that also need to be polled.
2009-10-10 09:31:39 +00:00
Nicholas Marriott
bf38a311da
The UTF-8 detection idea doesn't work and I am reasonably happy with the
...
current methods, so remove the (already #ifdef 0'd) code.
2009-10-09 07:33:12 +00:00
Nicholas Marriott
3af09ac946
Add a simple synchronize-panes window option: when set, all input to any pane
...
that is part of the window is also sent to all other panes in the same
window. Suggested by several, most recently Tomasz Pajor.
2009-10-09 07:27:00 +00:00
Nicholas Marriott
d528184836
Be less aggressive about turning the cursor off, only explicitly turn it off
...
when tmux is redrawing, otherwise leave in the state set by the application.
2009-10-09 07:23:28 +00:00
Nicholas Marriott
2cb2bb8257
Support J and K for scroll up and scroll down in copy mode with vi keys,
...
suggested by martynas.
2009-10-07 15:58:40 +00:00
Nicholas Marriott
56ddd3c0b1
Fix comment.
2009-10-07 07:02:40 +00:00
Nicholas Marriott
82efcc32ec
Accept ^? for backspace as well as BSpace.
2009-10-06 07:32:26 +00:00
Nicholas Marriott
35ca994ba2
Remove scroll mode which is now redundant, copy mode should be used instead.
...
The = key binding now does nothing.
2009-10-06 07:19:32 +00:00
Nicholas Marriott
9400fdac77
Make C-Up and C-Down in copy mode scroll the screen up and down one line
...
without moving the cursor, like Up and Down in scroll mode (which will shortly
disappear).
2009-10-06 07:09:00 +00:00
Nicholas Marriott
4ca2200d83
If no target client is specified to commands which accept one, try to guess the
...
current client, in a similar manner to how sessions already work: if the
current session can be established and has only one client, use that; otherwise
use the most recently created client.
2009-10-05 18:30:54 +00:00
Jason McIntyre
45043ebf3e
tweak previous;
2009-10-04 11:33:35 +00:00
Nicholas Marriott
d42b86d22b
Get / and ? the right way round in vi mode, and use : for goto line rather than
...
g.
2009-10-04 11:18:26 +00:00
Nicholas Marriott
c734789b18
Check for already locked/suspended clients in server_lock_client rather than
...
its callers.
2009-10-04 10:55:30 +00:00
Nicholas Marriott
205857b232
Add a key string for space ("Space") and document the names, suggested by
...
guenther@. Also document how to bind " and ', suggested by miod@.
2009-10-04 08:50:05 +00:00
Nicholas Marriott
97ca5711f9
C-v and M-v too.
2009-10-04 08:26:41 +00:00
Nicholas Marriott
123ae9e103
Support C-n/C-p with emacs keys in choice mode, also fix a comment.
2009-10-04 08:23:01 +00:00
Nicholas Marriott
8fa1858a2c
New lock-client and lock-session commands to lock an individual client or all
...
clients attached to a session respectively.
2009-09-24 14:17:09 +00:00
Nicholas Marriott
1764ef81ef
Don't allow locked or suspended clients to limit the size of active clients.
2009-09-24 07:02:56 +00:00
Nicholas Marriott
fecf8dc44e
Remove PROMPT_HIDDEN code which is now unused.
2009-09-23 14:42:48 +00:00
Nicholas Marriott
9200a0be7a
Support -c like sh(1) to execute a command, useful when tmux is a login
...
shell. Suggested by halex@.
This includes another protocol version increase (the last for now) so again
restart the tmux server before upgrading.
2009-09-23 12:03:30 +00:00
Nicholas Marriott
18ea820cb0
On SIGTERM, just abandon any suspended/locked clients and leave them to it,
...
otherwise the server will hang around (refusing new connections) until they
exit properly.
2009-09-23 08:21:57 +00:00
Nicholas Marriott
631a618238
Don't die if the client is detaching (the tty has been closed) after waking up
...
from locking.
2009-09-23 07:25:31 +00:00
Nicholas Marriott
b01dcd7971
Remove the internal tmux locking and instead detach each client and run the
...
command specified by a new option "lock-command" (by default "lock -np") in
each client.
This means each terminal has to be unlocked individually but simplifies the
code and allows the system password to be used to unlock.
Note that the set-password command is gone, so it will need to be removed from
configuration files, and the -U command line flag has been removed.
This is the third protocol version change so again it is best to stop the tmux
server before upgrading.
2009-09-23 06:18:47 +00:00
Nicholas Marriott
962fa20b36
Trim some code by moving the ioctl(TIOCGWINSZ) after SIGWINCH from the client
...
into the server.
This is another (the second of four) protocol version changes coming this
morning, so again the server should be killed before upgrading.
2009-09-23 06:12:58 +00:00
Nicholas Marriott
64caf59e84
Don't attempt to open() the tty path, rely on the client sending its stdin fd
...
with imsg and fatal if it doesn't, then set the FD_CLOEXEC flag in tty_init
instead of tty_open to prevent them leaking into child processes if any are
created between the two calls.
This bumps the protocol version, so the tmux server should be killed before
upgrading.
2009-09-23 06:05:02 +00:00
Nicholas Marriott
0a9005678d
Be more careful about what flags are cleared when opening the terminal,
...
otherwise the opened/started flags are cleared and the terminal never released.
2009-09-22 19:11:52 +00:00
Nicholas Marriott
96dd3e8eb9
Permit multiple prefix keys to be defined, separated by commas, for example:
...
set -g prefix ^a,^b
Any key in the list acts as the prefix. The send-prefix command always sends
the first key in the list.
2009-09-22 12:38:10 +00:00
Nicholas Marriott
6fab9a3e6f
Use KEYC_NONE constant instead of 0 on init.
2009-09-21 15:32:06 +00:00
Nicholas Marriott
a448524424
Nuke -i option which isn't used anymore.
2009-09-21 15:25:36 +00:00
Nicholas Marriott
6b37b2d79d
Use option print function for info messages as well.
2009-09-21 14:56:03 +00:00
Nicholas Marriott
e3c3d746f7
Move common code from show-options and show-window-options into a function.
2009-09-21 14:46:47 +00:00
Jason McIntyre
b769aa59d3
zap trailing whitespace;
2009-09-21 07:45:10 +00:00
Nicholas Marriott
fc9107a16a
Drop tiny union from option struct.
2009-09-21 07:00:09 +00:00
Nicholas Marriott
c7a8db5543
Key options were implemented as a number so these struct members are unused.
2009-09-21 06:55:06 +00:00
Nicholas Marriott
14ebcab5b0
run-shell command to run a shell command without opening a window, sending
...
stdout to output mode.
2009-09-20 19:15:01 +00:00
Nicholas Marriott
105ce36792
Nuke unused variables and fix stupid error message.
2009-09-20 17:31:26 +00:00
Nicholas Marriott
9b5f5ed8e8
Move some common and untidy code for window link/unlink into generic functions
...
instead of duplicating it in move/link window..
2009-09-20 17:27:18 +00:00
Nicholas Marriott
273f1b385c
Regularise some fatal messages.
2009-09-20 14:58:12 +00:00
Nicholas Marriott
63d499f480
New option, set-titles-string, to allow the window title to be specified (as
...
for status-left/right) if set-titles is on. Also only update the title when the
status line is being redrawn.
2009-09-18 15:19:27 +00:00
Nicholas Marriott
5c60162e3c
Rather than constructing an entire termios struct from ttydefaults.h, just let
...
forkpty do it and then alter the bits that should be changed after fork. A
little neater and more portable.
2009-09-16 12:35:04 +00:00
Jacek Masiulaniec
a6dd9e8e7e
Enclose repeated buffer draining code in a new msgbuf_drain()
...
function, which is additionally exported for use by others.
From nicm@, who reminded me that tmux is now using buffer.c, too.
2009-09-15 18:12:51 +00:00
Nicholas Marriott
4278199101
Stick line length to what is actually used (removing an optimization that
...
allowed it to be bigger), and use clear line/EOL sequences rather than spaces
in copy/scroll mode.
This fixes xterm copy/paste from tmux which treats trailing spaces differently
from clearing a line with the escape sequences. Reported by martynas@.
2009-09-15 15:14:09 +00:00
Nicholas Marriott
f39865e8e4
The default terminal size should be 80x24, not 80x25.
2009-09-15 07:45:16 +00:00
Nicholas Marriott
8548624676
Nuke unused server_client_index function, pointed out by martynas@.
2009-09-14 11:25:35 +00:00
Nicholas Marriott
8a873b97a3
Doh, trim variables unused now.
2009-09-12 13:09:43 +00:00
Nicholas Marriott
8cb8a0da8d
Tidy some common code for destroying sessions into a new function.
2009-09-12 13:01:19 +00:00
Nicholas Marriott
d771614d33
tmux always outputs \177 for backspace, so explicitly set VERASE to \177 for
...
new windows.
2009-09-12 09:54:34 +00:00
Nicholas Marriott
372a8cb1d9
Permit options such as status-bg to be configured using the entire 256 colour
...
palette by setting "colour0" to "colour255".
2009-09-10 17:16:24 +00:00
Nicholas Marriott
3f3b01c7ce
While the display-panes indicator is on screen, make the number keys select the
...
pane with that index.
2009-09-07 21:12:12 +00:00
Nicholas Marriott
51c95747d8
Reference count clients and sessions rather than relying on a saved index for
...
cmd-choose-*.
2009-09-07 21:01:50 +00:00
Matthias Kilian
e323f6620d
Tiny cleanup.
...
ok nicm@
2009-09-07 19:08:45 +00:00
Nicholas Marriott
ccba613e5b
Give each paste buffer a size member instead of requiring them to be
...
zero-terminated.
2009-09-07 18:50:45 +00:00
Nicholas Marriott
e97006b102
Permit embedded colour and attributes in status-left and status-right using new
...
#[] special characters, for example #[fg=red,bg=blue,blink].
2009-09-07 10:49:32 +00:00
Nicholas Marriott
ffab22bb35
Only redraw all clients once when the backoff timer expires rather than every
...
second all the time.
Reported by Simon Nicolussi.
2009-09-05 17:42:16 +00:00
Nicholas Marriott
83af55bed4
Tidy main and make it a bit easier to read.
2009-09-04 15:15:24 +00:00
Nicholas Marriott
be0d6faa15
Tell the user when sleeping due to password backoff.
2009-09-04 13:29:10 +00:00
Nicholas Marriott
751a2fa915
Fix a race condition when asking a client to take over the terminal (switching
...
to a different poll loop):
If a MSG_READY was followed very quickly by a MSG_EXIT (for example if doing
"tmux new 'exit'"), both messages could be read as part of the same imsg_read
in the first client poll loop. The MSG_READY would then cause a switch to the
second client loop, which would immediately call poll(2) again, causing the
client to hang forever waiting for an exit message that it already had.
Change to call imsg_get to process any existing messages before polling.
2009-09-02 23:49:25 +00:00
Nicholas Marriott
81a457e6fb
When shutting down the server, expect clients to be polite and exit when asked
...
with the right message.
2009-09-02 21:25:57 +00:00
Nicholas Marriott
459abafcea
That was the wrong fix. MSG_ERROR should set the error and the client should
...
use the error and exit on MSG_EXIT (it was being handled in the default
case). Undo the last change, move the errstr check into the MSG_EXIT case, and
add a comment.
2009-09-02 20:15:49 +00:00
Nicholas Marriott
7a4bac82d7
Set exittype for error exit as well as the error string.
2009-09-02 20:00:10 +00:00
Nicholas Marriott
74c35c513e
Accept -l to make it easier for people who use tmux as a login shell to use
...
$SHELL. Originally from martynas@, tweaked by me.
2009-09-02 17:34:57 +00:00
Nicholas Marriott
c5ac2579ba
When incorrect passwords are entered, behave similarly to login(1) and backoff
...
for a bit. Based on a diff from martynas@.
2009-09-02 16:38:35 +00:00
Nicholas Marriott
61b7dc522d
Add a transpose-chars command in edit mode (C-t in emacs mode only). From Kalle
...
Olavi Niemitalo.
2009-09-02 06:33:20 +00:00
Nicholas Marriott
c089e19020
If forking a login shell or if SHELL is otherwise not useful, set it to the
...
default shell. Based on a diff from martynas@.
2009-09-01 14:40:33 +00:00
Nicholas Marriott
7d5e494716
When using tmux as a login shell, there is currently no way to specify a shell
...
to be used as a login shell inside tmux, so add a default-shell session option.
This sets the shell invoked as a login shell when the default-command option is
empty.
The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell
or /bin/sh is valid first.
Based on a diff from martynas@, changed by me to be a session option rather
than a window option.
2009-09-01 13:09:49 +00:00
Nicholas Marriott
f8aa5821be
Use "Password:" with no space for password prompts and don't display a *s for
...
the password, like pretty much everything else. From martynas@ with minor
tweaks by me.
2009-09-01 09:11:05 +00:00
Nicholas Marriott
34bb735a65
Sort cases same as getopt argument, from martynas.
2009-09-01 09:00:54 +00:00
Nicholas Marriott
04319964b9
Add a new display-panes command, with two options (display-panes-colour and
...
display-panes-time), which displays a visual indication of the number of each
pane.
2009-08-31 20:46:19 +00:00
Stefan Sperling
8102ec3be5
squash typo
...
ok nicm@
2009-08-31 11:52:32 +00:00
Nicholas Marriott
71ede76c68
Don't call tty_free unless the client is a terminal, otherwise tty_init hasn't
...
been called and it may end up doing close(0). From Kalle Olavi Niemitalo.
2009-08-31 11:37:27 +00:00
Nicholas Marriott
2e5b3ab8bc
Initialise the arg2 pointer properly (also free it when freeing the
...
others). Fixes crashes with J in malloc_options reported by oga.
2009-08-26 18:09:52 +00:00
Nicholas Marriott
ddf97f8289
Make this work when the clock is in small characters as well. Doh.
2009-08-26 16:23:30 +00:00
Nicholas Marriott
1ba5ce9cb3
Fix clock mode in black and white terminals now that tty.c tries to fix
...
reverse.
2009-08-26 16:16:06 +00:00
Nicholas Marriott
f949107a32
Print -l and -p when showing command, pointed out by Tiago Cunha.
2009-08-25 14:53:22 +00:00
Nicholas Marriott
be16f79438
These should #include <ctype.h>.
2009-08-25 13:32:14 +00:00
Nicholas Marriott
7b847ced4a
Add a choose-client command and extend choose-{session,window} to accept a
...
template. After a choice is made, %% (or %1) in the template is replaced by the
name of the session, window or client suitable for -t and the result executed
as a command. So, for example, "choose-window "killw -t '%%'"" will kill the
selected window.
The defaults if no template is given are (as now) select-window for
choose-window, switch-client for choose-session, and detach-client for
choose-client (now bound to D).
2009-08-25 12:18:51 +00:00
Nicholas Marriott
4f1d81c4ce
gcc2 doesn't understand attributes on function pointers.
2009-08-24 08:03:11 +00:00
Nicholas Marriott
90400ae96a
Add some other obvious variables to update-environment (WINDOWID SSH_ASKPASS
...
SSH_AUTH_SOCK SSH_AGENT_PID SSH_CONNECTION) so they are updated in the session
environment on new/attach.
2009-08-23 18:21:02 +00:00
Nicholas Marriott
a910b38a35
Some code tidying.
2009-08-23 17:37:48 +00:00
Nicholas Marriott
c7394ac4e0
When using source-file, run the commands in the context of the source-file
...
command rather than with no context. This makes things like attach work from a
file.
2009-08-23 17:29:51 +00:00
Nicholas Marriott
43cd40e87a
The cursession member in struct cmd_ctx is always either curclient->session or
...
NULL when curclient is also NULL, so just eliminate it.
2009-08-23 16:45:00 +00:00
Nicholas Marriott
1eb303e6d4
Check the return value of strunvis against -1 not NULL.
2009-08-23 11:40:05 +00:00
Nicholas Marriott
926b52b600
Emulate dch/dch1 if missing by redrawing the entire line.
2009-08-21 12:29:59 +00:00
Nicholas Marriott
915a1913e1
Move reading termios settings to before tty_open alters them, and expand the
...
comment.
2009-08-21 11:36:08 +00:00
Nicholas Marriott
65ac8e9f0c
Ugh, committed the wrong version of this change and got both solutions rather
...
than just the second. Remove unused assignment.
2009-08-21 08:12:05 +00:00
Nicholas Marriott
f817a338d0
When moving up or down in copy mode, save the cursor position and size of the
...
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-21 07:33:58 +00:00
Nicholas Marriott
0198bb6bf3
Fix grid_expand_line so it actually works when the required size is bigger than
...
2 * the current size.
2009-08-21 07:29:37 +00:00
Nicholas Marriott
1501b3fbbd
A few trivial optimisations: no need to check for zero size if calling
...
buffer_ensure in buffer.c; expand grid lines by a greater increase than one
each time; and don't read UTF-8 data unless it actually needs to be checked
when overwriting a cell.
2009-08-20 19:14:42 +00:00
Nicholas Marriott
234ad54b2c
Nuke unused variable.
2009-08-20 10:48:25 +00:00
Nicholas Marriott
bf121f7c60
Handle the device attributes (DA) escape sequence.
2009-08-19 17:00:31 +00:00
Jason McIntyre
c741f2f4a6
tweak previous;
2009-08-19 16:10:26 +00:00
Nicholas Marriott
55336657d4
Don't read beyond the edge of the screen when searching (dies with debug
...
enabled).
2009-08-19 14:46:56 +00:00
Nicholas Marriott
c41aa49059
Use cfsetispeed/cfsetospeed to set termios speed members.
2009-08-19 14:32:15 +00:00
Nicholas Marriott
3f4418d84d
Extend command-prompt with a -p option which is a comma-separated list of one
...
or more prompts to present in order.
The responses to the prompt are replaced in the template string: %% are
replaced in order, so the first prompt replaces the first %%, the second
replaces the second, and so on. In addition, %1 up to %9 are replaced with the
responses to the first the ninth prompts
The default template is "%1" so the response to the first prompt is processed
as a command.
Note that this changes the behaviour for %% so if there is only one prompt,
only the first %% will be replaced. Templates such as "neww -n '%%' 'ssh %%'"
should be changed to "neww -n '%1' 'ssh %1'".
From Tiago Cunha.
2009-08-19 10:39:50 +00:00
Nicholas Marriott
036de0c5e4
Instead of just checking for an empty buffer, which may not be the case if
...
there is unconsumed data, save the previous size and use it instead. This means
that activity monitoring should work in this (unlikely) event.
Also remove a debugging statement that no longer seems necessary.
2009-08-18 21:41:13 +00:00
Nicholas Marriott
c488e5e40d
Whoops, getting the comparison the right way round is usually recommended.
2009-08-18 21:37:04 +00:00
Nicholas Marriott
8b7be5861e
Move another expensive options test to after a cheaper timer check/update.
2009-08-18 21:18:20 +00:00
Nicholas Marriott
fa617467b1
options_get_number() is relatively expensive and a check for dead panes happens
...
a lot more often than actually finding one, so instead of getting the option
for every check, get it for every dead window found.
2009-08-18 21:14:24 +00:00
Nicholas Marriott
145ba777e8
Now that pane targets (-t) are supported, switch some commands to use them
...
where it makes sense: clock-mode, copy-mode, scroll-mode, send-keys,
send-prefix.
2009-08-18 16:21:04 +00:00
Nicholas Marriott
dc6271cd79
Tag a few missed printf-like functions and fix a missing "%s".
2009-08-18 14:48:42 +00:00
Nicholas Marriott
003a2e6479
Pass show-buffer output through vis(3) as well, and wrap it to the edge of the
...
terminal when used from the command line.
2009-08-18 13:08:43 +00:00
Nicholas Marriott
840fff5e5e
Change list-buffers to run the preview of the buffer through vis(1).
2009-08-18 12:26:37 +00:00
Nicholas Marriott
1c58b94141
Use the full screen width when printing output rather than one less.
2009-08-18 11:53:03 +00:00
Nicholas Marriott
406fc209ac
Nuke unnecessary assignment.
2009-08-18 09:51:51 +00:00
Nicholas Marriott
feaf91ab93
Add a "delete line" key when editing in the status line or the search up/down
...
prompt. C-u with emacs keys, d with vi.
2009-08-18 07:23:43 +00:00
Nicholas Marriott
c828c2f366
Add (naive) searching and goto line in copy mode. Searching is C-r and C-s with
...
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-18 07:08:26 +00:00
Nicholas Marriott
e7cd547457
Reset attributes as well as scroll region before poll(2) and add a big comment
...
explaining why.
2009-08-14 11:23:34 +00:00
Nicholas Marriott
5cf994856f
Send SGR0 when initialising the screen. Fixes problems on terminals with BCE
...
(like putty) if the background colours is non-default when tmux starts. May
also fix problems when resuming a suspended tmux.
2009-08-14 08:53:52 +00:00
Nicholas Marriott
09cbd0c695
Switch the prompt code to return an empty string when the user enters no
...
response and reserve NULL for an explicit cancel. Change all callbacks to treat
them the same so no functional change.
Also add cancel key bindings to emacs mode which were missing.
2009-08-13 23:44:18 +00:00
Nicholas Marriott
7a359c00ac
vi(1)-style half page scroll in copy and scroll modes. Move the vi full page
...
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-13 22:32:18 +00:00
Nicholas Marriott
39154402e5
Scroll by two less than the number of lines in the screen, like emacs, rather
...
than by the entire screen, to make it easier to pull things out from under the
line indicator. Suggested by claudio.
2009-08-13 22:11:43 +00:00
Nicholas Marriott
375be90fd1
Disable mode-mouse (mouse in copy/choice mode) by default as it isn't very
...
useful at the moment and causes confusion.
2009-08-13 21:56:14 +00:00
Nicholas Marriott
3ad4de6c8c
Add a base-index session option to specify the first index checked when looking
...
for an index for a new window.
2009-08-13 20:11:58 +00:00
Nicholas Marriott
3026118c70
Allowing copy mode to scroll left and right is annoying, so limit it to the
...
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-13 19:35:20 +00:00
Nicholas Marriott
e2ff51f93f
Rather than telling the client to exit in the function when creating a new
...
session detached, let the caller do it. Allows "tmux new -d \; attach" to work.
2009-08-13 19:16:14 +00:00
Nicholas Marriott
52793e7a3f
When creating a new session from the command-line where there is an external
...
terminal, copy the termios(4) special characters and use them for new windows
created in the new session. Suggested by Theo.
2009-08-13 19:03:59 +00:00
Nicholas Marriott
2e3bb5a511
Redraw the screen after resizing.
2009-08-13 16:48:43 +00:00
Nicholas Marriott
b02e429788
It was originally intended that scroll mode would show content that was
...
currently off-screen due to resize, but somewhere along the way this got
lost. Restore this behaviour to scroll mode by fixing screen_write_copy to read
up to the saved line length rather than the current screen width. Copy mode
remains unaltered for now.
2009-08-13 16:24:33 +00:00
Nicholas Marriott
7a005b91b3
If the client passes zero for the window size in the identify message (which it
...
can, for example on serial terminals), reset it to 80x25, same as for resize
messages. Problem reported by kettenis@.
2009-08-13 12:15:45 +00:00
Nicholas Marriott
bc497dbb92
A tty context must not be modified as it may be reused to update multiple
...
clients, so make it const.
Also fix an actual modification which caused a hang when a session was
connected to multiple terminals at least one of which was missing ich/ich1.
2009-08-12 09:41:59 +00:00
Nicholas Marriott
9a52ef099a
When started as the shell, __progname contains a leading -, so hardcode "tmux"
...
for socket path and log files, and strip it when working out the shell.
2009-08-12 09:14:25 +00:00
Nicholas Marriott
85e8b70625
imsg closes the fd after sending, so dup() STDIN_FILENO before passing it to
...
the parent, otherwise TIOCGWINSZ will fail when the window is resized (that
could actually be moved into the server but this is more future-proof and
avoids breaking the protocol).
2009-08-12 06:04:28 +00:00
Nicholas Marriott
e0a19abb99
Initialise log_fd to -1, prevents spurious disconnection of the client when it
...
ends up as fd 0 (likely if the server is started with "tmux start").
Also add some extra debugging messages to server.c.
2009-08-11 22:34:17 +00:00
Nicholas Marriott
4310282a4c
Have the client pass its stdin fd to the server when identifying itself and
...
have the server use that rather than reopening the tty. If the fd isn't given,
use the old behaviour (so no need for a version change).
This allows tmux to be used as the shell, so also change so that when working
out the command to execute if default-command is empty (the default), tmux will
try not execute itself.
2009-08-11 21:28:11 +00:00
Nicholas Marriott
4ec8ade11c
Add a TTY_OPENED flag and tidy a little.
2009-08-11 20:29:04 +00:00
Nicholas Marriott
ff65e37545
Drop the no_stop argument to tty_close and tty_free in favour of a flag in the
...
tty struct.
2009-08-11 19:32:25 +00:00
Nicholas Marriott
f0635717b3
Switch tmux to use imsg. This is the last major change to make the
...
client-server protocol more resilient and make the protocol versioning work
properly. In future, the only things requiring a protocol version bump will be
changes in the message structs, and (when both client and server have this
change) mixing different versions should nicely report an error message.
As a side effect this also makes the code tidier, fixes a problem with the way
errors reported during server startup were handled, and supports fd passing
(which will be used in future).
Looked over by eric@, thanks.
Please note that mixing a client with this change with an older server or vice
versa may cause tmux to crash or hang - tmux should be completely exited before
upgrading.
2009-08-11 17:18:35 +00:00
Nicholas Marriott
60db6e3df4
Add flags for 1+2 and 2 arguments to the generic target code, use it for
...
cmd-set-environment/option/window-option and remove the generic options
parsing.
2009-08-11 12:53:37 +00:00
Nicholas Marriott
edcb22a6fb
No arguments are the same as new-session and this requires the environment to
...
be sent, so set that flag too when argc == 0.
2009-08-10 20:51:29 +00:00
Nicholas Marriott
181e1bcffd
Reset the attributes after drawing all or part of the screen, and reset the
...
region before poll(2). This reduces (but does not eliminate) the chance of the
attributes not being normal if tmux is disconnected without warning (ssh ~.,
reboot from inside, etc).
2009-08-10 19:42:03 +00:00
Nicholas Marriott
fa64c1235e
Use the right source and destination lines in grid_duplicate_lines.
2009-08-10 17:59:59 +00:00
Jason McIntyre
ec0c33b844
some minor tweaks; ok nicm
2009-08-10 17:14:55 +00:00
Jason McIntyre
de73fed73d
zap trailing whitespace;
2009-08-09 16:03:05 +00:00
Nicholas Marriott
d7de29e1e5
Minor language tweaks, change which key bindings are summarised.
2009-08-09 15:25:56 +00:00
Nicholas Marriott
ad18e45206
Nuke a dead variable found with clang and an unused declaration with lint.
2009-08-09 15:17:50 +00:00
Nicholas Marriott
57381aa560
Move the key bindings section to near the start, mention attach/detach in the
...
first section, and another couple of tweaks. Based on a diff from Theo.
2009-08-09 14:35:15 +00:00
Nicholas Marriott
b3107d26df
Don't leak in the (rare) case of an invalid command at the end of a file not
...
terminated by a \n.
2009-08-09 08:34:17 +00:00
Nicholas Marriott
05f1680efa
Use a temporary variable for strdup of const char *.
2009-08-08 21:54:26 +00:00
Nicholas Marriott
6491274f60
Infrastructure and commands to manage the environment for processes started
...
within tmux.
There is a global environment, copied from the external environment when the
server is started and each sesssion has an (initially empty) session
environment which overrides it.
New commands set-environment and show-environment manipulate or display the
environments.
A new session option, update-environment, is a space-separated list of
variables which are updated from the external environment into the session
environment every time a new session is created - the default is DISPLAY.
2009-08-08 21:52:43 +00:00
Nicholas Marriott
e985629440
Tidy function a little by using a temporary variable.
2009-08-08 21:18:23 +00:00
Nicholas Marriott
90f8151ffd
Options to set the colours and attributes for status-left/-right. From Thomas
...
Adam, thanks.
2009-08-08 20:36:42 +00:00
Nicholas Marriott
92cc3a6914
Handle ttyname(3) failure better.
2009-08-08 16:05:01 +00:00
Nicholas Marriott
06ddd3dcf8
Add a flags member to the grid_line struct and use it to differentiate lines
...
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-08 15:57:49 +00:00
Nicholas Marriott
5e01b6d663
Change the way the grid is stored, previously it was:
...
- 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-08 13:29:27 +00:00
Nicholas Marriott
e89e70e715
If there is an error in the configuration file, don't just exit(1) as this can
...
cause the client to hang. Instead, send the error message, then mark the client
as bad and start a normal shutdown so the server exits once the error is
written.
This also allows some code duplicating daemon(3) to be trimmed and logging to
begin earlier.
Prompted by Theo noticing the behaviour on error wasn't documented.
2009-08-07 15:39:10 +00:00
Nicholas Marriott
ccaf8724e4
Move introduction section up into description. From jmc.
2009-08-07 12:24:16 +00:00
Nicholas Marriott
04e97e8aef
Using the alternative screen (smcup/rmcup) should also preserve the current
...
colours and attributes. Found thanks to a report from Taylor Venable.
While here also nuke a couple of extra blank lines.
2009-08-07 00:12:13 +00:00
Jason McIntyre
746fe5832a
tweak INTRODUCTION; from nicm and myself
2009-08-06 21:06:35 +00:00
Nicholas Marriott
4027335fa9
Clear the codes array earlier as tty_term_free could be called on error.
2009-08-05 19:05:02 +00:00
Nicholas Marriott
bcddddf98d
If colours are not supported by the terminal, try to emulate a coloured
...
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-08-05 16:26:38 +00:00
Nicholas Marriott
12ef3ceda1
Add a -a flag to set-option and set-window-option to append to an existing
...
string value, useful for terminal-overrides.
2009-08-04 18:45:57 +00:00
Jason McIntyre
a0647f1616
restructure the layout of this page, moving the commands into various
...
subsections; lots of tweaks to come on the text
from nicm and myself
2009-08-04 18:41:28 +00:00
Nicholas Marriott
9e3bb986d5
Show the bell/activity/current status and the window title in the choice list.
2009-08-04 14:28:23 +00:00
Nicholas Marriott
93bf2a1d72
Check for "UTF8" as well as "UTF-8" in LANG etc as it seems this may also
...
appear.
2009-08-04 10:31:28 +00:00
Jason McIntyre
6b69b93b53
clean up some macro abuse in the commands section;
2009-08-04 07:56:38 +00:00
Nicholas Marriott
189fb08e13
Split the comparison into a function to make this code smaller and more
...
understandable.
2009-08-03 17:12:07 +00:00
Nicholas Marriott
ac54dee9bb
Don't try to free old string values (and crash) when they are overridden unless
...
they were actually found in the source terminal description. Reported by jmc.
2009-08-03 15:30:16 +00:00
Jason McIntyre
9a391b3320
tweak previous;
2009-08-03 14:34:47 +00:00
Nicholas Marriott
1673735f02
Add a terminal-overrides session option allowing individual terminfo(5) entries
...
to be overridden. The 88col/256col checks are now moved into the default
setting and out of the code.
Also remove a couple of old workarounds for xterm and rxvt which are no longer
necessary (tmux can emulate them if missing).
2009-08-03 14:10:54 +00:00
Matthieu Herrb
e4bb08e1f5
Fix checking of setupterm(3) error codes. While there include the
...
name of the terminal type causing the error where relevant. ok nicm@.
2009-08-02 20:47:35 +00:00
Nicholas Marriott
5db47ed53a
Pass the ACS border characters through tty_get_acs so they appear correctly on
...
terminals which don't use the standard set.
2009-07-31 10:12:49 +00:00
Nicholas Marriott
95caeaa5dc
Don't leak when rollling buffers off when the paste buffer limit is reached.
2009-07-30 20:50:54 +00:00
Nicholas Marriott
97f105cde2
Plug some memory leaks.
2009-07-30 20:41:48 +00:00
Nicholas Marriott
61f3fc7e4d
Don't babysit people and let them try to load /dev/zero or (more useful)
...
/dev/null if they want.
2009-07-30 17:46:12 +00:00
Nicholas Marriott
8df3035831
Remove some dead code found by clang.
2009-07-30 17:29:12 +00:00
Jason McIntyre
6d86882ed4
tweak previous;
2009-07-30 16:59:24 +00:00
Nicholas Marriott
9f1dd4d0af
Similar changes for server_msg_dispatch: use a switch instead of a lookup table
...
and merge smaller functions inline.
2009-07-30 16:40:12 +00:00
Nicholas Marriott
5f13bb0c3a
There aren't many client message types or code to handle them so get rid of the
...
lookup table and use a switch, merge the tiny handler functions into it, and
move the whole lot to client.c.
Also change client_msg_dispatch to consume as many messages as possible and
move the call to it to the right place so it checks for signals afterwards.
Prompted by suggestions from eric@.
2009-07-30 16:32:12 +00:00
Nicholas Marriott
479d614884
Tell the server when the client gets SIGTERM so it can clean up the terminal
...
properly, rather than just exiting.
2009-07-30 16:16:19 +00:00
Nicholas Marriott
071494d8fa
Merge pane number into the target specification for pane commands. Instead of
...
using -p index, a target pane is now addressed with the normal -t window form
but suffixed with a period and a pane index, for example :0.2 or
mysess:mywin.1. An unadorned number such as -t 1 is tried as a pane index in
the current window, if that fails the same rules are followed as for a target
window and the current pane in that window used.
As a side-effect this now means that swap-pane can swap panes between different
windows.
Note that this changes the syntax of the break-pane, clear-history, kill-pane,
resize-pane, select-pane and swap-pane commands.
2009-07-30 13:45:56 +00:00
Jason McIntyre
a87228b4ff
new sentence, new line;
2009-07-30 13:31:22 +00:00
Nicholas Marriott
a419e73f7a
Add a mode-mouse option to prevent tmux taking over the mouse in choice or copy
...
modes.
2009-07-30 07:04:50 +00:00
Nicholas Marriott
2b331084b4
Add an additional heuristic to work out the current session when run from the
...
command line. The name of all slave ptys in the server is known, so if the
client was run on a tty, look for any sessions containing that tty and use the
most recently created.
This is more reliable than looking at $TMUX if windows have been moved or
linked between sessions.
2009-07-29 17:03:16 +00:00
Nicholas Marriott
c1d6d7ac6b
Rename struct hdrtype to msgtype which is a better name and can be used even
...
when struct hdr disappears.
2009-07-29 14:17:26 +00:00
Nicholas Marriott
d3c461097b
Taking account of the "s, 22 not 24 is the maximum length of #T in status-right
...
to prevent the date being cut off.
2009-07-29 05:36:53 +00:00
Nicholas Marriott
f596be9950
Final pieces of mode key rebinding: bind-key and unbind-key now accept a -t
...
argument to modify a table.
2009-07-28 17:05:10 +00:00
Nicholas Marriott
9e5d585ba4
Accept and print "Enter" and "Escape" for keys rather than C-m and C-[.
2009-07-28 09:18:01 +00:00
Nicholas Marriott
86785004ba
Next step towards customisable mode keys: build each default table of keys into
...
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-28 07:03:32 +00:00
Nicholas Marriott
2da4864483
If select-layout is not given an argument, repply the last layout used in the
...
window, if any.
2009-07-28 06:48:44 +00:00
Nicholas Marriott
309b76fb32
Remove an unused entry in the mode keys command enum and rename
...
MODEKEYCOPY_QUIT to _CANCEL to match the others.
2009-07-27 20:36:13 +00:00
Nicholas Marriott
d95274c5f2
Change mode key bindings from big switches into a set of tables. Rather than
...
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-27 19:29:35 +00:00
Nicholas Marriott
13e29dd7b5
Get rid of empty mode_key_free function.
2009-07-27 18:51:46 +00:00
Nicholas Marriott
ad0aad21d5
Add a key to delete to end of line at the prompt (^K in emacs mode, C/D in vi).
...
From Kalle Olavi Niemitalo.
2009-07-27 12:11:11 +00:00
Nicholas Marriott
fc65da1eed
Draw UTF-8 characters under the selection correctly.
2009-07-27 11:33:21 +00:00
Nicholas Marriott
584eda8339
Change previous-word behavior to move to the beginning of the word (matches
...
emacs and vi). From Kalle Olavi Niemitalo.
2009-07-27 07:42:45 +00:00
Nicholas Marriott
639fbe0392
Detect backspace by looking at termios VERASE and translate it into \177 (which
...
matches screen's behaviour if not its termcap/terminfo entry). The terminfo kbs
cap is often wrong or missing so it can't be used, and just assuming \177 may
be wrong.
2009-07-26 21:42:08 +00:00
Nicholas Marriott
55d8c01c33
Calculate the space available for the prompt buffer and the cursor position
...
correctly, and make it work when the screen is not wide enough.
Noticed by Kalle Olavi Niemitalo.
2009-07-26 21:13:47 +00:00
Nicholas Marriott
6b3b852ebc
Go to the next if the current best process is replaced, don't keep comparing it
...
with itself. Also fix process name comparison.
2009-07-26 19:42:26 +00:00
Nicholas Marriott
34a82e7629
Make all messages sent between the client and server fixed size.
...
This is the first of two changes to make the protocol more resilient and less
sensitive to other changes in the code, particularly with commands. The client
now packs argv into a buffer and sends it to the server for parsing, rather
than doing it itself and sending the parsed command data.
As a side-effect this also removes a lot of now-unused command marshalling
code.
Mixing a server without this change and a client with or vice versa will cause
tmux to hang or crash, please ensure that tmux is entirely killed before
upgrading.
2009-07-26 12:58:44 +00:00
Nicholas Marriott
2bb89bc5bc
Set the active pane when respawning a window - fixes problems when respawning a
...
window with multiple panes.
2009-07-24 19:35:33 +00:00
Nicholas Marriott
133173850c
Use the full range of ACS line drawing characters to draw pane borders,
...
including intersections.
2009-07-24 19:14:38 +00:00
Nicholas Marriott
c6dac5c3c9
cmd_find_index should return -2 on error.
2009-07-24 18:46:40 +00:00
Nicholas Marriott
029599c02c
Simplify screen redrawing by drawing the border and background together rather
...
than border separately, and consolidating all the drawing characters into one
string.
2009-07-24 16:21:42 +00:00
Nicholas Marriott
1d1ea681f0
Accept lowercase c- and m- prefix as well as C- and M-.
2009-07-24 14:57:22 +00:00
Nicholas Marriott
5a1a106637
Permit commands to be bound to key presses without the prefix key first. The
...
new -n flag to bind-key and unbind-key sets or removes these bindings, and
list-key shows them in []s.
2009-07-24 14:52:47 +00:00
Stuart Henderson
ce4eb6559e
up-pane and down-pane no longer auto-repeat; update the description of
...
repeat-time accordingly. ok nicm@
if you prefer old behaviour;
bind -r Up up-pane
bind -r Down down-pane
2009-07-24 14:50:24 +00:00
Nicholas Marriott
4a04b498db
None of the server message functions return anything but 0, so make them all
...
void.
Also remove a leftover variable in client.c.
2009-07-23 21:19:11 +00:00
Nicholas Marriott
16e017d5a6
Tidy client message return slightly: convert flags into an enum, and merge
...
error string into struct client_ctx as well.
2009-07-23 20:24:27 +00:00
Nicholas Marriott
ba84ddcf8e
Redraw after starting selection to correctly remove any existing selection.
2009-07-23 17:03:47 +00:00
Nicholas Marriott
895171478f
Revert r1.5, I don't like it, new sessions should start off identically - with
...
the defaults.
2009-07-23 15:47:56 +00:00
Nicholas Marriott
e0d1954840
C-d is delete as well in emacs mode.
2009-07-23 13:44:02 +00:00
Nicholas Marriott
96a7cf1e6a
Both of cmdclient and curclient CAN be NULL - if the command is executed from
...
the configuration file. In this case, attach-session can't do much, and
new-session should just assume -d.
2009-07-23 12:33:48 +00:00
Nicholas Marriott
05b511f96a
If there is a current session, use its default path and working directory for
...
the initial window when creating a new session.
2009-07-22 22:47:43 +00:00
Nicholas Marriott
bb14c36a27
Pass a set of flags into client_init rather than just a start_server
...
variable. Only one flag now but more to come later.
2009-07-22 21:58:56 +00:00
Nicholas Marriott
5ee84436c8
window_add_pane cannot fail, so remove the unused cause argument and don't
...
bother to check for a NULL return.
2009-07-22 21:34:36 +00:00
Nicholas Marriott
f7df0bac96
Tidy the target parsing code a bit and correct the behaviour so that as before
...
a string with no colon as a target window is first looked up as a window then
as a session, noted by Iain Morgan.
Also attempt to clarify the description of the target specification in the man
page.
2009-07-22 21:23:29 +00:00
Nicholas Marriott
dd4a3b24fc
tty_write is relatively short and the only function left in tty-write.c so move
...
it into tty.c.
2009-07-22 20:56:58 +00:00
Nicholas Marriott
ddad0be5f7
More tty code tidying: move the saved cursor/region position (from before the
...
screen was updated) out of struct screen and into struct tty_ctx.
2009-07-22 20:53:38 +00:00
Nicholas Marriott
bb4bab4c26
log_debug3 no longer exists, change the sole use in GRID_DEBUG to log_debug2.
2009-07-22 18:06:58 +00:00
Nicholas Marriott
2ec2837daa
enum tty_cmd is only used as an index into the array of command function
...
pointers, so remove it and use the function pointers directly to represent
themselves.
2009-07-22 18:02:23 +00:00
Nicholas Marriott
6a309c53a8
There are relatively few arguments to tty_cmd_* functions now, so tidy them up
...
by using a struct rather than hiding everything with varargs.
2009-07-22 16:45:31 +00:00
Nicholas Marriott
5bd72ec629
tty_cmd_raw is only used once, for raw UTF-8 output, so rename it to
...
tty_cmd_utf8character and eliminate the size argument.
2009-07-22 15:55:32 +00:00
Nicholas Marriott
e43b6a2dd2
Adjust field width to fit longest key when listing.
2009-07-21 22:41:00 +00:00
Nicholas Marriott
3eb6080de3
Remove leftover debug logging of password.
2009-07-21 21:20:07 +00:00
Nicholas Marriott
76a9d98562
Make some functions which return unused values void (mostly found by lint) and
...
tweak a redundant expression in window_pane_set_mode.
2009-07-21 19:54:22 +00:00
Nicholas Marriott
6945e86fd7
Nix a few unused attributes on arguments which are no longer unused.
2009-07-21 18:52:03 +00:00
Nicholas Marriott
044ebf1952
Remove a couple of unused functions and fix a type ("FALLTHOUGH"), found by
...
lint.
2009-07-21 18:40:30 +00:00
Nicholas Marriott
b9a179089b
__progname is not const, pointed out by deraadt.
2009-07-21 18:38:52 +00:00
Nicholas Marriott
725938fb85
Tidy up keys: use an enum for the key codes, and remove the macros which just
...
wrap flag sets/clears/tests.
2009-07-21 17:57:29 +00:00
Nicholas Marriott
c6012aaabc
Now that #P could be in the status line, flag it for redraw when the active
...
pane changes.
2009-07-20 19:35:33 +00:00
Nicholas Marriott
c0862dae45
Tweak unbind-key language very slightly.
2009-07-20 15:51:55 +00:00
Nicholas Marriott
54afcfbfb4
Display the number of failed password attempts (if any) when the server is
...
locked. From Tom Doherty.
2009-07-20 14:37:51 +00:00
Nicholas Marriott
b292f71c49
Add a status-justify option to allow the window list in the status line to be
...
positioned at the left, centre, or right.
2009-07-20 14:32:09 +00:00
Nicholas Marriott
e32e0d5692
New options, window-status-current-{fg,bg,attr}, to set the fg, bg and
...
attributes with which the current window is shown in the status line. From
Johan Friis, thanks.
2009-07-20 09:15:18 +00:00
Nicholas Marriott
73732ffa05
Kill some dead stores and fix a null pointer deref, found by clang.
2009-07-20 07:31:10 +00:00
Nicholas Marriott
ff2cc0e387
Move the offsets as well when swapping panes.
2009-07-20 07:13:31 +00:00
Jason McIntyre
550b855c9d
tweak previous;
2009-07-19 14:07:47 +00:00
Nicholas Marriott
6036bdd06c
Improved layout code.
...
Each window now has a tree of layout cells associated with it. In this tree,
each node is either a horizontal or vertical cell containing a list of other
cells running from left-to-right or top-to-bottom, or a leaf cell which is
associated with a pane.
The major functional changes are:
- panes may now be split arbitrarily both horizontally (splitw -h, C-b %) and
vertically (splitw -v, C-b ");
- panes may be resized both horizontally and vertically (resizep -L/-R/-U/-D,
bound to C-b left/right/up/down and C-b M-left/right/up/down);
- layouts are now applied and then may be modified by resizing or splitting
panes, rather than being fixed and reapplied when the window is resized or
panes are added;
- manual-vertical layout is no longer necessary, and active-only layout is gone
(but may return in future);
- the main-pane layouts now reduce the size of the main pane to fit all panes
if possible.
Thanks to all who tested.
2009-07-19 13:21:40 +00:00
Nicholas Marriott
fc6a65c620
Add three new session options: visual-activity, visual-bell, visual-content. If
...
these are enabled (and the monitor-activity, bell-actio and monitor-content
options are configurated appropriately), when activity, a bell, or content is
detected, a message is shown.
Also tidy up the bell/activity/content code in server.c slightly and fix a
couple of errors.
2009-07-18 14:59:25 +00:00
Nicholas Marriott
0ca6f667e3
Make it so using kill-pane to destroy the last pane in a window destroys the
...
window instead of being an error.
2009-07-17 20:37:03 +00:00
Nicholas Marriott
6f5150a943
- New command display-message (alias display) to display a message in the
...
status line (bound to "i" and displays the current window and time by
default). The same substitutions are applied as for status-left/right.
- Add support for including the window index (#I), pane index (#P) and window
name (#W) in the message, and status-left or status-right.
- Bump protocol version.
From Tiago Cunha, thanks!
2009-07-17 18:45:08 +00:00
Nicholas Marriott
ad006bc6b6
When resizing a screen smaller in alternate screen mode, all the lines needed
...
could be consumed by deleting from the bottom, leaving none to be removed from
the top. In this case, don't call grid_view_delete_lines with ny of 0 as this
is incorrect and causes a bounds check to fatal error if built with -DDEBUG.
2009-07-17 18:35:11 +00:00
Nicholas Marriott
ce53936a2b
Tidy up new-session and attach-session and change them to work from inside
...
tmux, switching the current client to the new or requested session.
Written with Josh Elsasser.
2009-07-17 15:03:11 +00:00
Nicholas Marriott
1938c994e7
Remove a duplicate key binding, and turn off autorepeat for up/down as it is
...
kind of annoying by default.
2009-07-17 13:43:07 +00:00
Nicholas Marriott
7ddba901a4
If -u is specified or UTF-8 is otherwise detected when the server is started,
...
enable the utf8 and status-utf8 optons. While here, note in the man page that
the server is started with the first session and exits when none remain.
2009-07-17 13:38:03 +00:00
Nicholas Marriott
d3b5c242cc
Oops, it is always a good idea to get arguments the right way round.
2009-07-17 07:09:46 +00:00
Nicholas Marriott
216df07688
A similar for fix for window_choose: don't rely on the callback always being
...
called to free data, have a separate free callback and call it from the mode
cleanup code.
2009-07-17 07:05:58 +00:00
Nicholas Marriott
65deba3a35
Memory could be leaked if a second prompt or message appeared while another was
...
still present, so add a separate prompt free callback and make the _clear
function responsible for calling it if necessary (rather than the individual
prompt callbacks). Also make both messages and prompts clear any existing when
a new is set.
In addition, the screen could be modified while the prompt is there, restore
the redraw-entire-screen behaviour on prompt clear; add a comment as a
reminder.
2009-07-17 06:13:27 +00:00
Nicholas Marriott
9642f0373f
Remove some duplicate code that was causing the status line to be redrawn even
...
when it hadn't changed.
2009-07-16 23:25:21 +00:00
Nicholas Marriott
3e9d9a2119
Fix arguments to switch-client.
2009-07-16 22:50:49 +00:00
Nicholas Marriott
924bf8477f
Typo in grid_duplicate_lines (sy for dy) causing it to write into the wrong
...
place when copying UTF-8 data. Found by Dan Colish.
2009-07-16 07:34:37 +00:00
Nicholas Marriott
92da443a9e
Make status_message_set a variadic printf-like function. No functional change -
...
helpful for a couple of things coming soon.
2009-07-15 17:39:00 +00:00
Nicholas Marriott
780fd8f7a6
Return -1 not NULL on error, pointed out by Roy Marples.
2009-07-15 15:09:17 +00:00
Nicholas Marriott
aa3403a343
Add a -k flag to unlink-window which makes it behave the same as the old
...
kill-window - if a window is linked into only one session it unlinked and
destroyed.
2009-07-15 08:05:56 +00:00
Nicholas Marriott
9601b72e4c
The man page says that kill-window removes the window entirely, unlinking it
...
from any sessions. In fact the implementation only affected the current
session, making it the same as unlink-window but destroying the window if it
was linked into only one session (unlinkw gives an error). Change the behaviour
to match what it documented and was originally intended.
2009-07-15 08:00:49 +00:00
Nicholas Marriott
ca617d679f
Having to update NSETOPTION/NSETWINDOWOPTION when adding new options is a bit
...
annoying and it is only use for iterating, so use a sentinel to mark the end of
each array instead. Different fix for a problem pointed out by Kalle Olavi
Niemitalo.
2009-07-15 07:50:34 +00:00
Nicholas Marriott
615d85fb23
Add main-pane-height to the options list (was missed before).
2009-07-14 20:20:04 +00:00
Nicholas Marriott
f08c9b2217
For some reason when clearing status/message it was redrawing the entire client
...
not just the status line. Changing this also revealed the check for the status
line was incorrect when drawing the pane.
2009-07-14 19:11:58 +00:00
Nicholas Marriott
ae2ea52575
Instead of faking up a status line in status_redraw, use the same code to
...
redraw it as to draw the entire screen, just skip all lines but the last.
This makes horizontal split redraw properly when the status line is off.
2009-07-14 19:03:16 +00:00
Nicholas Marriott
e76caa0017
Don't accept input to a window if it not visible.
2009-07-14 16:52:50 +00:00
Nicholas Marriott
975f516f51
The scroll region cannot be one line only, ignore attempts to make it so.
2009-07-14 14:47:32 +00:00
Nicholas Marriott
fe20c0d89e
Get rid of the PANE_HIDDEN flag in favour of a function, and moving the
...
decision for whether or not a pane should be drawn out of the layout code and
into the redraw code.
This is needed for the new layout design, getting it in now to make that easier
to work on.
2009-07-14 07:23:36 +00:00
Nicholas Marriott
4a9b01eb0d
Need time.h not sys/time.h for time(2).
2009-07-14 06:59:06 +00:00
Nicholas Marriott
6910458a92
Add backspace key to named keys.
2009-07-14 06:56:30 +00:00
Nicholas Marriott
ceace9c6bd
Since tmux doesn't actually need ncurses, use -lcurses/curses.h
...
instead. Pointed out by millert a while ago.
2009-07-14 06:30:45 +00:00
Nicholas Marriott
5f108d9df6
Having fixed flags for single-character getopt options is a bit hard to
...
maintain and is only going to get worse as more are used. So instead, add a new
uint64_t member to cmd_entry which is a bitmask of upper and lowercase options
accepted by the command.
This means new single character options can be used without the need to add it
explicitly to the list.
2009-07-13 23:11:35 +00:00
Jason McIntyre
5d91555c7c
zap trailing whitespace;
2009-07-13 20:14:23 +00:00
Nicholas Marriott
cba885a67c
Expand leading tildes in arguments, from Tiage Cunha.
2009-07-13 18:49:36 +00:00
Nicholas Marriott
cf411053c7
copy-mode and scroll-mode have a -u flag missing from usage, add it.
2009-07-13 18:44:17 +00:00
Nicholas Marriott
023d8d38ec
Tidy up and improve target (-t) argument parsing:
...
- move the code back into cmd.c and merge with the existing functions where
possible;
- accept "-tttyp0" as well as "-t/dev/ttyp0" for clients;
- when looking up session names, try an exact match first, and if that fails
look for it as an fnmatch pattern and then as the start of a name - if more
that one session matches an error is given; so if there is one session called
"mysession", -tmysession, -tmysess, -tmysess* are equivalent but if there
is also "mysession2", the last two are errors;
- similarly for windows, if the argument is not a valid index or exact window
name match, try it against the window names as an fnmatch pattern and a
prefix.
2009-07-13 17:47:46 +00:00
Nicholas Marriott
359285928b
Support "alternate screen" mode (terminfo smcup/rmcup) typically used by full
...
screen interactive programs to preserve the screen contents. When activated, it
saves a copy of the visible grid and disables scrolling into and resizing out
of the history; when deactivated the visible data is restored and the history
reenabled.
2009-07-13 10:43:52 +00:00
Nicholas Marriott
0b788a3d61
Missed this declaration in key bindings change. Whoops.
2009-07-12 23:46:49 +00:00
Nicholas Marriott
88555d96d5
Document the -k flag to new-window.
2009-07-12 23:45:03 +00:00
Nicholas Marriott
9e49ec6cd3
Creating a key binding which replaces itself (such as "bind x bind x lsw")
...
frees the command list bound to the key while it is still being executed,
leading to a use after free. To prevent this, create a dead keys list and defer
freeing replaced or removed key bindings until the main loop when the key
binding will have finished executing.
Found by Johan Friis when creating a key binding to reload his configuration
file.
2009-07-12 17:33:18 +00:00
Nicholas Marriott
22d51ec1ea
Add a "back to indentation" key in copy mode to move the cursor to the first
...
non-whitespace character. ^ with vi and M-m with emacs key bindings. Another
from Kalle Olavi Niemitalo, thanks.
2009-07-12 16:15:34 +00:00
Nicholas Marriott
fa8333eddb
Merge three copies of identical code to move the cursor x position into a
...
single function, from Kalle Olavi Niemitalo.
2009-07-12 16:12:34 +00:00
Nicholas Marriott
22355ce947
If it exist, load a system-wide configuration file /etc/tmux.conf before any
...
user-specified one.
2009-07-12 16:07:56 +00:00
Nicholas Marriott
bd098c273b
Limit the history to hlimit not hlimit - 1. This makes a history-limit setting
...
of 0 work as expected.
2009-07-11 20:11:18 +00:00
Nicholas Marriott
e415ead361
Add -r to the synopsis of the paste-buffer command, prompted by jmc.
2009-07-11 20:04:19 +00:00
Nicholas Marriott
2f7198246e
When pasting, translate \n into \r. This matches xterm and putty's behaviour,
...
and makes emacs happy when pasting into some modes. A new -r (raw) flag to
paste-buffer pastes without the translation.
From Kalle Olavi Niemitalo, thanks!
2009-07-11 19:14:56 +00:00
Nicholas Marriott
289320a9b1
Copy was using the real line length which after resize can be larger than the
...
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-11 19:09:24 +00:00
Nicholas Marriott
4cbbbddf22
paste-buffer -d was not documented. From Kalle Olavi Niemitalo.
2009-07-10 19:01:40 +00:00
Nicholas Marriott
9cd5ba40d3
Redraw the status line after renaming a session (it may contain the name).
2009-07-10 17:34:51 +00:00
Nicholas Marriott
4a6d62e401
Don't send initialisation strings is1/2/3 (barely anything else does) and move
...
smcup to the first and rmcup to the last sequences output to the terminal. This
allows tmux to use the alternate screen (smcup/rmcup) when available.
2009-07-10 07:11:59 +00:00
Nicholas Marriott
daa1faa905
Add a default-terminal option to set the starting value of $TERM in new
...
windows.
This is "screen" by default and must be either that or something closely
related. This does makes it easier to customise it if necessary.
2009-07-10 05:50:54 +00:00
Nicholas Marriott
25d5734496
Document display-time option which seems to have been missed.
2009-07-10 05:43:01 +00:00
Nicholas Marriott
58361eb965
When the terminal size is reduced horizontally, don't truncate lines to the new
...
width, so that if the same lines are later increased in size the content
reappears.
2009-07-09 22:48:20 +00:00
Nicholas Marriott
5f2f07ed8a
Cursor up and down should be limited by the scroll region (cuu should stop at
...
the scroll region top if starting from below it and cud stop at the bottom if
starting from above). Fixes another vttest test.
2009-07-09 17:57:11 +00:00
Nicholas Marriott
81181bfb72
New command, if-shell (alias if). Executes the tmux command in the second
...
argument if the shell command in the first succeeds, for example:
if "[ -e ~/.tmux.conf.alt ]" "source .tmux.conf.alt"
Written by Tiago Cunha, many thanks.
2009-07-09 15:47:49 +00:00
Nicholas Marriott
24e1327d0d
Stop in the right place so all the lines selected are copied. Reported by Kalle
...
Olavi Niemitalo, thanks.
2009-07-09 15:02:00 +00:00
Nicholas Marriott
29f9d5f335
Don't leak FILE * on malloc failure. From ivoire at users dot sourceforge dot net.
2009-07-09 09:54:56 +00:00
Nicholas Marriott
86c93c6e34
Change inserting and deleting lines inside the scroll region to properly clear
...
lines that should be inserted/deleted but not moved. Fixes problems with mutt
reported by Brian Lewis, thanks.
2009-07-09 07:58:14 +00:00
Nicholas Marriott
643c219d18
Tidy by removing unused argument from grid_view_{insert,delete}_line_region
...
functions (currently don't fully work, this is to make fix easier).
2009-07-09 00:29:32 +00:00
Nicholas Marriott
f63761eabc
Fix two memory leaks when assigning shell variables in configuration
...
file/command prompt. From Tiago Cunha.
2009-07-08 16:04:56 +00:00
Nicholas Marriott
8c497ecac0
When reinitialising the screen, do not omit to clear the last line.
2009-07-08 05:56:11 +00:00
Nicholas Marriott
084d07f4eb
Just appending -l to $SHELL to create a login shell is wrong: -l is not POSIX,
...
and some people may use shells which do not support it. Instead, make an empty
default-command option mean a login shell, and fork it with a - in argv[0]
which is the method used by login(1).
Also fix the automatic-rename code to handle this correctly and to strip a
leading - if present.
2009-07-08 05:26:45 +00:00
Nicholas Marriott
b4efd1ca89
Don't let ambiguous commands override an exact alias match: eg if commands
...
"abc-1", "abc-2", "abc-3" exist and "abc-3" has the alias "abc", "tmux abc"
should execute abc-3, not complain about the command being ambiguous.
Not a problem at the moment but will be soon.
2009-07-07 21:23:22 +00:00
Nicholas Marriott
923ccfa2e8
Rename the global options variables to be shorter and to make session options
...
clear. No functional change, getting this out of the way to make later options
changes easier.
2009-07-07 19:49:19 +00:00
Nicholas Marriott
474fdebb7a
Handle empty or unset TERM correctly; also fix a fatal() message while here.
2009-07-07 17:24:32 +00:00
Nicholas Marriott
9ced016cbc
When sending a "protocol mismatch" error message, tell the client to exit
...
afterwards, otherwise it hangs.
2009-07-07 12:34:47 +00:00
Nicholas Marriott
e538d4adae
The fix for default-path (use target session options instead of global options)
...
is required here as well, doh.
2009-07-07 07:01:10 +00:00
Nicholas Marriott
eb424cf63d
Minor fix: look for default-path in the options for the specified session first
...
rather than just the global options. From Brandon Mercer, thanks.
2009-07-07 06:58:49 +00:00
Nicholas Marriott
69e150b7e3
Add a section summarising how options work, make the distinction between window
...
and session options clearer, and fix the incorrect synopses and descriptions of
show-options and show-window-options.
2009-07-06 19:50:04 +00:00
Nicholas Marriott
fe5edad1fc
Fix two copy/paste bugs: forbid zero-length buffers to prevent a fatal error
...
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-07-02 16:15:43 +00:00
Nicholas Marriott
4c5c125173
When unlocking the server, don't try to clear the prompt on clients without a
...
prompt (such as the one issuing the unlock request).
This caused the server to die if the wrong password was entered when unlocking
from the command line with -U (nasty).
2009-06-30 13:40:30 +00:00
Nicholas Marriott
68e06fb6b7
Fix two errors with character/line insertion and deletion: the maximum number
...
of characters which may be inserted or deleted is the screen width, not one
less (and similarly for lines and height); and if characters or lines are
deleted by moving the ones that follow, the space at the end needs to be
cleared.
This appears to solve long-standing redraw issues most visible when using the
force-width option then scrolling in view(1) or unwrapping lines in emacs.
2009-06-29 21:30:50 +00:00
Nicholas Marriott
003e8e65f7
Don't try to page up with scroll-mode -u or copy-mode -u unless the mode was
...
successfully changed - if already in a different mode, it would corrupt the
mode data.
2009-06-29 07:11:20 +00:00
Nicholas Marriott
710393e388
Use gmtime_r so the current time isn't overwritten, the minute comparison works
...
and the clock is actually updated. It was already used for lock-server but not
here.
2009-06-27 14:40:22 +00:00
Nicholas Marriott
2660692fb1
Copy the 256-colour flag into the tty saved cell as well as the actual colour,
...
otherwise colour 8 isn't reset properly.
2009-06-27 12:57:14 +00:00
Nicholas Marriott
916669a244
Add missing spaces before some alias closing brackets, otherwise they are
...
shown in the wrong style.
2009-06-26 22:47:06 +00:00
Nicholas Marriott
46f80d01ff
After logging (if enabled) is switched to file, there is no reason to keep
...
stdin/stdout/stderr active, so dup them to /dev/null.
2009-06-26 22:12:19 +00:00
Nicholas Marriott
b11b1dd1c0
Remove some unused function declarations; no binary change.
2009-06-26 19:44:36 +00:00
Nicholas Marriott
1ec736a3dc
Status line fixes: don't truncate status-right now the length calculation is
...
done for UTF-8, limit to the maximum length correctly when printing, and always
print a space even if the left string is longer than the width available.
2009-06-26 15:13:39 +00:00
Nicholas Marriott
c506e7f711
Also #ifndef nitems here, caught by Thomas Jeunet.
2009-06-26 10:55:37 +00:00
Nicholas Marriott
eb8ab96980
Remove some dead assignments, found by sthen with clang.
2009-06-25 22:09:20 +00:00
Nicholas Marriott
e225ce0fd7
#ifndef nitems to avoid redefining it if it is already in a header.
2009-06-25 22:08:15 +00:00
Nicholas Marriott
e8c10f5b34
Use the pane flags not the window flags. Doh.
2009-06-25 08:08:18 +00:00
Marc Espie
5050171f6b
diagflags for diags
...
okay nicm@
2009-06-25 07:42:41 +00:00
Nicholas Marriott
dbbb297d5f
If getcwd() fails, use the user's home directory, or /, instead of failing with
...
an error.
2009-06-25 06:54:32 +00:00
Nicholas Marriott
be17ac1eb2
lines variable can be -1 (to be ignored), so should be signed. Found by lint.
2009-06-25 06:48:23 +00:00
Nicholas Marriott
40c242a6d5
Remove error about using -L and -S together which was never displayed as
...
logging wasn't yet enabled, was unnecessary, and contradicted the man page
which says using -S will cause -L to be ignored.
2009-06-25 06:40:25 +00:00
Nicholas Marriott
a7075f1c66
tmux doesn't and won't need syslog logging, so remove it and some other unused
...
functions found by lint.
Also move a couple of internal function declarations into file scope.
2009-06-25 06:23:10 +00:00
Nicholas Marriott
1675ddb4d1
Miscellaneous unused functions, including one which was basically a
...
duplicate. Found by lint.
2009-06-25 06:15:04 +00:00
Nicholas Marriott
ed8350422e
Nuke unused buffer functions. Found by lint.
...
Also remove some old debug output which was #if 0.
2009-06-25 06:05:47 +00:00
Nicholas Marriott
9144d30848
Unused prototypes. Found by lint, no binary change.
2009-06-25 06:00:45 +00:00
Nicholas Marriott
83078bdcbc
Unused variables. Found by lint, no binary change.
2009-06-25 05:56:44 +00:00
Nicholas Marriott
74d0851ac5
Remove some cruft from the Makefile.
2009-06-24 23:32:18 +00:00
Nicholas Marriott
23326e40cf
Now that a UTF-8-capable puts function exists, use it for printing strings in
...
choice/more modes - lines with UTF-8 now display properly in find-window
results.
2009-06-24 23:00:31 +00:00
Nicholas Marriott
3db2433448
Fix a type mismatch warning in assignment.
2009-06-24 22:51:47 +00:00
Nicholas Marriott
7e796dea03
Change find-window and monitor-content to use fnmatch(3). For convenience and
...
compatibility, *s are implicitly added at the start and end of the pattern.
Also display the line number and the entire line in the results, and lose the
nasty section_string function and the now empty util.c file.
Initially from Tiago Cunha.
2009-06-24 22:49:56 +00:00
Nicholas Marriott
096cbf2ea5
Add a dedicated function to convert a line into a string and use it to simplify the search window function.
2009-06-24 22:04:18 +00:00
Nicholas Marriott
f4b8f00255
Change to match xterm's resizing behaviour, including pushing lines into the
...
history from the top when reducing vertical size and pulling them again when
increasing size.
ok todd sthen
2009-06-24 19:12:44 +00:00
Nicholas Marriott
da8401d8be
Make remain-on-exit work again when there is only one pane left, which was
...
broken sometime during the pane/layout changes. Reported/tested by Iain Morgan,
thanks.
2009-06-24 17:36:15 +00:00
Nicholas Marriott
2de599ac0e
Trying to predict the cursor position for UTF-8 output in the same way as for
...
normal eight-bit output is wrong, separate it into a different function. Fixes
spacing when mixing UTF-8 with some escape sequences, notably the way w3m does
it.
2009-06-24 16:01:02 +00:00
Jason McIntyre
7b4077ef87
tweak previous;
2009-06-24 08:13:22 +00:00
Nicholas Marriott
27cfa81110
Constify utf8_width() function argument.
2009-06-24 05:35:07 +00:00
Nicholas Marriott
013b88dfc3
Mention LC_ALL, LC_CTYPE.
2009-06-23 23:26:08 +00:00
Nicholas Marriott
6d2830a473
Add some common config file examples to the quick start section.
2009-06-23 22:13:11 +00:00
Nicholas Marriott
69f3c24647
If a pane is "zombified" (remain-on-exit flag), don't continue to queue key and
...
mouse input for it (otherwise they are processed after respawn).
2009-06-23 20:17:30 +00:00
Nicholas Marriott
c2b0fdae5b
LC_ALL overrides LC_CTYPE and LANG. Comment was correct but the code
...
wrong. Pointed out by Hannah Schroeter, thanks.
2009-06-23 18:27:40 +00:00
Nicholas Marriott
89262c62fe
Terminate cwd buffer before running xstrdup on it.
2009-06-05 11:14:13 +00:00
Nicholas Marriott
18665b8cc9
Check the first of LC_CTYPE, LC_ALL and LANG, rather than just the last, when
...
trying to decide about UTF-8, and use strcasestr. Reported by Geert Hendrickx.
2009-06-05 07:22:23 +00:00
Nicholas Marriott
a3c32841e6
strdup the input to putenv to avoid in one case passing a string that is later
...
freed and in the other const strings.
looks sane to millert, ok ray
2009-06-05 07:18:37 +00:00
Nicholas Marriott
1156467726
Call setproctitle earlier in the client, and include the socket name. Makes it
...
easier to match client to server in ps/pgrep when using several servers.
2009-06-05 07:15:58 +00:00
Ray Lai
74749e8705
Remove trailing newlines, spaces, and tabs.
...
No binary change.
2009-06-05 03:13:16 +00:00
Nicholas Marriott
85e0d8a221
Print a better message than '(null)' if no command is specified ("tmux \;").
2009-06-04 23:34:32 +00:00
Nicholas Marriott
38b2c42f63
Zero the password given to -U in the client as well.
2009-06-04 21:56:14 +00:00
Nicholas Marriott
50bd094856
If the prompt is hidden or a password is sent with -U, zero it before freeing
...
it.
2009-06-04 21:43:24 +00:00
Nicholas Marriott
f031975dc0
Implement the CBT (backward tab) sequence (\033[Z).
2009-06-04 21:02:21 +00:00
Nicholas Marriott
d42fb43f4f
Proper support for tab stops (\033H etc), using a bitstring(3). Makes another
...
vttest test happy.
2009-06-04 18:48:24 +00:00
Nicholas Marriott
d6015824dd
Okay, so I screwed up when testing this, doh. Unbreak so that CAN/SUB actually
...
do cancel the sequence, and tweak to make the code more clear.
2009-06-04 14:42:14 +00:00
Nicholas Marriott
6c1f03578d
Oops, CAN and SUB should abort the sequence (return to first state), not remain
...
in the same state.
2009-06-04 14:24:49 +00:00
Nicholas Marriott
8dd2f0da3f
More input compatibility love. Support C0 within escape sequences, and the C0
...
control character VT (vertical tab, \013), which is treated as LF like
VT102. Makes another vttest happy.
2009-06-04 14:15:50 +00:00
Jason McIntyre
0ba85cc326
zap trailing whitespace;
2009-06-04 13:36:25 +00:00
Nicholas Marriott
c1a4c0186a
Support insert mode by using insert character to shift the cells before writing
...
as normal.
2009-06-03 23:37:30 +00:00
Nicholas Marriott
52ec9b9ec4
Implement the DEC alignment test. With the last change this is enough for the
...
first cursor test in vttest (in ports) to pass; it still shops a few more
problems though.
2009-06-03 23:30:40 +00:00
Nicholas Marriott
ebe07c2726
Fix some miscalculations when clearing to start of screen: the number of lines
...
to the cursor is cy not cy - 1, and the current cursor cell should be included.
2009-06-03 23:26:56 +00:00
Nicholas Marriott
3f16fcb30a
Use vis(3) instead of handrolled function.
2009-06-03 19:37:27 +00:00
Nicholas Marriott
2faec76afa
Pass window titles through vis(1). <0x20 is dropped anyway by the input state
...
machine but top-bit-set nonprintables could cause trouble, and they are neater
like this anyway.
Suggested by deraadt a few days ago.
2009-06-03 19:33:04 +00:00
Nicholas Marriott
655a1aea6c
Do not set the window title by default (make set-titles option default to off),
...
wiping over the title is rude and annoying. Agreed by several.
2009-06-03 17:04:16 +00:00
Nicholas Marriott
6521427a45
New session option, status-utf8, to control the interpretation of top-bit-set
...
characters in status-left and status-right (if on, they are treated as UTF-8;
otherwise passed through).
2009-06-03 16:54:26 +00:00
Nicholas Marriott
7d45e29683
Add a UTF-8 aware string length function and make UTF-8 in
...
status-left/status-right work properly. At the moment any top-bit-set
characters are assumed to be UTF-8: a status-utf8 option to configure this will
come shortly.
2009-06-03 16:05:46 +00:00
Nicholas Marriott
41d985ace3
Add missing documentation for the -a flag used to move to next/previous window
...
with alert.
2009-06-03 15:58:40 +00:00
Nicholas Marriott
e659aa86b9
Add a section summarising the status line. There are quite a number of status
...
line options, it is something many want to configure, and the meaning of some
bits weren't really documented.
2009-06-03 15:47:14 +00:00
Jason McIntyre
5823854b5e
undo a mistake found by sobrado;
2009-06-03 09:29:06 +00:00
Nicholas Marriott
c5dbec9e85
When swapping pane positions, swap the PANE_HIDDEN flag as well, otherwise tmux
...
crashes when trying to find the new active pane.
While here, nuke an unused pane flag.
Fixes PR 6160, reported by and a slightly different version of diff tested by
ralf.horstmann at gmx.de.
2009-06-03 07:51:24 +00:00
Jason McIntyre
646cfa6983
some cleanup; ok nicm
2009-06-03 06:49:05 +00:00
Ray Lai
fdda4142bf
Cast char to u_char before passing to isalnum().
...
OK nicm@
2009-06-03 04:03:16 +00:00
Nicholas Marriott
3f76a973ee
Recent code to try and detect if a terminal supports UTF-8 by printing to it
...
fails spectacularly on (at least) sparc64, so disable it for now. Thanks to
naddy and Josh Elsasser for help and testing.
2009-06-02 23:39:32 +00:00
Igor Sobrado
4215d009a5
remove unused flag; while here, make usage's output fit on 80-column displays.
2009-06-02 16:53:20 +00:00
Igor Sobrado
a35630838f
sort options alphabetically.
2009-06-02 16:46:00 +00:00
Pierre-Yves Ritschard
dc373abba8
spawn login shells by default, adapt manpage bits as well.
...
ok nicm@
2009-06-02 15:55:32 +00:00
Ray Lai
f60bc7e03b
Don't access array[-1] if array is an empty string.
...
OK nicm@
2009-06-02 11:18:59 +00:00
Ray Lai
49c776ea59
Make code clearer:
...
- if (hdr->size > SIZE_MAX - 1)
+ if (hdr->size == SIZE_MAX)
OK nicm@
2009-06-02 11:17:03 +00:00
Ray Lai
3686645e77
Don't dereference NULL if buf winds up being empty. Can't happen
...
right now according to NicM but better safe than sorry.
OK nicm@
2009-06-02 11:14:08 +00:00
Ray Lai
df91860b52
Don't leak memory if multiple -f flags are given.
...
OK nicm@
2009-06-02 10:49:40 +00:00
Nicholas Marriott
29d4016572
Update the man page with some recent changes to the code:
...
- SIGUSR1 recreates the socket;
- guesswork to work out if the terminal supports UTF-8;
- a paste key for the command prompt;
- main-horizontal layout to match main-vertical, and options to configure the
size of the large pane;
- clear-history command;
- select-layout command.
2009-06-01 23:51:00 +00:00
Nicholas Marriott
6e3f673ef7
Whoops, didn't mean to add this.
2009-06-01 23:00:54 +00:00
Nicholas Marriott
35876eaab9
Import tmux, a terminal multiplexor allowing (among other things) a single
...
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
2009-06-01 22:58:49 +00:00