diff options
author | Junegunn Choi <junegunn.c@gmail.com> | 2016-03-02 03:06:21 +0900 |
---|---|---|
committer | Junegunn Choi <junegunn.c@gmail.com> | 2016-03-02 03:14:35 +0900 |
commit | 2ccdf21a1fa0ce64123fe89e1b7931240420e8e6 (patch) | |
tree | 260774a46cd3154e12a9de337777abffc79f520b /src/util/util.go | |
parent | cf8afc527e27600ac9f91127c57f24a9c6727b6c (diff) |
Add --hscroll-off=COL option
Close #513
Diffstat (limited to 'src/util/util.go')
-rw-r--r-- | src/util/util.go | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/src/util/util.go b/src/util/util.go index ab9e7664..4f3d409d 100644 --- a/src/util/util.go +++ b/src/util/util.go @@ -21,6 +21,14 @@ func Max(first int, items ...int) int { return max } +// Min returns the smallest integer +func Min(first int, second int) int { + if first <= second { + return first + } + return second +} + // Min32 returns the smallest 32-bit integer func Min32(first int32, second int32) int32 { if first <= second { |