Re: numpad

2010-03-09 Thread Nicholas Marriott
What platform, what terminal, what version of tmux?


On Mon, Mar 08, 2010 at 08:23:40PM -0800, Stealth wrote:
> I can't seem to find a way to get my numpad working in tmux. Is there a
> way to get it working?
> 
> --
> Download Intel® Parallel Studio Eval
> Try the new software tools for yourself. Speed compiling, find bugs
> proactively, and fine-tune applications for parallel performance.
> See why Intel Parallel Studio got high marks during beta.
> http://p.sf.net/sfu/intel-sw-dev
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


[patch] memory leak in status.c

2010-03-09 Thread greg
Hi,

It seems I found a memory leak in tmux. In status_job (status.c), cmd is
allocated and is not released if the command line is parsed without
error.

If someone uses a low value for status-interval (i.e less than 5
seconds) and a long command line for status jobs, memory consumption may
increase quickly.

Patch is in attachment.

Thanks,

Greg

-- 
Gregory Thiemonge
--- tmux/status.c	2010-01-28 23:46:44.0 +0100
+++ tmux.gt/status.c	2010-03-02 10:05:18.0 +0100
@@ -527,6 +527,9 @@
 		JOB_PERSIST, c, cmd, status_job_callback, xfree, NULL);
 		job_run(job);
 	}
+
+	xfree(cmd);
+
 	if (job->data == NULL)
 		return (xstrdup(""));
 	return (xstrdup(job->data));
--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Updated jump-char patch (was called "TtFf.diff").

2010-03-09 Thread Micah Cowan
Brought the patch in-line with IRC feedback from Nicholas.

-- 
Micah J. Cowan
http://micah.cowan.name/
Index: mode-key.c
===
--- mode-key.c.orig	2010-03-09 09:58:37.0 -0800
+++ mode-key.c	2010-03-09 12:17:36.0 -0800
@@ -88,6 +88,12 @@ struct mode_key_cmdstr mode_key_cmdstr_c
 	{ MODEKEYCOPY_GOTOLINE, "goto-line" },
 	{ MODEKEYCOPY_HISTORYBOTTOM, "history-bottom" },
 	{ MODEKEYCOPY_HISTORYTOP, "history-top" },
+	{ MODEKEYCOPY_JUMP, "jump" },
+	{ MODEKEYCOPY_JUMPAGAIN, "jump-again" },
+	{ MODEKEYCOPY_JUMPAGAINREVERSE, "jump-again-reverse" },
+	{ MODEKEYCOPY_JUMPBACK, "jump-back" },
+	{ MODEKEYCOPY_JUMPBEFOREBACK, "jump-before-back" },
+	{ MODEKEYCOPY_JUMPBEFORE, "jump-before" },
 	{ MODEKEYCOPY_LEFT, "cursor-left" },
 	{ MODEKEYCOPY_RECTANGLETOGGLE, "rectangle-toggle" },
 	{ MODEKEYCOPY_MIDDLELINE, "middle-line" },
@@ -177,6 +183,8 @@ struct mode_key_tree mode_key_tree_vi_ch
 const struct mode_key_entry mode_key_vi_copy[] = {
 	{ ' ',			0, MODEKEYCOPY_STARTSELECTION },
 	{ '$',			0, MODEKEYCOPY_ENDOFLINE },
+	{ ',',			0, MODEKEYCOPY_JUMPAGAINREVERSE },
+	{ ';',			0, MODEKEYCOPY_JUMPAGAIN },
 	{ '/',			0, MODEKEYCOPY_SEARCHDOWN },
 	{ '0',			0, MODEKEYCOPY_STARTOFLINE },
 	{ '1',			0, MODEKEYCOPY_STARTNUMBERPREFIX },
@@ -192,6 +200,7 @@ const struct mode_key_entry mode_key_vi_
 	{ '?',			0, MODEKEYCOPY_SEARCHUP },
 	{ 'B',			0, MODEKEYCOPY_PREVIOUSSPACE },
 	{ 'E',			0, MODEKEYCOPY_NEXTSPACEEND },
+	{ 'F',			0, MODEKEYCOPY_JUMPBACK },
 	{ 'G',			0, MODEKEYCOPY_HISTORYBOTTOM },
 	{ 'H',			0, MODEKEYCOPY_TOPLINE },
 	{ 'J',			0, MODEKEYCOPY_SCROLLDOWN },
@@ -199,6 +208,7 @@ const struct mode_key_entry mode_key_vi_
 	{ 'L',			0, MODEKEYCOPY_BOTTOMLINE },
 	{ 'M',			0, MODEKEYCOPY_MIDDLELINE },
 	{ 'N',			0, MODEKEYCOPY_SEARCHREVERSE },
+	{ 'T',			0, MODEKEYCOPY_JUMPBEFOREBACK },
 	{ 'W',			0, MODEKEYCOPY_NEXTSPACE },
 	{ '\002' /* C-b */,	0, MODEKEYCOPY_PREVIOUSPAGE },
 	{ '\003' /* C-c */,	0, MODEKEYCOPY_CANCEL },
@@ -213,6 +223,7 @@ const struct mode_key_entry mode_key_vi_
 	{ '^',			0, MODEKEYCOPY_BACKTOINDENTATION },
 	{ 'b',			0, MODEKEYCOPY_PREVIOUSWORD },
 	{ 'e',  0, MODEKEYCOPY_NEXTWORDEND },
+	{ 'f',			0, MODEKEYCOPY_JUMP },
 	{ 'g',			0, MODEKEYCOPY_HISTORYTOP },
 	{ 'h',			0, MODEKEYCOPY_LEFT },
 	{ 'j',			0, MODEKEYCOPY_DOWN },
@@ -220,6 +231,7 @@ const struct mode_key_entry mode_key_vi_
 	{ 'l',			0, MODEKEYCOPY_RIGHT },
 	{ 'n',			0, MODEKEYCOPY_SEARCHAGAIN },
 	{ 'q',			0, MODEKEYCOPY_CANCEL },
+	{ 't',			0, MODEKEYCOPY_JUMPBEFORE },
 	{ 'v',			0, MODEKEYCOPY_RECTANGLETOGGLE },
 	{ 'w',			0, MODEKEYCOPY_NEXTWORD },
 	{ KEYC_BSPACE,		0, MODEKEYCOPY_LEFT },
@@ -290,6 +302,8 @@ struct mode_key_tree mode_key_tree_emacs
 /* emacs copy mode keys. */
 const struct mode_key_entry mode_key_emacs_copy[] = {
 	{ ' ',			0, MODEKEYCOPY_NEXTPAGE },
+	{ ',',			0, MODEKEYCOPY_JUMPAGAINREVERSE },
+	{ ';',			0, MODEKEYCOPY_JUMPAGAIN },
 	{ '1' | KEYC_ESCAPE,	0, MODEKEYCOPY_STARTNUMBERPREFIX },
 	{ '2' | KEYC_ESCAPE,	0, MODEKEYCOPY_STARTNUMBERPREFIX },
 	{ '3' | KEYC_ESCAPE,	0, MODEKEYCOPY_STARTNUMBERPREFIX },
@@ -301,8 +315,11 @@ const struct mode_key_entry mode_key_ema
 	{ '9' | KEYC_ESCAPE,	0, MODEKEYCOPY_STARTNUMBERPREFIX },
 	{ '<' | KEYC_ESCAPE,0, MODEKEYCOPY_HISTORYTOP },
 	{ '>' | KEYC_ESCAPE,0, MODEKEYCOPY_HISTORYBOTTOM },
+	{ 'F',			0, MODEKEYCOPY_JUMPBACK },
+	{ 'N',			0, MODEKEYCOPY_SEARCHREVERSE },
 	{ 'R' | KEYC_ESCAPE,	0, MODEKEYCOPY_TOPLINE },
 	{ 'R',			0, MODEKEYCOPY_RECTANGLETOGGLE },
+	{ 'T',			0, MODEKEYCOPY_JUMPBEFOREBACK },
 	{ '\000' /* C-Space */,	0, MODEKEYCOPY_STARTSELECTION },
 	{ '\001' /* C-a */,	0, MODEKEYCOPY_STARTOFLINE },
 	{ '\002' /* C-b */,	0, MODEKEYCOPY_LEFT },
@@ -319,12 +336,14 @@ const struct mode_key_entry mode_key_ema
 	{ '\033' /* Escape */,	0, MODEKEYCOPY_CANCEL },
 	{ 'N',			0, MODEKEYCOPY_SEARCHREVERSE },
 	{ 'b' | KEYC_ESCAPE,	0, MODEKEYCOPY_PREVIOUSWORD },
+	{ 'f',			0, MODEKEYCOPY_JUMP },
 	{ 'f' | KEYC_ESCAPE,	0, MODEKEYCOPY_NEXTWORDEND },
 	{ 'g',			0, MODEKEYCOPY_GOTOLINE },
 	{ 'm' | KEYC_ESCAPE,	0, MODEKEYCOPY_BACKTOINDENTATION },
 	{ 'n',			0, MODEKEYCOPY_SEARCHAGAIN },
 	{ 'q',			0, MODEKEYCOPY_CANCEL },
 	{ 'r' | KEYC_ESCAPE,	0, MODEKEYCOPY_MIDDLELINE },
+	{ 't',			0, MODEKEYCOPY_JUMPBEFORE },
 	{ 'v' | KEYC_ESCAPE,	0, MODEKEYCOPY_PREVIOUSPAGE },
 	{ 'w' | KEYC_ESCAPE,	0, MODEKEYCOPY_COPYSELECTION },
 	{ KEYC_DOWN | KEYC_CTRL,0, MODEKEYCOPY_SCROLLDOWN },
Index: tmux.h
===
--- tmux.h.orig	2010-03-09 09:58:37.0 -0800
+++ tmux.h	2010-03-09 12:49:56.0 -0800
@@ -458,6 +458,12 @@ enum mode_key_cmd {
 	MODEKEYCOPY_HALFPAGEUP,
 	MODEKEYCOPY_HISTORYBOTTOM,
 	MODEKEYCOPY_HISTORYTOP,
+	MODEKEYCOPY_JUMP,
+	MODEKEYCOPY_JUMPAGAIN,
+	MODEKEYCOPY_JUMPAGAINREVERSE,
+	MODEKEYCOPY_JUMPBACK,
+	MODEKEYCOPY_JUMPBEFOREBACK,
+	MODEKEYCOPY_JUMPBEFORE,
 	MODEKEYCOPY_LEFT,
 	MODEKEYCOPY_MIDDLELINE,
 	M

Re: numpad

2010-03-09 Thread Stealth
I read both the current FAQ on the website, the one with the source
files, and the man page. I cannot find anything referring to input or
the numeric keypad (I even searched for 'numpad' and 'number pad' as
well as 'numeric keypad').

A little more direction and help than "There is an entry in the FAQ"
would be appreciated.

Thanks


On 3/9/2010 10:54 AM, Nicholas Marriott wrote:
> There is an entry in the FAQ about putty and the numeric keypad.
>
>
> On Tue, Mar 09, 2010 at 08:42:58AM -0800, Stealth wrote:
>   
>> Linux, though SSH (using putty), and tmux 1.1
>>
>> It appears numpad input works fine when running a program in tmux, but
>> not at the shell prompt in tmux.
>>
>> On 3/9/2010 1:20 AM, Nicholas Marriott wrote:
>> 
>>> What platform, what terminal, what version of tmux?
>>>
>>>
>>> On Mon, Mar 08, 2010 at 08:23:40PM -0800, Stealth wrote:
>>>   
 I can't seem to find a way to get my numpad working in tmux. Is there a
 way to get it working?

 --
 Download Intel® Parallel Studio Eval
 Try the new software tools for yourself. Speed compiling, find bugs
 proactively, and fine-tune applications for parallel performance.
 See why Intel Parallel Studio got high marks during beta.
 http://p.sf.net/sfu/intel-sw-dev
 ___
 tmux-users mailing list
 tmux-users@lists.sourceforge.net
 https://lists.sourceforge.net/lists/listinfo/tmux-users
 

--
Download Intel® Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users