mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
[apps] Fix cursor position when inserting function in Linear Edition
This commit is contained in:
@@ -191,7 +191,7 @@ bool VariableBoxController::selectLeaf(int selectedRow) {
|
||||
Storage::Record record = recordAtIndex(selectedRow);
|
||||
assert(Shared::StorageFunction::k_maxNameWithArgumentSize > 0);
|
||||
assert(Shared::StorageFunction::k_maxNameWithArgumentSize > SymbolAbstract::k_maxNameSize);
|
||||
size_t nameToHandleMaxSize = Shared::StorageFunction::k_maxNameWithArgumentSize - 1;
|
||||
constexpr size_t nameToHandleMaxSize = Shared::StorageFunction::k_maxNameWithArgumentSize;
|
||||
char nameToHandle[nameToHandleMaxSize];
|
||||
size_t nameLength = SymbolAbstract::TruncateExtension(nameToHandle, record.fullName(), nameToHandleMaxSize);
|
||||
|
||||
@@ -200,6 +200,8 @@ bool VariableBoxController::selectLeaf(int selectedRow) {
|
||||
assert(nameLength < nameToHandleMaxSize);
|
||||
nameToHandle[nameLength++] = '(';
|
||||
assert(nameLength < nameToHandleMaxSize);
|
||||
nameToHandle[nameLength++] = Ion::Charset::Empty;
|
||||
assert(nameLength < nameToHandleMaxSize);
|
||||
nameToHandle[nameLength++] = ')';
|
||||
assert(nameLength < nameToHandleMaxSize);
|
||||
nameToHandle[nameLength] = 0;
|
||||
|
||||
Reference in New Issue
Block a user