Add function to load runtime files from a directory for a plugin

This commit is contained in:
Zachary Yedidia
2016-09-16 16:15:44 -04:00
parent ab36db7646
commit 243f99aeb1
6 changed files with 30 additions and 19 deletions

View File

@@ -529,7 +529,7 @@ func (v *View) ClearAllGutterMessages() {
// Opens the given help page in a new horizontal split
func (v *View) openHelp(helpPage string) {
if data, err := FindRuntimeFile(FILE_Help, helpPage).Data(); err != nil {
if data, err := FindRuntimeFile(RTHelp, helpPage).Data(); err != nil {
TermMessage("Unable to load help text", helpPage, "\n", err)
} else {
helpBuffer := NewBuffer(data, helpPage+".md")