Skip to content

Commit

Permalink
Merge pull request #623 from chewing/issue618
Browse files Browse the repository at this point in the history
feat(editor): Revert mode switch notifications
  • Loading branch information
kanru authored Jul 20, 2024
2 parents 36af8a4 + 615046c commit 73298c4
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 18 deletions.
Binary file modified capi/data/mini.dat
Binary file not shown.
9 changes: 0 additions & 9 deletions src/editor/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,6 @@ impl Editor {
self.shared.clear();
}
pub fn ack(&mut self) {
self.shared.notice_buffer.clear();
self.shared.commit_buffer.clear();
}
pub fn clear_syllable_editor(&mut self) {
Expand Down Expand Up @@ -636,10 +635,6 @@ impl SharedState {
},
..self.options
};
match self.options.language_mode {
LanguageMode::Chinese => self.notice_buffer = format!("切換為中文模式"),
LanguageMode::English => self.notice_buffer = format!("切換為英數模式"),
}
}
fn switch_character_form(&mut self) {
self.options = EditorOptions {
Expand All @@ -649,10 +644,6 @@ impl SharedState {
},
..self.options
};
match self.options.character_form {
CharacterForm::Halfwidth => self.notice_buffer = format!("切換為半形模式"),
CharacterForm::Fullwidth => self.notice_buffer = format!("切換為全形模式"),
}
}
fn cancel_selecting(&mut self) {
self.com.pop_cursor();
Expand Down
9 changes: 0 additions & 9 deletions tests/test-bopomofo.c
Original file line number Diff line number Diff line change
Expand Up @@ -937,18 +937,11 @@ void test_Capslock()
mode = chewing_get_ChiEngMode(ctx);
ok(mode == SYMBOL_MODE, "mode shall change to SYMBOL_MODE");

ok_aux_buffer(ctx, "切換為英數模式");
ok_bopomofo_buffer(ctx, "");
ok_preedit_buffer(ctx, "");
ok_commit_buffer(ctx, "");

type_keystroke_by_string(ctx, "<CB>");

mode = chewing_get_ChiEngMode(ctx);
ok(mode == CHINESE_MODE, "mode shall change to CHINESE_MODE");

ok_aux_buffer(ctx, "切換為中文模式");

chewing_delete(ctx);
}

Expand Down Expand Up @@ -1102,7 +1095,6 @@ void test_ShiftSpace()
type_keystroke_by_string(ctx, "<SS>");
mode = chewing_get_ShapeMode(ctx);
ok(mode == FULLSHAPE_MODE, "mode shall be FULLSHAPE_MODE");
ok_aux_buffer(ctx, "切換為全形模式");

type_keystroke_by_string(ctx, " ");
ok_commit_buffer(ctx, "\xE3\x80\x80"); /* Fullshape Space (U+3000) */
Expand All @@ -1115,7 +1107,6 @@ void test_ShiftSpace()
type_keystroke_by_string(ctx, "<SS>");
mode = chewing_get_ShapeMode(ctx);
ok(mode == HALFSHAPE_MODE, "mode shall be HALFSHAPE_MODE");
ok_aux_buffer(ctx, "切換為半形模式");

type_keystroke_by_string(ctx, " ");
ok_commit_buffer(ctx, " ");
Expand Down

0 comments on commit 73298c4

Please sign in to comment.