4

When I use io.read() I get input from the user but when I do so it wont count backspaces, so if I type:

blah blah blaht

when my program wants input then if I delete the t:

blah blah blah

It still reads it as if the t is there, help?

EDIT: Only does this when debugging, im using SciTE, thx

Tiago Sippert
  • 1,324
  • 7
  • 24
  • 33

1 Answers1

1

I have been trying to figure this out for a long time and I came across this:

You have two programs here: SciTE and cmd. SciTE sends each visible character like 'r' through to cmd as soon as it is typed. ScITE interprets the backspace key internally to change the buffer but does not send the key through to cmd. You can not edit a command line as you want. Simplest to type Enter and try again. (source)

Unfortunately it doesn't seem to be possible to fix this.

Your best options are:

  1. Execute the Lua script outside of SciTE and then you wont have this issue
  2. Use another editor
MrHappyAsthma
  • 6,332
  • 9
  • 48
  • 78