From ea4d0466c410fbaa0d0daea1d080206b882c1156 Mon Sep 17 00:00:00 2001 From: Roi Martin Date: Tue, 26 Jan 2016 09:55:08 +0100 Subject: [PATCH] Rename Gui.ShowCursor to Gui.Cursor for consistency --- _examples/demo.go | 2 +- _examples/mouse.go | 2 +- _examples/stdin.go | 2 +- gui.go | 6 +++--- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/_examples/demo.go b/_examples/demo.go index 6a52c9e..01067c7 100644 --- a/_examples/demo.go +++ b/_examples/demo.go @@ -201,7 +201,7 @@ func main() { } g.SelBgColor = gocui.ColorGreen g.SelFgColor = gocui.ColorBlack - g.ShowCursor = true + g.Cursor = true err = g.MainLoop() if err != nil && err != gocui.ErrQuit { diff --git a/_examples/mouse.go b/_examples/mouse.go index 2631891..9eddfed 100644 --- a/_examples/mouse.go +++ b/_examples/mouse.go @@ -26,7 +26,7 @@ func main() { } g.SelBgColor = gocui.ColorGreen g.SelFgColor = gocui.ColorBlack - g.ShowCursor = true + g.Cursor = true g.Mouse = true err = g.MainLoop() diff --git a/_examples/stdin.go b/_examples/stdin.go index 33725b3..7bee2f2 100644 --- a/_examples/stdin.go +++ b/_examples/stdin.go @@ -25,7 +25,7 @@ func main() { if err := initKeybindings(g); err != nil { log.Fatalln(err) } - g.ShowCursor = true + g.Cursor = true err := g.MainLoop() if err != nil && err != gocui.ErrQuit { diff --git a/gui.go b/gui.go index 17936b4..eb379e1 100644 --- a/gui.go +++ b/gui.go @@ -45,8 +45,8 @@ type Gui struct { // foreground colors of the selected line, when it is highlighted. SelBgColor, SelFgColor Attribute - // If ShowCursor is true then the cursor is enabled. - ShowCursor bool + // If Cursor is true then the cursor is enabled. + Cursor bool // If Mouse is true then mouse events will be enabled. Mouse bool @@ -375,7 +375,7 @@ func (g *Gui) drawFrame(v *View) error { // draw manages the cursor and calls the draw function of a view. func (g *Gui) draw(v *View) error { - if g.ShowCursor { + if g.Cursor { if v := g.currentView; v != nil { maxX, maxY := v.Size() cx, cy := v.cx, v.cy