Skip to content

Commit

Permalink
fix_bug_with_edit_and_scrolling:
Browse files Browse the repository at this point in the history
* add clrscr() to clear the screen before printing the history
  • Loading branch information
medvecky committed Jun 28, 2024
1 parent 25887a4 commit 8e16ab1
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions src/modules/history_helper.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ void historyEditAndExecute( void )
char * nthElement = NULL;

size_t queueSize = Queue_getSize( queuePtr );
clrscr();

Queue_print_raw( queuePtr );

Expand Down Expand Up @@ -114,14 +115,6 @@ static void cursorHandler( size_t cursorYPosition, char * entryString )
{
cursorYPosition--;
}
else if ( entryLength > 39 && cursorYPosition == 23 )
{
cursorYPosition = 22;
}
else if ( entryLength > 36 && entryLength < 40 && cursorYPosition == 22 )
{
cursorYPosition = 23;
}

while ( currentKey != 0x0a )
{
Expand Down

0 comments on commit 8e16ab1

Please sign in to comment.