Skip to content

Commit

Permalink
Rename Gui.ShowCursor to Gui.Cursor for consistency
Browse files Browse the repository at this point in the history
  • Loading branch information
jroimartin committed Jan 26, 2016
1 parent 260872b commit ea4d046
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion _examples/demo.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
2 changes: 1 addition & 1 deletion _examples/mouse.go
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
2 changes: 1 addition & 1 deletion _examples/stdin.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down
6 changes: 3 additions & 3 deletions gui.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down

0 comments on commit ea4d046

Please sign in to comment.