Commits

Thibaut Colar committed ba9eaaf

Tweaked menus & ordering. Small fix to search command

Comments (0)

Files changed (3)

src/brie/fan/MenuBar.fan

         it.text = "File"
         MenuItem{ it.command = sys.commands.save.asCommand},
         MenuItem{ it.command = sys.commands.newFile.asCommand},
+        MenuItem{ it.command = sys.commands.openFolder.asCommand},
         MenuItem{ it.command = sys.commands.reload.asCommand},
-        MenuItem{ it.command = sys.commands.openFolder.asCommand},
         MenuItem{ it.command = sys.commands.exit.asCommand},
       }
 
       nav = Menu {
         it.text = "Navigation"
+        MenuItem{ it.command = sys.commands.searchDocs.asCommand},
         MenuItem{ it.command = sys.commands.mostRecent.asCommand},
-        MenuItem{ it.command = sys.commands.prevMark.asCommand},
-        MenuItem{ it.command = sys.commands.nextMark.asCommand},
         MenuItem{ it.command = sys.commands.find.asCommand},
         MenuItem{ it.command = sys.commands.findInSpace.asCommand},
         MenuItem{ it.command = sys.commands.goto.asCommand},
+        MenuItem{ it.command = sys.commands.prevMark.asCommand},
+        MenuItem{ it.command = sys.commands.nextMark.asCommand},
       }
 
       process = Menu {

src/brie/fan/command/Commands.fan

   }
   new make(|This| f) {f(this)}
 }
+
 internal const class HelpCmd : Cmd
 {
-  override const Str name := "Search Docs"
+  override const Str name := "Quick search on selection"
   override Void invoke(Event event)
   {
     selection := frame.curView?.curSelection ?: ""

src/brie/fan/widget/HelpPane.fan

     }
     search.text = text.trim
     pageHistory.clear
-    browser.loadStr(find(search.text))
+    if(search.text.isEmpty)
+      showPage("")
+    else
+      browser.loadStr(find(search.text))
   }
 
   private Void hide()