diff options
Diffstat (limited to 'editors')
-rw-r--r-- | editors/Makefile | 1 | ||||
-rw-r--r-- | editors/cudatext/Makefile | 2 | ||||
-rw-r--r-- | editors/cudatext/distinfo | 6 | ||||
-rw-r--r-- | editors/encryptpad/Makefile | 16 | ||||
-rw-r--r-- | editors/encryptpad/distinfo | 6 | ||||
-rw-r--r-- | editors/lazarus-qt5/Makefile | 4 | ||||
-rw-r--r-- | editors/lazarus-qt6/Makefile | 4 | ||||
-rw-r--r-- | editors/lazarus/Makefile | 10 | ||||
-rw-r--r-- | editors/lazarus/distinfo | 6 | ||||
-rw-r--r-- | editors/lazarus/files/patch-lcl_interfaces_qt6_qtwidgets.pas | 25 | ||||
-rw-r--r-- | editors/lazarus/files/pkg-message.in | 11 | ||||
-rw-r--r-- | editors/microsoft-edit/Makefile | 40 | ||||
-rw-r--r-- | editors/microsoft-edit/Makefile.crates | 71 | ||||
-rw-r--r-- | editors/microsoft-edit/distinfo | 145 | ||||
-rw-r--r-- | editors/microsoft-edit/files/patch-assets_manpage_edit.1 | 29 | ||||
-rw-r--r-- | editors/microsoft-edit/files/patch-src_lib.rs | 10 | ||||
-rw-r--r-- | editors/microsoft-edit/files/patch-src_sys_unix.rs | 97 | ||||
-rw-r--r-- | editors/microsoft-edit/files/patch-src_tui.rs | 421 | ||||
-rw-r--r-- | editors/microsoft-edit/pkg-descr | 5 | ||||
-rw-r--r-- | editors/picpas/Makefile | 2 |
20 files changed, 874 insertions, 37 deletions
diff --git a/editors/Makefile b/editors/Makefile index 69d8bca00905..c5c5fa48a011 100644 --- a/editors/Makefile +++ b/editors/Makefile @@ -205,6 +205,7 @@ SUBDIR += mg SUBDIR += mickey SUBDIR += micro + SUBDIR += microsoft-edit SUBDIR += mined SUBDIR += mle SUBDIR += mousepad diff --git a/editors/cudatext/Makefile b/editors/cudatext/Makefile index d888acaae0e5..c25e72e60467 100644 --- a/editors/cudatext/Makefile +++ b/editors/cudatext/Makefile @@ -1,5 +1,5 @@ PORTNAME= cudatext -PORTVERSION= 1.223.5.1 +PORTVERSION= 1.223.6.0 CATEGORIES= editors PKGNAMESUFFIX= ${LAZARUS_PKGNAMESUFFIX} diff --git a/editors/cudatext/distinfo b/editors/cudatext/distinfo index 2b5f0e2110e7..8c2ed0645db2 100644 --- a/editors/cudatext/distinfo +++ b/editors/cudatext/distinfo @@ -1,6 +1,6 @@ -TIMESTAMP = 1745600206 -SHA256 (Alexey-T-CudaText-1.223.5.1_GH0.tar.gz) = 3ce5370935a5dafa68baefa2958e7598e3af5f38c8d2c9e38a5118c620630061 -SIZE (Alexey-T-CudaText-1.223.5.1_GH0.tar.gz) = 6371624 +TIMESTAMP = 1748047717 +SHA256 (Alexey-T-CudaText-1.223.6.0_GH0.tar.gz) = 298138b5ae3e52028924861bce816edf40f1190b5116cc481a2e2bce5470c7ff +SIZE (Alexey-T-CudaText-1.223.6.0_GH0.tar.gz) = 6372738 SHA256 (bgrabitmap-bgrabitmap-d2a9b15_GH0.tar.gz) = bf831ada3e9562dfc9653e0b1d46dca2bbe5409f8406ae4db7f52299e09fe4c6 SIZE (bgrabitmap-bgrabitmap-d2a9b15_GH0.tar.gz) = 6657935 SHA256 (Alexey-T-Python-for-Lazarus-fda3fdb_GH0.tar.gz) = 7243d0eb6d2f1924447fa575621474f043ec54ad258f770d230489bfeecb9cf5 diff --git a/editors/encryptpad/Makefile b/editors/encryptpad/Makefile index 23020b2a903a..ac79712b92da 100644 --- a/editors/encryptpad/Makefile +++ b/editors/encryptpad/Makefile @@ -1,7 +1,6 @@ PORTNAME= encryptpad DISTVERSIONPREFIX= v -DISTVERSION= 0.5.0.2 -PORTREVISION= 1 +DISTVERSION= 0.5.0.4 CATEGORIES= editors security MAINTAINER= eduardo@FreeBSD.org @@ -11,22 +10,19 @@ WWW= https://evpo.net/encryptpad/ LICENSE= GPLv2+ LICENSE_FILE= ${WRKSRC}/license.txt -DEPRECATED= Depends on expired security/botan2 -EXPIRATION_DATE=2025-06-21 - -LIB_DEPENDS= libbotan-2.so:security/botan2 +LIB_DEPENDS= libbotan-3.so:security/botan3 USES= compiler:c++11-lang desktop-file-utils gl gmake pkgconfig \ - python:build qt:5 shared-mime-info shebangfix + python:build qt:5 shared-mime-info USE_GITHUB= yes GH_ACCOUNT= evpo GH_PROJECT= EncryptPad +GH_TAGNAME= 3593110ddc83395815caa6a00ce9412161c173e7 # botan3 branch, 20240627 USE_GL= gl -USE_QT= core gui widgets buildtools:build qmake:build -BINARY_ALIAS= python=${PYTHON_CMD} \ - qmake=${QMAKE} +USE_QT= core gui printsupport svg widgets buildtools:build qmake:build +BINARY_ALIAS= python3=${PYTHON_CMD} qmake=${QMAKE} PORTDOCS= * diff --git a/editors/encryptpad/distinfo b/editors/encryptpad/distinfo index 800e802650d5..e3cbe85b22b1 100644 --- a/editors/encryptpad/distinfo +++ b/editors/encryptpad/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1661602196 -SHA256 (evpo-EncryptPad-v0.5.0.2_GH0.tar.gz) = 3ec5f445dc20023ceee86848053f980eed5b2536b384a2b2eb4953511ddde094 -SIZE (evpo-EncryptPad-v0.5.0.2_GH0.tar.gz) = 14968657 +TIMESTAMP = 1748299290 +SHA256 (evpo-EncryptPad-v0.5.0.4-3593110ddc83395815caa6a00ce9412161c173e7_GH0.tar.gz) = cd802cbb2cb883f83978c132462f02c432815c22ff7634a216d23664ca804793 +SIZE (evpo-EncryptPad-v0.5.0.4-3593110ddc83395815caa6a00ce9412161c173e7_GH0.tar.gz) = 18589358 diff --git a/editors/lazarus-qt5/Makefile b/editors/lazarus-qt5/Makefile index fdbad1d94475..297dbb04a88c 100644 --- a/editors/lazarus-qt5/Makefile +++ b/editors/lazarus-qt5/Makefile @@ -2,8 +2,8 @@ PKGNAMESUFFIX?= -qt5 COMMENT= Portable Delphi-like IDE for the FreePascal compiler (QT5) -CONFLICTS= lazarus-gtk2 lazarus-gtk2-devel lazarus-qt5-devel lazarus-qt6 \ - lazarus-qt6-devel +CONFLICTS= lazarus-gtk2 lazarus-gtk2-devel lazarus-gtk3-devel lazarus-qt5-devel \ + lazarus-qt6 lazarus-qt6-devel LIB_DEPENDS= libQt5Pas.so:x11-toolkits/qt5pas diff --git a/editors/lazarus-qt6/Makefile b/editors/lazarus-qt6/Makefile index beda06699a11..00b407456e42 100644 --- a/editors/lazarus-qt6/Makefile +++ b/editors/lazarus-qt6/Makefile @@ -2,8 +2,8 @@ PKGNAMESUFFIX?= -qt6 COMMENT= Portable Delphi-like IDE for the FreePascal compiler (QT6) -CONFLICTS= lazarus-gtk2 lazarus-gtk2-devel lazarus-qt5 lazarus-qt5-devel \ - lazarus-qt6-devel +CONFLICTS= lazarus-gtk2 lazarus-gtk2-devel lazarus-gtk3-devel lazarus-qt5 \ + lazarus-qt5-devel lazarus-qt6-devel LIB_DEPENDS= libQt6Pas.so:x11-toolkits/qt6pas diff --git a/editors/lazarus/Makefile b/editors/lazarus/Makefile index d02cf5eece4c..499d3f619636 100644 --- a/editors/lazarus/Makefile +++ b/editors/lazarus/Makefile @@ -1,5 +1,5 @@ PORTNAME= lazarus -DISTVERSION= 3.8.0 +DISTVERSION= 4.0 PKGNAMESUFFIX?= -gtk2 PORTREVISION?= 0 CATEGORIES= editors devel @@ -9,8 +9,8 @@ MAINTAINER?= acm@FreeBSD.org COMMENT?= Portable Delphi-like IDE for the FreePascal compiler (GTK2) WWW= https://www.lazarus-ide.org/ -CONFLICTS?= lazarus-gtk2-devel lazarus-qt5 lazarus-qt5-devel lazarus-qt6 \ - lazarus-qt6-devel +CONFLICTS?= lazarus-gtk2-devel lazarus-gtk3-devel lazarus-qt5 lazarus-qt5-devel \ + lazarus-qt6 lazarus-qt6-devel BUILD_DEPENDS?= ${LOCALBASE}/bin/as:devel/binutils RUN_DEPENDS?= ${LOCALBASE}/bin/as:devel/binutils \ @@ -22,7 +22,7 @@ ONLY_FOR_ARCHS= i386 amd64 USE_GITLAB= yes GL_ACCOUNT= freepascal.org/lazarus GL_PROJECT= ${PORTNAME} -GL_COMMIT= 57e899e4bbe50b6653ec20434bdb7799aa629e06 +GL_COMMIT= 9d15c73c91a1545be50bee02b27bd3b43f9d90e8 USES= desktop-file-utils fpc:run gettext gmake iconv shared-mime-info xorg USE_XORG= x11 @@ -40,7 +40,7 @@ OPTIONS_DEFAULT= GDB .include <bsd.port.options.mk> LAZARUS_ARCH= ${ARCH:S,amd64,x86_64,} -LAZARUS_BASE= 3.8.0 +LAZARUS_BASE= 4.0 BUILDNAME= ${LAZARUS_ARCH}-${OPSYS:tl} LCL_PLATFORM?= gtk2 diff --git a/editors/lazarus/distinfo b/editors/lazarus/distinfo index 2507de300fbf..5c4b4049b587 100644 --- a/editors/lazarus/distinfo +++ b/editors/lazarus/distinfo @@ -1,3 +1,3 @@ -TIMESTAMP = 1737610002 -SHA256 (freepascal/freepascal.org/lazarus-lazarus-57e899e4bbe50b6653ec20434bdb7799aa629e06_GL0.tar.gz) = a0d97da6787218eb66572a17f2cfa3e0bbc7b1aaf019a3cf1bdcbdad9140d197 -SIZE (freepascal/freepascal.org/lazarus-lazarus-57e899e4bbe50b6653ec20434bdb7799aa629e06_GL0.tar.gz) = 56248974 +TIMESTAMP = 1748046926 +SHA256 (freepascal/freepascal.org/lazarus-lazarus-9d15c73c91a1545be50bee02b27bd3b43f9d90e8_GL0.tar.gz) = d0f81afd1be9f7deeb2d7941c72ab07acaa1fced288117ee341d7db83ec995af +SIZE (freepascal/freepascal.org/lazarus-lazarus-9d15c73c91a1545be50bee02b27bd3b43f9d90e8_GL0.tar.gz) = 60530688 diff --git a/editors/lazarus/files/patch-lcl_interfaces_qt6_qtwidgets.pas b/editors/lazarus/files/patch-lcl_interfaces_qt6_qtwidgets.pas new file mode 100644 index 000000000000..2e84562874d1 --- /dev/null +++ b/editors/lazarus/files/patch-lcl_interfaces_qt6_qtwidgets.pas @@ -0,0 +1,25 @@ +--- lcl/interfaces/qt6/qtwidgets.pas.orig 2025-05-03 06:08:10 UTC ++++ lcl/interfaces/qt6/qtwidgets.pas +@@ -16497,10 +16497,6 @@ begin + FActions.Free; + end; + +- if Assigned(FActionHandle) then +- QAction_Destroy(FActionHandle); +- FActionHandle := nil; +- + inherited Destroy; + end; + +@@ -16554,6 +16550,11 @@ begin + QMenu_hook_destroy(FAboutToHideHook); + FAboutToHideHook := nil; + end; ++ ++ if Assigned(FActionHandle) then ++ QAction_Destroy(FActionHandle); ++ FActionHandle := nil; ++ + inherited DetachEvents; + end; + diff --git a/editors/lazarus/files/pkg-message.in b/editors/lazarus/files/pkg-message.in index 9fe32565884c..c9b15d113647 100644 --- a/editors/lazarus/files/pkg-message.in +++ b/editors/lazarus/files/pkg-message.in @@ -24,24 +24,21 @@ The Lazarus RAD was installed by default: editors/lazarus - editors/lazarus-devel editors/lazarus-qt5 - editors/lazarus-qt5-devel editors/lazarus-qt6 - editors/lazarus-qt6-devel - You can added those ports if you want support for gtk2, qt5 or qt6 - interfaces. Please look at net-p2p/transmission-remote-gui like a example of - how use it + You can added those ports if you want support for gtk2, qt5 or qt6 interfaces. + Please look at sysutils/bhyvemgr like a example of how use it. 6) If you want built apps using devel version of lazarus, you must add the following into /etc/make.conf file WANT_LAZARUS_DEVEL= yes - It is neccesary for use devel version of lazarus (gtk2, qt5 or qt6) + It is neccesary for use devel version of lazarus (gtk2, gtk3, qt5 or qt6) editors/lazarus-devel + editors/lazarus-gtk3-devel editors/lazarus-qt5-devel editors/lazarus-qt6-devel diff --git a/editors/microsoft-edit/Makefile b/editors/microsoft-edit/Makefile new file mode 100644 index 000000000000..97ea85cf8af0 --- /dev/null +++ b/editors/microsoft-edit/Makefile @@ -0,0 +1,40 @@ +PORTNAME= microsoft-edit +DISTVERSIONPREFIX= v +DISTVERSION= 1.0.0 +PORTREVISION= 1 +CATEGORIES= editors + +MAINTAINER= nobutaka@FreeBSD.org +COMMENT= Console text editor written in Rust +WWW= https://github.com/microsoft/edit + +LICENSE= MIT +LICENSE_FILE= ${WRKSRC}/LICENSE + +USES= cargo +USE_GITHUB= yes +GH_ACCOUNT= microsoft +GH_PROJECT= edit + +BUILD_DEPENDS= rust-nightly>0:lang/rust-nightly +CARGO_BUILDDEP= no + +PORTDOCS= CODE_OF_CONDUCT.md CONTRIBUTING.md README.md SECURITY.md + +OPTIONS_DEFINE= DOCS + +PLIST_FILES= bin/edit \ + bin/msedit \ + share/man/man1/edit.1.gz \ + share/man/man1/msedit.1.gz + +post-install-DOCS-on: + @${MKDIR} ${STAGEDIR}${DOCSDIR} + ${INSTALL_DATA} ${PORTDOCS:S|^|${WRKSRC}/|} ${STAGEDIR}${DOCSDIR} + +post-install: + ${RLN} ${STAGEDIR}${PREFIX}/bin/edit ${STAGEDIR}${PREFIX}/bin/msedit + ${INSTALL_MAN} ${WRKSRC}/assets/manpage/edit.1 ${STAGEDIR}${PREFIX}/share/man/man1 + ${RLN} ${STAGEDIR}${PREFIX}/share/man/man1/edit.1 ${STAGEDIR}${PREFIX}/share/man/man1/msedit.1 + +.include <bsd.port.mk> diff --git a/editors/microsoft-edit/Makefile.crates b/editors/microsoft-edit/Makefile.crates new file mode 100644 index 000000000000..98c885e1a155 --- /dev/null +++ b/editors/microsoft-edit/Makefile.crates @@ -0,0 +1,71 @@ +CARGO_CRATES= aho-corasick-1.1.3 \ + anes-0.1.6 \ + anstyle-1.0.10 \ + autocfg-1.4.0 \ + bumpalo-3.17.0 \ + cast-0.3.0 \ + cfg-if-1.0.0 \ + ciborium-0.2.2 \ + ciborium-io-0.2.2 \ + ciborium-ll-0.2.2 \ + clap-4.5.35 \ + clap_builder-4.5.35 \ + clap_lex-0.7.4 \ + criterion-0.5.1 \ + criterion-plot-0.5.0 \ + crossbeam-deque-0.8.6 \ + crossbeam-epoch-0.9.18 \ + crossbeam-utils-0.8.21 \ + crunchy-0.2.3 \ + either-1.15.0 \ + half-2.6.0 \ + hermit-abi-0.5.0 \ + is-terminal-0.4.16 \ + itertools-0.10.5 \ + itoa-1.0.15 \ + js-sys-0.3.77 \ + libc-0.2.171 \ + log-0.4.27 \ + memchr-2.7.4 \ + num-traits-0.2.19 \ + once_cell-1.21.3 \ + oorandom-11.1.5 \ + plotters-0.3.7 \ + plotters-backend-0.3.7 \ + plotters-svg-0.3.7 \ + proc-macro2-1.0.94 \ + quote-1.0.40 \ + rayon-1.10.0 \ + rayon-core-1.12.1 \ + regex-1.11.1 \ + regex-automata-0.4.9 \ + regex-syntax-0.8.5 \ + rustversion-1.0.20 \ + ryu-1.0.20 \ + same-file-1.0.6 \ + serde-1.0.219 \ + serde_derive-1.0.219 \ + serde_json-1.0.140 \ + syn-2.0.100 \ + tinytemplate-1.2.1 \ + toml-0.5.11 \ + unicode-ident-1.0.18 \ + walkdir-2.5.0 \ + wasm-bindgen-0.2.100 \ + wasm-bindgen-backend-0.2.100 \ + wasm-bindgen-macro-0.2.100 \ + wasm-bindgen-macro-support-0.2.100 \ + wasm-bindgen-shared-0.2.100 \ + web-sys-0.3.77 \ + winapi-util-0.1.9 \ + windows-sys-0.59.0 \ + windows-targets-0.52.6 \ + windows_aarch64_gnullvm-0.52.6 \ + windows_aarch64_msvc-0.52.6 \ + windows_i686_gnu-0.52.6 \ + windows_i686_gnullvm-0.52.6 \ + windows_i686_msvc-0.52.6 \ + windows_x86_64_gnu-0.52.6 \ + windows_x86_64_gnullvm-0.52.6 \ + windows_x86_64_msvc-0.52.6 \ + winres-0.1.12 diff --git a/editors/microsoft-edit/distinfo b/editors/microsoft-edit/distinfo new file mode 100644 index 000000000000..b13edffb06a3 --- /dev/null +++ b/editors/microsoft-edit/distinfo @@ -0,0 +1,145 @@ +TIMESTAMP = 1748176479 +SHA256 (rust/crates/aho-corasick-1.1.3.crate) = 8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916 +SIZE (rust/crates/aho-corasick-1.1.3.crate) = 183311 +SHA256 (rust/crates/anes-0.1.6.crate) = 4b46cbb362ab8752921c97e041f5e366ee6297bd428a31275b9fcf1e380f7299 +SIZE (rust/crates/anes-0.1.6.crate) = 23857 +SHA256 (rust/crates/anstyle-1.0.10.crate) = 55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9 +SIZE (rust/crates/anstyle-1.0.10.crate) = 15725 +SHA256 (rust/crates/autocfg-1.4.0.crate) = ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26 +SIZE (rust/crates/autocfg-1.4.0.crate) = 17712 +SHA256 (rust/crates/bumpalo-3.17.0.crate) = 1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf +SIZE (rust/crates/bumpalo-3.17.0.crate) = 91975 +SHA256 (rust/crates/cast-0.3.0.crate) = 37b2a672a2cb129a2e41c10b1224bb368f9f37a2b16b612598138befd7b37eb5 +SIZE (rust/crates/cast-0.3.0.crate) = 11452 +SHA256 (rust/crates/cfg-if-1.0.0.crate) = baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd +SIZE (rust/crates/cfg-if-1.0.0.crate) = 7934 +SHA256 (rust/crates/ciborium-0.2.2.crate) = 42e69ffd6f0917f5c029256a24d0161db17cea3997d185db0d35926308770f0e +SIZE (rust/crates/ciborium-0.2.2.crate) = 35611 +SHA256 (rust/crates/ciborium-io-0.2.2.crate) = 05afea1e0a06c9be33d539b876f1ce3692f4afea2cb41f740e7743225ed1c757 +SIZE (rust/crates/ciborium-io-0.2.2.crate) = 6697 +SHA256 (rust/crates/ciborium-ll-0.2.2.crate) = 57663b653d948a338bfb3eeba9bb2fd5fcfaecb9e199e87e1eda4d9e8b240fd9 +SIZE (rust/crates/ciborium-ll-0.2.2.crate) = 14695 +SHA256 (rust/crates/clap-4.5.35.crate) = d8aa86934b44c19c50f87cc2790e19f54f7a67aedb64101c2e1a2e5ecfb73944 +SIZE (rust/crates/clap-4.5.35.crate) = 56970 +SHA256 (rust/crates/clap_builder-4.5.35.crate) = 2414dbb2dd0695280da6ea9261e327479e9d37b0630f6b53ba2a11c60c679fd9 +SIZE (rust/crates/clap_builder-4.5.35.crate) = 168525 +SHA256 (rust/crates/clap_lex-0.7.4.crate) = f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6 +SIZE (rust/crates/clap_lex-0.7.4.crate) = 12858 +SHA256 (rust/crates/criterion-0.5.1.crate) = f2b12d017a929603d80db1831cd3a24082f8137ce19c69e6447f54f5fc8d692f +SIZE (rust/crates/criterion-0.5.1.crate) = 110088 +SHA256 (rust/crates/criterion-plot-0.5.0.crate) = 6b50826342786a51a89e2da3a28f1c32b06e387201bc2d19791f622c673706b1 +SIZE (rust/crates/criterion-plot-0.5.0.crate) = 22706 +SHA256 (rust/crates/crossbeam-deque-0.8.6.crate) = 9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51 +SIZE (rust/crates/crossbeam-deque-0.8.6.crate) = 22471 +SHA256 (rust/crates/crossbeam-epoch-0.9.18.crate) = 5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e +SIZE (rust/crates/crossbeam-epoch-0.9.18.crate) = 46875 +SHA256 (rust/crates/crossbeam-utils-0.8.21.crate) = d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28 +SIZE (rust/crates/crossbeam-utils-0.8.21.crate) = 42691 +SHA256 (rust/crates/crunchy-0.2.3.crate) = 43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929 +SIZE (rust/crates/crunchy-0.2.3.crate) = 3775 +SHA256 (rust/crates/either-1.15.0.crate) = 48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719 +SIZE (rust/crates/either-1.15.0.crate) = 20114 +SHA256 (rust/crates/half-2.6.0.crate) = 459196ed295495a68f7d7fe1d84f6c4b7ff0e21fe3017b2f283c6fac3ad803c9 +SIZE (rust/crates/half-2.6.0.crate) = 59507 +SHA256 (rust/crates/hermit-abi-0.5.0.crate) = fbd780fe5cc30f81464441920d82ac8740e2e46b29a6fad543ddd075229ce37e +SIZE (rust/crates/hermit-abi-0.5.0.crate) = 17480 +SHA256 (rust/crates/is-terminal-0.4.16.crate) = e04d7f318608d35d4b61ddd75cbdaee86b023ebe2bd5a66ee0915f0bf93095a9 +SIZE (rust/crates/is-terminal-0.4.16.crate) = 7811 +SHA256 (rust/crates/itertools-0.10.5.crate) = b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473 +SIZE (rust/crates/itertools-0.10.5.crate) = 115354 +SHA256 (rust/crates/itoa-1.0.15.crate) = 4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c +SIZE (rust/crates/itoa-1.0.15.crate) = 11231 +SHA256 (rust/crates/js-sys-0.3.77.crate) = 1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f +SIZE (rust/crates/js-sys-0.3.77.crate) = 55538 +SHA256 (rust/crates/libc-0.2.171.crate) = c19937216e9d3aa9956d9bb8dfc0b0c8beb6058fc4f7a4dc4d850edf86a237d6 +SIZE (rust/crates/libc-0.2.171.crate) = 785246 +SHA256 (rust/crates/log-0.4.27.crate) = 13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94 +SIZE (rust/crates/log-0.4.27.crate) = 48120 +SHA256 (rust/crates/memchr-2.7.4.crate) = 78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3 +SIZE (rust/crates/memchr-2.7.4.crate) = 96670 +SHA256 (rust/crates/num-traits-0.2.19.crate) = 071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841 +SIZE (rust/crates/num-traits-0.2.19.crate) = 51631 +SHA256 (rust/crates/once_cell-1.21.3.crate) = 42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d +SIZE (rust/crates/once_cell-1.21.3.crate) = 34534 +SHA256 (rust/crates/oorandom-11.1.5.crate) = d6790f58c7ff633d8771f42965289203411a5e5c68388703c06e14f24770b41e +SIZE (rust/crates/oorandom-11.1.5.crate) = 23750 +SHA256 (rust/crates/plotters-0.3.7.crate) = 5aeb6f403d7a4911efb1e33402027fc44f29b5bf6def3effcc22d7bb75f2b747 +SIZE (rust/crates/plotters-0.3.7.crate) = 149031 +SHA256 (rust/crates/plotters-backend-0.3.7.crate) = df42e13c12958a16b3f7f4386b9ab1f3e7933914ecea48da7139435263a4172a +SIZE (rust/crates/plotters-backend-0.3.7.crate) = 13709 +SHA256 (rust/crates/plotters-svg-0.3.7.crate) = 51bae2ac328883f7acdfea3d66a7c35751187f870bc81f94563733a154d7a670 +SIZE (rust/crates/plotters-svg-0.3.7.crate) = 6715 +SHA256 (rust/crates/proc-macro2-1.0.94.crate) = a31971752e70b8b2686d7e46ec17fb38dad4051d94024c88df49b667caea9c84 +SIZE (rust/crates/proc-macro2-1.0.94.crate) = 52391 +SHA256 (rust/crates/quote-1.0.40.crate) = 1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d +SIZE (rust/crates/quote-1.0.40.crate) = 31063 +SHA256 (rust/crates/rayon-1.10.0.crate) = b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa +SIZE (rust/crates/rayon-1.10.0.crate) = 180155 +SHA256 (rust/crates/rayon-core-1.12.1.crate) = 1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2 +SIZE (rust/crates/rayon-core-1.12.1.crate) = 70701 +SHA256 (rust/crates/regex-1.11.1.crate) = b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191 +SIZE (rust/crates/regex-1.11.1.crate) = 254170 +SHA256 (rust/crates/regex-automata-0.4.9.crate) = 809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908 +SIZE (rust/crates/regex-automata-0.4.9.crate) = 618525 +SHA256 (rust/crates/regex-syntax-0.8.5.crate) = 2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c +SIZE (rust/crates/regex-syntax-0.8.5.crate) = 357541 +SHA256 (rust/crates/rustversion-1.0.20.crate) = eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2 +SIZE (rust/crates/rustversion-1.0.20.crate) = 20666 +SHA256 (rust/crates/ryu-1.0.20.crate) = 28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f +SIZE (rust/crates/ryu-1.0.20.crate) = 48738 +SHA256 (rust/crates/same-file-1.0.6.crate) = 93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502 +SIZE (rust/crates/same-file-1.0.6.crate) = 10183 +SHA256 (rust/crates/serde-1.0.219.crate) = 5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6 +SIZE (rust/crates/serde-1.0.219.crate) = 78983 +SHA256 (rust/crates/serde_derive-1.0.219.crate) = 5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00 +SIZE (rust/crates/serde_derive-1.0.219.crate) = 57798 +SHA256 (rust/crates/serde_json-1.0.140.crate) = 20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373 +SIZE (rust/crates/serde_json-1.0.140.crate) = 154852 +SHA256 (rust/crates/syn-2.0.100.crate) = b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0 +SIZE (rust/crates/syn-2.0.100.crate) = 297947 +SHA256 (rust/crates/tinytemplate-1.2.1.crate) = be4d6b5f19ff7664e8c98d03e2139cb510db9b0a60b55f8e8709b689d939b6bc +SIZE (rust/crates/tinytemplate-1.2.1.crate) = 26490 +SHA256 (rust/crates/toml-0.5.11.crate) = f4f7f0dd8d50a853a531c426359045b1998f04219d88799810762cd4ad314234 +SIZE (rust/crates/toml-0.5.11.crate) = 54910 +SHA256 (rust/crates/unicode-ident-1.0.18.crate) = 5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512 +SIZE (rust/crates/unicode-ident-1.0.18.crate) = 47743 +SHA256 (rust/crates/walkdir-2.5.0.crate) = 29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b +SIZE (rust/crates/walkdir-2.5.0.crate) = 23951 +SHA256 (rust/crates/wasm-bindgen-0.2.100.crate) = 1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5 +SIZE (rust/crates/wasm-bindgen-0.2.100.crate) = 48288 +SHA256 (rust/crates/wasm-bindgen-backend-0.2.100.crate) = 2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6 +SIZE (rust/crates/wasm-bindgen-backend-0.2.100.crate) = 32111 +SHA256 (rust/crates/wasm-bindgen-macro-0.2.100.crate) = 7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407 +SIZE (rust/crates/wasm-bindgen-macro-0.2.100.crate) = 9663 +SHA256 (rust/crates/wasm-bindgen-macro-support-0.2.100.crate) = 8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de +SIZE (rust/crates/wasm-bindgen-macro-support-0.2.100.crate) = 26243 +SHA256 (rust/crates/wasm-bindgen-shared-0.2.100.crate) = 1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d +SIZE (rust/crates/wasm-bindgen-shared-0.2.100.crate) = 8570 +SHA256 (rust/crates/web-sys-0.3.77.crate) = 33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2 +SIZE (rust/crates/web-sys-0.3.77.crate) = 638246 +SHA256 (rust/crates/winapi-util-0.1.9.crate) = cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb +SIZE (rust/crates/winapi-util-0.1.9.crate) = 12464 +SHA256 (rust/crates/windows-sys-0.59.0.crate) = 1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b +SIZE (rust/crates/windows-sys-0.59.0.crate) = 2387323 +SHA256 (rust/crates/windows-targets-0.52.6.crate) = 9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973 +SIZE (rust/crates/windows-targets-0.52.6.crate) = 6403 +SHA256 (rust/crates/windows_aarch64_gnullvm-0.52.6.crate) = 32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3 +SIZE (rust/crates/windows_aarch64_gnullvm-0.52.6.crate) = 435718 +SHA256 (rust/crates/windows_aarch64_msvc-0.52.6.crate) = 09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469 +SIZE (rust/crates/windows_aarch64_msvc-0.52.6.crate) = 832615 +SHA256 (rust/crates/windows_i686_gnu-0.52.6.crate) = 8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b +SIZE (rust/crates/windows_i686_gnu-0.52.6.crate) = 880402 +SHA256 (rust/crates/windows_i686_gnullvm-0.52.6.crate) = 0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66 +SIZE (rust/crates/windows_i686_gnullvm-0.52.6.crate) = 475940 +SHA256 (rust/crates/windows_i686_msvc-0.52.6.crate) = 240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66 +SIZE (rust/crates/windows_i686_msvc-0.52.6.crate) = 901163 +SHA256 (rust/crates/windows_x86_64_gnu-0.52.6.crate) = 147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78 +SIZE (rust/crates/windows_x86_64_gnu-0.52.6.crate) = 836363 +SHA256 (rust/crates/windows_x86_64_gnullvm-0.52.6.crate) = 24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d +SIZE (rust/crates/windows_x86_64_gnullvm-0.52.6.crate) = 435707 +SHA256 (rust/crates/windows_x86_64_msvc-0.52.6.crate) = 589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec +SIZE (rust/crates/windows_x86_64_msvc-0.52.6.crate) = 832564 +SHA256 (rust/crates/winres-0.1.12.crate) = b68db261ef59e9e52806f688020631e987592bd83619edccda9c47d42cde4f6c +SIZE (rust/crates/winres-0.1.12.crate) = 19772 +SHA256 (microsoft-edit-v1.0.0_GH0.tar.gz) = 6718d9a96aa9dd2117d9d4afa83b0278ef007bcd42bdb1e8c4e2ad34144246c0 +SIZE (microsoft-edit-v1.0.0_GH0.tar.gz) = 250150 diff --git a/editors/microsoft-edit/files/patch-assets_manpage_edit.1 b/editors/microsoft-edit/files/patch-assets_manpage_edit.1 new file mode 100644 index 000000000000..0ddc19019708 --- /dev/null +++ b/editors/microsoft-edit/files/patch-assets_manpage_edit.1 @@ -0,0 +1,29 @@ +--- assets/manpage/edit.1.orig 2025-05-27 16:45:04 UTC ++++ assets/manpage/edit.1 +@@ -0,0 +1,26 @@ ++.TH EDIT 1 "version 1.0" "May 2025" ++.SH NAME ++edit \- a simple text editor ++.SH SYNOPSIS ++\fBedit\fP [\fIOPTIONS\fP]... [\fIARGUMENTS\fP]... ++.SH DESCRIPTION ++edit is a simple text editor inspired by MS-DOS edit. ++.SH EDITING ++Edit is an interactive mode-less editor. Use Alt-F to access the menus. ++.SH ARGUMENTS ++.TP ++\fIFILE[:LINE[:COLUMN]]\fP ++The file to open, optionally with line and column (e.g., \fBfoo.txt:123:45\fP). ++.SH OPTIONS ++.TP ++\fB\-h\fP, \fB\-\-help\fP ++Print the help message. ++.TP ++\fB\-v\fP, \fB\-\-version\fP ++Print the version number. ++.SH COPYRIGHT ++Copyright (c) Microsoft Corporation. ++.br ++Licensed under the MIT License. ++.SH SEE ALSO ++https://github.com/microsoft/edit diff --git a/editors/microsoft-edit/files/patch-src_lib.rs b/editors/microsoft-edit/files/patch-src_lib.rs new file mode 100644 index 000000000000..f83f9e0d6fcb --- /dev/null +++ b/editors/microsoft-edit/files/patch-src_lib.rs @@ -0,0 +1,10 @@ +--- src/lib.rs.orig 2025-05-18 18:11:22 UTC ++++ src/lib.rs +@@ -5,7 +5,6 @@ + allocator_api, + breakpoint, + cold_path, +- inherent_str_constructors, + let_chains, + linked_list_cursors, + maybe_uninit_fill, diff --git a/editors/microsoft-edit/files/patch-src_sys_unix.rs b/editors/microsoft-edit/files/patch-src_sys_unix.rs new file mode 100644 index 000000000000..5bfc46a66640 --- /dev/null +++ b/editors/microsoft-edit/files/patch-src_sys_unix.rs @@ -0,0 +1,97 @@ +--- src/sys/unix.rs.orig 2025-05-18 18:11:22 UTC ++++ src/sys/unix.rs +@@ -8,9 +8,9 @@ use std::fs::{self, File}; + + use std::ffi::{CStr, c_int, c_void}; + use std::fs::{self, File}; +-use std::mem::{self, MaybeUninit}; ++use std::mem::{self, ManuallyDrop, MaybeUninit}; + use std::os::fd::{AsRawFd as _, FromRawFd as _}; +-use std::ptr::{self, NonNull, null, null_mut}; ++use std::ptr::{self, NonNull, null_mut}; + use std::{thread, time}; + + use crate::arena::{Arena, ArenaString, scratch_arena}; +@@ -195,11 +195,19 @@ pub fn read_stdin(arena: &Arena, mut timeout: time::Du + let beg = time::Instant::now(); + + let mut pollfd = libc::pollfd { fd: STATE.stdin, events: libc::POLLIN, revents: 0 }; +- let ts = libc::timespec { +- tv_sec: timeout.as_secs() as libc::time_t, +- tv_nsec: timeout.subsec_nanos() as libc::c_long, +- }; +- let ret = libc::ppoll(&mut pollfd, 1, &ts, null()); ++ let ret; ++ #[cfg(target_os = "linux")] ++ { ++ let ts = libc::timespec { ++ tv_sec: timeout.as_secs() as libc::time_t, ++ tv_nsec: timeout.subsec_nanos() as libc::c_long, ++ }; ++ ret = libc::ppoll(&mut pollfd, 1, &ts, ptr::null()); ++ } ++ #[cfg(not(target_os = "linux"))] ++ { ++ ret = libc::poll(&mut pollfd, 1, timeout.as_millis() as libc::c_int); ++ } + if ret < 0 { + return None; // Error? Let's assume it's an EOF. + } +@@ -225,7 +233,7 @@ pub fn read_stdin(arena: &Arena, mut timeout: time::Du + return None; // EOF + } + if ret < 0 { +- match *libc::__errno_location() { ++ match errno() { + libc::EINTR if STATE.inject_resize => break, + libc::EAGAIN if timeout == time::Duration::ZERO => break, + libc::EINTR | libc::EAGAIN => {} +@@ -304,7 +312,7 @@ pub fn write_stdout(text: &str) { + continue; + } + +- let err = unsafe { *libc::__errno_location() }; ++ let err = errno(); + if err != libc::EINTR { + return; + } +@@ -407,7 +415,7 @@ unsafe fn load_library(name: &CStr) -> apperr::Result< + unsafe fn load_library(name: &CStr) -> apperr::Result<NonNull<c_void>> { + unsafe { + NonNull::new(libc::dlopen(name.as_ptr(), libc::RTLD_LAZY)) +- .ok_or_else(|| errno_to_apperr(libc::ELIBACC)) ++ .ok_or_else(|| errno_to_apperr(libc::ENOENT)) + } + } + +@@ -423,7 +431,7 @@ pub unsafe fn get_proc_address<T>(handle: NonNull<c_vo + unsafe { + let sym = libc::dlsym(handle.as_ptr(), name.as_ptr()); + if sym.is_null() { +- Err(errno_to_apperr(libc::ELIBACC)) ++ Err(errno_to_apperr(libc::ENOENT)) + } else { + Ok(mem::transmute_copy(&sym)) + } +@@ -538,6 +546,14 @@ pub fn preferred_languages(arena: &Arena) -> Vec<Arena + } + + #[inline] ++fn errno() -> i32 { ++ // Under `-O -Copt-level=s` the 1.87 compiler fails to fully inline and ++ // remove the raw_os_error() call. This leaves us with the drop() call. ++ // ManuallyDrop fixes that and results in a direct `std::sys::os::errno` call. ++ ManuallyDrop::new(std::io::Error::last_os_error()).raw_os_error().unwrap_or(0) ++} ++ ++#[inline] + pub(crate) fn io_error_to_apperr(err: std::io::Error) -> apperr::Error { + errno_to_apperr(err.raw_os_error().unwrap_or(0)) + } +@@ -565,5 +581,5 @@ fn check_int_return(ret: libc::c_int) -> apperr::Resul + } + + fn check_int_return(ret: libc::c_int) -> apperr::Result<libc::c_int> { +- if ret < 0 { Err(errno_to_apperr(unsafe { *libc::__errno_location() })) } else { Ok(ret) } ++ if ret < 0 { Err(errno_to_apperr(errno())) } else { Ok(ret) } + } diff --git a/editors/microsoft-edit/files/patch-src_tui.rs b/editors/microsoft-edit/files/patch-src_tui.rs new file mode 100644 index 000000000000..14d8bcbac081 --- /dev/null +++ b/editors/microsoft-edit/files/patch-src_tui.rs @@ -0,0 +1,421 @@ +--- src/tui.rs.orig 2025-05-18 18:11:22 UTC ++++ src/tui.rs +@@ -640,6 +640,7 @@ impl Tui { + + tree, + last_modal: None, ++ focused_node: None, + next_block_id_mixin: 0, + needs_settling: false, + +@@ -653,6 +654,9 @@ impl Tui { + // out where is to do a binary search of commenting out code in main.rs. + debug_assert!(ctx.tree.current_node.borrow().stack_parent.is_none()); + ++ // End the root node. ++ ctx.block_end(); ++ + // Ensure that focus doesn't escape the active modal. + if let Some(node) = ctx.last_modal + && !self.is_subtree_focused(&node.borrow()) +@@ -684,18 +688,8 @@ impl Tui { + // Remove any unknown nodes from the focus path. + // It's important that we do this after the tree has been swapped out, + // so that pop_focusable_node() has access to the newest version of the tree. +- let focus_path_changed = self.pop_focusable_node(focus_path_pop_min); +- needs_settling |= focus_path_changed; ++ needs_settling |= self.pop_focusable_node(focus_path_pop_min); + +- // If some elements went away and the focus path changed above, we ignore tab presses. +- // It may otherwise lead to weird situations where focus moves unexpectedly. +- if !focus_path_changed +- && !ctx.input_consumed +- && let Some(input) = ctx.input_keyboard +- { +- needs_settling |= self.move_focus(input); +- } +- + // `needs_more_settling()` depends on the current value + // of `settling_have` and so we increment it first. + self.settling_have += 1; +@@ -1213,117 +1207,6 @@ impl Tui { + last_before != last_after + } + +- // TODO: Move this into `block_end()` and run it whenever the block is a `focus_well`. +- // It makes no sense otherwise that all input handling occurs in the controls, except for this. +- fn move_focus(&mut self, input: InputKey) -> bool { +- if !matches!(input, vk::TAB | SHIFT_TAB | vk::UP | vk::DOWN | vk::LEFT | vk::RIGHT) { +- return false; +- } +- +- let focused_id = self.focused_node_path.last().cloned().unwrap_or(0); +- let Some(focused) = self.prev_node_map.get(focused_id) else { +- debug_assert!(false); // The caller should've cleaned up the focus path. +- return false; +- }; +- +- let mut focused_start = focused; +- let mut root = focused; +- +- // Figure out if we're inside a focus void (a container that doesn't +- // allow tabbing inside), and in that case, toss the focus to it. +- // +- // Also, figure out the container within which the focus must be contained. +- // This way, tab/shift-tab only moves within the same window. +- // The ROOT_ID node has no parent, and the others have a float attribute. +- // If the root is the focused node, it should of course not move upward. +- loop { +- let root_node = root.borrow(); +- if root_node.attributes.focus_well { +- break; +- } +- if root_node.attributes.focus_void { +- focused_start = root; +- } +- root = match root_node.parent { +- Some(parent) => parent, +- None => break, +- } +- } +- +- let forward; +- let min_depth; +- match input { +- SHIFT_TAB | vk::TAB => { +- forward = input == vk::TAB; +- min_depth = usize::MAX; +- } +- vk::UP | vk::DOWN => { +- forward = input == vk::DOWN; +- min_depth = usize::MAX; +- } +- vk::LEFT | vk::RIGHT => { +- // Find the cell within a row within a table that we're in. +- // To do so we'll use a circular buffer of the last 3 nodes while we travel up. +- let mut buf = [None; 3]; +- let mut idx = buf.len() - 1; +- let mut node = focused_start; +- +- loop { +- idx = (idx + 1) % buf.len(); +- buf[idx] = Some(node); +- if let NodeContent::Table(..) = &node.borrow().content { +- break; +- } +- if ptr::eq(node, root) { +- return false; +- } +- node = match node.borrow().parent { +- Some(parent) => parent, +- None => return false, +- } +- } +- +- // The current `idx` points to the table. +- // The last item is the row. +- // The 2nd to last item is the cell. +- let Some(row) = buf[(idx + 3 - 1) % buf.len()] else { +- return false; +- }; +- let Some(cell) = buf[(idx + 3 - 2) % buf.len()] else { +- return false; +- }; +- +- root = row; +- focused_start = cell; +- forward = input == vk::RIGHT; +- min_depth = root.borrow().depth; +- } +- _ => return false, +- } +- +- let mut focused_next = focused_start; +- Tree::visit_all(root, focused_start, forward, |node| { +- let n = node.borrow(); +- if ptr::eq(node, root) { +- VisitControl::Continue +- } else if n.attributes.focusable && !ptr::eq(node, focused_start) { +- focused_next = node; +- VisitControl::Stop +- } else if n.attributes.focus_void || n.depth >= min_depth { +- VisitControl::SkipChildren +- } else { +- VisitControl::Continue +- } +- }); +- +- if ptr::eq(focused_next, focused_start) { +- false +- } else { +- Tui::build_node_path(Some(focused_next), &mut self.focused_node_path); +- true +- } +- } +- + // Scroll the focused node(s) into view inside scrollviews + fn scroll_to_focused(&mut self) -> bool { + let focused_id = self.focused_node_path.last().cloned().unwrap_or(0); +@@ -1375,6 +1258,7 @@ pub struct Context<'a, 'input> { + + tree: Tree<'a>, + last_modal: Option<&'a NodeCell<'a>>, ++ focused_node: Option<&'a NodeCell<'a>>, + next_block_id_mixin: u64, + needs_settling: bool, + +@@ -1484,8 +1368,83 @@ impl<'a> Context<'a, '_> { + /// Ends the current UI block, returning to its parent container. + pub fn block_end(&mut self) { + self.tree.pop_stack(); ++ self.block_end_move_focus(); + } + ++ fn block_end_move_focus(&mut self) { ++ // At this point, it's more like "focus_well?" instead of "focus_well!". ++ let focus_well = self.tree.last_node; ++ ++ // Remember the focused node, if any, because once the code below runs, ++ // we need it for the `Tree::visit_all` call. ++ if self.is_focused() { ++ self.focused_node = Some(focus_well); ++ } ++ ++ // Filter down to nodes that are focus wells and contain the focus. ++ // They're basically the "tab container". ++ if !focus_well.borrow().attributes.focus_well { ++ return; ++ } ++ ++ // The mere fact that there's a `focused_node` indicates that we're the ++ // first `block_end()` call that's a focus well and also contains the focus. ++ let Some(focused) = self.focused_node else { ++ return; ++ }; ++ ++ // Filter down to Tab/Shift+Tab inputs. ++ if self.input_consumed { ++ return; ++ } ++ let Some(input) = self.input_keyboard else { ++ return; ++ }; ++ if !matches!(input, SHIFT_TAB | vk::TAB) { ++ return; ++ } ++ ++ let forward = input == vk::TAB; ++ let mut focused_start = focused; ++ let mut focused_next = focused; ++ ++ // We may be in a focus void right now (= doesn't want to be tabbed into), ++ // so first we must go up the tree until we're outside of it. ++ loop { ++ if ptr::eq(focused_start, focus_well) { ++ // If we hit the root / focus well, we weren't in a focus void, ++ // and can reset `focused_before` to the current focused node. ++ focused_start = focused; ++ break; ++ } ++ ++ focused_start = focused_start.borrow().parent.unwrap(); ++ if focused_start.borrow().attributes.focus_void { ++ break; ++ } ++ } ++ ++ Tree::visit_all(focus_well, focused_start, forward, |node| { ++ let n = node.borrow(); ++ if n.attributes.focusable && !ptr::eq(node, focused_start) { ++ focused_next = node; ++ VisitControl::Stop ++ } else if n.attributes.focus_void { ++ VisitControl::SkipChildren ++ } else { ++ VisitControl::Continue ++ } ++ }); ++ ++ if ptr::eq(focused_next, focused_start) { ++ return; ++ } ++ ++ Tui::build_node_path(Some(focused_next), &mut self.tui.focused_node_path); ++ self.set_input_consumed(); ++ self.needs_rerender(); ++ } ++ + /// Mixes in an extra value to the next UI block's ID for uniqueness. + /// Use this when you build a list of items with the same classname. + pub fn next_block_id_mixin(&mut self, id: u64) { +@@ -1796,6 +1755,8 @@ impl<'a> Context<'a, '_> { + debug_assert!(matches!(parent.content, NodeContent::Table(_))); + + self.block_end(); ++ self.table_end_row(); ++ + self.next_block_id_mixin(parent.child_count as u64); + } + } +@@ -1803,6 +1764,10 @@ impl<'a> Context<'a, '_> { + self.block_begin("row"); + } + ++ fn table_end_row(&mut self) { ++ self.table_row_move_focus(); ++ } ++ + /// Ends the current table block. + pub fn table_end(&mut self) { + let current_node = self.tree.current_node.borrow(); +@@ -1811,11 +1776,136 @@ impl<'a> Context<'a, '_> { + // current_node will refer to the table. Otherwise, it'll refer to the current row. + if !matches!(current_node.content, NodeContent::Table(_)) { + self.block_end(); ++ self.table_end_row(); + } + + self.block_end(); // table ++ self.table_end_move_focus(); + } + ++ fn table_row_move_focus(&mut self) { ++ // Filter down to table rows that are focused. ++ if !self.contains_focus() { ++ return; ++ } ++ ++ // Filter down to left/right inputs. ++ if self.input_consumed { ++ return; ++ } ++ let Some(input) = self.input_keyboard else { ++ return; ++ }; ++ if !matches!(input, vk::LEFT | vk::RIGHT) { ++ return; ++ } ++ ++ let row = self.tree.last_node; ++ let Some(&focused_cell_id) = self.tui.focused_node_path.get(row.borrow().depth + 1) else { ++ return; ++ }; ++ ++ let mut prev_next = NodeSiblings { prev: None, next: None }; ++ let mut focused = None; ++ ++ // Iterate through the cells in the row, looking for the focused cell. ++ // Take note of the previous and next focusable cells around the focused one. ++ for cell in Tree::iterate_siblings(row.borrow().children.first) { ++ let n = cell.borrow(); ++ if n.id == focused_cell_id { ++ focused = Some(cell); ++ } else if n.attributes.focusable { ++ if focused.is_none() { ++ prev_next.prev = Some(cell); ++ } else { ++ prev_next.next = Some(cell); ++ break; ++ } ++ } ++ } ++ ++ if focused.is_none() { ++ return; ++ } ++ ++ let forward = input == vk::RIGHT; ++ let children_idx = if forward { NodeChildren::FIRST } else { NodeChildren::LAST }; ++ let siblings_idx = if forward { NodeSiblings::NEXT } else { NodeSiblings::PREV }; ++ let Some(focused_next) = ++ prev_next.get(siblings_idx).or_else(|| row.borrow().children.get(children_idx)) ++ else { ++ return; ++ }; ++ ++ Tui::build_node_path(Some(focused_next), &mut self.tui.focused_node_path); ++ self.set_input_consumed(); ++ self.needs_rerender(); ++ } ++ ++ fn table_end_move_focus(&mut self) { ++ // Filter down to table rows that are focused. ++ if !self.contains_focus() { ++ return; ++ } ++ ++ // Filter down to up/down inputs. ++ if self.input_consumed { ++ return; ++ } ++ let Some(input) = self.input_keyboard else { ++ return; ++ }; ++ if !matches!(input, vk::UP | vk::DOWN) { ++ return; ++ } ++ ++ let table = self.tree.last_node; ++ if table.borrow().child_count <= 1 { ++ // If there's just one row, we can't move focus up or down. ++ return; ++ } ++ ++ let Some(&focused_row_id) = self.tui.focused_node_path.get(table.borrow().depth + 1) else { ++ return; ++ }; ++ ++ let mut prev_next = NodeSiblings { prev: None, next: None }; ++ let mut focused = None; ++ ++ // Iterate through the row in the table, looking for the focused row. ++ // Take note of the previous and next focusable rows around the focused one. ++ for cell in Tree::iterate_siblings(table.borrow().children.first) { ++ let n = cell.borrow(); ++ if n.id == focused_row_id { ++ focused = Some(cell); ++ } else if n.attributes.focusable { ++ if focused.is_none() { ++ prev_next.prev = Some(cell); ++ } else { ++ prev_next.next = Some(cell); ++ break; ++ } ++ } ++ } ++ ++ if focused.is_none() { ++ return; ++ } ++ ++ let forward = input == vk::DOWN; ++ let children_idx = if forward { NodeChildren::FIRST } else { NodeChildren::LAST }; ++ let siblings_idx = if forward { NodeSiblings::NEXT } else { NodeSiblings::PREV }; ++ let Some(focused_next) = ++ prev_next.get(siblings_idx).or_else(|| table.borrow().children.get(children_idx)) ++ else { ++ return; ++ }; ++ ++ Tui::build_node_path(Some(focused_next), &mut self.tui.focused_node_path); ++ self.set_input_consumed(); ++ self.needs_rerender(); ++ } ++ + /// Creates a simple text label. + pub fn label(&mut self, classname: &'static str, text: &str) { + self.styled_label_begin(classname); +@@ -3312,9 +3402,10 @@ impl<'a> Tree<'a> { + /// Completes the current node and moves focus to the parent. + fn pop_stack(&mut self) { + let current_node = self.current_node.borrow(); +- let stack_parent = current_node.stack_parent.unwrap(); +- self.last_node = self.current_node; +- self.current_node = stack_parent; ++ if let Some(stack_parent) = current_node.stack_parent { ++ self.last_node = self.current_node; ++ self.current_node = stack_parent; ++ } + } + + fn iterate_siblings( diff --git a/editors/microsoft-edit/pkg-descr b/editors/microsoft-edit/pkg-descr new file mode 100644 index 000000000000..c333168ba08f --- /dev/null +++ b/editors/microsoft-edit/pkg-descr @@ -0,0 +1,5 @@ +Microsoft Edit pays homage to the classic MS-DOS Editor, but with a modern +interface and input controls similar to VS Code. + +The goal is to provide an accessible editor that even users largely +unfamiliar with terminals can easily use. diff --git a/editors/picpas/Makefile b/editors/picpas/Makefile index cf2941e2c8e7..d6977de34e24 100644 --- a/editors/picpas/Makefile +++ b/editors/picpas/Makefile @@ -1,6 +1,6 @@ PORTNAME= picpas PORTVERSION= 0.9.0 -PORTREVISION= 17 +PORTREVISION= 18 DISTVERSIONPREFIX= v CATEGORIES= editors PKGNAMESUFFIX= ${LAZARUS_PKGNAMESUFFIX} |