summaryrefslogtreecommitdiff
path: root/src/client.hh
diff options
context:
space:
mode:
authorMaxime Coste <frrrwww@gmail.com>2012-08-15 22:36:45 +0200
committerMaxime Coste <frrrwww@gmail.com>2012-08-15 22:36:45 +0200
commitc1fcc593a1316c450302de66c7bb466ea75c0fae (patch)
treefffed63072047ae771a413c72e922d33e597dfb7 /src/client.hh
parenta2aefa299874437a87e3ff0aec8f71d7a490408a (diff)
Store the current client in context
Diffstat (limited to 'src/client.hh')
-rw-r--r--src/client.hh13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/client.hh b/src/client.hh
index 3ec36620..84adab4f 100644
--- a/src/client.hh
+++ b/src/client.hh
@@ -3,6 +3,7 @@
#include "keys.hh"
#include "completion.hh"
+#include "utils.hh"
namespace Kakoune
{
@@ -12,26 +13,20 @@ class Window;
class String;
class Context;
-class Client
+class Client : public SafeCountable
{
public:
virtual ~Client() {}
virtual void draw_window(Window& window) = 0;
virtual void print_status(const String& status) = 0;
- virtual String prompt(const String& prompt, const Context& context, Completer completer) = 0;
+ virtual String prompt(const String& prompt, const Context& context,
+ Completer completer = complete_nothing) = 0;
virtual Key get_key() = 0;
};
struct prompt_aborted {};
-extern Client* current_client;
-
-void draw_editor_ifn(Editor& editor);
-String prompt(const String& text, const Context& context, Completer completer = complete_nothing);
-Key get_key();
-void print_status(const String& status);
-
}
#endif // client_hh_INCLUDED