]> git.cworth.org Git - sup/blobdiff - lib/sup/modes/completion-mode.rb
Merge branch 'index-locking' into next
[sup] / lib / sup / modes / completion-mode.rb
index 638c64e1e523625eda7495b14682ec157afcb385..3cb2fad74dae6d56045cf5b041f9b421ad7290c1 100644 (file)
@@ -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