You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When using the fzf plugin to open a file the plugin displays an annoying "Press enter to close" message before closing the internal terminal. The fzf plugin uses the "RunTermEmulator" function with the "wait" flag set to "false" which I assume it should make it close the internal terminal immediately but instead displays a message that says "Press enter to close" before closing.
Specifications
Version: 2.0.14-dev.131
Commit hash: acb0d76
Compiled on April 10, 2024
OS: Ubuntu 22.04
Terminal: xterm
The text was updated successfully, but these errors were encountered:
I can reproduce this. From micro's code I see that the Press enter to close message actually indicates that an error occurred. So this message seems misleading, and moreover, it doesn't tell us which error occurred.
I've instrumented the code so it says which error is it:
diff --git a/internal/shell/terminal.go b/internal/shell/terminal.go
index 6fb1ce7f..5712efbd 100644
--- a/internal/shell/terminal.go
+++ b/internal/shell/terminal.go
@@ -2,6 +2,7 @@ package shell
import (
"bytes"
+ "fmt"
"os/exec"
"strconv"
@@ -97,7 +98,7 @@ func (t *Terminal) Start(execCmd []string, getOutput bool, wait bool, callback f
for {
err := Term.Parse()
if err != nil {
- Term.Write([]byte("Press enter to close"))
+ Term.Write([]byte(fmt.Sprintf("Press enter to close: %v", err)))
screen.Redraw()
break
}
and I can see the error is:
Press enter to close: read /dev/ptmx: input/output error
When using the fzf plugin to open a file the plugin displays an annoying "Press enter to close" message before closing the internal terminal. The fzf plugin uses the "RunTermEmulator" function with the "wait" flag set to "false" which I assume it should make it close the internal terminal immediately but instead displays a message that says "Press enter to close" before closing.
Specifications
Version: 2.0.14-dev.131
Commit hash: acb0d76
Compiled on April 10, 2024
OS: Ubuntu 22.04
Terminal: xterm
The text was updated successfully, but these errors were encountered: