瀏覽代碼

Remove dir watch before filtering contents

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

+ 13
- 14
src/nnn.c 查看文件

@@ -1249,21 +1249,8 @@ static int nextsel(int *presel)
if (c == 0) {
c = getch();
DPRINTF_D(c);
} else {
/* Unwatch dir if we are still in a filtered view */
#ifdef LINUX_INOTIFY
if (*presel == FILTER && inotify_wd >= 0) {
inotify_rm_watch(inotify_fd, inotify_wd);
inotify_wd = -1;
}
#elif defined(BSD_KQUEUE)
if (*presel == FILTER && event_fd >= 0) {
close(event_fd);
event_fd = -1;
}
#endif
} else
*presel = 0;
}

if (c == -1) {
++idle;
@@ -3144,6 +3131,18 @@ nochange:
printmsg(mark);
goto nochange;
case SEL_FLTR:
/* Unwatch dir if we are still in a filtered view */
#ifdef LINUX_INOTIFY
if (inotify_wd >= 0) {
inotify_rm_watch(inotify_fd, inotify_wd);
inotify_wd = -1;
}
#elif defined(BSD_KQUEUE)
if (event_fd >= 0) {
close(event_fd);
event_fd = -1;
}
#endif
presel = filterentries(path);
/* Save current */
if (ndents)


Loading…
取消
儲存