Commit Graph
2385 Commits
Author SHA1 Message Date
TakaseandGuldoman c3fa3859f2 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-23 09:02:55 +08:00
Takase 64b7625b62 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-23 09:02:55 +08:00
Takase 8782c8064f 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-23 09:02:55 +08:00
Janandtakase1121 b8e4b30912 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-23 09:02:55 +08:00
Takase 8432499f98 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-23 09:02:55 +08:00
Takase 6e7bcff493 ci: fix typo in release note template (#1801) 2024-06-23 09:02:54 +08:00
Guldomanandtakase1121 9fb5d299f9 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-23 09:02:46 +08:00
fgelm01andtakase1121 3d692cf5a6 Change co_wait to co_await in language_cpp (#1800)
The C++20 keyword is spelled `co_await`.
2024-06-21 08:06:53 +08:00
Takase e9a40c615f api/system: fix newlines returned by get_clipboard (#1788) 2024-06-21 08:06:44 +08:00
Takase bab7b3caf9 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-06-21 08:06:18 +08:00
Guldomanandtakase1121 8989dd6dc9 build: fix dirmonitor backend selection (#1790)
When a backend was specified using meson, the relative source files weren't being added.
2024-06-21 08:05:35 +08:00
takase1121 f4311df1d6 chore: update version 2024-04-16 18:47:51 +08:00
takase1121 71d25f34b3 chore: update changelog 2024-04-15 11:47:00 +08:00
Takase c449632e85 ci: fix missing permission for creating releases (#1770) 2024-04-15 11:45:05 +08:00
takase1121 79b2457556 chore: update version 2024-04-15 10:39:36 +08:00
takase1121 bf35573725 changelog: add changes for 2.1.4 2024-04-15 10:32:25 +08:00
Guldomanandtakase1121 67202c7284 Skip patterns matching nothing in tokenizer (#1743)
These patterns cause infinite loops, so warn about them and skip them.
2024-04-15 09:02:17 +08:00
Andrei Vincaandtakase1121 ae4a27c797 Fix BufferSize in g_read for Windows (#1722) 2024-04-15 09:02:00 +08:00
PerilousBookletandtakase1121 4299909cd3 Added Arduino syntax highlighting support alongside C++. (#1767) 2024-04-15 08:50:13 +08:00
PerilousBookletandtakase1121 48712a242d 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-04-15 08:49:40 +08:00
Guldomanandtakase1121 e053ea3ad2 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 17:22:34 +08:00
Aziz Mazouz Jaberandtakase1121 41e2939ea9 Add from symbol to support ESM (#1754) 2024-03-25 17:22:12 +08:00
Guldomanandtakase1121 db6e07f041 Rectify LICENSE dates and owners (#1748) 2024-03-23 20:28:31 +08:00
Takase 5296f8de4b scripts: not hardcode MSYSTEM (#1739) 2024-03-23 20:28:31 +08:00
Guldomanandtakase1121 ddf08de1d4 Fix language_js regex/comment distinction (#1731) 2024-03-23 20:28:31 +08:00
takase1121andGuldoman 48aa350a3e 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

Co-authored-by: Guldoman <giulio.lettieri@gmail.com>
2024-03-23 20:27:47 +08:00
Guldomanandtakase1121 499124d8e3 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-23 20:26:43 +08:00
PerilousBookletandtakase1121 e568e4acdf Added .pyi extension to python. (#1728) 2024-03-23 20:26:43 +08:00
Takase 4ac4f72198 process: fix unitialized variables (#1719)
* process: fix potential unitialized variables

* process: fix brace initializer error on Windows
2024-03-23 20:26:43 +08:00
takase1121 c6a7ff98b0 appstream: update release date 2024-01-29 07:47:49 +08:00
takase1121 caf30574ed changelog: fix formatting issue and release date 2024-01-29 07:43:03 +08:00
takase1121 328ed55f83 update version in metadata 2024-01-21 15:13:26 +08:00
takase1121 b4d750013d changelog: update changelog for v2.1.3 2024-01-21 14:59:52 +08:00
Takase b856dc371a process: style changes (#1709) 2024-01-21 14:49:35 +08:00
Takase bbc524ad82 language_js: support binary and octal representation (#1710) 2024-01-21 14:49:28 +08:00
vqnandtakase1121 a389adbaf5 autoreload docs only if their filename matches an actual file (#1698) 2024-01-21 14:48:56 +08:00
vqnandtakase1121 df12a5dde6 reorder nagview options on doc:save error to be more consistent with other nagview confirmations (#1696) 2024-01-21 14:48:44 +08:00
Fijiandtakase1121 e353c5322a 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-21 14:48:21 +08:00
4ae92ae128 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-21 14:42:46 +08:00
vqnandtakase1121 2ce8c58bea 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-21 14:40:41 +08:00
takase1121 b68efcd9e4 chore(changelog): update changelog for v2.1.2 2023-12-29 09:33:12 +08:00
takase1121 97a49661e0 chore: update versions 2023-12-29 08:47:22 +08:00
vqnandtakase1121 9c21903af7 add autocompletion to multicursor (#1394)
* use Doc:remove
2023-12-29 08:47:21 +08:00
Adam Harrisonandtakase1121 1d4e01a192 Fixed a minor bug, should close issue #1680. 2023-12-29 08:47:21 +08:00
ThaCuberandtakase1121 f1bdd840a1 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-29 08:47:05 +08:00
Guldomanandtakase1121 34cebe8fe4 Make license time-independent (#1655) 2023-12-01 15:41:25 +08:00
Takase 311651333a 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-12-01 10:12:16 +08:00
Guldomanandtakase1121 8e2928aeb8 Improve font/color change detection in language_md (#1614)
* Delay setting font for custom `language_md` token types

* Improve font/color change detection in `language_md`
2023-11-30 11:45:58 +08:00
Guldomanandtakase1121 bc935906d1 Use x offset to define render command rect in rencache_draw_text (#1618)
* Return x offset for the first character in `ren_font_group_get_width`

* Use x offset to define render command rect in `rencache_draw_text`
2023-11-30 11:45:25 +08:00
Guldomanandtakase1121 9be5a46a22 Fix patterns starting with ^ in tokenizer (#1645)
Previously the "dirty" version of the pattern was used, which could 
result in trying to match with multiple `^`, which failed valid matches.
2023-11-30 11:39:55 +08:00