LibLine: Rename on_char_input() => register_character_input_callback()

The "on_foo" format is our convention for public callback members.
This commit is contained in:
Andreas Kling 2020-03-31 13:37:01 +02:00
parent 8ab576308f
commit c7257ed827
Notes: sideshowbarker 2024-07-19 08:01:52 +09:00
2 changed files with 2 additions and 2 deletions

View File

@ -107,7 +107,7 @@ void Editor::insert(const char ch)
++m_cursor;
}
void Editor::on_char_input(char ch, Function<bool(Editor&)> callback)
void Editor::register_character_input_callback(char ch, Function<bool(Editor&)> callback)
{
if (m_key_callbacks.contains(ch)) {
dbg() << "Key callback registered twice for " << ch;

View File

@ -74,7 +74,7 @@ public:
void add_to_history(const String&);
const Vector<String>& history() const { return m_history; }
void on_char_input(char ch, Function<bool(Editor&)> callback);
void register_character_input_callback(char ch, Function<bool(Editor&)> callback);
Function<Vector<String>(const String&)> on_tab_complete_first_token = nullptr;
Function<Vector<String>(const String&)> on_tab_complete_other_token = nullptr;