mirror of
https://github.com/SpartanJ/eepp.git
synced 2026-08-18 06:55:48 +03:00
Fixed "clear" command now clears scrollback history.
Improved font bold rendering (minor tweak). Added click step for terminal scroll.
This commit is contained in:
@@ -237,6 +237,10 @@ class TerminalDisplay : public ITerminalDisplay {
|
||||
|
||||
bool isAltScr() const;
|
||||
|
||||
const Uint32& getClickStep() const;
|
||||
|
||||
void setClickStep( const Uint32& clickStep );
|
||||
|
||||
protected:
|
||||
EE::Window::Window* mWindow;
|
||||
std::vector<TerminalGlyph> mBuffer;
|
||||
@@ -268,6 +272,7 @@ class TerminalDisplay : public ITerminalDisplay {
|
||||
Clock mLastDoubleClick;
|
||||
int mColumns{ 0 };
|
||||
int mRows{ 0 };
|
||||
Uint32 mClickStep{ 5 };
|
||||
FrameBuffer* mFrameBuffer{ nullptr };
|
||||
TerminalColorScheme mColorScheme;
|
||||
|
||||
|
||||
@@ -562,6 +562,14 @@ bool TerminalDisplay::isAltScr() const {
|
||||
return mEmulator && mEmulator->tisaltscr();
|
||||
}
|
||||
|
||||
const Uint32& TerminalDisplay::getClickStep() const {
|
||||
return mClickStep;
|
||||
}
|
||||
|
||||
void TerminalDisplay::setClickStep( const Uint32& clickStep ) {
|
||||
mClickStep = clickStep;
|
||||
}
|
||||
|
||||
void TerminalDisplay::update() {
|
||||
if ( mFocus && isBlinkingCursor() && mClock.getElapsedTime().asSeconds() > 0.7 ) {
|
||||
mMode ^= MODE_BLINK;
|
||||
@@ -591,25 +599,25 @@ void TerminalDisplay::action( TerminalShortcutAction action ) {
|
||||
break;
|
||||
}
|
||||
case TerminalShortcutAction::SCROLLUP_SCREEN: {
|
||||
TerminalArg arg( (int)-1 );
|
||||
TerminalArg arg( (int)-mClickStep );
|
||||
mTerminal->kscrollup( &arg );
|
||||
sendEvent( { EventType::SCROLL_HISTORY } );
|
||||
break;
|
||||
}
|
||||
case TerminalShortcutAction::SCROLLDOWN_SCREEN: {
|
||||
TerminalArg arg( (int)-1 );
|
||||
TerminalArg arg( (int)-mClickStep );
|
||||
mTerminal->kscrolldown( &arg );
|
||||
sendEvent( { EventType::SCROLL_HISTORY } );
|
||||
break;
|
||||
}
|
||||
case TerminalShortcutAction::SCROLLUP_ROW: {
|
||||
TerminalArg arg( (int)1 );
|
||||
TerminalArg arg( (int)mClickStep );
|
||||
mTerminal->kscrollup( &arg );
|
||||
sendEvent( { EventType::SCROLL_HISTORY } );
|
||||
break;
|
||||
}
|
||||
case TerminalShortcutAction::SCROLLDOWN_ROW: {
|
||||
TerminalArg arg( (int)1 );
|
||||
TerminalArg arg( (int)mClickStep );
|
||||
mTerminal->kscrolldown( &arg );
|
||||
sendEvent( { EventType::SCROLL_HISTORY } );
|
||||
break;
|
||||
|
||||
@@ -1503,6 +1503,9 @@ void TerminalEmulator::csihandle( void ) {
|
||||
tclearregion( 0, 0, mTerm.col - 1, mTerm.c.y - 1 );
|
||||
tclearregion( 0, mTerm.c.y, mTerm.c.x, mTerm.c.y );
|
||||
break;
|
||||
case 3:
|
||||
clearHistory();
|
||||
// fallthrough
|
||||
case 2: /* all */
|
||||
tclearregion( 0, 0, mTerm.col - 1, mTerm.row - 1 );
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user