瀏覽代碼

dselect: Use max() to compute total_width

Guillem Jover 14 年之前
父節點
當前提交
7abdff8709
共有 1 個文件被更改,包括 1 次插入3 次删除
  1. 1 3
      dselect/baselist.cc

+ 1 - 3
dselect/baselist.cc

@@ -243,9 +243,7 @@ baselist::baselist(keybindings *kb) {
   nitems= 0;
   nitems= 0;
 
 
   gap_width = 1;
   gap_width = 1;
-  total_width = TOTAL_LIST_WIDTH;
-  if (total_width < COLS)
-    total_width = COLS;
+  total_width = max(TOTAL_LIST_WIDTH, COLS);
 
 
   xmax= -1;
   xmax= -1;
   list_height=0; info_height=0;
   list_height=0; info_height=0;