[readline] some minor cleanup from the last checkin

pull/69/head
Timothy Stack 11 years ago
parent af3524bbf6
commit 165958f92d

@ -1519,7 +1519,8 @@ static void handle_paging_key(int ch)
}
lnav_data.ld_mode = LNM_COMMAND;
lnav_data.ld_rl_view->focus(LNM_COMMAND, ":");
lnav_data.ld_bottom_source.set_prompt("Enter an lnav command:");
lnav_data.ld_bottom_source.set_prompt("Enter an lnav command: "
"(Press CTRL+] to abort)");
break;
case '/':
@ -1529,7 +1530,8 @@ static void handle_paging_key(int ch)
get_top();
lnav_data.ld_rl_view->focus(LNM_SEARCH, "/");
lnav_data.ld_bottom_source.set_prompt(
"Enter a regular expression to search for:");
"Enter a regular expression to search for: "
"(Press CTRL+] to abort)");
break;
case ';':
@ -1553,7 +1555,7 @@ static void handle_paging_key(int ch)
tc->reload_data();
}
lnav_data.ld_bottom_source.set_prompt(
"Enter an SQL query:");
"Enter an SQL query: (Press CTRL+] to abort)");
}
break;

@ -62,7 +62,6 @@
using namespace std;
static int got_line = 0;
static int got_abort = 0;
static sig_atomic_t got_timeout = 0;
static sig_atomic_t got_winch = 0;
static readline_curses *child_this;
@ -436,7 +435,6 @@ void readline_curses::start(void)
struct itimerval itv;
got_line = 0;
got_abort = 0;
itv.it_value.tv_sec = 0;
itv.it_value.tv_usec = 0;
itv.it_interval.tv_sec = 0;
@ -488,12 +486,8 @@ void readline_curses::line_ready(const char *line)
char msg[1024];
int rc;
if (got_abort) {
snprintf(msg, sizeof(msg), "a");
}
else {
rc = history_expand(rl_line_buffer, expanded.out());
switch (rc) {
rc = history_expand(rl_line_buffer, expanded.out());
switch (rc) {
#if 0
/* TODO: fix clash between history and pcre metacharacters */
case -1:
@ -504,16 +498,15 @@ void readline_curses::line_ready(const char *line)
break;
#endif
case -1:
snprintf(msg, sizeof(msg), "d:%s", line);
break;
case -1:
snprintf(msg, sizeof(msg), "d:%s", line);
break;
case 0:
case 1:
case 2: /* XXX */
snprintf(msg, sizeof(msg), "d:%s", expanded.in());
break;
}
case 0:
case 1:
case 2: /* XXX */
snprintf(msg, sizeof(msg), "d:%s", expanded.in());
break;
}
if (reliable_send(this->rc_command_pipe[RCF_SLAVE],

Loading…
Cancel
Save