No description
Find a file
Jeremy Soller 98191e32c7
Better efficiency (fewer redraws) and context menu in input fields (#604)
Depends on 
- [x] https://github.com/pop-os/iced/pull/377
- [x] https://github.com/pop-os/libcosmic/pull/1382
- [x] https://github.com/pop-os/libcosmic/pull/1387
- [x] https://github.com/pop-os/cosmic-files/pull/1815



This pulls the changes in Iced and libcosmic that removes "redraw on any
message", which means moving the cursor doesn't automatically call a
redraw, widgets need to ask for it. I have found all places that
previously was working normally because we were redrawing almost
unconditionally. But it is possible that a custom widget somewhere still
isn't asking for a redraw explicitly when its state changes. So, for QA
I'd keep an eye on that.

For example I found that moving the cursor to middle of a word and
pressing delete doesn't redraw, because we only redraw if the cursor
changes position. Or pressing ctrl+a and then backspace doesn't redraw
for the same reason. Or double-click to select a text wasn't drawing the
selection. I have fixed those, but just examples for the QA team to
check.

Demo:


https://github.com/user-attachments/assets/5e5940a8-fd89-498a-8670-85d540fcaa72


___
- [x] I have disclosed use of any AI generated code in my commit
messages.
- If you are using an LLM, and do not fully understand the changes it is
making to the code base, do not create a PR.
- In our experience, AI generated code often results in overly complex
code that lacks enough context for a proper fix or feature inclusion.
This results in considerably longer code reviews. Due to this, AI
authored or partially authored PRs may be closed without comment.
- [x] I understand these changes in full and will be able to respond to
review comments.
- [x] My change is accurately described in the commit message.
- [x] My contribution is tested and working as described.
- [x] I have read the [Developer Certificate of
Origin](https://developercertificate.org/) and certify my contribution
under its conditions.
2026-08-18 14:14:43 -06:00
.github Add pull request template 2026-02-13 12:35:27 -07:00
.idea Fix character counting in document statistics to use graphemes 2025-10-09 08:34:18 -06:00
debian Epoch 1.5.0 version update 2026-07-28 09:14:00 -06:00
i18n i18n: translation updates from weblate 2026-08-17 06:51:31 +00:00
res fix: add application/x-zerosize mime type association 2026-06-17 19:08:10 -04:00
src fix: request redraw when editor needs to redraw 2026-08-10 10:26:54 -06:00
.gitattributes Add metainfo 2024-03-13 09:53:10 -06:00
.gitignore Fix gitignore of debian build directory 2023-11-08 08:48:44 -07:00
build.rs Generate translated desktop and metainfo files with xdgen 2026-02-12 15:13:02 -07:00
Cargo.lock chore: update libcosmic and cosmic-files 2026-08-18 07:26:03 -06:00
Cargo.toml Epoch 1.5.0 version update 2026-07-28 09:14:00 -06:00
flake.lock Add flake files 2023-11-02 13:10:20 -06:00
flake.nix build(nix): remove gtk dependency 2024-01-26 17:16:37 +01:00
i18n.toml Add translation support 2023-10-30 09:34:36 -06:00
justfile Generate translated desktop and metainfo files with xdgen 2026-02-12 15:13:02 -07:00
LICENSE Initial commit 2023-02-07 12:23:07 -07:00
README.md Add metainfo 2024-03-13 09:53:10 -06:00
redoxer.sh Add redoxer script 2023-11-15 09:13:46 -07:00
TESTING.md docs: Add QA testing checklist 2025-11-25 13:27:34 -07:00

COSMIC Text Editor

Text editor for the COSMIC desktop

Screenshot

Currently an incomplete pre-alpha, this project is a work in progress - issues are expected.

Testing

You can test by installing a current version of Rust and then building with cargo.

git clone https://github.com/pop-os/cosmic-edit
cd cosmic-edit
cargo build

You can get more detailed errors by using the RUST_LOG environment variables, that you can invoke for just that one command like this: RUST_LOG=debug cargo run. This will give you more detail about the application state. You can go even further with RUST_LOG=trace cargo run, that shows all logging details about the application.

Clippy Lints

PRs are welcome, as it builds a better product for everyone. It is recommended that you check your code with Clippy Lints turned on. You can find more about Configuring Clippy here.