From e23ae24ac343299a25d2dab66816e993f301f57d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mart=C3=ADn=20Lucas=20Golini?= Date: Mon, 27 Oct 2025 01:22:19 -0300 Subject: [PATCH] Fix terminal not redrawing after child process finish. Fix minor annoyance in build settings, not setting the current run setting. --- .../src/eterm/terminal/terminalemulator.cpp | 23 +++++++++++-------- src/tools/ecode/uibuildsettings.cpp | 2 ++ 2 files changed, 16 insertions(+), 9 deletions(-) diff --git a/src/modules/eterm/src/eterm/terminal/terminalemulator.cpp b/src/modules/eterm/src/eterm/terminal/terminalemulator.cpp index f3e9011a1..72abb3ffa 100644 --- a/src/modules/eterm/src/eterm/terminal/terminalemulator.cpp +++ b/src/modules/eterm/src/eterm/terminal/terminalemulator.cpp @@ -978,18 +978,20 @@ void TerminalEmulator::selmove( int n ) { } void TerminalEmulator::selscroll( int top, int n ) { - if ( mSel.ob.x == -1 ) + if ( mSel.ob.x == -1 || mSel.alt != IS_SET( MODE_ALTSCREEN ) ) return; - top += mTerm.scr; - int bot = mTerm.bot + mTerm.scr; - - if ( BETWEEN( mSel.nb.y, top, bot ) != BETWEEN( mSel.ne.y, top, bot ) ) { + if ( BETWEEN( mSel.nb.y, top, mTerm.bot ) != BETWEEN( mSel.ne.y, top, mTerm.bot ) ) { selclear(); - } else if ( BETWEEN( mSel.nb.y, top, bot ) ) { - selmove( n ); - if ( mSel.nb.y < top || mSel.ne.y > bot ) + } else if ( BETWEEN( mSel.nb.y, top, mTerm.bot ) ) { + mSel.ob.y += n; + mSel.oe.y += n; + if ( mSel.ob.y < mTerm.top || mSel.ob.y > mTerm.bot || mSel.oe.y < mTerm.top || + mSel.oe.y > mTerm.bot ) { selclear(); + } else { + selnormalize(); + } } } @@ -1617,7 +1619,7 @@ void TerminalEmulator::csihandle( void ) { // Extended underline styles - fallback to standard underline DEFAULT( mCsiescseq.arg[0], 1 ); switch ( mCsiescseq.arg[0] ) { - /* case 0: // No underline - fallback to ESC[24m + /* case 0: // No underline - fallback to ESC[24m { int fallback_args[] = { 24 }; // Reset underline tsetattr( fallback_args, 1 ); @@ -2830,6 +2832,9 @@ bool TerminalEmulator::update() { if ( mStatus == TerminalEmulator::STARTING ) { mStatus = TerminalEmulator::RUNNING; } else if ( mStatus != TerminalEmulator::RUNNING ) { + if ( mDirty ) + draw(); + return true; } diff --git a/src/tools/ecode/uibuildsettings.cpp b/src/tools/ecode/uibuildsettings.cpp index e14d325c8..932f0c66e 100644 --- a/src/tools/ecode/uibuildsettings.cpp +++ b/src/tools/ecode/uibuildsettings.cpp @@ -845,7 +845,9 @@ void UIBuildSettings::runSetup() { ->querySelector( "#build_tab_view #run_config_list" ) ->asType(); + auto runName = mConfig.runName; runUpdate( true, runList, panelRunListDDL ); + mConfig.runName = std::move( runName ); runList->getListBox()->setSelected( runIndex() ); if ( panelRunListDDL )