Micro delivers mouse events, including mouse release events, to the currently active pane or tab only. As a result, in the following scenario:
press a mouse button on an active pane or tab
switch to another pane or tab (or, for example, switch to the infopane, e.g. begin typing a command), while keeping the mouse button pressed
release the mouse button
the mouse release event is delivered to the new active pane, not to the original one. As a result, when we switch again to the original pane, it thinks that the mouse is still pressed, and thus handles mouse events incorrectly.
Some examples of issues caused by this bug:
If the file opened in the bufpane has been modified by another program and then we click on the bufpane with the mouse, micro shows The file on disk has changed. Reload file? (y,n,esc) prompt. And then, after pressing y in this prompt, scrolling via the mouse wheel stops working. It starts working again only after clicking a mouse button once again. (In this case, the issue occurs because the prompt switches the focus from the bufpane to the infopane immediately after the mouse is pressed, before it is released.)
Press a mouse button, switch to another split pane via Ctrl-w (without releasing the mouse), release the mouse and switch back to the original pane. Then click mouse somewhere in that pane. Result: unexpected text selection.
Begin resizing a split pane by dragging the split pane divider with the mouse, switch to another tab via Alt-. (without releasing the mouse), release the mouse and switch back to the original tab. Then click mouse somewhere. Result: unexpected resize of the split pane.
Micro delivers mouse events, including mouse release events, to the currently active pane or tab only. As a result, in the following scenario:
the mouse release event is delivered to the new active pane, not to the original one. As a result, when we switch again to the original pane, it thinks that the mouse is still pressed, and thus handles mouse events incorrectly.
Some examples of issues caused by this bug:
If the file opened in the bufpane has been modified by another program and then we click on the bufpane with the mouse, micro shows
The file on disk has changed. Reload file? (y,n,esc)
prompt. And then, after pressingy
in this prompt, scrolling via the mouse wheel stops working. It starts working again only after clicking a mouse button once again. (In this case, the issue occurs because the prompt switches the focus from the bufpane to the infopane immediately after the mouse is pressed, before it is released.)Press a mouse button, switch to another split pane via
Ctrl-w
(without releasing the mouse), release the mouse and switch back to the original pane. Then click mouse somewhere in that pane. Result: unexpected text selection.Begin resizing a split pane by dragging the split pane divider with the mouse, switch to another tab via
Alt-.
(without releasing the mouse), release the mouse and switch back to the original tab. Then click mouse somewhere. Result: unexpected resize of the split pane.Commit hash: f386b29e OS: any Terminal: any