This teaches the list/choose windows command to accept -F, and in doing so,
add #{window_panes} to return the total number of panes for a window.
---
trunk/cmd-choose-window.c | 41 ++---
trunk/cmd-list-windows.c | 14 +++---
trunk/format.c
---
trunk/tmux.1 | 51 +++
1 file changed, 43 insertions(+), 8 deletions(-)
diff --git a/trunk/tmux.1 b/trunk/tmux.1
index bc83be1..9b8e404 100644
--- a/trunk/tmux.1
+++ b/trunk/tmux.1
@@ -1036,6 +1036,7 @@ visible pane and negative numbers are li
This teaches the choose/list commands to use -F.
---
trunk/cmd-choose-session.c | 33 +
trunk/cmd-list-sessions.c | 10 ++
2 files changed, 19 insertions(+), 24 deletions(-)
diff --git a/trunk/cmd-choose-session.c b/trunk/cmd-choose-session.c
index d3e
This adds formatting support to break-pane.
---
trunk/cmd-break-pane.c |7 ---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/trunk/cmd-break-pane.c b/trunk/cmd-break-pane.c
index 9d3cbbf..cfa599f 100644
--- a/trunk/cmd-break-pane.c
+++ b/trunk/cmd-break-pane.c
@@ -93,9 +93,
This adds formatting support to new-window.
---
trunk/cmd-new-window.c |6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/trunk/cmd-new-window.c b/trunk/cmd-new-window.c
index ccc6d5e..9425855 100644
--- a/trunk/cmd-new-window.c
+++ b/trunk/cmd-new-window.c
@@ -122,15 +12
This adds the default format options for sessions, windows, clients, buffers
because both templates are used for list-* and choose-*.
Also introduces other default template macros for commands already using
formatting code.
---
trunk/tmux.h | 24
1 file changed, 24 inse
Hi,
Stop buggering about. There's an autogen.sh script you need to run to
generate that.
On May 20, 2012 5:19 AM, "Sinbad" wrote:
>
> On Sun, May 20, 2012 at 9:44 AM, Sinbad wrote:
>
>> On Thu, May 17, 2012 at 1:36 PM, Thomas Adam wrote:
>>
>>> O
soon-to-be released version of tmux. No one knows when
that will be as it's typically "when there's enough changes".
You might want to familiarise yourself with the trunk/NOTES file as this
tells you how to build tmux, especially in terms of running the
bootstrapping script (
On Fri, May 25, 2012 at 02:37:16PM +0530, Sinbad wrote:
> On Tue, May 15, 2012 at 12:23 PM, Thomas Adam wrote:
>
> > Rate limiting support to help with this problem, was added to tmux
> > recently. Again, you'll need to use svn, something you seem reluctant to do?
data->lastsx = ox;
}
Does reverting this fix it for you? (I'm only reading the code here; not
actually tried this.)
It might be worthwhile checking data->rectflag or somesuch, and
conditionally only turn on the feature thi
t tmux. Any idea why this doesn't work? Which shell
> is used to interpret the command: sh, default-shell, $SHELL? My guess
> is "sh".
Yes. It's sh(1). Look here:
execl(_PATH_BSHELL, "sh", "-c&q
. And hey, guess what? You're now free to change it with -F.
-- Thomas Adam
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat landscape has changed and
\
"(#{window_panes} panes) " \
- "[#{window_width}x#{window_height}] " \
- "[layout #{window_layout}] #{window_id}"\
- "#{?window_active, (active),}"
+ "[#{window_width}x#{window_heig
lues when they are technically free to change them,
ironically something they weren't able to do before. :)
-- Thomas Adam
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today&
h, we had this with "move-window -r". Thanks for this, looks good to me.
-- Thomas Adam
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and
threat lands
On Jun 1, 2012 5:26 PM, "Jonathan Daugherty" wrote:
>
> Hi,
>
> I couldn't find this information in the obvious places so I'll ask
> here: when might 1.7 be released?
It's not released yet. That's what the svn version in trunk/ is for.
Thomas
On Jun 1, 2012 5:26 PM, "Jonathan Daugherty" wrote:
>
> Hi,
>
> I couldn't find this information in the obvious places so I'll ask
> here: when might 1.7 be released?
Oh, when? Sorry. Misread that. Svn versions get released whenever. There
tends to be no pattern per se. Presumably when someone ha
On Jun 1, 2012 6:24 PM, "Jonathan Daugherty" wrote:
>
> > > I couldn't find this information in the obvious places so I'll ask
> > > here: when might 1.7 be released?
> >
> > Oh, when? Sorry. Misread that. Svn versions get released
> > whenever. There tends to be no pattern per se. Presumably when
Note that I really couldn't be bothered to unwrap the calls from xfree() to
just use free() directly, given this change just calls free() directly from
xfree() without doing any other checking. Perhaps it doesn't matter though.
It would be a lot of unnecessary noise, IMO, if it were to ch
The C standard dictates that calling free(NULL) is a no-op. So we can
safely assume this to be OK.
This patch removes the fatalx() call in xmalloc.c:xfree() and all callers of
xfree() where they were previously checking for NULL have been removed.
---
trunk/arguments.c | 12 --
On Sun, Jun 03, 2012 at 01:21:47PM +0100, Thomas Adam wrote:
> The C standard dictates that calling free(NULL) is a no-op. So we can
> safely assume this to be OK.
I'm a disaster. I forgot to include some files. Oops. Here's V2,
attached.
-- Thomas Adam
--
"Deep in
---
trunk/window-choose.c | 13 +++--
1 file changed, 3 insertions(+), 10 deletions(-)
diff --git a/trunk/window-choose.c b/trunk/window-choose.c
index a8b8230..8196435 100644
--- a/trunk/window-choose.c
+++ b/trunk/window-choose.c
@@ -53,25 +53,18 @@ struct window_choose_mode_data {
Define the structure for lists of items (window_choose_mode_item) and ensure
that window_choose_add can store them.
---
trunk/tmux.h | 20 ++--
trunk/window-choose.c | 23 ++-
2 files changed, 28 insertions(+), 15 deletions(-)
diff --git a/trunk/tm
The choose-data specific struct is not used anymore.
---
trunk/cmd-choose-buffer.c |5 -
1 file changed, 5 deletions(-)
diff --git a/trunk/cmd-choose-buffer.c b/trunk/cmd-choose-buffer.c
index 535765e..3e803f8 100644
--- a/trunk/cmd-choose-buffer.c
+++ b/trunk/cmd-choose-buffer.c
@@ -41,1
Switch the callback of this command to use the centralised window_choose_ctx
function.
---
trunk/cmd-choose-session.c | 40 ++--
1 file changed, 6 insertions(+), 34 deletions(-)
diff --git a/trunk/cmd-choose-session.c b/trunk/cmd-choose-session.c
index d6b793
---
trunk/cmd-choose-buffer.c | 47 +
1 file changed, 22 insertions(+), 25 deletions(-)
diff --git a/trunk/cmd-choose-buffer.c b/trunk/cmd-choose-buffer.c
index 3e803f8..f55e565 100644
--- a/trunk/cmd-choose-buffer.c
+++ b/trunk/cmd-choose-buffer.c
@@
---
trunk/window-choose.c |5 -
1 file changed, 5 deletions(-)
diff --git a/trunk/window-choose.c b/trunk/window-choose.c
index c7d46d4..073c8c4 100644
--- a/trunk/window-choose.c
+++ b/trunk/window-choose.c
@@ -48,11 +48,6 @@ const struct window_mode window_choose_mode = {
NULL,
Switch the callback of this command to use the centralised window_choose_ctx
function.
---
trunk/cmd-choose-window.c | 44 ++--
1 file changed, 6 insertions(+), 38 deletions(-)
diff --git a/trunk/cmd-choose-window.c b/trunk/cmd-choose-window.c
index 78fda
---
trunk/cmd-choose-window.c | 63 +++--
1 file changed, 32 insertions(+), 31 deletions(-)
diff --git a/trunk/cmd-choose-window.c b/trunk/cmd-choose-window.c
index 8ac0f0c..c4c 100644
--- a/trunk/cmd-choose-window.c
+++ b/trunk/cmd-choose-window.c
@@
Introduce window_choose_data_create() and use struct window_choose_data
therein.
---
trunk/tmux.h |6 +-
trunk/window-choose.c | 55 ++---
2 files changed, 43 insertions(+), 18 deletions(-)
diff --git a/trunk/tmux.h b/trunk/tmux.h
ind
---
trunk/cmd-choose-session.c | 56 +++-
1 file changed, 29 insertions(+), 27 deletions(-)
diff --git a/trunk/cmd-choose-session.c b/trunk/cmd-choose-session.c
index 1a7fc12..8931141 100644
--- a/trunk/cmd-choose-session.c
+++ b/trunk/cmd-choose-session.
xfree(NULL) patches, by the way. :P Hope that's not going to
cause too many problems.
Any questions, do please ask.
Kindly,
-- Thomas Adam
Thomas Adam (14):
Introduce window_choose_ctx()
Convert choose-buffer to use window_choose_ctx()
Convert choose-session to use window_ch
---
trunk/cmd-find-window.c | 56 ++-
1 file changed, 26 insertions(+), 30 deletions(-)
diff --git a/trunk/cmd-find-window.c b/trunk/cmd-find-window.c
index ff8405f..88f84e7 100644
--- a/trunk/cmd-find-window.c
+++ b/trunk/cmd-find-window.c
@@ -30,8 +
Define a common function for each choose command's callback() function when
running the defined action, and setting out the command context, etc.
---
trunk/window-choose.c | 35 +++
1 file changed, 35 insertions(+)
diff --git a/trunk/window-choose.c b/trunk/windo
Switch the callback of this command to use the centralised window_choose_ctx
function.
---
trunk/cmd-choose-buffer.c | 37 ++---
1 file changed, 6 insertions(+), 31 deletions(-)
diff --git a/trunk/cmd-choose-buffer.c b/trunk/cmd-choose-buffer.c
index 29535a2..535
---
trunk/cmd-choose-client.c | 87 +
1 file changed, 32 insertions(+), 55 deletions(-)
diff --git a/trunk/cmd-choose-client.c b/trunk/cmd-choose-client.c
index 5ae882d..7ca4346 100644
--- a/trunk/cmd-choose-client.c
+++ b/trunk/cmd-choose-client.c
@@
good thing to know,
but in the case where you might have malloc()d something or not
(because a certain element hasn't changed, or had a value set), and
you then have to code around that eventuality just to free it, which
is safe w.r.t NULL, creates
t have this check actually needs them, and indeed,
should the implementation of the surrounding code ever change, they'd
have to _remember_ to add them in, presumably, if it's to be
compliant.
Kindly,
-- Thomas Adam
Hi,
On Sun, Jun 03, 2012 at 07:59:06PM +0100, Thomas Adam wrote:
> So some observations/ideas (in no particular order):
>
> * I don't like the free() callbacks to each cmd-choose-* file. Ideally we
> should probably look at centralising these where approp
Hi,
Yes, this was synched in Openbsd patchset 1082. Look in svn trunk. It's not
in a released version of tmux yet.
-- Thomas Adam
On Jun 4, 2012 7:41 PM, "Sébastien le Preste de Vauban" <
ulpianoso...@gmail.com> wrote:
> On Sun, Apr 01, 2012 at 02:50:20AM -0400, James
Also, when panes are synced, I'd like (if possible, but it might be
> confusing and hard to document) that pasting buffer from copy mode is
> made in all panes.
There was a patch for that feature sent to this list recently. I can't say
I'd welcome it myself.
-- Thomas Adam
---
ame
> file, your cursor matches up with the section on all items you are editing.
You'd have to draw a fake cursor in all the other panes. Is this really
worth it, when regardless of which pane is active, the same input is being
s
This adds the "-a" option to detach-client, which will detch all clients but
the one specified with "-t". If "-t" is not specified, the current client
is assumed.
This mimicks the functionality of kill-window, for instance. Requested by
somasin on IRC.
Thomas Adam
This adds an option to the detach-client command to use -a which will detach
all clients except (-a) the target client specified with -t.
---
trunk/cmd-detach-client.c | 16
trunk/tmux.1 |5 +
2 files changed, 17 insertions(+), 4 deletions(-)
diff --git a/t
This teaches the kill-session command about "-a" which will kill all
sessions but the one specified with "-a", including all clients, and unless
"-t" is specified, assumes the current session.
Thomas Adam (1):
Teach kill-session about "-a
This will kill all sessions and detach clients except the session specified
with "-a" and "-t" -- and where "-t" is not given, assumes current session.
---
trunk/cmd-kill-session.c | 20 ++--
trunk/tmux.1 |7 ++-
2 files changed, 20 insertions(+), 7 deletions(
When referring to alerts, don't try and enumerate the type of alert, rather,
mention that an alert occurs. This stops the need to enumerate all the
alert types in more than one place, and indeed, without this patch, not all
the alert types are referenced.
---
trunk/tmux.1 |6 +++---
1 file ch
On Wed, Jun 06, 2012 at 09:05:20PM +0800, lryylryy wrote:
> Hi,
>
> I'm new to tmux. I found that when I resize pane in LXTerminal, It works.
> But when I switched to console use Ctrl+Alt+F1, I cannot resize pane. How
> can I resize pane in console?
Which key-bindi
On Thu, Jun 07, 2012 at 02:29:33PM +0800, lryylryylryy wrote:
> On Wed, 6 Jun 2012 19:37:58 +0100
> Thomas Adam wrote:
>
> > On Wed, Jun 06, 2012 at 09:05:20PM +0800, lryylryy wrote:
> > > Hi,
> > >
> > > I'm new to tmux. I found that when I resize
Previously, each entry's action to be performed from the choose-list,
happened at callback time. Instead, interpolate the command much earlier
before it's added to the choose-list. This makes it easier later on to
chain commands together, such as in choose-tree.
---
trunk/cmd-choose-buffer.c |
isite patch series I mentioned above.
Questions/comments welcome. Would appreciate testing, etc., to ensure I've
not broken anything. ;)
Kindly,
-- Thomas Adam
[1] https://github.com/ThomasAdam/tmux/tree/ta/choose-tree3
Thomas Adam (3):
Introduce window_choose_add_{session,window}()
In
Define an abstraction for adding windows and sessions to a choose list, and
use them for the choose-{window,session} commands.
Both these functions return the struct window_choose_data* pointer.
---
trunk/cmd-choose-session.c | 24 ++--
trunk/cmd-choose-window.c | 26 ++--
file mode 100644
index 000..d14ddf6
--- /dev/null
+++ b/trunk/cmd-choose-tree.c
@@ -0,0 +1,141 @@
+/* $Id$ */
+
+/*
+ * Copyright (c) 2012 Thomas Adam
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the
When a winlink is linked in to multiple sessions, make the alert appear
across all sessions where that winlink is linked to, and on clearing it,
ensure *all* instances of that alert are cleared.
---
trunk/server-window.c |5 ++---
trunk/session.c |8
trunk/tmux.h |
ing windows to clear all flags across winlinks.
Any questions, please ask.
-- Thomas Adam
Thomas Adam (2):
Simplify server_window_check_bell()
Clear WINLINK_ALERTFLAGS across all sessions
trunk/server-window.c | 55 ++---
trunk/session.c |
Rather than duplicating the same logic between monitoring bells in all or
the current window, instead centralise the logic of looping over all
windows, and for the purposes of rendering visual-* alerts, only check the
bell type at that point, and print the appropriate message.
---
trunk/server-win
When a winlink is linked in to multiple sessions, make the alert appear
across all sessions where that winlink is linked to, and on clearing it,
ensure *all* instances of that alert are cleared.
---
V2: Clear more window->flags than just WINDOW_BELL.
trunk/server-window.c | 11 ---
t
aptop to ram;
>> 4) I relaunch mutt with that same keybinding.
I can't reproduce this, but if you're using the SVN version that
compiles with -g in CFLAGS, and a backtrace from gdb from a corefile
would be r
On Sun, Jun 17, 2012 at 10:53:54PM +0100, Thomas Adam wrote:
> Hi,
>
> On 17 June 2012 22:50, Giorgio Lando wrote:
> >
> > On Sun, Jun 17, 2012, at 08:46 PM, Giorgio Lando wrote:
> >> 1) I start tmux;
> >> 2) I launch mutt with the following key binding de
Hi,
On Sun, Jun 17, 2012 at 07:20:08PM +0100, Thomas Adam wrote:
> +/* Clear alert flags for a winlink */
> +void
> +winlink_clear_flags(struct winlink *wl)
> +{
> + struct winlink *wm;
> + struct session *s;
> + struct window *w;
> + u_inti
On Wed, Jun 20, 2012 at 11:44:09AM +, Fabio Spelta wrote:
> Thomas Adam xteddy.org> writes:
>
> >
> >
> > Hi,
> > Yes, this was synched in Openbsd patchset 1082. Look in svn trunk.
>
> Hello,
> I just fetched the latest (so far) version of th
+ data->cy - data->oy;
ox = window_copy_find_length(wp, oy);
if (data->cx != ox) {
-- Thomas Adam
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's securi
I don't have the time to give it any proper attention
right now. Someone else can if they want to.
-- Thomas Adam
--
Live Security Virtual Conference
Exclusive live event will cover all the ways today's s
in input_mouse() -- holding down
ctrl and scrolling down all the way to the bottom of the window causes the
server to crash. :)
-- Thomas Adam
--
Live Security Virtual Conference
Exclusive live event will cover all th
file mode 100644
index 000..4051261
--- /dev/null
+++ b/trunk/cmd-choose-tree.c
@@ -0,0 +1,188 @@
+/* $Id$ */
+
+/*
+ * Copyright (c) 2012 Thomas Adam
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or without fee is hereby granted, provided that the
From: Thomas Adam
Hi,
The following two patches should hopefully be self-explanatory.
They're written against code which is in OpenBSD's tmux but yet in the
portable version, so whomever is looking at these should bear that in mind
when trying to compile this against sourceforge
From: Thomas Adam
Move the choose-session and choose-window commands as wrappers to
choose-tree, and remove references to choose-session.c and choose-window.c
from the Makefile.
---
trunk/Makefile.am |2 --
trunk/cmd-choose-tree.c | 36 ++--
2 files
ine -d exe_cloonix"
>
> If the names are: "ABCDE" for the first machine and "ABCD" for the second
> machine then the launch of the second machine kills silently the first
> one.
I do not understand this. Can
This FAQ entry describes how to query tmux for its default values. A few
people on IRC have asked for this.
---
trunk/FAQ | 13 -
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/trunk/FAQ b/trunk/FAQ
index 4ffd2d5..03ebb8d 100644
--- a/trunk/FAQ
+++ b/trunk/FAQ
@@ -430
On 2 July 2012 18:38, John Magolske wrote:
> With #N shown here to represent "total number of windows in a session"
Use tmux from SVN trunk, and then read up on "FORMATS", specifically
"#{sessio
On Tue, Jul 03, 2012 at 01:25:35PM -0700, John Magolske wrote:
> * Thomas Adam [120702 15:46]:
> > On 2 July 2012 18:38, John Magolske wrote:
> > > With #N shown here to represent "total number of windows in a session"
> >
> > Use tmux from SVN trunk, and
Per NicM's suggestions this patch:
* Reimplements -F for choose-{window,session}, and makes the old syntax
the default, which means configs won't have to change.
* -s and -w to choose-tree are now the session/window flags. -SW are for
formatting.
* Moved #define's from tty.c to tmux.h to al
r now, so I'll be
back after that, should you have any further comments/questions.
Thanks for looking at this, and being patient, I really appreciate it.
Kindly,
-- Thomas Adam
--
Live Security Virtual Conference
Exclusi
Per NicM's suggestions this patch:
* Reimplements -F for choose-{window,session}, and makes the old syntax
the default, which means configs won't have to change.
* -s and -w to choose-tree are now the session/window flags. -SW are for
formatting.
* No more ACS drawing, the tree is rendered
Hi,
Looks like I forgot to change the usage string for choose-tree from its
older flags when it was still in development. I've checked getops and the
man page, they're both correct.
Patch attached, applied on top of tmux in OpenBSD, for your convenience,
Nicholas.
Kindly,
-- Thomas
es are particularly compelling so I'm leaning towards making
> this change, let me think about it...
Did you get a chance to think on this? :)
-- Thomas Adam
--
Live Security Virtual Conference
Exclusive live ev
Remove the "struct tty *" declaration; it's not used anymore.
---
trunk/cmd-choose-tree.c |2 --
1 file changed, 2 deletions(-)
diff --git a/trunk/cmd-choose-tree.c b/trunk/cmd-choose-tree.c
index 0a5cd86..b33bf34 100644
--- a/trunk/cmd-choose-tree.c
+++ b/trunk/cmd-choose-tree.c
@@ -76,7 +76
7;s unambiguous.
[6/6]: I got tired of copying/pasting the same four/fives lines, when
setting the given gc to the values of mode-*, so created a function to do
it, since this was used in window-copy as well.
Questions, do please ask.
Kindly,
-- Thomas Adam
Thomas Adam (6):
Split out winlink c
Make numeric keys and backspace have meaning in choice-mode so that they can
be used later on in prompts, etc.
---
trunk/mode-key.c | 24
trunk/tmux.h |2 ++
2 files changed, 26 insertions(+)
diff --git a/trunk/mode-key.c b/trunk/mode-key.c
index b82e9b9..a5540f
Create a function for setting a given grid_cell to the mode-* values, and
use it.
---
trunk/tmux.h|1 +
trunk/window-copy.c | 10 ++
trunk/window.c | 10 ++
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/trunk/tmux.h b/trunk/tmux.h
index 3fbec0
So that entries as listed in choose-* mode commands can be selected with a
numeric prefix, ensure we know which prefix that is, by maintaining the
index of that item in the array.
---
trunk/tmux.h |5 +++--
trunk/window-choose.c |1 +
2 files changed, 4 insertions(+), 2 deletions(
When rendering windows in choose-mode (via choose-tree and choose-window)
render certain lines in their appropriate alert colour, if set.
---
trunk/window-choose.c |3 +++
1 file changed, 3 insertions(+)
diff --git a/trunk/window-choose.c b/trunk/window-choose.c
index f385763..96d13f5 100644
At the moment, the logic for setting the fg/bg/attr for winlinks happens
only in status_print(). Split out the logic to winlink_set_alert_colours()
so that it can be used elsewhere.
---
trunk/status.c | 33 ++---
trunk/tmux.h |3 +++
trunk/window.c | 45 +
Make all entries in choose-mode use an ever-increasing numeric ID, and
prompt for that ID, if a user presses a number. If the number of items are
less than 10, automatically go to the item -- otherwise issue a "Goto item"
prompt instead.
---
trunk/window-choose.c | 142 ++
On 18 July 2012 15:08, Alexander Artemenko wrote:
> Hi!
>
> Is there any way to figure out tmux's version if I only have a binary?
-V has been supported in tmux for a while now.
-- Thomas Adam
--
Live Se
Whilst it's technically correct that the return type of the cmd-* commands
is an int, it's still part of an enum field, and we already mark the other
commands like this. So do the same for choose-tree.
---
trunk/cmd-choose-tree.c |2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --gi
---
trunk/tmux.1 | 27 +++
1 file changed, 27 insertions(+)
diff --git a/trunk/tmux.1 b/trunk/tmux.1
index 8e834dd..3c72dea 100644
--- a/trunk/tmux.1
+++ b/trunk/tmux.1
@@ -1071,6 +1071,33 @@ section.
This command works only from inside
.Nm .
.It Xo
+.Ic choose-list
+
---
trunk/Makefile.am |1 +
1 file changed, 1 insertion(+)
diff --git a/trunk/Makefile.am b/trunk/Makefile.am
index 890e157..054176f 100644
--- a/trunk/Makefile.am
+++ b/trunk/Makefile.am
@@ -66,6 +66,7 @@ dist_tmux_SOURCES = \
cmd-capture-pane.c \
cmd-choose-buffer.c \
-choose-list.c b/trunk/cmd-choose-list.c
new file mode 100644
index 000..6f28c64
--- /dev/null
+++ b/trunk/cmd-choose-list.c
@@ -0,0 +1,125 @@
+/* $Id$ */
+
+/*
+ * Copyright (c) 2012 Thomas Adam
+ *
+ * Permission to use, copy, modify, and distribute this software for any
+ * purpose with or
Hi,
This adds a choose-list command, allowing user menus to be created.
Hopefully fairly self-explanatory.
Any questions, please do ask.
Kindly,
-- Thomas Adam
Thomas Adam (4):
Introduce window_choose_add_item()
Add cmd-choose-list.c
Build cmd-choose-list.c by adding to Makefile.am
Responsible for displaying list entries in choice mode.
---
trunk/tmux.h |3 +++
trunk/window-choose.c | 33 +
2 files changed, 36 insertions(+)
diff --git a/trunk/tmux.h b/trunk/tmux.h
index 49f053f..0dedd14 100644
--- a/trunk/tmux.h
+++ b/trunk/tmu
On Sun, Jul 15, 2012 at 12:31:08PM +0100, Thomas Adam wrote:
> So that entries as listed in choose-* mode commands can be selected with a
> numeric prefix, ensure we know which prefix that is, by maintaining the
> index of that item in the array.
> ---
> trunk/tmux.h
ask.
Kindly,
-- Thomas Adam
Thomas Adam (7):
Split out winlink colour settings
Render winlink alerts in choose-mode
Define 0-9 and backspace as bindings in choice-mode
Make choose entries use ever-increasing numeric ID
Use #{line} at the start of some default templates
Fix-up templates
Make all entries in choose-mode use an ever-increasing numeric ID, and
prompt for that ID, if a user presses a number. If the number of items are
less than 10, automatically go to the item -- otherwise issue a "Goto item"
prompt instead.
---
trunk/window-choose.c | 142 ++
---
trunk/cmd-choose-tree.c |6 --
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/trunk/cmd-choose-tree.c b/trunk/cmd-choose-tree.c
index b33bf34..46d940d 100644
--- a/trunk/cmd-choose-tree.c
+++ b/trunk/cmd-choose-tree.c
@@ -149,7 +149,8 @@ cmd_choose_tree_exec(struct cmd *
At the moment, the logic for setting the fg/bg/attr for winlinks happens
only in status_print(). Split out the logic to winlink_set_alert_colours()
so that it can be used elsewhere.
---
trunk/status.c | 33 ++---
trunk/tmux.h |3 +++
trunk/window.c | 45 +
Make numeric keys and backspace have meaning in choice-mode so that they can
be used later on in prompts, etc.
---
trunk/mode-key.c | 24
trunk/tmux.h |2 ++
2 files changed, 26 insertions(+)
diff --git a/trunk/mode-key.c b/trunk/mode-key.c
index b82e9b9..a5540f
Create a function for setting a given grid_cell to the mode-* values, and
use it.
---
trunk/tmux.h|1 +
trunk/window-copy.c | 10 ++
trunk/window.c | 10 ++
3 files changed, 13 insertions(+), 8 deletions(-)
diff --git a/trunk/tmux.h b/trunk/tmux.h
index ea4410
Since key-combinations can mark entries, rather than making this different
from the template, add the "line" marker to the template, and allow users to
override that with -F in some commands to turn it off if wanted.
---
trunk/tmux.h | 40
1 file changed,
When rendering windows in choose-mode (via choose-tree and choose-window)
render certain lines in their appropriate alert colour, if set.
---
trunk/window-choose.c |3 +++
1 file changed, 3 insertions(+)
diff --git a/trunk/window-choose.c b/trunk/window-choose.c
index f385763..96d13f5 100644
101 - 200 of 690 matches
Mail list logo