[Gambas-devel] BUG: Recent changes to TerminalView stop you from responding to certain prompts

Tony Morehen tmorehen at ...755...
Mon Aug 28 17:50:01 CEST 2017


Mea Culpa.

We need to revert this change.

While the fix I proposed did fix read and git's username/password 
prompts, it broke several terminal-based text editors: nano, joe and 
micro were the one's I tested.  For the editors, you now need to press 
ctrl-M to get a new line.  Emacs though works fine.

As far as read and git are concerned, you can press ctrl-J to get a new 
line.  As well "read -e" will accept ctrl-M as new line.

Obviously, there is no simple fix.  TerminalView needs to detect whether 
the application is expecting keyboard input and so will work only with 
ctrl-M or file-type input (ctrl-J).  I'll follow up on this.

Sorry for the mess.
Tony


On 2017-08-25 05:10 PM, Benoît Minisini wrote:
> Le 25/08/2017 à 22:32, Tony Morehen a écrit :
>> When using terminalview in a terminal program, you cannot respond to 
>> prompts such as git's requests for username and password. Bash's 
>> built-in read command also doesn't work properly.  You can type in 
>> text ok, but when you press enter, all you see is "^M" and nothing 
>> happens. All you can do is press control-C to abort.
>>
>> To duplicate:
>> 1) run FTerminalView in gb.form.terminal
>> 2) enter "read -p '>'
>> 3) type some text, press enter
>> 4) all you see is your text + ^M
>>
>> Potential fix:
>>
>> line 673 in TerminalFilter_VT100, change the False action of the IIf 
>> from "\r" to "\n"
>>
>> gb.form.terminal must be driving you guys nuts.
>>
>> Cheers,
>> Tony
>>
>
> OK, fixed.
>






More information about the Devel mailing list