Closed kevinptt0323 closed 7 years ago
It will be incorrect if there is double-width characters.
it("double width characters", function() { var t = newTermState(); t.write("ab"); t.mvCursor(-2,0); t.write("\u4e00"); // '一' (chinese) expect(t.toString()).to.be("\u4e00"); // expect error });
Maybe you can use wcwidth or string-width to determine the length of string.
It will be incorrect if there is double-width characters.
Maybe you can use wcwidth or string-width to determine the length of string.