Skip to content

Commit

Permalink
dialogs/TextInputDialog: forward KEY_{RETURN,LINEFEED} to caller in "…
Browse files Browse the repository at this point in the history
…fragile" mode

This reverts to the behavior prior to
a8f90d3 when we switched the "jump"
command to TextInputDialog.
  • Loading branch information
MaxKellermann committed Sep 23, 2024
1 parent 73023a0 commit 80dd276
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions NEWS
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
ncmpc 0.51 - not yet released
* repaint main area after terminal was resized
* pressing Enter while in "jump mode" activates selected item

ncmpc 0.50 - (2024-09-12)
* build: require Meson 0.60
Expand Down
5 changes: 5 additions & 0 deletions src/dialogs/TextInputDialog.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,11 @@ bool
TextInputDialog::OnKey(const Window window, int key)
{
if (key == KEY_RETURN || key == KEY_LINEFEED) {
if (fragile) {
Cancel();
return false;
}

SetReady();
return true;
}
Expand Down

0 comments on commit 80dd276

Please sign in to comment.