diff options
| author | Maxime Coste <mawww@kakoune.org> | 2017-04-12 10:39:17 +0100 |
|---|---|---|
| committer | Maxime Coste <mawww@kakoune.org> | 2017-04-12 10:39:17 +0100 |
| commit | 91bfd714e4be3484e04eaadc5bbe630861fff652 (patch) | |
| tree | d8b2eb554c7feaf44545d650351480b468f4886d /src/json_ui.cc | |
| parent | 80dd9ec4cb68669df4688c621486a27dd9b33548 (diff) | |
Place hardware terminal cursor at the current main cursor/prompt cursor position
Fixes #1318
Also fixes https://gitlab.com/gnachman/iterm2/issues/5408
Diffstat (limited to 'src/json_ui.cc')
| -rw-r--r-- | src/json_ui.cc | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/src/json_ui.cc b/src/json_ui.cc index 8a436513..e907be24 100644 --- a/src/json_ui.cc +++ b/src/json_ui.cc @@ -135,6 +135,16 @@ String to_json(InfoStyle style) return ""; } +String to_json(CursorMode mode) +{ + switch (mode) + { + case CursorMode::Prompt: return R"("prompt")"; + case CursorMode::Buffer: return R"("buffer")"; + } + return ""; +} + String concat() { return ""; @@ -209,6 +219,11 @@ void JsonUI::info_hide() rpc_call("info_hide"); } +void JsonUI::set_cursor(CursorMode mode, DisplayCoord coord) +{ + rpc_call("set_cursor", mode, coord); +} + void JsonUI::refresh(bool force) { rpc_call("refresh", force); |
