mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-03-30 04:00:02 +02:00
[poincare/utf8_decoder] nextCodePointPointer is now stringPosition
This commit is contained in:
@@ -8,8 +8,8 @@ size_t CursorIndexInCommand(const char * text) {
|
||||
size_t index = 0;
|
||||
UTF8Decoder decoder(text);
|
||||
const char * currentPointer = text;
|
||||
const char * nextPointer = decoder.nextCodePointPointer();
|
||||
CodePoint codePoint = decoder.nextCodePoint();
|
||||
const char * nextPointer = decoder.stringPosition();
|
||||
while (codePoint != KDCodePointNull) {
|
||||
if (codePoint == KDCodePointEmpty) {
|
||||
return index;
|
||||
@@ -18,8 +18,8 @@ size_t CursorIndexInCommand(const char * text) {
|
||||
if (codePoint == '\'') {
|
||||
index+= nextPointer - currentPointer;
|
||||
currentPointer = nextPointer;
|
||||
nextPointer = decoder.nextCodePointPointer();
|
||||
codePoint = decoder.nextCodePoint();
|
||||
nextPointer = decoder.stringPosition();
|
||||
if (codePoint == '\'') {
|
||||
return index;
|
||||
}
|
||||
@@ -28,8 +28,8 @@ size_t CursorIndexInCommand(const char * text) {
|
||||
}
|
||||
index+= nextPointer - currentPointer;
|
||||
currentPointer = nextPointer;
|
||||
nextPointer = decoder.nextCodePointPointer();
|
||||
codePoint = decoder.nextCodePoint();
|
||||
nextPointer = decoder.stringPosition();
|
||||
}
|
||||
return index;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user