On machines with a slow CPU (Atom) and a highres screen drawing the diskcrypt dialog may take longer then the keyrepeat speed, this leads to a long delay before showing keypresses when doing the following:
1) Type long password 2) Realize it is wrong, press + hold backspace the key-repeat will now generate backspace key presses faster then we process them as main.c does an update_display for each press 3) Users releases backspace when we've processed input-length backspace key-presses, but since we were drawing slower then key-presses were coming in many more backspace keypresses are in the keyboard buffer 4) User types first character of the right password, this shows up up to a couple of seconds later because first we are still processing all the queued up backspace presses and doing a redraw for each.
This commit fixes this by skipping the redraws in on_backspace when there is no more input left in the input buffer.
da27e42 main: Do not update the display on backspace when there is no input to remove
src/main.c | 2 ++
1 file changed, 2 insertions(+)