slviajero / tinybasic

A BASIC interpreter for Arduino, ESP, RP2040, STM32, Infineon XMC and POSIX with IoT and microcontroller features.
GNU General Public License v3.0
203 stars 31 forks source link

backspace can go before start of input #37

Closed henk1955 closed 1 year ago

henk1955 commented 1 year ago

i changed this in hardware-arduino.h lines 3547 ... } else if ( (c == 127 || c == 8) && z.a>1) { z.a--; } else { b[z.a++]=c; }

to

} else if (c == 127 || c == 8){ if( z.a>1) { z.a--; } } else { b[z.a++]=c; }

slviajero commented 1 year ago

oh yes, this seems to be a good idea

Sent from my iPhone

On Dec 5, 2022, at 5:16 PM, henk1955 @.***> wrote:

 i changed this in hardware-arduino.h lines 3547 ... } else if ( (c == 127 || c == 8) && z.a>1) { z.a--; } else { b[z.a++]=c; }

to

} else if (c == 127 || c == 8){ if( z.a>1) { z.a--; } } else { b[z.a++]=c; }

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

slviajero commented 1 year ago

fixed and tested, thank you, will make this part of the main code