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

Add support for resizeable terminals #41

Merged
merged 2 commits into from
Oct 5, 2016
Merged

Add support for resizeable terminals #41

merged 2 commits into from
Oct 5, 2016

Conversation

ismacasti
Copy link

This is a small change to the ui code, that makes it adapt to resized terminals. It just listens to the ncurses signal to update the h, w and hw variables. It also paints the header every time.

Works quite well.

@vedranmiletic
Copy link

Tested on Fedora 24 with a Fiji card. Works well.

@clbr
Copy link
Owner

clbr commented Oct 5, 2016

I tested in xterm, rxvt and mrxvt. In the first two it passes, but in mrxvt the VRAM bar gets drawn wrong, one char left to where it should be.

Pic:
Imgur

Now, this may be a mrxvt bug, but I'd appreciate if you looked into this.

@ismacasti
Copy link
Author

It seems mrxvt prints the cursor when resizing, ignoring ncurses' curs_set(0). It's probably a bug on mrxvt, but anyway, now I set the cursor at 0,0 before refreshing. That will just put a black character square at the beginning of the header.
image

@clbr clbr merged commit 1e946c6 into clbr:master Oct 5, 2016
@clbr
Copy link
Owner

clbr commented Oct 5, 2016

Thanks!

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.

3 participants