Skip to content

Commit

Permalink
Avoid command from history not fully visible at the bottom (#2627)
Browse files Browse the repository at this point in the history
* Avoid-command-from-history-not-fully-visible-at-the-bottom

* proper solution

* fix same problem when pasting big texts
  • Loading branch information
Miguel-hrvs authored Jul 27, 2024
1 parent eae8b55 commit b33e516
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/studio/screens/console.c
Original file line number Diff line number Diff line change
Expand Up @@ -4235,7 +4235,7 @@ static void processKeyboard(Console* console)
switch(getClipboardEvent(console->studio))
{
case TIC_CLIPBOARD_COPY: copyToClipboard(console); break;
case TIC_CLIPBOARD_PASTE: copyFromClipboard(console); break;
case TIC_CLIPBOARD_PASTE: copyFromClipboard(console); scrollConsole(console); break;
default: break;
}

Expand Down Expand Up @@ -4270,7 +4270,10 @@ static void processKeyboard(Console* console)
}
else
{
if(keyWasPressed(console->studio, tic_key_up)) onHistoryUp(console);
if(keyWasPressed(console->studio, tic_key_up)) {
onHistoryUp(console);
scrollConsole(console);
}
else if(keyWasPressed(console->studio, tic_key_down)) onHistoryDown(console);
else if(keyWasPressed(console->studio, tic_key_left))
{
Expand Down

0 comments on commit b33e516

Please sign in to comment.