mirror of
https://github.com/jarun/nnn.git
synced 2024-11-28 05:41:31 +00:00
Fix #692 (partially)
This commit is contained in:
parent
5e3a793480
commit
75c34d5f68
|
@ -688,7 +688,7 @@ static uint fcolors[C_UND + 1] = {0};
|
||||||
|
|
||||||
/* Event handling */
|
/* Event handling */
|
||||||
#ifdef LINUX_INOTIFY
|
#ifdef LINUX_INOTIFY
|
||||||
#define NUM_EVENT_SLOTS 32 /* Make room for 8 events */
|
#define NUM_EVENT_SLOTS 32 /* Make room for 32 events */
|
||||||
#define EVENT_SIZE (sizeof(struct inotify_event))
|
#define EVENT_SIZE (sizeof(struct inotify_event))
|
||||||
#define EVENT_BUF_LEN (EVENT_SIZE * NUM_EVENT_SLOTS)
|
#define EVENT_BUF_LEN (EVENT_SIZE * NUM_EVENT_SLOTS)
|
||||||
static int inotify_fd, inotify_wd = -1;
|
static int inotify_fd, inotify_wd = -1;
|
||||||
|
@ -5022,6 +5022,9 @@ static void populate(char *path, char *lastname)
|
||||||
#ifndef NOFIFO
|
#ifndef NOFIFO
|
||||||
static void notify_fifo(bool force)
|
static void notify_fifo(bool force)
|
||||||
{
|
{
|
||||||
|
if (!fifopath)
|
||||||
|
return;
|
||||||
|
|
||||||
if (fifofd == -1) {
|
if (fifofd == -1) {
|
||||||
fifofd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC);
|
fifofd = open(fifopath, O_WRONLY|O_NONBLOCK|O_CLOEXEC);
|
||||||
if (fifofd == -1) {
|
if (fifofd == -1) {
|
||||||
|
@ -5081,7 +5084,6 @@ static void move_cursor(int target, int ignore_scrolloff)
|
||||||
curscroll = MAX(curscroll, MAX(cur - (onscreen - 1), 0));
|
curscroll = MAX(curscroll, MAX(cur - (onscreen - 1), 0));
|
||||||
|
|
||||||
#ifndef NOFIFO
|
#ifndef NOFIFO
|
||||||
if (fifopath)
|
|
||||||
notify_fifo(FALSE);
|
notify_fifo(FALSE);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue