From dea7b94ae0bc935e8504cf1110da9459183d1d3e Mon Sep 17 00:00:00 2001 From: Markus Gans Date: Tue, 3 Sep 2024 22:56:20 +0200 Subject: [PATCH] FAQ update --- doc/faq.md | 10 ++++++++++ test/eventloop-monitor-test.cpp | 14 +++++++------- test/fwidget-test.cpp | 2 +- 3 files changed, 18 insertions(+), 8 deletions(-) diff --git a/doc/faq.md b/doc/faq.md index 40d5c700..e3bb3fe1 100644 --- a/doc/faq.md +++ b/doc/faq.md @@ -154,3 +154,13 @@ With Ctrl-L you can clear and redraw all information on the terminal screen. This may be necessary if a background program overwrites the displayed widgets with other characters. + +How to disable mouse tracking and the non-scrollable alternate screen buffer in the GNU Debugger (GDB) +------------------------------------------------------------------------------------------------------ + +If you are using an xterm-compatible terminal, you can disable mouse tracking and re-enable the terminal scroll buffer by resetting the terminal settings. You can use the following command in the GNU Debugger to do this: + +``` +(gdb) printf "%s\n", "\033c\033]104\007" +``` + diff --git a/test/eventloop-monitor-test.cpp b/test/eventloop-monitor-test.cpp index b8e606aa..537f0014 100644 --- a/test/eventloop-monitor-test.cpp +++ b/test/eventloop-monitor-test.cpp @@ -602,7 +602,7 @@ class EventloopMonitorTest : public CPPUNIT_NS::TestFixture void exceptionTest(); private: - void keyboardInput (const std::string); + void keyboardInput (std::string&&); void drainStdin(); // Adds code needed to register the test suite @@ -1034,18 +1034,18 @@ void EventloopMonitorTest::exceptionTest() } //---------------------------------------------------------------------- -void EventloopMonitorTest::keyboardInput (const std::string s) +void EventloopMonitorTest::keyboardInput (std::string&& s) { // Simulates keystrokes + const auto input = std::move(s); const char EOT = 0x04; // End of Transmission - auto stdin_no = finalcut::FTermios::getStdIn(); - fflush(stdout); + const auto stdin_no = finalcut::FTermios::getStdIn(); - std::string::const_iterator iter; - iter = s.cbegin(); + fflush(stdout); + std::string::const_iterator iter = input.cbegin(); - while ( iter != s.cend() ) + while ( iter != input.cend() ) { char c = *iter; diff --git a/test/fwidget-test.cpp b/test/fwidget-test.cpp index 404a7696..368c7046 100644 --- a/test/fwidget-test.cpp +++ b/test/fwidget-test.cpp @@ -2573,7 +2573,7 @@ void FWidgetTest::closeWidgetTest() class TestWidget : public finalcut::FWidget { public: - TestWidget (finalcut::FWidget* parent = nullptr) + explicit TestWidget (finalcut::FWidget* parent = nullptr) : finalcut::FWidget{parent} { }