mirror of
https://github.com/RGBCube/serenity
synced 2025-07-24 16:57:35 +00:00
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:
parent
8ab576308f
commit
c7257ed827
2 changed files with 2 additions and 2 deletions
|
@ -107,7 +107,7 @@ void Editor::insert(const char ch)
|
||||||
++m_cursor;
|
++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)) {
|
if (m_key_callbacks.contains(ch)) {
|
||||||
dbg() << "Key callback registered twice for " << ch;
|
dbg() << "Key callback registered twice for " << ch;
|
||||||
|
|
|
@ -74,7 +74,7 @@ public:
|
||||||
void add_to_history(const String&);
|
void add_to_history(const String&);
|
||||||
const Vector<String>& history() const { return m_history; }
|
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_first_token = nullptr;
|
||||||
Function<Vector<String>(const String&)> on_tab_complete_other_token = nullptr;
|
Function<Vector<String>(const String&)> on_tab_complete_other_token = nullptr;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue