Skip to content

Commit

Permalink
Implement find and improvements for focus
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Jan 9, 2024
1 parent 81a0bbc commit f3a8fef
Show file tree
Hide file tree
Showing 10 changed files with 358 additions and 105 deletions.
32 changes: 16 additions & 16 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

3 changes: 3 additions & 0 deletions i18n/en/cosmic_edit.ftl
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,9 @@ default-font-size = Default font size
keyboard-shortcuts = Keyboard shortcuts
enable-vim-bindings = Enable Vim bindings
# Find
find-placeholder = Find...
# Menu

## File
Expand Down
3 changes: 3 additions & 0 deletions res/icons/edit-clear-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions res/icons/go-up-symbolic.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
6 changes: 6 additions & 0 deletions src/config.rs
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ pub enum Action {
CloseProject,
Copy,
Cut,
Find,
FindAndReplace,
NewFile,
NewWindow,
OpenFileDialog,
Expand All @@ -42,6 +44,8 @@ impl Action {
Self::CloseProject => Message::CloseProject,
Self::Copy => Message::Copy,
Self::Cut => Message::Cut,
Self::Find => Message::Find(Some(false)),
Self::FindAndReplace => Message::Find(Some(true)),
Self::NewFile => Message::NewFile,
Self::NewWindow => Message::NewWindow,
Self::OpenFileDialog => Message::OpenFileDialog,
Expand Down Expand Up @@ -111,6 +115,8 @@ impl KeyBind {
bind!([Ctrl], W, CloseFile);
bind!([Ctrl], X, Cut);
bind!([Ctrl], C, Copy);
bind!([Ctrl], F, Find);
bind!([Ctrl], H, FindAndReplace);
bind!([Ctrl], V, Paste);
bind!([Ctrl], T, NewFile);
bind!([Ctrl], N, NewWindow);
Expand Down
2 changes: 2 additions & 0 deletions src/icon_cache.rs
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,11 @@ impl IconCache {
};
}

bundle!("edit-clear-symbolic", 16);
bundle!("folder-open-symbolic", 16);
bundle!("go-down-symbolic", 16);
bundle!("go-next-symbolic", 16);
bundle!("go-up-symbolic", 16);
bundle!("list-add-symbolic", 16);
bundle!("object-select-symbolic", 16);
bundle!("window-close-symbolic", 16);
Expand Down
Loading

0 comments on commit f3a8fef

Please sign in to comment.