Commit Graph
1900 Commits
Author SHA1 Message Date
GuldomanandGitHub 0c456eb664 Allow functions in keymap (#948)
This allows `keymap.add` to map shortcuts to functions.

If the function returns `false`, the next command is executed (as if the
`predicate` of a `command` failed).
2022-04-26 09:48:59 -04:00
Jefferson GonzálezandGitHub e572c58f24 Add utf8 support to tokenizer (#945)
* add utf8 support to tokenizer

* wrap utf8 functions in string table using a 'u' prefix

* document new utf8 functions
2022-04-26 09:42:02 -04:00
Guldoman 7dd83bb737 Fix ren_font_group_get_tab_size returning unexpected values
We were casting the `xadvance` to an int, so in some cases the resulting 
tab size was wrong.
2022-04-26 04:34:18 +02:00
GuldomanandGitHub f42dbb0060 Add animation categories to enable finer transitions control (#941)
* Allow finer control over transitions

* Add categories to transitions
2022-04-25 20:35:35 -04:00
Adam Harrison d8f202e251 Make sure pipes are closed on exec. 2022-04-24 21:13:18 -04:00
AdamandGitHub 5df1640595 Merge branch 'master' into master-2.1 2022-04-24 13:42:24 -04:00
AdamandGitHub 97174706fe Asynchronous Reads for Dirmonitor (#930)
Change dirmonitor reads to be synchronous, in a secondary thread.
2022-04-24 13:40:58 -04:00
Guldoman b9957138ac Add launchable tag to AppStream xml 2022-04-21 00:41:15 +02:00
GuldomanandGitHub 1439b59d65 Improve performance of ren_draw_rect (#935)
We color a 1x1 `SDL_Surface` with the desired color. This surface is 
then stretched over the area we need to cover using `SDL_BlitScaled`.
This way we avoid having to do the blending ourselves.
2022-04-20 17:13:42 -04:00
GuldomanandGitHub bbac7e479c Set the correct working directory for the AppImage version (#937) 2022-04-20 17:00:48 -04:00
JanandGitHub 915625b74f Update SDL to 2.0.20 (#884) 2022-04-20 16:30:41 -04:00
Guldoman 9a5f8e72d0 Add DATADIR and USERDIR explanation in created user module 2022-04-18 21:14:50 +02:00
Philip BergwerfandGuldoman 5453a27f91 Add triple single quotes multiline strings to language_python 2022-04-18 20:22:25 +02:00
Adam Harrison c112bd8d7c Significantly improved performance of tokenization for larger documents by by default not requiring tokenization. 2022-04-17 13:01:45 -04:00
JanandGitHub fff10a2612 Cleanup (#826)
* Update meson.build
- add logic to loop over more lua names (in the future more names might be discovered)
- disable warnings and errors on dependencies

* adding missing includes and checks, correct data types, pointer mess […]
- various functions from string.h were used but never defined
- logic was done across multiple different data types with different signedness, got all of them up to snuff
- give 0 sized array size of 1 (array of size 0 is illegal, but rewriting the code is out of the scope of this commit)
- add preprocessor that marks possibly unused argument as such (does not mean they will get optimized out or anything)
- correctly initialize structs with all data needed

All these were found by generating the project using `meson -Dwarning_level=3 -Dwerror=true`

* remove undefined behavior, correct data types

* Comment manual bit manipulation to be investigated

* check for more edge cases, replace multiple cleanups with goto

* remove system specific includes
2022-04-15 11:34:46 -04:00
Adam HarrisonandGuldoman d323917538 Added in check in case of nil. 2022-04-15 00:07:20 +02:00
Jefferson GonzálezandGitHub c0970f41c0 Merge pull request #916 from Guldoman/PR_enhanced_scrollbar
Enhance scrollbar
2022-04-14 13:42:18 -04:00
Guldoman 93b31211cb Apply drawwhitespace plugin only to DocViews 2022-04-12 04:05:59 +02:00
Guldoman 43086a9c24 Fix missing pixel in scrollbar 2022-04-12 03:20:27 +02:00
Guldoman 4f434d1a41 Show arrow cursor when hovering DocView scrollbar track 2022-04-12 02:56:41 +02:00
Guldoman 48c371a638 Add scrollbar "track" and resize on hover 2022-04-12 02:56:30 +02:00
Guldoman 052c140787 Fix DocView:on_mouse_released not considering all parameters 2022-04-12 02:38:30 +02:00
Guldoman 202e42b568 Avoid calling View:scrollbar_overlaps_point uselessly
`View:on_mouse_moved` already updated `self.hovered_scrollbar`, so use 
that instead.
2022-04-12 02:37:21 +02:00
FrancescoandGitHub 16fcb2e751 Merge pull request #913 from lite-xl/auto-complete-syntax-symbols
Add syntax symbols for auto-complete
2022-04-11 20:42:17 +02:00
Francesco Abbate d4f84e1aff Add syntax symbols for auto-complete 2022-04-10 10:32:43 +02:00
Guldoman e5c55e8abc Early break if autocomplete needs to update 2022-04-10 04:20:46 +02:00
Guldoman ffe698cef7 Consider last document line to gather autocomplete symbols 2022-04-10 04:11:59 +02:00
AdamandGitHub 683d23e3ba Changed calculation to use ascender, which should work better. (#912) 2022-04-04 10:38:43 -04:00
Adam Harrison 04adb10f97 Added in check in case of nil. 2022-04-03 16:44:02 -04:00
Adam Harrison 974fd9c8d5 Fixed windows dirmonitor issues. 2022-04-03 16:44:02 -04:00
Adam Harrison 562e284d04 Fixed some minor issues with linewrapping. 2022-04-03 16:44:02 -04:00
Adam Harrison 11dfb5b1ca Apparenlty these were issues? What? 2022-04-03 16:44:02 -04:00
Adam 3479890ce5 Soft Line Wrapping (#636)
Added in soft line wrapping.
2022-04-03 16:44:02 -04:00
Adam Harrison 048d250f5e Added in notes to the changelog. 2022-04-03 16:44:02 -04:00
Adam Harrison 45a0382d50 Bumping version numbers. 2022-04-03 16:44:02 -04:00
GuldomanandGitHub 50acf2e7e6 Fix keeping scroll position when restoring a DocView (#910)
Since 5526041da3 we check a pair of 
line&column to decide if we should scroll to the cursor.
Previously we only considered a single line&column.
2022-04-03 16:24:39 -04:00
Guldoman c70b5130a9 Improve drawwhitespace plugin
Add configuration options to specify:
- characters to substitute and their substitution;
- whether to substitute at the beginning, middle or end of the line;
- the color of the substitution;
- the color for the beginning, middle or end;
- the minimum number of white space to show in the middle.
2022-04-01 18:18:50 +02:00
jgmdev 23bd21a191 language_md: remove extra empty line 2022-03-30 09:30:55 -04:00
Jefferson GonzálezandGitHub 693bf2cf29 Merge pull request #907 from jgmdev/PR/less-hacky-tokenizer-fix
syntax: remove pattern re-ordering on optimization
2022-03-29 22:26:50 -04:00
jgmdev b0c005a5ac syntax: remove pattern re-ordering on optimization
* Introduces a flag that syntax writers can turn off named
  space_handling, turning it off means that your syntax will take care
  of handling the excessive amount of spaces that can slow down the
  tokenizer.
* Adds another pattern at the end of every single table that also
  improves tokenizer performance by matching words that weren't match by
  any of the synxtax patterns.
* Modifies language_md to turn off the provided space_handling and do its
  own since it has rules that require a space at the beginning, also
  handles long consecutives amount of dashes used in tables that degrade
  performance.
* This changes where discussed in collaboration with @Guldoman and
  @takase1121 thanks to all!
2022-03-29 22:11:14 -04:00
Jefferson GonzálezandGitHub 7372d2f82d Merge pull request #906 from jgmdev/PR/temp-file-other-dir
core: fixes and changes to temp files
2022-03-29 16:33:08 -04:00
Jefferson GonzálezandGitHub aca1cd6b6b Merge pull request #892 from jgmdev/PR/status-view-move-item
statusview: added functions for easy custom item ordering
2022-03-29 16:25:31 -04:00
Jefferson GonzálezandGitHub 61ad6b052e Merge pull request #895 from jgmdev/PR/c-cpp-fixes-improvements
language_c/cpp: fixes and improvements
2022-03-29 16:20:22 -04:00
jgmdev e74761da95 language_c/cpp: fixes and improvements
* support colorization of function and variables type declarations
* support the macro concatenation operator ##
* support what seems to be new cpp number notation format #'###
* improved uppercase constants matching
2022-03-29 16:16:12 -04:00
Jefferson GonzálezandGitHub fac54d2ff4 Merge pull request #904 from jgmdev/PR/fix-syntax-optimization
syntax: fix conflicts introduced with #896
2022-03-29 15:44:19 -04:00
Jefferson GonzálezandGitHub 29968b6f35 Merge pull request #905 from jgmdev/PR/md-add-parenthesis-bullet
language_md: parenthesis support to numbered bullets
2022-03-29 15:41:54 -04:00
jgmdev ca37644aa9 core: fixes and changes to temp files
* fix delete_temp_files() deleting in EXEDIR but temp_filename() was
  creating temp files in USERDIR
* make delete_temp_files() public so it can be used by plugins
* add optional `dir` parameter to both delete_temp_files() and
  temp_filename() to allow specifying a different directory, this is
  for example useful when generting markdown previews, the temp file
  should be generated in the project dir in case the readme references
  images that are relative to it, so the web browser can find them.
2022-03-28 22:36:49 -04:00
jgmdev 5f9d45895d language_md: parenthesis support to numbered bullets 2022-03-28 21:03:59 -04:00
jgmdev e862fe9052 syntax: fix conflicts introduced with #896
* mainly the language_md got affected which has some exotic rules
* some other languages are also using spaces at start of pattern
  and even if not affected this change tackles that
2022-03-28 20:51:09 -04:00
GuldomanandGitHub 3e1fdc4157 Merge pull request #900 from buffet/add-lua-fallback-version
Add minimum version to lua fallback dependency to avoid confusion
2022-03-28 22:33:24 +02:00