Commit Graph

44 Commits

Author SHA1 Message Date
Léa Saviot
e73ae9bcdf [apps/code] Fix varbox that should autocomplete the current word 2020-06-04 14:50:05 +02:00
Léa Saviot
0f2ac5b110 [escher/text_field] Fix std::min use 2020-06-04 14:50:05 +02:00
Léa Saviot
003317647e [apps/code] Display empty message in var box 2020-06-04 14:50:05 +02:00
Léa Saviot
f371126708 [apps/code] Fix assertion 2020-06-04 14:50:05 +02:00
Léa Saviot
b41d1e393e [apps/code] Autocomplete when cursor at the end of the word
Not just after adding or deleting text
2020-06-04 14:50:05 +02:00
Léa Saviot
af3394d35a [apps/code] Better event handling for autocompletion 2020-06-04 14:50:04 +02:00
Léa Saviot
5a37b1df53 [apps/code] Use Default color at beginning of autocompleted token 2020-06-04 14:50:04 +02:00
Léa Saviot
14f914e3d6 [apps/code] Remove unused functions and argument 2020-06-04 14:50:04 +02:00
Léa Saviot
f412d95584 [apps/code] Load builtins according to autocompleted text 2020-06-04 14:50:04 +02:00
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
b9693f1f26 [apps/code] Load variable box with script index argument 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
77e34f0446 [apps/code] Reload the view for autocompletion changes 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
a2cc923a02 [apps/code] Fix assertion 2020-06-04 14:50:03 +02:00
Léa Saviot
5dd4f12ee3 [apps/code] Handle acception/dismissal of autocompletion 2020-06-04 14:50:03 +02:00
Léa Saviot
938e0dd840 [apps/code] Autocompletion steps 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
Léa Saviot
32fbea9d06 [apps/code] Handle autocomplete coloring 2020-06-04 14:50:03 +02:00
Léa Saviot
9b8b0bc98f [apps/code] PythonTextArea should always be the PythonUser when coloring 2020-06-04 14:50:03 +02:00
Romain Goyet
950862f8d0 Use std::min and std::max 2020-04-14 09:31:02 -04:00
Léa Saviot
e98b67634d [escher/text_area] Improve dirty tracking 2020-02-12 15:13:17 +01:00
Léa Saviot
a2c7e57a77 [apps/python_text_area] Color the white spaces 2020-02-12 15:13:17 +01:00
Léa Saviot
9d9efc985f [apps/python_text_area] Clean drawLine 2020-02-12 15:13:17 +01:00
Léa Saviot
349b4f8532 [escher/text_area] Fix selection color 2020-02-12 15:13:17 +01:00
Léa Saviot
14cc6ffc59 [escher/text_area] Select and copy 2020-02-12 15:13:17 +01:00
Léa Saviot
0f52335183 [apps/code] Fix syntaxic coloration
This fixes the coloration of:
"123\n"+1
"\n\n"+1

For strings, lex->vstr.len gave the wrong value because it had already
translated escaped chars, so "\n" would be one char long.
2020-02-12 15:13:15 +01:00
Émilie Feral
8b926612a2 Revert "[ion] Namespace Ion::UTF8Helper and Ion::UTF8Decoder"
This reverts commit 23da0d3f2c.
2019-05-03 16:29:28 +02:00
Émilie Feral
23da0d3f2c [ion] Namespace Ion::UTF8Helper and Ion::UTF8Decoder 2019-04-29 18:01:30 +02:00
Léa Saviot
7b5636f298 [unicode] Clean decoder use 2019-04-12 15:16:52 +02:00
Léa Saviot
646931b3b5 [text_area] Fix Text::Position use with unicode
A glyph offset is not equivalent to a code point offset since a code
point can be several glyphs long.
2019-04-12 15:16:51 +02:00
Léa Saviot
43031928c3 Remove max/min inline from KDCoordinate header 2019-04-12 15:16:51 +02:00
Léa Saviot
5142c071df [escher] Fix text inputs so they use UTF8 2019-04-12 15:16:51 +02:00
Émilie Feral
afce751eb7 [code] Get rid of malloc: keep a buffer in Code::App to be used as python heap 2018-09-19 18:20:30 +02:00
Émilie Feral
0b71e92625 [apps] Add missing min/max redefinition 2018-09-04 12:19:49 +02:00
Louis Rannou
70a2db9336 Fix warnings about comparing different signedness
Some variables were declared as int while they are size_t. As we try to compare
them to unsigned values, a warning was raised (comparison of integer expressions
of different signedness).
2018-08-24 15:32:26 +02:00
Romain Goyet
3d74d52ec6 [python] Highlight minus-equal, plus-equal as operators 2018-06-20 11:22:32 +02:00
Romain Goyet
74330bb330 [python] Properly compute all token length 2018-06-20 11:22:32 +02:00
Romain Goyet
caff93cda0 [code] Avoid init/deinit-ing uPy in each editor redraw 2018-06-04 16:08:11 +02:00
Romain Goyet
b52590e2f7 [code] Use named colors 2018-06-04 16:08:11 +02:00
Romain Goyet
6cd18cca89 [python] Malloc the syntax-highlighting uPy heap 2018-06-04 16:08:11 +02:00
Romain Goyet
29cacbc44f [code] Implement syntax highlighting in PythonTextArea 2018-06-04 16:08:11 +02:00
Romain Goyet
88e40266f6 [code] Create a PythonTextArea 2018-06-04 16:08:11 +02:00