mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[code] The cursor in a toolbox command does not go before a point.
The cursor now goes either after the first open parenthesis or at the end of the command. Fixed z.real and z.imag. Change-Id: I46ca3be0415832fd91273ca7fed12ed3d6f125dc
This commit is contained in:
@@ -8,8 +8,6 @@ int CursorIndexInCommand(const char * text) {
|
||||
for (size_t i = 0; i < strlen(text); i++) {
|
||||
if (text[i] == '(') {
|
||||
return i + 1;
|
||||
} else if (text[i] == '.') {
|
||||
return i;
|
||||
}
|
||||
}
|
||||
return strlen(text);
|
||||
@@ -20,10 +18,7 @@ void TextToInsertForCommandMessage(I18n::Message message, char * buffer) {
|
||||
int currentNewTextIndex = 0;
|
||||
int numberOfOpenBrackets = 0;
|
||||
for (size_t i = 0; i < strlen(messageText); i++) {
|
||||
if (messageText[i] == '.') {
|
||||
currentNewTextIndex = 0;
|
||||
numberOfOpenBrackets = 0;
|
||||
} else if (messageText[i] == ')') {
|
||||
if (messageText[i] == ')') {
|
||||
numberOfOpenBrackets--;
|
||||
}
|
||||
if (numberOfOpenBrackets == 0 || messageText[i] == ',')
|
||||
|
||||
Reference in New Issue
Block a user