Commit b77ea92 1 parent bdc141f commit b77ea92 Copy full SHA for b77ea92
File tree 4 files changed +12
-4
lines changed
4 files changed +12
-4
lines changed Original file line number Diff line number Diff line change
1
+ 2023-04-04 Markus Gans <guru.mail@muenster.de>
2
+ * Avoid printing scrollbar overrun on emit callback
3
+
1
4
2023-04-02 Markus Gans <guru.mail@muenster.de>
2
5
* Implementation of the mouse selection in the FTextView. Can be
3
6
activated by setSelectable()
Original file line number Diff line number Diff line change @@ -763,8 +763,10 @@ void FScrollbar::avoidScrollOvershoot()
763
763
// ----------------------------------------------------------------------
764
764
void FScrollbar::processScroll ()
765
765
{
766
+ startDrawing (); // Avoid printing an overshoot on the emit callback
766
767
emitCallback (" change-value" );
767
768
avoidScrollOvershoot ();
769
+ finishDrawing ();
768
770
}
769
771
770
772
// ----------------------------------------------------------------------
Original file line number Diff line number Diff line change @@ -121,7 +121,7 @@ auto FTextView::getSelectedText() const -> FString
121
121
line = iter->text .toWString ();
122
122
123
123
if ( iter == last )
124
- line = line. substr ( 0 , end_col + 1 );
124
+ line. resize ( end_col + 1 );
125
125
126
126
selected_text += FString (line) + L' \n ' ; // Add newline character
127
127
++iter;
Original file line number Diff line number Diff line change 3
3
* *
4
4
* This file is part of the FINAL CUT widget toolkit *
5
5
* *
6
- * Copyright 2018-2023 Markus Gans *
6
+ * Copyright 2018-2024 Markus Gans *
7
7
* *
8
8
* FINAL CUT is free software; you can redistribute it and/or modify *
9
9
* it under the terms of the GNU Lesser General Public License as *
@@ -330,7 +330,8 @@ class FKeyboardTest : public CPPUNIT_NS::TestFixture
330
330
// End of test suite definition
331
331
CPPUNIT_TEST_SUITE_END ();
332
332
void init ();
333
- void input (std::string);
333
+ template <typename CharT>
334
+ void input (CharT&&);
334
335
void processInput ();
335
336
void clear ();
336
337
void keyPressed ();
@@ -3183,14 +3184,16 @@ void FKeyboardTest::init()
3183
3184
}
3184
3185
3185
3186
// ----------------------------------------------------------------------
3186
- void FKeyboardTest::input (std::string s)
3187
+ template <typename CharT>
3188
+ void FKeyboardTest::input (CharT&& string)
3187
3189
{
3188
3190
// Simulates keystrokes
3189
3191
3190
3192
const char EOT = 0x04 ; // End of Transmission
3191
3193
auto stdin_no = finalcut::FTermios::getStdIn ();
3192
3194
fflush (stdout);
3193
3195
3196
+ std::string s = std::forward<CharT>(string);
3194
3197
std::string::const_iterator iter;
3195
3198
iter = s.begin ();
3196
3199
You can’t perform that action at this time.
0 commit comments