Skip to content
  • Íñigo Huguet's avatar
    nmtui: fix deletion confirmation with ESC key press · 8f5a4f95
    Íñigo Huguet authored
    When deleting a profile, the confirmation dialog shows "Cancel" and
    "Delete" buttons. ESC key should do nothing, but in some distributions
    like Debian and Ubuntu newt has a downstream patch that enables it (see
    https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=584098).
    
    In that case, when pressing ESC the return value of the dialog is not
    "Cancel" (1) or "Delete" (2), but the "otherwise" value (0). Fix it by
    not checking if "Cancel" is pressed. Instead, check if "Delete" was
    pressed, and continue deleting only in that case.
    
    Also, fix the doc comment that incorrectly says that the dialog returns
    0/1 for the buttons, it is 1/2.
    8f5a4f95