[view_curses] only write OSC;send-input in the test env

Fixes #895
This commit is contained in:
Timothy Stack 2021-08-15 14:47:55 -07:00
parent b6cb1e6dda
commit ce8397b5cf
3 changed files with 11 additions and 1 deletions

6
NEWS
View File

@ -1,3 +1,9 @@
lnav v0.10.1:
Bug Fixes:
* The text "send-input" would show up on some terminals instead of
ignoring the escape sequence. This control sequence was only
intended to be used in the test suite.
lnav v0.10.0:
Features:
* Files on remote machines can be viewed/tailed if they are accessible

View File

@ -101,9 +101,12 @@ struct utf_to_display_adjustment {
void view_curses::awaiting_user_input()
{
static const bool enabled = getenv("lnav_test") != nullptr;
static const char OSC_INPUT[] = "\x1b]999;send-input\a";
write(STDOUT_FILENO, OSC_INPUT, sizeof(OSC_INPUT) - 1);
if (enabled) {
write(STDOUT_FILENO, OSC_INPUT, sizeof(OSC_INPUT) - 1);
}
}
void view_curses::mvwattrline(WINDOW *window,

View File

@ -4,6 +4,7 @@
unset SSH_CONNECTION
lnav_test="${top_builddir}/src/lnav-test"
export lnav_test
for fn in ${srcdir}/tui-captures/*; do
base_fn=`basename $fn`