瀏覽代碼

Let user switch to detail mode in case of few columns

master
Arun Prakash Jana 5 年之前
父節點
當前提交
2d72465e7b
沒有發現已知的金鑰在資料庫的簽署中 GPG 金鑰 ID: A75979F35C080412
共有 1 個檔案被更改,包括 1 行新增8 行删除
  1. +1
    -8
      src/nnn.c

+ 1
- 8
src/nnn.c 查看文件

@@ -2740,7 +2740,6 @@ static void redraw(char *path)
static char buf[NAME_MAX + 65] __attribute__ ((aligned));
size_t ncols = COLS;
int nlines = MIN(LINES - 4, ndents), i, attrs;
bool mode_changed = FALSE;

/* Clear screen */
erase();
@@ -2806,10 +2805,9 @@ static void redraw(char *path)
attroff(A_UNDERLINE);

/* Fallback to light mode if less than 35 columns */
if (ncols < 41 && cfg.showdetail) {
if (ncols < 35 && cfg.showdetail) {
cfg.showdetail ^= 1;
printptr = &printent;
mode_changed = TRUE;
}

/* Calculate the number of cols available to print entry name */
@@ -2877,11 +2875,6 @@ static void redraw(char *path)
} else
printmsg("0/0");
}

if (mode_changed) {
cfg.showdetail ^= 1;
printptr = &printent_long;
}
}

static void browse(char *ipath)


Loading…
取消
儲存