gtk_text_view_get_iter_location(textview, &newpager, &pagerpos);
gtk_text_view_get_iter_location(textview, &end, &endpos);
- g_printerr("View height = %d\n", visiblerect.height);
- g_printerr("End - Pager = %d\n", endpos.y - pagerpos.y);
+ /*g_printerr("View height = %d\n", visiblerect.height);
+ g_printerr("End - Pager = %d\n", endpos.y - pagerpos.y);*/
*view_height = visiblerect.height;
*scroll_distance = endpos.y - pagerpos.y;
/* Add it to the global stream list */
glk_data->stream_list = g_list_prepend(glk_data->stream_list, str);
str->stream_list = glk_data->stream_list;
-
+
return str;
}
win->window_stream->type = STREAM_TYPE_WINDOW;
win->window_stream->window = win;
win->window_stream->style = "normal";
-
+
win->echo_stream = NULL;
win->input_request_type = INPUT_REQUEST_NONE;
win->line_input_buffer = NULL;
if(pair_node != NULL)
{
gboolean new_child_on_left = ( pair_node == g_node_first_sibling(pair_node) );
- GNode *sibling_node = pair_node->children; /* only one child left */
+
+ /* Lookup our sibling */
+ GNode *sibling_node = pair_node->children;
+ if(sibling_node == win->window_node)
+ sibling_node = sibling_node->next;
+
GNode *new_parent_node = pair_node->parent;
g_node_unlink(pair_node);
g_node_unlink(sibling_node);
g_node_append(new_parent_node, sibling_node);
}
+ stream_close_common( ((winid_t) pair_node->data)->window_stream, NULL );
window_close_common( (winid_t) pair_node->data, TRUE);
}
else /* it was the root window */