blob: 71a3a4a67eebb984b512b7ff4f1a6fb9bc58e47d (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
|
#pragma once
#include <string>
#include "line/type.h"
namespace ov4
{
// 1-based
inline int cursor_row;
inline int cursor_col;
//inline int line_end_pos;
inline int prompt_pos;
inline int window_size_row;
inline int window_size_col;
// 0-based index
inline int buffer_index_cursor;
// index [begin, end] is displayed
// NB: CLOSE interval
inline int _buffer_index_display_begin;
//inline int buffer_index_display_end;
inline std::string line_buffer;
void print_override(const std::string &s);
void move_cursor(char c);
void cursor_input_char(char c);
void update_window_size();
void move_cursor(T_cursor_movement_direction d);
void switch_history(T_cursor_movement_direction d);
void reset_editor();
void cursor_skip_prompt();
}
|