mirror of
https://github.com/wavetermdev/xterm.js.git
synced 2026-08-05 13:43:48 -07:00
Merge branch 'master' into fix_bufferline_resize
This commit is contained in:
@@ -469,4 +469,11 @@ describe('InputHandler', () => {
|
||||
}
|
||||
expect(s).equals('World ');
|
||||
});
|
||||
describe('print', () => {
|
||||
it('should not cause an infinite loop (regression test)', () => {
|
||||
const term = new Terminal();
|
||||
const inputHandler = new InputHandler(term);
|
||||
inputHandler.print(String.fromCharCode(0x200B), 0, 1);
|
||||
});
|
||||
});
|
||||
});
|
||||
|
||||
+4
-2
@@ -452,8 +452,10 @@ export class InputHandler extends Disposable implements IInputHandler {
|
||||
// fullwidth char - also set next cell to placeholder stub and advance cursor
|
||||
// for graphemes bigger than fullwidth we can simply loop to zero
|
||||
// we already made sure above, that buffer.x + chWidth will not overflow right
|
||||
while (--chWidth) {
|
||||
bufferRow.set(buffer.x++, [curAttr, '', 0, undefined]);
|
||||
if (chWidth > 0) {
|
||||
while (--chWidth) {
|
||||
bufferRow.set(buffer.x++, [curAttr, '', 0, undefined]);
|
||||
}
|
||||
}
|
||||
}
|
||||
this._terminal.updateRange(buffer.y);
|
||||
|
||||
Reference in New Issue
Block a user