On Tue, Jan 29, 2013 at 6:10 PM, Thomas Adam <[email protected]> wrote:
>
> Your patch segfaults tmux when I do this:
>
> tmux -Stemp -Ltemp -f/dev/null
> ^b:setw reflow
> ^b"
>
> (That is, start tmux on a new server with your patch compiled;
> immediately set the 'reflow' option on the window; then call 'splitw'
> on it.)
Good catch, Thomas. Your stack trace was invaluable, as I wouldn't
have known how to reproduce this crash without it. This only happens
when there's a UTF-8 character in the grid; you must have one in your
prompt. I wasn't setting the new grid with UTF-8 appropriately. See my
extra patch below.
diff --git a/grid.c b/grid.c
index 0b8e0cd..4f07bf8 100644
--- a/grid.c
+++ b/grid.c
@@ -580,6 +580,9 @@ grid_reflow(struct grid *dst, const struct grid
*src, u_int sx)
}
}
grid_set_cell(dst, px, py, gl->celldata + cell);
+ if (gl->celldata[cell].flags & GRID_FLAG_UTF8) {
+ grid_set_utf8(dst, px, py, gl->utf8data + cell);
+ }
px++;
}
prev_line_wrapped = gl->flags & GRID_LINE_WRAPPED;
------------------------------------------------------------------------------
Everyone hates slow websites. So do we.
Make your web apps faster with AppDynamics
Download AppDynamics Lite for free today:
http://p.sf.net/sfu/appdyn_d2d_jan
_______________________________________________
tmux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/tmux-users