Commit Graph

280 Commits

Author SHA1 Message Date
Léa Saviot
eeb42f2544 [apps/code] autocompletionText uses the right text length
Before, there was no notion that the autocompleted text might not be a
null terminated string.
2020-06-04 14:50:03 +02:00
Léa Saviot
f883516716 [apps/code] Editor asks VariableBox for autocompletion 2020-06-04 14:50:03 +02:00
Léa Saviot
1e2492c5f4 [apps/code] Autocomplete only at the end of the word
For instance, if the cursor is: "he|llo" and the user adds the letter
'i', there is no autocompletion provided as the cursor is still in the
middle of a word.
2020-06-04 14:50:03 +02:00
Léa Saviot
f82079a40a [apps/code] Autocomplete only if char before cursor is not ' ' or '\n' 2020-06-04 14:50:03 +02:00
Léa Saviot
343d2328b8 [ion/utf8_helper] EndOfWord helper 2020-06-04 14:50:03 +02:00
Émilie Feral
3f6647f3ae [ion][python] Implement an architecture-dependant collect_registers.
setjmp is not guaranteed to collect all registers without modification
on all platforms.

This fixes the following bug: when the pointer of a newly allocated
object on the Python heap is stored in rpb registers on x86_64 arch, it
was not collected by the garbarge collector.
2020-05-18 14:39:46 +02:00
Léa Saviot
efe5b4d6f8 [ion/storage] Private constructor and cleaner sharedStorage() 2020-05-07 06:22:42 -07:00
Léa Saviot
2ed354710f [build/simulator] NDEBUG flag in release mode
This way, asserts are not performed on simulator platforms
2020-04-10 00:49:15 -07:00
Joachim Le Fournis
4a9bfca1f6 [ion] Alpha-locked percent becomes backspace 2020-04-09 12:09:03 -04:00
Romain Goyet
743eb104bf [ion] Replace Ion::Events::Event::id() by an explicit cast operator 2020-04-08 09:56:33 +02:00
Romain Goyet
35d446353f [escher] Avoid long switches on Left/Up/Right/Down 2020-04-08 09:56:33 +02:00
Neven Sajko
1c9b402645 [ion] Remove volatile qualifier from millis return type
Qualification of an integer return type as volatile is ignored by the
compiler. To clarify, an integer value (not a variable), which is what
the return type is, can not be assigned to anyway, so qualification as
volatile does not make sense.
2020-04-06 17:18:03 +02:00
Léa Saviot
4a4ba52e38 [ion/events] Better handling of Shift on the web target 2020-03-11 15:36:52 +01:00
Romain Goyet
670490e642 [ion] Add a telemetry API 2020-02-17 10:31:24 -05:00
Romain Goyet
aa0dbee303 [ion] Console::writeLine can ommit trailing CR/LF 2020-02-17 10:31:24 -05:00
Émilie Feral
0c55ea4531 [ion] unicode: UTF8Helper::CopyAndRemoveCodePoints returns a boolean
which is true if the whole source was copied
2020-02-12 15:13:24 +01:00
Léa Saviot
ae3fa46191 [escher/text_field] Fix handling of \n
The buffer length did not take into account the \n removal. In fact, we
could just remove the \n while also removing the empty code points,
which is what we do now.
2020-02-12 15:13:24 +01:00
Ruben Dashyan
844a28db7b [poincare/parsing/tokenizer] Token::Identifiers may contain Greek letters except pi 2020-02-12 15:13:23 +01:00
Léa Saviot
b29d014695 [escher/text_field] Fix removing of \n in insertTextAtLocation
Scenario: Copy a text with \n (for instance from a script), then paste
it in a script name -> if \n are replaed with \0 instead of just being
removed, there are problems with the extension
2020-02-12 15:13:23 +01:00
Ruben Dashyan
179ce5d5d5 [ion/unicode/codepoint] Rename is[(Lower|Upper)Case]Letter to isLatin[(Small|Capital)]Letter
to conform with unicode terminology
2020-02-12 15:13:23 +01:00
Ruben Dashyan
575b911da9 [ion/unicode] Split isDigit into isDecimalDigit, isBinaryDigit, isHexadecimalDigit 2020-02-12 15:13:23 +01:00
Ruben Dashyan
9b0b4e3096 [ion/unicode] Define and use CodePoint const methods
isLowerCaseLetter
isUpperCaseLetter
isLetter
isDigit

Remove similar ones from UTF8Helper and from Poincare::Tokenizer.
2020-02-12 15:13:23 +01:00
Léa Saviot
d70c4c7205 [ion] Typo 2020-02-12 15:13:22 +01:00
Léa Saviot
9d6bab092f [poincare/parser] Identifier is not already function -> symbol
We check the context: if an identifier is already a function, we
interpret it as such, otherwise it is a symbol.
This way, in the Equation app, x(x+1) is interpreted as x*(x+1)
2020-02-12 15:13:21 +01:00
Léa Saviot
8cf13adaf0 [apps/editor_controller] Handle deleted scripts in cleanStorageEmptySpace 2020-02-12 15:13:18 +01:00
Léa Saviot
30923ed4c6 [escher/text_area] Select up/down 2020-02-12 15:13:17 +01:00
Léa Saviot
0209c6d2d4 [ion/storage] Increase size to 32K 2020-02-12 15:13:16 +01:00
Léa Saviot
5853e96947 [apps/code] Remove EditorController::m_areaBuffer
This was a very large buffer that took a lot of RAM space (the size of
the storage). Instead of having it, we just move the available space of
the storage at the end of the edited script, and move it back when the
edition finishes.
This is slower but saves a lot of space.
2020-02-12 15:13:16 +01:00
Léa Saviot
b9bc9008ac [ion] Detect long repeated events
This will be use for instance to sroll faster if the user presses the
directional keys for a long time
2020-02-12 15:13:15 +01:00
Léa Saviot
973c2149d4 [ion/battery] Battery level has some hysteresis
This prevents a blinking battery pictogra wwhen the battery level is at
the limit between two states.
2020-02-12 15:13:15 +01:00
Ruben Dashyan
c3cf5c1ef4 Rename UCodePointUnknownX to UCodePointUnknown 2020-02-12 15:13:15 +01:00
Émilie Feral
f4de842a86 [ion] Change exam mode to have 3 states (off, standard, Dutch) 2019-12-19 15:52:45 +01:00
Léa Saviot
ebc5843795 [apps/ion/exam_mode] Store the exam mode activation in the flash
This way, it is not cleared by a reset
2019-12-11 13:51:38 +01:00
Romain Goyet
758c217120 [ion] ion_main takes const arguments 2019-10-16 10:01:00 +02:00
Ruben Dashyan
259eb35cf4 Revert ""Almost equal to" sign in banner views"
This reverts commit bd5a247858.
2019-09-26 10:36:17 +02:00
Ruben Dashyan
bd5a247858 "Almost equal to" sign in banner views 2019-09-23 17:31:02 +02:00
Léa Saviot
7c5cf82598 [apps/cartesian_function] When changing plot type, recompute unknowns 2019-09-12 10:38:51 +02:00
Léa Saviot
d9f650d283 [ion/utf8_helper] HasCodePoint 2019-09-09 13:30:04 +02:00
Léa Saviot
5235f74852 [ion/storage] Memoize last retrieved record
Faster Graph navigation
2019-08-30 10:47:15 +02:00
Ruben Dashyan
ee1cdea837 [apps/shared/cartesian_function] Function symbol depends on its plot type 2019-08-29 11:07:22 +02:00
Ruben Dashyan
a8810ef066 Use UCodePointUnknownX instead of UCodePointUnknownN 2019-08-29 11:07:21 +02:00
Léa Saviot
601827e790 [poincare/serializ_hlpr] Use SerHlpr::CodePoint, not UTF8Decoder
SerializationHelper::CodePoint puts a null-terminating char
2019-08-08 17:22:06 +02:00
Léa Saviot
a2bda4b955 [ion/utf8_helper] Fix RemoveCodePoint
The index to update was not updated properly
2019-08-08 16:19:53 +02:00
Léa Saviot
b2efb478e6 [ion/utf8_helper] Remove unused method parameter 2019-08-08 16:19:53 +02:00
Léa Saviot
f5a7a44546 [apps/ion] Factorize code and TODO 2019-08-07 11:15:28 +02:00
Léa Saviot
a450ce3855 Merge branch 'master' into f7 2019-08-06 17:40:14 +02:00
Léa Saviot
606e132747 [apps/bench] Change LCD Data pattern (tiling red/blue/green) 2019-07-12 17:50:38 +02:00
Léa Saviot
bf9ba7b363 [apps/hardware_test] ColorsLCDTest 2019-07-05 12:25:50 +02:00
Léa Saviot
2fdbf2ea11 [poincare] VerticalOffsetLyt serializes as ^().
UCodePointLeftSuperscript and UCodePointRightSuperscript no longer exist
2019-06-26 14:03:08 +02:00
Léa Saviot
6109903f66 [poincare/serialization] Use system parentheses to serialize
This solves the problem :

 (1
 --- that serialized as ((1)/(2)), which was valid
  2)
2019-06-26 14:03:08 +02:00