Skip to content

Commit

Permalink
Made a minor change that allows this to compiled on i386
Browse files Browse the repository at this point in the history
  • Loading branch information
justjanne committed Sep 1, 2017
1 parent 36489f5 commit b4bec46
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
7 changes: 7 additions & 0 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,13 @@ import (
"strings"
)

const (
MinUnsignedInteger uint = 0
MaxUnsignedInteger = ^MinUnsignedInteger
MaxInteger int = int(MaxUnsignedInteger >> 1)
MinInteger = ^MaxInteger
)

type segment struct {
content string
foreground uint8
Expand Down
3 changes: 1 addition & 2 deletions powerline.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ import (
"strings"

"golang.org/x/text/width"
"math"
"os"
"strconv"
)
Expand Down Expand Up @@ -89,7 +88,7 @@ func (p *powerline) draw() string {
shellActualLength += len(segment.content) + len(segment.separator)
}
for shellActualLength > shellMaxLength {
minPriority := math.MaxInt64
minPriority := MaxInteger
minPrioritySegmentId := -1
for idx, segment := range p.Segments {
if segment.priority < minPriority {
Expand Down

0 comments on commit b4bec46

Please sign in to comment.