Skip to content

Commit

Permalink
update to vi@0.7
Browse files Browse the repository at this point in the history
  • Loading branch information
tesuji committed Jun 3, 2024
1 parent 16abf80 commit 6fcd0a1
Show file tree
Hide file tree
Showing 5 changed files with 10 additions and 6 deletions.
2 changes: 1 addition & 1 deletion Cargo.lock

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

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ version = "0.1"
path = "ribus"

[workspace.dependencies.vi]
version = "0.6"
version = "0.7"
path = "../vi-rs"

[workspace.lints.clippy]
Expand Down
4 changes: 2 additions & 2 deletions gokien/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ use std::mem;

use ribus::c::{self, guint};
use tracing::{debug, error};
use vi::telex::transform_buffer;
use vi::transform_buffer;

// account for incorrect typos
const MAX_CHARS_IN_WORD: usize = "nghieengz".len().next_power_of_two();
Expand Down Expand Up @@ -122,7 +122,7 @@ impl GokienEngine {
}

let buffer = self.buffer.iter().cloned();
transform_buffer(buffer, &mut self.output);
transform_buffer(&vi::TELEX, buffer, &mut self.output);
true
}

Expand Down
6 changes: 4 additions & 2 deletions gokien/src/tests.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
use super::{transform_buffer, GokienEngine};
use vi::transform_buffer;

use super::GokienEngine;

#[test]
fn main() {
Expand All @@ -22,7 +24,7 @@ fn test_vi_whole_word() {
("wwww", "wwww")
];
for (word, expected) in cases.into_iter() {
transform_buffer(word.chars(), &mut out);
transform_buffer(&vi::TELEX, word.chars(), &mut out);
assert_eq!(*expected, out);
out.clear();
}
Expand Down
2 changes: 2 additions & 0 deletions todo
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
# Triage

# rewrite vi::Word with char?

### Install and test with log
```bash
ibus read-config
Expand Down

0 comments on commit 6fcd0a1

Please sign in to comment.