Skip to content

Commit

Permalink
Improve an error message
Browse files Browse the repository at this point in the history
  • Loading branch information
xyproto committed Sep 4, 2024
1 parent 4c79514 commit 3f8b6ed
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions v2/neweditor.go
Original file line number Diff line number Diff line change
Expand Up @@ -168,11 +168,12 @@ func NewEditor(tty *vt100.TTY, c *vt100.Canvas, fnord FilenameOrData, lineNumber

} else if fileInfo, err := os.Stat(e.filename); err == nil { // no issue

// TODO: Enter file-rename mode when opening a directory?
// Check if this is a directory
if fileInfo.IsDir() {
e.dirMode = true
return nil, "", false, errors.New("dirmode has not been implemented yet")
// TODO: Support opening directories and giving a GitHub-like overview of projects and the git status
// TODO: Consider supporting file rename, finding programming symbols or git push
return nil, "", false, errors.New("can not open directories")
}

warningMessage, err = e.Load(c, tty, fnord)
Expand Down

0 comments on commit 3f8b6ed

Please sign in to comment.