Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Clear Terminal on Window Resize [#170] #185

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

XOYZ69
Copy link

@XOYZ69 XOYZ69 commented Feb 27, 2023

Fixes #[170]

Summary of Changes

  • added the config Option "clearConsoleWhenResized"
  • default value is false
  • If this is enabled the terminal will be cleared if the window is getting resized

Additional context

  • I used the program with wrong credentials which should be irrelevant for this bugfix.

Discord username (if different from GitHub): XOYZ69#1230

Testing instructions

Start CapulseFarmerEvolved in any terminal:
image

Resize the window and the terminal should be cleared so that there are no overlapping tables:
image

The following test was not done but should be considered:

  • Opening a screen terminal from a linux server to see the different respones form the terminal application.

How to download the PR for testing

Using GitHub CLI

  1. Clone this PR
  2. Run gh pr checkout 124 (Requires GitHub CLI)
  3. Follow the Advanced Installation Guides from the Wiki

Using regular GIT

  1. Fetch the PR git fetch origin pull/<PR_NUMBER>/head:<LOCAL_BRANCH_NAME> (e.g. git fetch origin pull/110/head:notif)
  2. Checkout the branch git checkout <LOCAL_BRANCH_NAME> (e.g. git checkout notif)
  3. Follow the Advanced Installation Guides from the Wiki

I created a way to manually enable a option so that the window will get cleared if the user does have the new setting "clearConsoleWhenResized" enabled and resizes the window.
@XOYZ69 XOYZ69 changed the title Clear Terminal on Window Resize [#170] feat: Clear Terminal on Window Resize [#170] Feb 27, 2023
@Skribb11es
Copy link
Contributor

Skribb11es commented Feb 27, 2023

Completely kills PR #162, an already implemented feature, so unless you can avoid this there is a low likelihood of this being added.

@alepouna
Copy link
Collaborator

And even so, the application should automatically refresh the screen after a few seconds resolving the problem.. at least on Windows terminals.

@XOYZ69
Copy link
Author

XOYZ69 commented Feb 28, 2023

Actually the screen does not refresh for me automatically no matter which terminal I use. And since I run this program on a Linux Server it's just a convinient thing for me.
But I will look into the PR #162 and check how I can optimize my code for it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants