mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[poincare/utf8_decoder] nextCodePointPointer is now stringPosition
This commit is contained in:
@@ -11,8 +11,8 @@ int CursorIndexInCommandText(const char * text) {
|
||||
UTF8Decoder decoder(text);
|
||||
size_t index = 0;
|
||||
const char * currentPointer = text;
|
||||
const char * nextPointer = decoder.nextCodePointPointer();
|
||||
CodePoint codePoint = decoder.nextCodePoint();
|
||||
const char * nextPointer = decoder.stringPosition();
|
||||
while (codePoint != KDCodePointNull) {
|
||||
if (codePoint == '(' || codePoint == '\'') {
|
||||
return index + 1;
|
||||
@@ -22,8 +22,8 @@ int CursorIndexInCommandText(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