Compare commits

..

No commits in common. "338d00d6054b7832cf4da83ca7a052258bf5aad4" and "c298b6fc97d000f7a823b21e04464e7cdd8d3a18" have entirely different histories.

24
sdn.cpp
View File

@ -841,11 +841,6 @@ fun resort (const string anchor = at_cursor ().filename) {
focus (anchor);
}
fun show_message (const string &message, int ttl = 30) {
g.message = to_wide (message);
g.message_ttl = ttl;
}
fun reload (bool keep_anchor) {
g.unames.clear ();
while (auto *ent = getpwent ())
@ -864,16 +859,6 @@ fun reload (bool keep_anchor) {
auto now = time (NULL); g.now = *localtime (&now);
auto dir = opendir (".");
g.entries.clear ();
if (!dir) {
show_message (strerror (errno));
if (g.cwd != "/") {
struct dirent f = {};
strncpy(f.d_name, "..", sizeof f.d_name);
f.d_type = DT_DIR;
g.entries.push_back (make_entry (&f));
}
goto readfail;
}
while (auto f = readdir (dir)) {
string name = f->d_name;
// Two dots are for navigation but this ain't as useful
@ -884,7 +869,6 @@ fun reload (bool keep_anchor) {
}
closedir (dir);
readfail:
g.out_of_date = false;
for (int col = 0; col < entry::COLUMNS; col++) {
auto &longest = g.max_widths[col] = 0;
@ -905,6 +889,11 @@ readfail:
(IN_ALL_EVENTS | IN_ONLYDIR | IN_EXCL_UNLINK) & ~(IN_ACCESS | IN_OPEN));
}
fun show_message (const string &message, int ttl = 30) {
g.message = to_wide (message);
g.message_ttl = ttl;
}
fun run_program (initializer_list<const char *> list, const string &filename) {
if (g.ext_helpers) {
// XXX: this doesn't try them all out, though it shouldn't make any
@ -1852,12 +1841,9 @@ int main (int argc, char *argv[]) {
pop_levels (g.cwd);
update ();
// Cunt, now I need to reïmplement all signal handling
#if NCURSES_VERSION_PATCH < 20210821
// This gets applied along with the following halfdelay()
cur_term->Nttyb.c_cc[VSTOP] =
cur_term->Nttyb.c_cc[VSTART] = _POSIX_VDISABLE;
#endif
// Invoking keypad() earlier would make ncurses flush its output buffer,
// which would worsen start-up flickering