summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKyohei Uto <im@kyoheiu.dev>2023-12-10 05:03:32 +0900
committerGitHub <noreply@github.com>2023-12-10 05:03:32 +0900
commit3e86ca512e35d56d665e79cee2693ce31e62fa64 (patch)
tree00d8a10d4fb76860d604177b4ee32ed32f663b2f
parent81494c291d472e48cbe59ce8a28787190f2ace10 (diff)
parent9e03938efe5289eae394968a5713650aedcb9131 (diff)
Merge pull request #260 from kyoheiu/developv2.11.1
v2.11.1
-rw-r--r--CHANGELOG.md6
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--README.md7
-rw-r--r--src/run.rs94
5 files changed, 62 insertions, 49 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md
index 3334892..58b75ba 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -4,6 +4,12 @@
## Unreleased
+## v2.11.1 (2023-12-10)
+
+### Fixed
+
+- Allow SHIFT key to enter characters after `i`, `I`, `c`, `/`, `:` and `z`.
+
## v2.11.0 (2023-12-09)
### Added
diff --git a/Cargo.lock b/Cargo.lock
index 9d6f2b5..9ed4309 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -330,7 +330,7 @@ checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5"
[[package]]
name = "felix"
-version = "2.11.0"
+version = "2.11.1"
dependencies = [
"bwrap",
"chrono",
diff --git a/Cargo.toml b/Cargo.toml
index 790b3fa..ab06d2f 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "felix"
-version = "2.11.0"
+version = "2.11.1"
authors = ["Kyohei Uto <im@kyoheiu.dev>"]
edition = "2021"
description = "tui file manager with vim-like key mapping"
diff --git a/README.md b/README.md
index 3d3289f..17fe256 100644
--- a/README.md
+++ b/README.md
@@ -25,11 +25,18 @@ For more detailed document, visit https://kyoheiu.dev/felix.
## New release
+## v2.11.1 (2023-12-10)
+
+### Fixed
+
+- Allow SHIFT key to enter characters after `i`, `I`, `c`, `/`, `:` and `z`.
+
## v2.11.0 (2023-12-09)
### Added
- `<C-h>` for Backspace functionality after `i`, `I`, `c`, `/`, `:` and `z`.
+
## v2.10.2 (2023-11-26)
### Fixed
diff --git a/src/run.rs b/src/run.rs
index 24fb2ad..f551bb2 100644
--- a/src/run.rs
+++ b/src/run.rs
@@ -766,7 +766,7 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
}
}
- (KeyCode::Char(c), KeyModifiers::NONE) => {
+ (KeyCode::Char(c), _) => {
command.insert(
(current_pos - INITIAL_POS_Z).into(),
c,
@@ -922,28 +922,6 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
}
}
- (KeyCode::Char(c), KeyModifiers::NONE) => {
- if let Some(to_be_added) =
- unicode_width::UnicodeWidthChar::width(c)
- {
- if current_pos + to_be_added as u16
- > state.layout.terminal_column
- {
- continue;
- }
- new_name.insert(current_char_pos, c);
- current_char_pos += 1;
- current_pos += to_be_added as u16;
-
- go_to_info_line_and_reset();
- print!(
- " {}",
- &new_name.iter().collect::<String>(),
- );
- move_to(current_pos, 2);
- }
- }
-
(KeyCode::Enter, KeyModifiers::NONE) => {
hide_cursor();
//Set the command and argument(s).
@@ -968,6 +946,28 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
break 'insert;
}
+ (KeyCode::Char(c), _) => {
+ if let Some(to_be_added) =
+ unicode_width::UnicodeWidthChar::width(c)
+ {
+ if current_pos + to_be_added as u16
+ > state.layout.terminal_column
+ {
+ continue;
+ }
+ new_name.insert(current_char_pos, c);
+ current_char_pos += 1;
+ current_pos += to_be_added as u16;
+
+ go_to_info_line_and_reset();
+ print!(
+ " {}",
+ &new_name.iter().collect::<String>(),
+ );
+ move_to(current_pos, 2);
+ }
+ }
+
_ => continue,
}
screen.flush()?;
@@ -1293,7 +1293,7 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
}
}
- (KeyCode::Char(c), KeyModifiers::NONE) => {
+ (KeyCode::Char(c), _) => {
if let Some(to_be_added) =
unicode_width::UnicodeWidthChar::width(c)
{
@@ -1432,7 +1432,7 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
}
}
- (KeyCode::Char(c), KeyModifiers::NONE) => {
+ (KeyCode::Char(c), _) => {
if let Some(to_be_added) =
unicode_width::UnicodeWidthChar::width(c)
{
@@ -2048,28 +2048,6 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
}
}
- (KeyCode::Char(c), KeyModifiers::NONE) => {
- if let Some(to_be_added) =
- unicode_width::UnicodeWidthChar::width(c)
- {
- if current_pos + to_be_added as u16
- > state.layout.terminal_column
- {
- continue;
- }
- command.insert(current_char_pos, c);
- current_char_pos += 1;
- current_pos += to_be_added as u16;
-
- go_to_info_line_and_reset();
- print!(
- ":{}",
- &command.iter().collect::<String>(),
- );
- move_to(current_pos, 2);
- }
- }
-
(KeyCode::Enter, KeyModifiers::NONE) => {
hide_cursor();
//Set the command and argument(s).
@@ -2228,6 +2206,28 @@ fn _run(mut state: State, session_path: PathBuf) -> Result<(), FxError> {
break 'command;
}
+ (KeyCode::Char(c), _) => {
+ if let Some(to_be_added) =
+ unicode_width::UnicodeWidthChar::width(c)
+ {
+ if current_pos + to_be_added as u16
+ > state.layout.terminal_column
+ {
+ continue;
+ }
+ command.insert(current_char_pos, c);
+ current_char_pos += 1;
+ current_pos += to_be_added as u16;
+
+ go_to_info_line_and_reset();
+ print!(
+ ":{}",
+ &command.iter().collect::<String>(),
+ );
+ move_to(current_pos, 2);
+ }
+ }
+
_ => continue,
}
screen.flush()?;