commit 00eb0941076c694b3ce1eeb5ab8487fc93fcf56e
parent 0c41879f4ea15210f74abea0344a05f8172a70bc
Author: wmorgan <wmorgan@5c8cc53c-5e98-4d25-b20a-d8db53a31250>
Date: Sat, 8 Dec 2007 22:51:26 +0000
bugfix: mod by zero in completino mode
git-svn-id: svn://rubyforge.org/var/svn/sup/trunk@750 5c8cc53c-5e98-4d25-b20a-d8db53a31250
Diffstat:
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/lib/sup/modes/completion-mode.rb b/lib/sup/modes/completion-mode.rb
@@ -28,7 +28,7 @@ private
def update_lines
width = buffer.content_width
max_length = @list.max_of { |s| s.length }
- num_per = buffer.content_width / (max_length + INTERSTITIAL.length)
+ num_per = [1, buffer.content_width / (max_length + INTERSTITIAL.length)].max
@lines = [@header].compact
@list.each_with_index do |s, i|
if @prefix_len