mirror of
https://github.com/zyedidia/micro.git
synced 2026-02-15 03:20:20 +09:00
Don't open a new split if help is already open
This commit is contained in:
@@ -466,10 +466,16 @@ func (v *View) ClearAllGutterMessages() {
|
||||
|
||||
// Opens the given help page in a new horizontal split
|
||||
func (v *View) openHelp(helpPage string) {
|
||||
helpBuffer := NewBuffer([]byte(helpPages[helpPage]), helpPage+".md")
|
||||
helpBuffer.Name = "Help"
|
||||
v.HSplit(helpBuffer)
|
||||
CurView().Help = true
|
||||
if v.Help {
|
||||
helpBuffer := NewBuffer([]byte(helpPages[helpPage]), helpPage+".md")
|
||||
helpBuffer.Name = "Help"
|
||||
v.OpenBuffer(helpBuffer)
|
||||
} else {
|
||||
helpBuffer := NewBuffer([]byte(helpPages[helpPage]), helpPage+".md")
|
||||
helpBuffer.Name = "Help"
|
||||
v.HSplit(helpBuffer)
|
||||
CurView().Help = true
|
||||
}
|
||||
}
|
||||
|
||||
func (v *View) drawCell(x, y int, ch rune, combc []rune, style tcell.Style) {
|
||||
|
||||
Reference in New Issue
Block a user