2012-06-28 14:11:43 +02:00
|
|
|
#include "client.hh"
|
|
|
|
|
|
|
|
#include "window.hh"
|
|
|
|
|
|
|
|
namespace Kakoune
|
|
|
|
{
|
|
|
|
|
|
|
|
Client* current_client = nullptr;
|
|
|
|
|
|
|
|
void draw_editor_ifn(Editor& editor)
|
|
|
|
{
|
|
|
|
Window* window = dynamic_cast<Window*>(&editor);
|
|
|
|
if (current_client and window)
|
|
|
|
current_client->draw_window(*window);
|
|
|
|
}
|
|
|
|
|
2012-08-05 20:13:41 +02:00
|
|
|
String prompt(const String& text, const Context& context, Completer completer)
|
2012-06-28 14:11:43 +02:00
|
|
|
{
|
|
|
|
assert(current_client);
|
2012-08-05 20:13:41 +02:00
|
|
|
return current_client->prompt(text, context, completer);
|
2012-06-28 14:11:43 +02:00
|
|
|
}
|
|
|
|
|
|
|
|
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);
|
|
|
|
}
|
|
|
|
|
|
|
|
}
|