micro-editor/micro · error
Terminal emulator is not supported on this system
Error message
Terminal emulator is not supported on this system
What it means
Returned by NewTermPane (internal/action/termpane.go:64) when the compiled-in constant TermEmuSupported is false — i.e. the same unsupported-platform condition as error [10], re-checked at the constructor as defense in depth. It prevents constructing a TermPane (which wraps a shell.Terminal plus display.TermWindow) in a build that has no pty support.
Source
Thrown at internal/action/termpane.go:64
}
func termMapMouse(k MouseEvent, action string) {
// TODO: map mouse
termMapKey(k, action)
}
type TermPane struct {
*shell.Terminal
display.Window
mouseReleased bool
id uint64
tab *Tab
}
func NewTermPane(x, y, w, h int, t *shell.Terminal, id uint64, tab *Tab) (*TermPane, error) {
if !TermEmuSupported {
return nil, errors.New("Terminal emulator is not supported on this system")
}
th := new(TermPane)
th.Terminal = t
th.id = id
th.mouseReleased = true
th.Window = display.NewTermWindow(x, y, w, h, t)
th.tab = tab
return th, nil
}
func (t *TermPane) ID() uint64 {
return t.id
}
func (t *TermPane) SetID(i uint64) {
t.id = i
}View on GitHub (pinned to 1c8b82b32e)
Solutions
- Gate the call: if !action.TermEmuSupported { skip / show message } before NewTermPane
- Ensure your build compiles terminal_supported.go (unix) and never both stub and real implementation — check custom build tags in forks
- For users: use WSL or an external terminal instead of the internal pane on Windows
Example fix
// before
tp, err := NewTermPane(x, y, w, h, term, id, tab) // always errs on windows
// after
if !TermEmuSupported {
return nil, errors.New("Terminal emulator is not supported on this system")
}
tp, err := NewTermPane(x, y, w, h, term, id, tab) Defensive patterns
Strategy: type-guard
Validate before calling
if !action.TermEmuSupported {
return nil, errors.New("terminal panes unavailable in this build")
}
tp, err := action.NewTermPane(x, y, w, h, term, id, tab) Type guard
// Guard before constructing the pane
func newTermPaneSafe(x, y, w, h int, t *shell.Terminal, id uint64, tab *action.Tab) (*action.TermPane, error) {
if !action.TermEmuSupported {
return nil, errors.New("Terminal emulator is not supported on this system")
}
return action.NewTermPane(x, y, w, h, t, id, tab)
} Try / catch
tp, err := NewTermPane(v.X, v.Y, v.Width, v.Height, t, id, MainTab())
if err != nil {
if strings.Contains(err.Error(), "not supported on this system") {
// build lacks pty support: present the external-shell fallback once
InfoBar.Error(err)
return nil
}
return err
} Prevention
- Never construct TermPane without first checking the TermEmuSupported constant
- In forks, make sure build tags select exactly one of terminal_supported.go / terminal_unsupported.go
- Plugin UIs should hide the '> term' entry when the guard reports false
When it happens
Trigger: Calling action.NewTermPane(...) directly (as command.go:1161 and terminal_supported.go:37 do) in a windows/plan9 build, or a fork/vendor that compiles termpane.go without terminal_supported.go so the constant stays false.
Common situations: Plugin code constructing terminal panes manually; maintainers porting micro to a new OS where the build tags were not updated and the unsupported stub still links.
Related errors
AI-assisted analysis of micro-editor/micro@1c8b82b32e (2026-08-15).
Data as JSON: /api/errors/9e86c01ad38a6306.
Report an issue: GitHub.