Fix performance regression on large documents
This commit is contained in:
parent
2d7326f1c9
commit
82e8ae5a49
1 changed files with 4 additions and 0 deletions
|
|
@ -1277,7 +1277,11 @@ var EditSession = function(text, mode) {
|
||||||
return screenRows;
|
return screenRows;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// For every keystroke this gets called once per char in the whole doc!!
|
||||||
|
// Wouldn't hurt to make it a bit faster for c >= 0x1100
|
||||||
function isFullWidth(c) {
|
function isFullWidth(c) {
|
||||||
|
if (c < 0x1100)
|
||||||
|
return false;
|
||||||
return c >= 0x1100 && c <= 0x115F ||
|
return c >= 0x1100 && c <= 0x115F ||
|
||||||
c >= 0x11A3 && c <= 0x11A7 ||
|
c >= 0x11A3 && c <= 0x11A7 ||
|
||||||
c >= 0x11FA && c <= 0x11FF ||
|
c >= 0x11FA && c <= 0x11FF ||
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue