Open bencao opened 7 years ago
I did a further attempt:
Instead of specify a fixed width, I passed on "parent" and a percentage as "width" and "height" to xTermWindow. And I got an error like this:
TypeError: Cannot set property bytesRead of #<Socket> which has only a getter
at _clone (/Users/zcao/Documents/workspace/integration/node_modules/clone/clone.js:156:16)
at _clone (/Users/zcao/Documents/workspace/integration/node_modules/clone/clone.js:156:18)
at _clone (/Users/zcao/Documents/workspace/integration/node_modules/clone/clone.js:156:18)
at _clone (/Users/zcao/Documents/workspace/integration/node_modules/clone/clone.js:156:18)
at _clone (/Users/zcao/Documents/workspace/integration/node_modules/clone/clone.js:156:18)
at _clone (/Users/zcao/Documents/workspace/integration/node_modules/clone/clone.js:156:18)
at clone (/Users/zcao/Documents/workspace/integration/node_modules/clone/clone.js:196:10)
at XTerm (/Users/zcao/Documents/workspace/integration/node_modules/blessed-xterm/blessed-xterm.js5:54:19)
at onBuildWorkspace (/Users/zcao/Documents/workspace/integration/cli/it_concerns/dev/uif.js:13:29)
at buildScreen (/Users/zcao/Documents/workspace/integration/cli/it_concerns/dev/common.js:247:22)
at buildWindows (/Users/zcao/Documents/workspace/integration/cli/it_concerns/dev/uif.js:10:10)
at onReady (/Users/zcao/Documents/workspace/integration/cli/it_concerns/dev/uif.js:158:41)
at Socket.runContainer.stdout.on.runContainerData (/Users/zcao/Documents/workspace/integration/cli/it_concerns/dev/common.js:440:7)
at emitOne (events.js:115:13)
at Socket.emit (events.js:210:7)
at addChunk (_stream_readable.js:250:12)
The reason might be that "parent" is a blessed layout object which cannot easily be cloned.
If I comment out the "clone" call in line 46 of blessed-xterm.js, it just works as expected, responsive to screen resize events and font size changes.
So the question becomes: What's the purpose of cloning the options, is it safe to remove this line?
Had the same issue and commenting the clone call also fixed the problem for me.
I'm using the Grid layout from blessed-contrib.
I have the same issue. Comment the clone fix the problem.
Are any of you using a fork w/ this clone rmeoved @novast @kamushadenes @bencao ?
Is there a solution that doesn't require me to fork this @rse ?
No. Finally, I found that blessed.log meet my requirement. @acidjazz
Thanks for the good work! Recently I used blessed-xterm in my project, to draw a dashboard like following:
here're some information about the above layout:
The problem I noticed is that when I resize the terminal, or adjust font size, the xterm window will remain its initial size, which does not fit any more.
Any idea whether we can make it more "responsible" to layout changes?
Thank you!