You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
10 lines
287 B
10 lines
287 B
import { Terminal } from 'xterm';
|
|
import { fit } from 'xterm/lib/addons/fit/fit';
|
|
import { socket } from './socket';
|
|
|
|
export default function resize(term: Terminal): Function {
|
|
return (): void => {
|
|
fit(term);
|
|
socket.emit('resize', { cols: term.cols, rows: term.rows });
|
|
};
|
|
}
|
|
|