mirror of
https://github.com/tstack/lnav
synced 2024-11-03 23:15:38 +00:00
[mouse] update the status line when the mouse is enabled/disabled
This commit is contained in:
parent
1850c4f678
commit
deccd51bdf
@ -794,7 +794,8 @@ private:
|
||||
|
||||
blank.e_token = DT_QUOTED_STRING;
|
||||
blank.e_capture.c_begin = blank.e_capture.c_end = pair_subs.front().e_capture.c_end;
|
||||
if (blank.e_capture.c_begin < pi.pi_length) {
|
||||
if ((blank.e_capture.c_begin >= 0) &&
|
||||
((size_t) blank.e_capture.c_begin < pi.pi_length)) {
|
||||
switch (str[blank.e_capture.c_begin]) {
|
||||
case '=':
|
||||
case ':':
|
||||
@ -922,7 +923,7 @@ private:
|
||||
*(this->dp_msg_format) += this->get_string_up_to_value(*fiter);
|
||||
this->dp_msg_format->append("#");
|
||||
}
|
||||
if (this->dp_msg_format_begin < pi.pi_length) {
|
||||
if ((size_t) this->dp_msg_format_begin < pi.pi_length) {
|
||||
const char *str = pi.get_string();
|
||||
pcre_context::capture_t last(this->dp_msg_format_begin,
|
||||
pi.pi_length);
|
||||
|
@ -262,6 +262,10 @@ void handle_paging_key(int ch)
|
||||
case KEY_F(2):
|
||||
if (xterm_mouse::is_available()) {
|
||||
lnav_data.ld_mouse.set_enabled(!lnav_data.ld_mouse.is_enabled());
|
||||
lnav_data.ld_rl_view->set_value(
|
||||
string("info: mouse mode -- ") +
|
||||
(lnav_data.ld_mouse.is_enabled() ?
|
||||
ANSI_BOLD("enabled") : ANSI_BOLD("disabled")));
|
||||
}
|
||||
else {
|
||||
lnav_data.ld_rl_view->set_value(
|
||||
|
@ -1671,7 +1671,7 @@ static void looper(void)
|
||||
readline_context sql_context("sql", NULL, false);
|
||||
readline_context exec_context("exec");
|
||||
readline_curses rlc;
|
||||
sig_atomic_t overlay_counter;
|
||||
sig_atomic_t overlay_counter = 0;
|
||||
int lpc;
|
||||
|
||||
command_context.set_highlighter(readline_command_highlighter);
|
||||
|
@ -336,7 +336,7 @@ struct date_time_scanner {
|
||||
bool convert_local = true);
|
||||
|
||||
bool convert_to_timeval(const char *time_src,
|
||||
size_t time_len,
|
||||
ssize_t time_len,
|
||||
struct timeval &tv_out) {
|
||||
struct exttm tm;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user