diff --git a/moo/mooterm/mooterm-private.h b/moo/mooterm/mooterm-private.h index f59b7bff..7354da6c 100644 --- a/moo/mooterm/mooterm-private.h +++ b/moo/mooterm/mooterm-private.h @@ -255,6 +255,7 @@ void _moo_term_invalidate (MooTerm *term); void _moo_term_release_selection (MooTerm *term); void _moo_term_grab_selection (MooTerm *term); +void _moo_term_clear_selection (MooTerm *term); /* in mooterm-draw.c */ void _moo_term_pause_cursor_blinking (MooTerm *term); diff --git a/moo/mooterm/mooterm-text.c b/moo/mooterm/mooterm-text.c index 755c00f8..33e1052c 100644 --- a/moo/mooterm/mooterm-text.c +++ b/moo/mooterm/mooterm-text.c @@ -338,6 +338,18 @@ _moo_term_select_range (MooTerm *term, } +void +_moo_term_clear_selection (MooTerm *term) +{ + MooTermIter iter; + + g_return_if_fail (MOO_IS_TERM (term)); + + get_start_iter (term, &iter); + _moo_term_select_range (term, &iter, &iter); +} + + static void get_start_iter (MooTerm *term, MooTermIter *iter) { diff --git a/moo/mooterm/mooterm.c b/moo/mooterm/mooterm.c index a37bb9b7..975b3adc 100644 --- a/moo/mooterm/mooterm.c +++ b/moo/mooterm/mooterm.c @@ -1622,6 +1622,8 @@ _moo_term_setting_request (MooTerm *term, static void moo_term_reset_real (MooTerm *term) { + _moo_term_clear_selection (term); + _moo_term_buffer_freeze_changed_notify (term->priv->primary_buffer); _moo_term_buffer_freeze_cursor_notify (term->priv->primary_buffer); diff --git a/moo/mooterm/mootermpt-unix.c b/moo/mooterm/mootermpt-unix.c index 002a0523..eb84a36a 100644 --- a/moo/mooterm/mootermpt-unix.c +++ b/moo/mooterm/mootermpt-unix.c @@ -234,8 +234,8 @@ fork_argv (MooTermPt *pt_gen, } else { -#if 0 - g_message ("%s: forked child pid %d", G_STRLOC, pt->child_pid); +#if 1 + g_message ("%s: forked child pid %d on fd %d", G_STRLOC, pt->child_pid, pt->master); #endif }