Commit Graph
2385 Commits
Author SHA1 Message Date
Takase 451bfacaf5 docview: prevent overscroll when DocView size is less than lh * 2 (#1971) 2024-12-04 13:02:06 +08:00
d436dfe9bf check item type before creating input text (#1904)
* check item type before creating input text

* Update data/plugins/treeview.lua

Co-authored-by: Takase <20792268+takase1121@users.noreply.github.com>

* Update data/plugins/treeview.lua

Co-authored-by: Takase <20792268+takase1121@users.noreply.github.com>

---------

Co-authored-by: FloppyDisco <joshuapaulpiasecki@gmail.com>
Co-authored-by: Takase <20792268+takase1121@users.noreply.github.com>
2024-12-04 13:02:06 +08:00
ThaCuberandtakase1121 9222136070 allow / for path suggestions in all OSes 2024-12-03 08:35:40 +08:00
Guldomanandtakase1121 142c19bc51 fix: scale font pixel size in RENDERER mode 2024-12-02 15:22:28 +08:00
Guldomanandtakase1121 f6fd438b08 Return state when tokenizing plaintext syntaxes 2024-12-02 15:21:52 +08:00
takase1121 8498a988e4 chore: bump versions to v2.1.6 2024-11-29 09:26:39 +08:00
takase1121 451bea592a chore: write changelogs for v2.1.6 2024-11-29 09:26:29 +08:00
takase1121 debfbcd986 ci: add releases permission to release CI 2024-11-27 20:53:36 +08:00
takase1121 fff5acda25 appimage.sh: temporarily fix the script to generate the appimage correctly 2024-11-27 20:53:35 +08:00
takase1121 e1a37cf194 ci: bump lite-xl-build-box-manylinux version 2024-11-27 20:53:35 +08:00
Jan200101andtakase1121 fdfa2f43d3 convert unix style paths literals into meson path segments 2024-11-27 20:53:35 +08:00
Jan200101andtakase1121 319e1e80ef use meson datadir as lite_datadir base 2024-11-27 20:53:35 +08:00
Samuelandtakase1121 eafd283019 fix appimage cd error and use static appimage runtime (#1924)
* fix appimage cd error and use static appimage runtime

* include `desktop-file-utils` for appimagetool

* remove mv of old `AppRun`

* revert indentation

* don't export `APPIMAGE_EXTRACT_AND_RUN`
2024-11-27 20:53:34 +08:00
Jan200101andtakase1121 aafd856149 Update PCRE2 wrap
fixes configuration issues on systems that don't support the sealloc jit
2024-11-27 20:53:34 +08:00
Jan200101andtakase1121 ce3d4de101 Format renderer font scale code to be actually readable 2024-11-27 20:53:34 +08:00
Takase 7c68b20115 feat(core.emptyview): add name to emptyview (#1569)
* feat(core.emptyview): add name to emptyview

* fix(core.emptyview): set filename to empty
2024-11-27 20:53:34 +08:00
Guldomanandtakase1121 ac4995ee46 Fix multi-type usage in delimited patterns (#1740)
In the "end" pattern we weren't considering the multiple types.
2024-11-27 20:53:34 +08:00
3114f2103e improve projectsearch (#1876)
* improve projectsearch

- stick status to top of view
- add horizontal scrolling
- added ellipsis at the end of the text if it's too long

* Reverted removal of 0 on yield.

---------

Co-authored-by: Adam Harrison <adamdharrison@gmail.com>
2024-11-27 20:53:33 +08:00
Adam Harrisonandtakase1121 e802239022 Additional small fixes for windows as part of the process API move to lua. 2024-11-27 20:53:33 +08:00
Adam Harrisonandtakase1121 d2586bf0c2 Fixed minor typo from merge of #1854 for windows builds. 2024-11-27 20:53:33 +08:00
takase1121 2e2305b9fe arena_allocator: return lxl_arena instead of initializing an existing struct 2024-11-27 20:53:33 +08:00
takase1121 cf40e254fe process: migrate arg validation and checking to Lua 2024-11-27 20:53:32 +08:00
takase1121 f84305b2b2 utfconv: add functions that use arena_allocator 2024-11-25 21:29:33 +08:00
takase1121 14489482ec allocator: add arena_allocator
This allocator uses Lua userdatas for dynamic allocation
that is automatically freed when the current scope exits.
2024-11-25 21:29:28 +08:00
Janandtakase1121 f0d7e22dbf remove lhelper script, build configuration and dependency support (#1906)
* remove lhelper script, build configuration and dependency support

* turn lhelper flag into a error
2024-11-25 21:29:22 +08:00
Guldomanandtakase1121 8c66c5f493 treeview: remove unused code (#1895)
It caused a lot of useless `system.absolute_path` calls.
2024-11-25 21:29:05 +08:00
Guldomanandtakase1121 f6558995fa meta: remove FUNDING.yml 2024-11-25 21:28:57 +08:00
Adamandtakase1121 49a1ec32b8 Add keyboard shortcut to tooltips in ToolbarView (#1880) 2024-11-25 21:28:47 +08:00
Takase 55d84ea1a8 ci: use lite-xl-build-box-manylinux (#1877) 2024-11-25 21:28:29 +08:00
Takase 7a603f2a2d renderer: rewrite glyph cache (#1845)
* renderer: rewrite glyph cache

This commit splits the current GlyphSet-based system into 2 caches,
CharMap and GlyphMap, which maps codepoints -> glyph IDs and glyph IDs -> glyphs respectively.
Each GlyphMap contains a number of GlyphAtlas mapped by their width,
and each GlyphAtlas has a list of surfaces with the same width.
Surfaces within the GlyphAtlas acts like a bump allocator, but is flexible
enough to allow older GlyphAtlas surfaces to be recycled.

GlyphMetric now contains atlas_idx and surface_idx, which points to the correct surface.
Since GlyphAtlas supports rudimentary packing & allocation, we no longer render whole
GlyphSets and this speeds up rendering in most cases.

Tab width is no longer set with the hacky "modify the GlyphMetric" hack.

* renderer: set natlas to 0 after freeing

* renderer: fix printf warning

* renderer: fix memory leak

* renderer: better whitespace rendering

* renderer: fix ubsan warning when casting ints

* renderer: fix tab handling

There's a bug with inconsistent tab widths caused by fontgroups.

* renderer: fix glyphs being loaded over and over

* renderer: add glyphmap size

* renderer: store per-surface offset_y and use it to find best-fitting surface

* renderer: fix MSVC compiler error

* renderer: remove return value from ren_font_glyph

* renderer: refactor xadvance calculation

* renderer: fix double free SDL_RWops if FT_Set_Pixel_Size fail

* renderer: always try .notdef before U+25A1

* renderer: disable ren_font_dump yet again

Accidentally commited this change.

* renderer: remove unused imports

* renderer: fix double free with FT_Open_Face

* renderer: return SDL_Surface in font_find_glyph_surface

* renderer: bring back metric flags for future extension

* renderer: refactor xadvance calculation into macro

* renderer: fix comment

* renderer: store GlyphMetric directly in the surface

* renderer: remove duplicated comment

* renderer: rename font_find_glyph_surface to font_allocate_glyph_surface

* renderer: refactor glyphmetric retrieval into an inline function

* renderer: do not render glyphs with bitmap set to null

This is a weird edge case, but at least it shouldn't crash

* renderer: refactor face metric code into its own function

* renderer: actually check if glyph fits in surface

* renderer: rudimentary support for non-scalable faces

At least it won't render nothing on the screen

* renderer: check for font_surface instead of metric directly

This is safe and shorter

* renderer: fix indentation

* renderer: rename GLYPH_PER_ATLAS to GLYPHS_PER_ATLAS

* renderer: rename all GLYPH_PER_ATLAS correctly

* renderer: make utf8_to_codepoint slightly more durable

* renderer: fix compiler unsigned cast warning
2024-11-25 21:27:03 +08:00
kramoandtakase1121 91a30099f7 macos: Add proper platform-specific icon 2024-11-25 21:08:48 +08:00
takase1121 4d803204a8 src/renwindow: correctly free texture and renderer 2024-11-25 21:04:45 +08:00
aia29andtakase1121 4e3558322c add cuda 2024-11-25 21:03:11 +08:00
takase1121 af9c8344cf chore: update versions 2024-06-29 22:46:15 +08:00
takase1121 e7c659c4e1 chore: changelogs for v2.1.5 2024-06-29 22:46:15 +08:00
takase1121 1140ceca94 ci/release: adapt release note generation to the new script 2024-06-29 22:46:14 +08:00
takase1121 474d696c84 resources,scripts: use gh cli to fetch the correct release tags 2024-06-29 22:46:14 +08:00
takase1121 4bfcd0d16e core/doc: fix wrong table index in Doc:merge_cursors
it was off by 1
2024-06-24 22:29:05 +08:00
Guldomanandtakase1121 71913e1b86 fix(doc): convert Doc:merge_cursors parameter from "selection index" to table index 2024-06-24 22:29:05 +08:00
takase1121 5ba8cfde6d core/rootview: fix dnd multiple folders into dock 2024-06-23 13:09:52 +08:00
Guldomanandtakase1121 52dd76add6 fix(autoreload): wait a second before automatically reloading a file (#1823)
This is needed because we use `mtime` to determine if a file has actually changed, but on most systems this has a resolution of 1 second (and we truncate it to an integer anyways).

Without this wait, we would skip reloading a file that has been changed multiple times in the same `mtime` second, thus losing some data.
2024-06-23 10:08:08 +08:00
Guldomanandtakase1121 ea5c1ee628 fix(dirmonitor): avoid calling the change callback multiple times in the same notification (#1824) 2024-06-23 10:08:08 +08:00
fgelm01andtakase1121 9c7f1bede4 Handle static constexpr in language_cpp (#1806) 2024-06-23 10:08:08 +08:00
Takase ce70fcf5dd macos: support drag-and-drop and default file associations (#1822)
* macos: support drag-and-drop and default file associations

* resources/macos: use LSItemContentTypes to narrow down files

* macos: support opening folders

* rootview: workaround macos weird dnd event timing

* core/rootview: rename variable and refactor if statement
2024-06-23 10:08:08 +08:00
Guldomanandtakase1121 214602d17a Update font scale on monitor scale change for RENDERER backend (macOS) (#1650)
* Update font scale on monitor scale change for `RENDERER` backend (macOS)

* fix(renderer): check every font of a fontgroup for scale changes in `update_font_scale`

It is needed because fonts can be reused between groups and outside of them.
So if the first font of a group has already been scaled, we still need to check if the others still needs to be scaled.
2024-06-23 09:02:56 +08:00
2f32806426 Update language_python.lua (#1723)
* Update language_python.lua

* Update language_python.lua

* Update language_python.lua

* implemented a better `python_type` subsyntax

* Update language_python.lua

* fixed a small error where you couldn't hint a type at a var and guive it a value at the same time

* Update language_python.lua

* Update language_python.lua

Dictionaries appear now normally

* Update language_python.lua

* added suggestions concerning strings

* commited suggestion

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>

* Various changes

* Update language_python.lua

Syntax more optimized but a tiny bit more complex...

* Simplified everything

---------

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2024-06-23 09:02:56 +08:00
fgelm01andtakase1121 2679ac9d83 Add support for binary integer literals. (#1819) 2024-06-23 09:02:56 +08:00
Takase a8e5941337 language_cpp: backport number highlighting from c (#1818) 2024-06-23 09:02:56 +08:00
ThaCuberandtakase1121 28edec36e8 improve number highlighting for c (#1752)
* improve number highlighting for c

* add unsigned suffix

* add long suffixes

* reorder octal literals and add suffix for hex numbers

* fix integer and float suffixes
too many characters, send help
2024-06-23 09:02:55 +08:00
Takase c43996cf36 resources/macos: better macos installer background (#1816) 2024-06-23 09:02:55 +08:00