From: NeilBrown Date: Wed, 13 Sep 2023 22:29:28 +0000 (+1000) Subject: Change calls on closed panes to return Efallthrough, not Efail X-Git-Url: http://git.neil.brown.name/?a=commitdiff_plain;h=f809d205122cf2920a61a694e710922c2facbe8c;p=edlib.git Change calls on closed panes to return Efallthrough, not Efail Efail is too harsh. We really want to make it appear that the command doesn't exist. So do that. This fixes a problem with x11selection-xcb where a notification to a closed pane returned Efail which has a large abs value and so drowned out the good results. Signed-off-by: NeilBrown --- diff --git a/DOC/TODO.md b/DOC/TODO.md index cbf5b08c..043b199e 100644 --- a/DOC/TODO.md +++ b/DOC/TODO.md @@ -9,6 +9,8 @@ the file. ### Triage +- [X] open second x11 window, use selections. Close it. command + in x11selection_Xcb gets freed??? - [X] adding new lines at end of doc in x11 leaves phantom underline cursors. - [ ] 20230908090027.6AA0DC05B9@prodcs.lwn.net has a wrapped diff --git a/core-pane.h b/core-pane.h index 335994ff..6c323c44 100644 --- a/core-pane.h +++ b/core-pane.h @@ -139,7 +139,7 @@ static inline int do_call_val(enum target_type type, struct pane *home, /* This pane cannot accept anything but * "Close" or "Close:mark" or "Close:Notify" */ - return Efail; + return Efallthrough; ci.comm = home->handle; ret = ci.comm->func(&ci); break; @@ -149,7 +149,7 @@ static inline int do_call_val(enum target_type type, struct pane *home, if (home) ci.home = home; if (ci.home->damaged & DAMAGED_CLOSED) - return Efail; + return Efallthrough; ci.comm = comm2a; ci.comm2 = comm2b; ret = ci.comm->func(&ci);