Skip to content

Commit

Permalink
fix: avoid invalid page_size (rime#679)
Browse files Browse the repository at this point in the history
  • Loading branch information
eagleoflqj authored and graphemecluster committed Aug 1, 2023
1 parent a321ad5 commit 032e57e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions src/rime/schema.cc
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,9 @@ void Schema::FetchUsefulConfigItems() {
schema_name_ = schema_id_;
}
config_->GetInt("menu/page_size", &page_size_);
if (page_size_ < 1) {
page_size_ = 5;
}
config_->GetString("menu/alternative_select_keys", &select_keys_);
config_->GetBool("menu/page_down_cycle", &page_down_cycle_);
}
Expand Down

0 comments on commit 032e57e

Please sign in to comment.