瀏覽代碼

Experimental: guards to reduce repeat screen redraws

master
Arun Prakash Jana 4 年之前
父節點
當前提交
ddaddcaf21
沒有發現已知的金鑰在資料庫的簽署中 GPG Key ID: A75979F35C080412
共有 1 個文件被更改,包括 9 次插入5 次删除
  1. +9
    -5
      src/nnn.c

+ 9
- 5
src/nnn.c 查看文件

@@ -4917,8 +4917,6 @@ static void redraw(char *path)
xlines = LINES;
xcols = COLS;

DPRINTF_S(__FUNCTION__);

int ncols = (xcols <= PATH_MAX) ? xcols : PATH_MAX;
int onscreen = xlines - 4;
int i;
@@ -4932,6 +4930,8 @@ static void redraw(char *path)
return draw_line(path, ncols);
}

DPRINTF_S(__FUNCTION__);

/* Clear screen */
erase();

@@ -5141,7 +5141,9 @@ begin:
#endif

while (1) {
redraw(path);
/* Do not do a double redraw in filterentries */
if ((presel != FILTER) || !filterset())
redraw(path);

/* Display a one-time message */
if (listpath && (g_states & STATE_MSG)) {
@@ -5667,8 +5669,10 @@ nochange:
/* In case of successful operation, reload contents */

/* Continue in type-to-nav mode, if enabled */
if ((cfg.filtermode || filterset()) && !refresh)
break;
if ((cfg.filtermode || filterset()) && !refresh) {
presel = FILTER;
goto nochange;
}

/* Save current */
if (ndents)


Loading…
取消
儲存