From 48c9fbd1a2bd73fd301edb80a2e9dcaeefff808b Mon Sep 17 00:00:00 2001 From: Cheer Xiao Date: Thu, 26 Feb 2015 15:32:49 +0100 Subject: [PATCH] Move util/ceildiv{"" _test} to edit/ --- {util => edit}/ceildiv.go | 2 +- {util => edit}/ceildiv_test.go | 2 +- edit/writer.go | 3 +-- 3 files changed, 3 insertions(+), 4 deletions(-) rename {util => edit}/ceildiv.go (91%) rename {util => edit}/ceildiv_test.go (96%) diff --git a/util/ceildiv.go b/edit/ceildiv.go similarity index 91% rename from util/ceildiv.go rename to edit/ceildiv.go index cf76e7da..bdbf5883 100644 --- a/util/ceildiv.go +++ b/edit/ceildiv.go @@ -1,4 +1,4 @@ -package util +package edit // CeilDiv computes ceil(float(a)/b) but does not actually use float // arithmetics. diff --git a/util/ceildiv_test.go b/edit/ceildiv_test.go similarity index 96% rename from util/ceildiv_test.go rename to edit/ceildiv_test.go index 692f46ff..c84656f8 100644 --- a/util/ceildiv_test.go +++ b/edit/ceildiv_test.go @@ -1,4 +1,4 @@ -package util +package edit import "testing" diff --git a/edit/writer.go b/edit/writer.go index c1acf11d..3aef1318 100644 --- a/edit/writer.go +++ b/edit/writer.go @@ -9,7 +9,6 @@ import ( "unicode/utf8" "github.com/elves/elvish/edit/tty" - "github.com/elves/elvish/util" ) const ( @@ -473,7 +472,7 @@ tokens: if cols == 0 { cols = 1 } - lines := util.CeilDiv(len(cands), cols) + lines := CeilDiv(len(cands), cols) bs.completionLines = lines // Determine the window to show.