#include "client.hh" #include "window.hh" namespace Kakoune { Client* current_client = nullptr; void draw_editor_ifn(Editor& editor) { Window* window = dynamic_cast(&editor); if (current_client and window) current_client->draw_window(*window); } String prompt(const String& text, const Context& context, Completer completer) { assert(current_client); return current_client->prompt(text, context, completer); } Key get_key() { assert(current_client); return current_client->get_key(); } void print_status(const String& status) { assert(current_client); return current_client->print_status(status); } }