diff options
author | Neil <nyamatongwe@gmail.com> | 2022-01-13 14:55:15 +1100 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2022-01-13 14:55:15 +1100 |
commit | bbca46f628052cbebb041267b583cf217c6a7008 (patch) | |
tree | d9631e34fa83494588cc37578d9a14d77a3592c1 /src | |
parent | 15acbfa65f759c04837b2414f41d7de8acba892a (diff) | |
download | scintilla-mirror-bbca46f628052cbebb041267b583cf217c6a7008.tar.gz |
Optimize GetColumn a little.
Diffstat (limited to 'src')
-rw-r--r-- | src/Document.cxx | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/Document.cxx b/src/Document.cxx index 3d6e48a98..69eec5254 100644 --- a/src/Document.cxx +++ b/src/Document.cxx @@ -1576,6 +1576,9 @@ Sci::Position Document::GetColumn(Sci::Position pos) { return column; } else if (i >= Length()) { return column; + } else if (UTF8IsAscii(ch)) { + column++; + i++; } else { column++; i = NextPosition(i, 1); |