Commit Graph

7 Commits

Author SHA1 Message Date
Alastair Poole 207da69c97 elm_code_text: Return empty string on 0 length.
Throughout elm_code we rely on this function returning a valid
string (unless the line object isn't set/is NULL).
2020-01-05 17:36:33 +00:00
Vincent Torri 7db4714db6 replace strndup with eina_strndup, remove strndup definition in evil and elm_test_dnd
Test Plan: compilation

Reviewers: cedric, zmike, raster

Subscribers: #reviewers, #committers

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D8814
2019-05-03 13:13:57 +01:00
Alastair Poole 1bdda117a1 elm_code_line: fix potential crash.
Summary:
This can occur and thus malloc will return NULL when line->length is
0. Check for !line->length and return. Very difficult to reproduce, but
I had managed three times, and avoided a crash.

Reviewers: #committers, ajwillia.ms, zmike

Reviewed By: #committers, zmike

Subscribers: cedric, #reviewers, zmike

Tags: #efl

Differential Revision: https://phab.enlightenment.org/D6842
2018-08-16 10:12:35 -04:00
Andy Williams 650606ab90 elm_code: better safety around widget edge cases
Fixes crashes when dragging selection out of widget.
@fix
2017-04-05 22:40:43 +01:00
Andy Williams 5851a9d4a8 elm_code: Add initial simple syntax highlighting for C code
For c source and headers lookup a simple syntax definition.
Use a very simple text processing line by line to tokenise.
Simple but it gets us one step closer to cross-language syntax
2017-01-20 22:11:01 +00:00
Andy Williams f6486473ed elm_code: Slightly smarter indent logic
Continue comment blocks where appropriate...
A bunch of refactoring of text/indent code to expand further
2016-11-27 23:15:46 +00:00
Cedric BAIL d384012307 elementary: merging in elm_code widget.
Theme is not there as it should be manually merged into the elementary
default theme.
2016-06-02 17:19:08 -07:00