Commit graph

306 commits

Author SHA1 Message Date
Josh Megnauth
e4006945c6
Fix tab auto focus on TabCloseForce
Auto focus should only trigger if the current tab is selected or else
closing an unfocused tab would move the focused tab.

See: pop-os/cosmic-files#1949
2026-08-01 20:11:53 -04:00
Ashley Wulber
171de79535 chore: frosted glass 2026-07-06 09:34:42 -04:00
Nathan Rowe
dfcef22632 Save file to recents on save 2026-06-30 15:58:35 -04:00
Hojjat
eae9127fbe fix: add alt_clipboard bindings 2026-06-25 14:06:11 +02:00
Ashley Wulber
12cee06253 fix: libcosmic updates 2026-05-26 14:15:00 -04:00
KENZ
4c53d607f7
feat(ime): minimal IME support for the text_box widget (#539)
* Support CJK input method

* Fix the input method window occasionally jumps around

Use the previous caret(text cursor) position to place the input method
window when the position is not available

* refactor: Omit calling request_input_method() if doesn't focus

- iced UserInterface.update() starts with InputMethod::Disabled state,
  and merges any input_method_request() which is InputMethod::Enabled in
  widgets tree traversal.
- We don't enable the input method feature if the widget doesn't have
  focus, we can safely omit request_input_method() call itself.
2026-04-27 16:05:22 -06:00
Rishi Yadav
ffb2c46d6e fix: allow editor focus when project search drawer is open 2026-04-10 13:39:13 -06:00
olekawaii
48b648500e Close application upon closing last tab 2026-04-10 11:38:20 -06:00
Ashley Wulber
a95a1c1691 chore: update libcosmic after reexports were removed 2026-04-09 15:59:16 -06:00
Hojjat
6677fe05d5 chore: update libcosmic and cosmic-text 2026-04-03 14:42:12 -06:00
Hojjat
cf557a0608 chore: cargo fmt 2026-03-31 16:14:06 -04:00
Hojjat
4fe528a58e fix: avoid infinite focus loop 2026-03-31 16:14:06 -04:00
Hojjat
0e48718a92 fix: focus the main textbox when clicked 2026-03-31 16:14:06 -04:00
Hojjat
6ea24b8518 fix: don't capture all mouse events 2026-03-31 16:14:06 -04:00
Ashley Wulber
6326f65d84
feat: rebase libcosmic onto iced 0.14 2026-03-18 17:23:49 +01:00
Dmitry Yarygin
cd32df6760
#523 Fix recent-menu label clipping by enforcing single-line path labels (#524)
* Fix menu clipping for the Recent menu

* Set RECENT_MENU_LABEL_MAX_CHARS to 40
2026-03-02 11:18:21 -07:00
Dmitry Yarygin
e11902c5bf
Merge pull request #520 from deemoun/hide-scrollbar
Hide the Scrollbar when it isn't needed #507
2026-03-02 11:17:47 -07:00
Jeremy Soller
ad47d8905c Update cosmic-text 2026-02-19 09:23:05 -07:00
Jeremy Soller
36633540c2 Generate translated desktop and metainfo files with xdgen 2026-02-12 15:13:02 -07:00
Ashley Wulber
2b90abdde9
feat: tab dnd 2026-02-03 12:05:09 -05:00
Jeremy Soller
6dbc5d5ef7
Merge pull request #503 from pop-os/new-buffer-zero-size
Set buffer size to zero on creation
2026-01-27 12:34:01 -07:00
Jeremy Soller
ad206c3115
Set buffer size to zero on creation to improve file load times and memory usage 2026-01-23 09:40:19 -07:00
Jeremy Soller
1c037f0a6e
Fix compilation with new cosmic_text 2026-01-22 09:54:18 -07:00
Frederic Laing
290be82696 implement shift press plus mouse click text selection 2025-12-31 13:03:54 -06:00
Ashley Wulber
20a278587a chore: update cosmic-text 2025-12-09 11:38:28 -07:00
Jeremy Soller
f0cb90733c
Fix horizontal scrolling with wheel or touchpad and improve scrollbar behavior 2025-11-11 18:42:59 -07:00
Jeremy Soller
449ff6b88c
Reload folder tree and git status using recursive watcher 2025-11-11 13:24:50 -07:00
Jeremy Soller
f0adef5fa0
Change text_box redraw log level to trace 2025-11-11 13:21:46 -07:00
Jeremy Soller
ec78c39a58
Show open project placeholder only if no projects open 2025-11-11 11:50:47 -07:00
Jeremy Soller
2e6487542c
Use ignore crate to build tree view 2025-11-11 11:49:22 -07:00
Jeremy Soller
b48e7b0865
Make context drawer inline 2025-11-10 07:44:29 -07:00
Jeremy Soller
0a3b248c67
Close git diff tabs with same path when new one is opened 2025-11-10 07:44:28 -07:00
Jeremy Soller
fbad8439ae
Remove extra line in project search 2025-11-10 07:44:27 -07:00
Jeremy Soller
392f6e6ab1
Clip text box 2025-11-06 16:49:17 -07:00
Jeremy Soller
966cc0f332
Draw most items with GPU, except for line numbers 2025-11-06 13:40:10 -07:00
Ashley Wulber
73446cdafc fix: focus find on window focus if text box did not have focus 2025-10-24 20:47:07 +02:00
Jeremy Soller
252d5a7953
Filter out changes from saves in EditorTab::reload, fixes #431 2025-10-17 08:12:58 -06:00
Jeremy Soller
bce1d2aebc
Allow opening of non-existant files, fixes #434 2025-10-14 09:58:44 -06:00
Jeremy Soller
117f00337d
Preserve newlines and get closest cursor on reload, fixes #390 2025-10-09 12:28:39 -06:00
aquiles
801c7fa68c Fix character counting in document statistics to use graphemes
- Add unicode-segmentation dependency for proper grapheme cluster support
- Replace chars() iteration with graphemes(true) for accurate character counting
- Fix counting of complex Unicode characters like emojis, combining characters, and multi-byte sequences
- Resolves TODO: 'do graphemes?' in document_statistics function

This change provides more accurate character counts for international text,
emojis with skin tones, combined characters, and other multi-codepoint graphemes.

Examples of improved accuracy:
- 👍🏾 now counts as 1 character instead of 2
- é (e + combining acute) counts as 1 character instead of 2
- 🧑‍💻 (person technologist) counts as 1 character instead of 4
2025-10-09 08:34:18 -06:00
aquiles
4bf88ae6ad Refactor: Extract monospace_attrs() helper to eliminate code duplication
- Add monospace_attrs() function in main.rs to centralize monospace font attributes creation
- Replace duplicated Attrs::new().family(Family::Monospace) calls in:
  * line_number.rs: LineNumberCache::get() method
  * main.rs: App::init() font enumeration
  * tab.rs: EditorTab::new() constructor
- Remove unused imports (Attrs, Family) from line_number.rs
- Resolves TODO comments about code repetition across modules

This change improves maintainability by having a single source of truth
for monospace font configuration.
2025-10-05 06:22:37 +00:00
Ashley Wulber
bde36a3c17
chore: update libcosmic 2025-10-03 15:02:53 -04:00
Jeremy Soller
099e32bdc0
Use modiifed_key instead of key, fixes #286 2025-09-16 08:57:37 -06:00
Vukašin Vojinović
d2b13f987d chore: update to icu 2.0
Reduces binary size by about 25 MB.
2025-09-15 23:51:07 +02:00
Vukašin Vojinović
ee4272112e chore: make dbus-config optional 2025-09-13 10:53:00 +02:00
Vukašin Vojinović
b380b1bf32 chore: update dependencies
Also switches to the `about` widget.
2025-09-11 19:36:09 +02:00
Vukašin Vojinović
e405b929c1 chore: Rust 2024 edition 2025-09-11 16:26:28 +02:00
Jeremy Soller
038d770200 Adjust scroll speeds 2025-09-07 19:57:47 -06:00
Jeremy Soller
1e2424861d
Update to latest cosmic-text 2025-09-07 19:45:52 -06:00
Andrew Yatsko
18f6bc4e74 fix(322): fix undo/redo after reverting all changes 2025-08-24 15:17:02 -04:00