Commit 83d04891 authored by Nalin Dahyabhai's avatar Nalin Dahyabhai

make row_data a structure containing an array instead of a simple array.

* src/vte.c: make row_data a structure containing an array instead of a simple
	array.  Add a field to row data structures which tracks whether or not
	we soft-wrapped from this line to the next one.  Make use of the field
	when copying text and selecting by "line".
* src/reflect.c: put the label in a scrolled window to avoid mad loops when we
	resize it to accomodate more text, which shrinks the terminal, which
	removes text from the label, which resizes it to be smaller, which
	gives the terminal more space, which adds text to the viewable area,
	which requires a bigger label, and so on.
* src/vte.c: move vte_terminal_get_text_range logic into
	vte_terminal_get_text_range_maybe_wrapped for internal use,
	vte_terminal_get_text likewise.
parent 05b79cf4
2003-04-15 nalin
* src/vte.c: make row_data a structure containing an array instead of a
simple array. Add a field to row data structures which tracks whether
or not we soft-wrapped from this line to the next one. Make use of the
field when copying text and selecting by "line".
* src/reflect.c: put the label in a scrolled window to avoid mad loops
when we resize it to accomodate more text, which shrinks the terminal,
which removes text from the label, which resizes it to be smaller, which
gives the terminal more space, which adds text to the viewable area,
which requires a bigger label, and so on.
* src/vte.c: move vte_terminal_get_text_range logic into
vte_terminal_get_text_range_maybe_wrapped for internal use,
vte_terminal_get_text likewise.
2003-04-14 nalin
* src/vte.c: don't snap the beginning of selection to the next line in
select-by-line mode.
......
......@@ -403,7 +403,7 @@ init_term_with_defaults(struct termios* term)
#endif
/* These two may overlap so set them first */
/* That setup means, that read() will be blocked untill */
/* That setup means, that read() will be blocked until */
/* at least 1 symbol will be read. */
term->c_cc[VMIN] = 1;
term->c_cc[VTIME] = 0;
......
......@@ -340,7 +340,7 @@ terminal_adjustment(GtkWidget *terminal)
int
main(int argc, char **argv)
{
GtkWidget *label, *terminal, *tophalf, *pane, *window, *scrollbar;
GtkWidget *label, *terminal, *tophalf, *pane, *window, *scrollbar, *sw;
AtkObject *obj;
char *text, *p;
gunichar c;
......@@ -375,11 +375,15 @@ main(int argc, char **argv)
gtk_label_set_justify(GTK_LABEL(label), GTK_JUSTIFY_LEFT);
gtk_misc_set_alignment(GTK_MISC(label), 0, 0);
sw = gtk_scrolled_window_new(NULL, NULL);
gtk_scrolled_window_add_with_viewport(GTK_SCROLLED_WINDOW(sw), label);
gtk_widget_show(label);
pane = gtk_vpaned_new();
gtk_paned_pack1(GTK_PANED(pane), tophalf, TRUE, FALSE);
gtk_paned_pack2(GTK_PANED(pane), label, TRUE, FALSE);
gtk_paned_pack2(GTK_PANED(pane), sw, TRUE, FALSE);
gtk_widget_show(tophalf);
gtk_widget_show(label);
gtk_widget_show(sw);
window = gtk_window_new(GTK_WINDOW_TOPLEVEL);
g_signal_connect(G_OBJECT(window), "delete_event",
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment