mirror of
https://github.com/UpsilonNumworks/Upsilon.git
synced 2026-01-19 00:37:25 +01:00
For those who likes to code ❤ (#113)
This commit is contained in:
@@ -63,7 +63,7 @@ void EditorController::didBecomeFirstResponder() {
|
||||
void EditorController::viewWillAppear() {
|
||||
ViewController::viewWillAppear();
|
||||
m_editorView.loadSyntaxHighlighter();
|
||||
m_editorView.setCursorLocation(m_editorView.text() + strlen(m_editorView.text()));
|
||||
m_editorView.setCursorLocation(m_script.content() + *m_script.CursorPosition());
|
||||
}
|
||||
|
||||
void EditorController::viewDidDisappear() {
|
||||
@@ -72,6 +72,7 @@ void EditorController::viewDidDisappear() {
|
||||
}
|
||||
|
||||
bool EditorController::textAreaDidReceiveEvent(TextArea * textArea, Ion::Events::Event event) {
|
||||
m_script.setCursorPosition(textArea->cursorLocation() - m_script.content());
|
||||
if (App::app()->textInputDidReceiveEvent(textArea, event)) {
|
||||
return true;
|
||||
}
|
||||
@@ -157,7 +158,7 @@ void EditorController::cleanStorageEmptySpace() {
|
||||
Ion::Storage::Record::Data scriptValue = m_script.value();
|
||||
Ion::Storage::sharedStorage()->getAvailableSpaceFromEndOfRecord(
|
||||
m_script,
|
||||
scriptValue.size - Script::StatusSize() - (strlen(m_script.content()) + 1)); // TODO optimize number of script fetches
|
||||
scriptValue.size - Script::StatusSize() - Script::CursorPositionSize() - (strlen(m_script.content()) + 1)); // TODO optimize number of script fetches
|
||||
}
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user