Comments (1)
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
RunTermEmulator()
uses the https://github.com/zyedidia/terminal library, which opens /dev/ptmx using the https://github.com/creack/pty library, and reads characters from it. Apparently, when finishing running the fzf
job, reading from /dev/ptmx
fails with EIO for some reason.
We can try to debug it further.
Quick googling: https://www.google.com/search?q=%2Fdev%2Fptmx+eio
finds some possibly useful links:
- creack/pty#21 (comment)
- https://unix.stackexchange.com/questions/478815/read2-blocking-behaviour-changes-when-pts-is-closed-resulting-in-read-return
from micro.
Related Issues (20)
- Nightly builds are not the current master branch 😭 HOT 2
- Not working command and comnand switch HOT 2
- Micro 2.0.13 (Windows only) crashes when selecting a directory with "open" HOT 1
- IsWhitespace from util package not working HOT 6
- Alt-Shift-Left or Alt-Shift-Right are not recognized desipte getting detected in raw HOT 2
- Disable micro auto formatting bindings.json when adding new bindings HOT 1
- Garbled contents when reloading file with DOS line endings HOT 8
- Inconsistent keybindings behavior for Alt Shift Combinations HOT 4
- file manager plugin .. go up not work HOT 2
- Feature Request: Editor Width/Margins HOT 2
- JumpToMatchingBrace inconsistent with adjacent unpaired braces e.g. )[ or }( or )( HOT 10
- disable error HOT 2
- Confusion over missing bindings
- Differing copy-paste mechanics between tmux and non-tmux
- Calling clipboard.Write in lua crashes micro HOT 6
- 2.0.13 micro-2.0.13-linux-arm.tar.gz may have been tampered with HOT 11
- Micro panics when cd-ing to root
- How to toggle softwrap + wordwrap in editor, and how to make it a default setting? HOT 1
- Colors in Color Schems appear wrong. HOT 1
- DeleteLine does not delete selected lines
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from micro.