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

changing numChars manually with settings() #353

Closed
artursOs opened this issue Nov 2, 2017 · 5 comments
Closed

changing numChars manually with settings() #353

artursOs opened this issue Nov 2, 2017 · 5 comments

Comments

@artursOs
Copy link

artursOs commented Nov 2, 2017

Expected behavior

Actual behavior

Steps to reproduce

when changing numChars manually with settings(). and then perform resize(). terminal doesn't recalculate max new num chars for command prompt value.

Browser and OS

@jcubic
Copy link
Owner

jcubic commented Nov 2, 2017

The setting numChars was just a hack to make test from jasmine node work becuase there are no css there to make width of the terminal so I've created that option to set number of chars. I didn't know it even work outside of tests.

Maybe I should not put it in docs.

@artursOs
Copy link
Author

artursOs commented Nov 13, 2017

there are two problems. first it doesn't correctly return actual num chars per line. (maybe because of custom css)
and second :
problem is that when i have many terminals on screen , executing this code :

var temp = $('<div class="terminal temp"><div class="cmd"><span cla' +
			'ss="prompt">&nbsp;</span></div></div>').appendTo('body');

cost 30 ms in my chorme brower per terminal . so image if i have 16 terminals on screen. not too good for User expirience.
so i tried to calculate num chars manually only 1 time before resizing all terminals. (for ex. when user changing font size, or change width of his browser window. Or even on terminal init)
so i just return {} and rely on setting.num_chars

@jcubic
Copy link
Owner

jcubic commented Nov 18, 2017

I've put character size check in font resizer so it will fire only when you change font.

@jcubic
Copy link
Owner

jcubic commented Nov 18, 2017

And fixed the requested bug with command line resize on settings.numChars + terminal.resize, didn't get what you wanted first time I've read the issue.

@jcubic
Copy link
Owner

jcubic commented Dec 19, 2017

The change is in version 1.11.0

@jcubic jcubic closed this as completed Dec 19, 2017
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

No branches or pull requests

2 participants