Commit Graph

2341 Commits

Author SHA1 Message Date
Takase 062f8dd1ff
resources/macos: better macos installer background (#1816) 2024-06-19 17:29:00 +02:00
Takase 3878e466e2
ci: dependabot updates (#1814)
* ci: dependabot updates

* dependabot: fix syntax error

* dependabot: better group name
2024-06-18 16:04:40 +02:00
Takase 05b388e3b7
subprojects: update lua,pcre2,sdl2 (#1812)
* subprojects: update lua,pcre2,sdl2

* meson.build: remove hidapi usage

* subprojects/sdl2: fix compilation with xinput

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

---------

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2024-06-18 15:19:38 +02:00
Takase 646b43bd37
Update macOS copyright notice (#1815)
* resources: update copyright in info.plist

* meson.build: dynamically generate current year

"present" may be misleading.

* resources/macos: remove unecessary newlines
2024-06-18 15:00:14 +02:00
Takase a9d918901e
ci: use latest macos images (#1804)
* ci: use latest macos images

* ci/build: clarify the purpose of md5sha1sum

* meson.build: remove hidapi usage

* ci: downgrade macos version for universal build

* scripts: codesign the universal binary with sha1 and sha256

* ci: revert back to macos-14 for universal

* ci/build: remove old comment
2024-06-18 11:38:41 +08:00
Jan 39ba860645
Update labeler config for new version (#1805)
* Update labeler config for new version

* Fix indent

---------

Co-authored-by: Takase <20792268+takase1121@users.noreply.github.com>
2024-06-07 19:20:16 +08:00
Takase a17c7cfcd1
Update action dependencies (#1724)
* CI: update various action versions

The most significant change is action/upload-artifact@v4,
which does not support uploading artifacts of the same name.
This makes our lives significantly worse, but I don't know
if GitHub will remove v3 in future or not.

* CI: fix macOS universal artifact download

* CI: update release action versions

* CI: use containers only for building

* CI: fix multiline commands

* CI: try to fix multiline strings again

* CI: fix multiline strings again ugh

* CI: Fix ccache in containers

* CI: Fix quotes again

* CI: fix ccache

* CI: fix deprecated set-output command

* ci: update build box to v2.1.2

* ci: revert to softprops/action-gh-release

* ci: add name to release

* ci: remove name again

* ci: fix wrong outputs reference

* ci: add name

* ci: add missing name for each step

* ci: format yaml files

* ci/release: add names to unamed entries

* ci/release: fix MSYS2 not downloading deps

* ci/release: change to ncipollo/release-action

There is some weird issue with softprops/action-gh-release and I can't update an existing release.

* ci/release: allow updating releases

* ci/release: upload all artifacts, then download them at once

* ci/release: use a better name for job

* ci/release: add release as dependency

* ci/release: set tag for update release

* ci/auto-labeler: remove workaround for old autolabeler issue

* ci/release: remove the need of another bash -c

* ci/release: remove weird bash -c
2024-06-07 10:08:12 +08:00
Takase 490f627f38
ci: fix typo in release note template (#1801) 2024-06-06 09:51:57 +08:00
Guldoman 4d649ba92d
fix: avoid iterating over a changing table in `run_threads` (#1794)
* fix: avoid iterating over a changing table in `run_threads`

This is done to avoid iterating over a table that can change in the meantime.
More precisely the issue appears if a thread is removed from the table, we yield early from `run_threads` because we reached the end of the frame, and a new thread is added before the next iteration.

For example:
```lua
local lost_time = false
core.add_thread(function()
  -- force early yield
  local t0 = system.get_time()
  while system.get_time() - t0 < .1 do end
  lost_time = true
end, "a")

local step = core.step
function core.step()
  if lost_time then
    -- add a new thread while run_threads hasn't finished iterating
    core.add_thread(function()end, "a1")
    lost_time = false
  end
  return step()
end
```
would crash with `invalid key to 'next'`.

* fix: only run coroutine if it wasn't removed

* fix: don't handle `core.threads` table as an array

This caused some entries to be skipped or even removed erroneously.
2024-06-05 08:58:19 -04:00
fgelm01 e0a7bdbcba
Change co_wait to co_await in language_cpp (#1800)
The C++20 keyword is spelled `co_await`.
2024-06-05 12:25:33 +02:00
Takase e74cee1419
api/system: fix newlines returned by get_clipboard (#1788) 2024-05-23 22:19:15 +02:00
Takase 5549c0bd29
Generate release notes (#1774)
* ci: generate better release notes

* scripts: rename generate-release-note.sh

* ci/release: check out all the history

* ci/release: accept version from input
2024-05-18 07:12:04 +08:00
Guldoman 7d876f81ad
build: fix dirmonitor backend selection (#1790)
When a backend was specified using meson, the relative source files weren't being added.
2024-05-17 17:19:39 +02:00
Takase 7fdb35ac46
Release v2.1.4 (#1772)
* changelog: add changes for 2.1.4

* chore: update version and changelog
2024-04-16 19:12:43 +08:00
Takase fb3a707ce6
ci: fix missing permission for creating releases (#1770) 2024-04-15 11:44:06 +08:00
Guldoman 21dcd782c0
Skip patterns matching nothing in `tokenizer` (#1743)
These patterns cause infinite loops, so warn about them and skip them.
2024-04-15 09:00:03 +08:00
Andrei Vinca 0795a5dad4
Fix BufferSize in g_read for Windows (#1722) 2024-04-15 08:52:49 +08:00
PerilousBooklet 727c179deb
Added Arduino syntax highlighting support alongside C++. (#1767) 2024-04-13 10:54:31 +02:00
PerilousBooklet e9e2d83dc5
Fixed some typos in core.init (#1755)
* Fixed some typos.

* Update data/core/init.lua

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

* Update data/core/init.lua

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

---------

Co-authored-by: Takase <20792268+takase1121@users.noreply.github.com>
2024-03-28 19:33:55 +01:00
Guldoman 3bed5c16ae
Limit `language_js` regex avoidance to numbers, and fix starting `/*` comments (#1744)
* Avoid starting regexes only after numbers in `language_js`

* Allow starting `/*` comments after numbers in `language_js`
2024-03-25 00:20:32 +01:00
Aziz Mazouz Jaber 6e849890be
Add from symbol to support ESM (#1754) 2024-03-24 14:25:44 -04:00
Jan 5d264e14ef
Add SerenityOS platform support (#1745)
* Add SerenityOS platform support

* remove cpp_std default option
2024-03-18 13:55:01 -04:00
Guldoman 62d7ec8e85
Rectify `LICENSE` dates and owners (#1748) 2024-03-15 21:03:24 +01:00
Takase 2b7bed9a4e
scripts: not hardcode MSYSTEM (#1739) 2024-03-07 01:21:46 +01:00
Guldoman cfca01e88e
Fix `language_js` regex/comment distinction (#1731) 2024-03-06 21:06:36 +01:00
Guldoman 2c1dc93d9d
Improve `CommandView` and `autocomplete` scroll behavior (#1732)
* Make command palette item scrolling more natural

Also add a config option for the maximum number of visible entries in the command palette.

* Make `autocomplete` item scrolling more natural
2024-03-05 22:56:01 -05:00
Guldoman abf8955799
Improve `autocomplete` suggestions box behavior (#1734)
* Improve `autocomplete` suggestions box sizing

This avoids that the box gets too big because of non-visible items, and makes it reactive to window sizing.

* Draw ellipsis when `autocomplete` entries aren't fully visible
2024-03-05 22:29:17 -05:00
PerilousBooklet 03b8c239dc
Added .pyi extension to python. (#1728) 2024-02-24 01:46:28 +01:00
Takase 2e8d59b86f
wasm cross file improvements (#1660)
* fix(wasm-cross): missing idbfs in newer emscripten

* refactor(wasm-cross): specify important option in cross file

* feat(wasm-cross): allow overriding emscripten path

* feat(wasm-cross): add file_packager as a binary
2024-02-06 14:38:12 +08:00
Takase 53876405fa
readme: add minimum supported OSes (#1711)
* readme: add minimum supported OSes

* README: add linebreak between sentences
2024-02-06 01:49:41 +01:00
Takase 8090c1aa29
process: fix unitialized variables (#1719)
* process: fix potential unitialized variables

* process: fix brace initializer error on Windows
2024-02-05 09:23:24 -05:00
Takase 3f31c27677
v2.1.3 (#1712)
* changelog: update changelog for v2.1.3

* update version in metadata

* changelog: fix formatting issue and release date

* appstream: update release date
2024-01-29 01:10:15 +01:00
Chloé Vulquin 1a5fd97c20
Add system.setenv (#1706)
* add system.setenv

* document system.setenv

* system.setenv: use wide versions of functions on windows

* do not include processenv.h

* system.setenv: report failure, including of utfconv

* system.setenv: free utfconv output
2024-01-23 00:22:44 +01:00
Luke aka SwissalpS 8cf40de860
Fix comment typos in data/core/{init.lua,dirwatch.lua} (#1549)
* comment typo in data/core/init.lua

* init.lua reword comment

* Update dirwatch.lua

Some wording is still whacky, maybe next time

* Update dirwatch.lua

* clear up can/may be not nil confusion

* falsey vs falsy new wording to help out

* falsey -> falsy

* Update data/core/dirwatch.lua

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

---------

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2024-01-21 22:30:59 +01:00
Takase 0383e17475
process: style changes (#1709) 2024-01-21 10:18:32 +08:00
Takase dd69d7b9d0
language_js: support binary and octal representation (#1710) 2024-01-21 10:18:13 +08:00
vqn c561eb78e6
autoreload docs only if their filename matches an actual file (#1698) 2024-01-21 01:49:25 +01:00
vqn fd9b17ff15
reorder nagview options on doc:save error to be more consistent with other nagview confirmations (#1696) 2024-01-20 01:19:12 +01:00
Fiji c27d9aa0c0
Improve number highlighting for python syntax highlighting (#1704)
* Improve number highlighting for python syntax highlighting

Adds support for octal and binary representation, as well uppercase characters (X, B and O)

* add underscore and negative hex/oct/bin value support

* Removed | from pattern
2024-01-20 01:04:49 +01:00
Chloé Vulquin e9a8dff884
Memory fixes (#1705)
* fix: free-before-init in renwin_init_surface when using sdl renderer

`ren->rensurface.surface` presupposes zero-initialized rensurface.
Rensurface was not actually zero-initialized.
It is now.

* fix: heap buffer overflow in process_env_free

`process_env_free` presupposed that it was null-terminated.
Pass length to free instead.

* use calloc instead of memset for zero-init

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

---------

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2024-01-20 08:02:46 +08:00
vqn 8b9b26e18f
Fix doc:create-cursor-previous/next-line with tabs (#1697)
* use DocView.translate to split cursor on previous/next line

* use dv.doc instead of doc()
2024-01-13 13:49:26 +01:00
Takase 500ea2aefd
v2.1.2 (#1695)
* chore: update versions

* chore(changelog): update changelog for v2.1.2
2024-01-02 13:20:59 +01:00
Jan badcaef13b
turn window_renderer into managed pointer (#1683)
* turn window_renderer into managed pointer
this will make it easier to move it into userdata in the future

* remove unused function, remove comment
2023-12-06 12:51:45 +01:00
Adam Harrison cfbe68936a Fixed a minor bug, should close issue #1680. 2023-12-03 11:09:56 -05:00
ThaCuber f26eef14fa
fix nagbar failed save message (#1678)
* fix nagbar failed save message

- visually separated statements with a `.`
- first statement slightly rewritten
- use `'` rather than `"`

* yeahhhh no back to `"`
2023-12-03 06:44:07 +08:00
Guldoman e8ae7583bc
Expose plaintext syntax (#1652) 2023-11-30 10:53:01 -05:00
Guldoman 9a4831d5c2
Use `\r\n` for new files on Windows (#1596)
* Use `\r\n` for new files on Windows

* Add `config.line_endings`
2023-11-30 10:51:10 -05:00
Takase 142f0a17ba
feat(process): allow commands and envs on proces_start (#1477)
* feat(process): allow commands and envs on proces_start

* refactor(process): copy process arguments once whenever possible

Refactors the code to use an arglist type which is just lpCmdline on Windows
and a list in Linux.
The function automatically escapes the command when it is needed, avoiding
a second copy.

This also allows UTF-8 commands btw.

* fix(process): fix invalid dereference

* refactor(process): mark xstrdup as potentially unused

* feat(process): add parent process environment when launching process

* fix(process): fix operator precedence with array operators

* fix(process): fix segfault when freeing random memory

* fix(process): fix wrong check for setenv()

* fix(process): fix accidentally initializing an array by assignment

* fix(process): clear return value if success
2023-11-30 10:33:24 -05:00
takase1121 ad1597125e chore(deps): update Lua 2023-11-30 11:19:18 +08:00
takase1121 eb7329d1fc chore(deps): update SDL2 2023-11-30 11:19:18 +08:00