Hi Nicholas,

What about this?

On Tue, Jul 26, 2011 at 7:05 PM, David Coppa <dco...@gmail.com> wrote:
> On Tue, Jul 26, 2011 at 9:23 AM, Nicholas Marriott
> <nicholas.marri...@gmail.com> wrote:
>> Yes it is trying to set the window title (three times in fact for some 
>> reason):
>>
>> ^[]0;Paolo Fresu & Uri Caine - Darn That Dream^G
>>
>> IIRC this will make wscons freeze. This is because it expects OSC to be
>> terminated by ST (\033\) not by ^G (\007). So it sits waiting for the
>> end that will never arrive.
>>
>> I can't try it right now but you will probably be able to see the same
>> with eg:
>>
>> $ printf "\033]0;abc\007"
>>
>> If that does reproduce the behaviour then that's the problem.
>>
>> I think wscons actually technically does the right thing here - C0 are
>> supposed to operate as normal inside escape sequences. I'm not sure
>> where this idea that BEL should terminate OSC came from. However, it is
>> pretty much the de facto standard now (ie, xterm supports it). Something
>> like this might do it but not tested:
>>
>> Index: wsemul_vt100.c
>> ===================================================================
>> RCS file: /cvs/src/sys/dev/wscons/wsemul_vt100.c,v
>> retrieving revision 1.27
>> diff -u -p -r1.27 wsemul_vt100.c
>> --- wsemul_vt100.c      1 Sep 2010 21:17:16 -0000       1.27
>> +++ wsemul_vt100.c      26 Jul 2011 07:19:20 -0000
>> @@ -386,7 +386,10 @@ wsemul_vt100_output_c0c1(struct wsemul_v
>>                /* ignore */
>>                break;
>>        case ASCII_BEL:
>> -               wsdisplay_emulbell(edp->cbcookie);
>> +               if (edp->state == VT100_EMUL_STATE_STRING)
>> +                       edp->state = VT100_EMUL_STATE_NORMAL;
>> +               else
>> +                       wsdisplay_emulbell(edp->cbcookie);
>>                break;
>>        case ASCII_BS:
>>                if (edp->ccol > 0) {
>
> Your patch works.
>
> ncmpcpp no longer hangs on console *with enable_window_title set to yes*.
>
> Can it be committed?
>
> cheers,
> David
>

Reply via email to