Re: [PATCH 1/1] kill-window: Unzoom window before looking up winlink

2015-01-06 Thread Nicholas Marriott

applied, thanks



On Sun, Jan 04, 2015 at 02:22:08AM +, Thomas Adam wrote:
> If the window that's being killed is in a zoomed state, unzoom it first,
> otherwise there's no chance of finding the correct winlink, causing tmux to
> exit.
> ---
>  server-fn.c | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/server-fn.c b/server-fn.c
> index 6cab6bd..1ed3a01 100644
> --- a/server-fn.c
> +++ b/server-fn.c
> @@ -270,6 +270,7 @@ server_kill_window(struct window *w)
>  
>   if (session_has(s, w) == NULL)
>   continue;
> + server_unzoom_window(w);
>   while ((wl = winlink_find_by_window(&s->windows, w)) != NULL) {
>   if (session_detach(s, wl)) {
>   server_destroy_session_group(s);
> -- 
> 2.0.1
> 
> 
> --
> Dive into the World of Parallel Programming! The Go Parallel Website,
> sponsored by Intel and developed in partnership with Slashdot Media, is your
> hub for all things parallel software development, from weekly thought
> leadership blogs to news, videos, case studies, tutorials and more. Take a
> look and join the conversation now. http://goparallel.sourceforge.net
> ___
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: [PATCH 1/2] Fix broken reflowing after insert/delete characters

2015-01-06 Thread Nicholas Marriott
This was causing random crashes, so it's clearly still wrong and I've
reverted back to before any of these changes. I don't have time to look
into it further but maybe you want to have a look (with valgrind
maybe?).

Cheers


On Mon, Dec 01, 2014 at 10:23:54PM +, Nicholas Marriott wrote:
> I think this is alright, the calculations seem sensible anyway.
> 
> 
> On Sat, Nov 29, 2014 at 09:31:10PM +, Balazs Kezes wrote:
> > Disregard my previous patch, after a little bit of thinking I came up
> > with this:
> > 
> > diff --git a/grid-view.c b/grid-view.c
> > index a34c5a0..0b890d8 100644
> > --- a/grid-view.c
> > +++ b/grid-view.c
> > @@ -184,9 +184,10 @@ grid_view_insert_cells(struct grid *gd, u_int px, 
> > u_int py, u_int nx)
> > px = grid_view_x(gd, px);
> > py = grid_view_y(gd, py);
> >  
> > -   sx = grid_view_x(gd, gd->linedata[py].cellsize);
> > -   if (sx < px + nx)
> > -   sx = px + nx;
> > +   if (gd->linedata[py].cellsize + nx < gd->sx)
> > +   sx = grid_view_x(gd, gd->linedata[py].cellsize + nx);
> > +   else
> > +   sx = grid_view_x(gd, gd->sx);
> >  
> > if (px == sx - 1)
> > grid_clear(gd, px, py, 1, 1);
> > 
> > For insertion we need to size it to (cellsize+nx) because we have (nx)
> > new characters and now the expression (sx-px-nx) cannot go below zero
> > because (sx-nx) is just (cellsize) and (px) is always strictly smaller
> > than (cellsize). For the other branch, (gd->sx-px-nx >= 0) is guaranteed
> > by the calling site.
> > 
> > And I believe the deletion part is already handled well.
> > 
> > Let me know if there's a better way of testing this than trial and
> > error.
> > 
> > -- 
> > Balazs

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Trick to getting /usr/bin/logname to return a value?

2015-01-06 Thread John
Under tmux 1.9_a, if I run /usr/bin/logname, I do not get my username returned, 
just "logname: no login name."  Is there a setting I need to enable in 
~/.tmux.conf or the like?  Thanks!

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Trick to getting /usr/bin/logname to return a value?

2015-01-06 Thread Thomas Adam
On Tue, Jan 06, 2015 at 10:09:11PM +, John wrote:
> Under tmux 1.9_a, if I run /usr/bin/logname, I do not get my username
> returned, just "logname: no login name."  Is there a setting I need to
> enable in ~/.tmux.conf or the like?  Thanks!

Which OS?  If you're on Linux, install libutempter, this will then allow
the utmp database to be queried, and commands like w, who, and logname
should work.

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Trick to getting /usr/bin/logname to return a value?

2015-01-06 Thread John
- Original Message -

> Which OS?  If you're on Linux, install libutempter, this will then allow
> the utmp database to be queried, and commands like w, who, and logname
> should work.


Thank you for the suggestion. Yes, it is Linux.  I have the libutempter package 
installed, but upon spawning a new tmux session, logname still errors out.  Is 
there a corresponding config option I need to tweak or?

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users


Re: Trick to getting /usr/bin/logname to return a value?

2015-01-06 Thread Thomas Adam
On Tue, Jan 06, 2015 at 10:40:47PM +, John wrote:
> Thank you for the suggestion. Yes, it is Linux.  I have the
> libutempter package installed, but upon spawning a new tmux session,

That's not enough.  You need to install the -dev package, and compile
tmux to use it (it'll check for the utempter header file automatically).

> logname still errors out.  Is there a corresponding config option I
> need to tweak or?

No.  No config option.

-- Thomas Adam

-- 
"Deep in my heart I wish I was wrong.  But deep in my heart I know I am
not." -- Morrissey ("Girl Least Likely To" -- off of Viva Hate.)

--
Dive into the World of Parallel Programming! The Go Parallel Website,
sponsored by Intel and developed in partnership with Slashdot Media, is your
hub for all things parallel software development, from weekly thought
leadership blogs to news, videos, case studies, tutorials and more. Take a
look and join the conversation now. http://goparallel.sourceforge.net
___
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users