summaryrefslogtreecommitdiff
path: root/src/input_handler.hh
diff options
context:
space:
mode:
authorMaxime Coste <mawww@kakoune.org>2024-03-31 21:38:51 +1100
committerMaxime Coste <mawww@kakoune.org>2024-03-31 21:38:51 +1100
commit303d87978556b3548ca4bab98f5daba7f804e4b8 (patch)
treead221472c2f723d5e59d2f228521ad16c8491882 /src/input_handler.hh
parent7d0f25a99c094feeaca6a53b04803659709861f5 (diff)
Support exposing some env vars as part of the mode information
This should implement what #5131 proposed in a different way. Closes #5131
Diffstat (limited to 'src/input_handler.hh')
-rw-r--r--src/input_handler.hh9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/input_handler.hh b/src/input_handler.hh
index eeb42464..1d1404d4 100644
--- a/src/input_handler.hh
+++ b/src/input_handler.hh
@@ -4,6 +4,7 @@
#include "completion.hh"
#include "constexpr_utils.hh"
#include "context.hh"
+#include "env_vars.hh"
#include "face.hh"
#include "normal.hh"
#include "keys.hh"
@@ -52,6 +53,12 @@ enum class InsertMode : unsigned
OpenLineAbove
};
+struct ModeInfo
+{
+ DisplayLine display_line;
+ EnvVarMap env_vars;
+};
+
class InputHandler : public SafeCountable
{
public:
@@ -97,7 +104,7 @@ public:
Context& context() { return m_context; }
const Context& context() const { return m_context; }
- DisplayLine mode_line() const;
+ ModeInfo mode_info() const;
std::pair<CursorMode, DisplayCoord> get_cursor_info() const;