summary refs log tree commit diff stats
path: root/lib/ui/context.go
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ui/context.go')
-rw-r--r--lib/ui/context.go8
1 files changed, 4 insertions, 4 deletions
diff --git a/lib/ui/context.go b/lib/ui/context.go
index 1665819..d7796bf 100644
--- a/lib/ui/context.go
+++ b/lib/ui/context.go
@@ -3,9 +3,9 @@ package ui
 import (
 	"fmt"
 
-	"github.com/mattn/go-runewidth"
 	"github.com/gdamore/tcell"
 	"github.com/gdamore/tcell/views"
+	"github.com/mattn/go-runewidth"
 )
 
 // A context allows you to draw in a sub-region of the terminal
@@ -40,10 +40,10 @@ func NewContext(width, height int, screen tcell.Screen) *Context {
 
 func (ctx *Context) Subcontext(x, y, width, height int) *Context {
 	vp_width, vp_height := ctx.viewport.Size()
-	if (x < 0 || y < 0) {
+	if x < 0 || y < 0 {
 		panic(fmt.Errorf("Attempted to create context with negative offset"))
 	}
-	if (x + width > vp_width || y + height > vp_height) {
+	if x+width > vp_width || y+height > vp_height {
 		panic(fmt.Errorf("Attempted to create context larger than parent"))
 	}
 	vp := views.NewViewPort(ctx.viewport, x, y, width, height)
@@ -88,7 +88,7 @@ func (ctx *Context) Printf(x, y int, style tcell.Style,
 			crunes := []rune{}
 			ctx.viewport.SetContent(x, y, ch, crunes, style)
 			x += runewidth.RuneWidth(ch)
-			if x == old_x + width {
+			if x == old_x+width {
 				if !newline() {
 					return runewidth.StringWidth(str)
 				}
0800 committer Kartik K. Agaram <vc@akkartik.com> 2015-02-17 17:14:45 -0800 775 - starting to reorg C++ mu to use layers' href='/akkartik/mu/commit/cpp/literate/tangle/001trace.cc?h=hlt&id=515309164793b2e03c15954bf8a89f0f288a7f2c'>51530916 ^
3fada0da ^
51530916 ^

3fada0da ^


51530916 ^


51530916 ^





51530916 ^





30ab0297 ^
51530916 ^
30ab0297 ^
51530916 ^
3fada0da ^
51530916 ^
07cae610 ^
51530916 ^














3fada0da ^
4a943d4e ^
51530916 ^





3fada0da ^

51530916 ^
3fada0da ^
51530916 ^















51530916 ^


3fada0da ^


51530916 ^




3fada0da ^
51530916 ^












51530916 ^

51530916 ^



add9d36d ^

51530916 ^







1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139