fix ext editor open only for files
This commit is contained in:
@@ -224,7 +224,7 @@ func (m *model) Update(msg tea.Msg) (tea.Model, tea.Cmd) {
|
|||||||
m.layout(m.terminalWidth, m.terminalHeight)
|
m.layout(m.terminalWidth, m.terminalHeight)
|
||||||
return m, m.resizeChildren()
|
return m, m.resizeChildren()
|
||||||
case "o":
|
case "o":
|
||||||
if m.tree != nil && m.tree.selectedNode != nil {
|
if m.tree != nil && m.tree.selectedNode != nil && m.tree.selectedNode.nodeType == FileNode {
|
||||||
c := exec.Command("micro", m.tree.selectedNode.path)
|
c := exec.Command("micro", m.tree.selectedNode.path)
|
||||||
c.Stdin = os.Stdin
|
c.Stdin = os.Stdin
|
||||||
c.Stdout = os.Stdout
|
c.Stdout = os.Stdout
|
||||||
|
|||||||
Reference in New Issue
Block a user