diff options
| author | _ov4 <ov4@ov4.org> | 2026-10-09 03:41:56 +0000 |
|---|---|---|
| committer | _ov4 <ov4@ov4.org> | 2026-10-09 03:41:56 +0000 |
| commit | c47cfb32f4ca9ed7bbb360053d90f1fb52a95708 (patch) | |
| tree | 0d186530cbccb6f14f5230da1ad145b4c98aeac0 /include | |
| parent | d29590546054feabff2d7e559665811d1d28f538 (diff) | |
add line editor history
Diffstat (limited to 'include')
| -rw-r--r-- | include/history.h | 4 | ||||
| -rw-r--r-- | include/line/cursor.h | 4 | ||||
| -rw-r--r-- | include/line/mode.h | 2 | ||||
| -rw-r--r-- | include/line/type.h | 2 |
4 files changed, 12 insertions, 0 deletions
diff --git a/include/history.h b/include/history.h index 77ab9ed..a4966e2 100644 --- a/include/history.h +++ b/include/history.h @@ -8,7 +8,11 @@ namespace ov4 inline std::vector<std::string> history_vec; +inline size_t history_index; + void add_history(const std::string &s); void clear_history(); +std::size_t get_last_index(); + } diff --git a/include/line/cursor.h b/include/line/cursor.h index 032269d..217f5f2 100644 --- a/include/line/cursor.h +++ b/include/line/cursor.h @@ -38,5 +38,9 @@ void update_window_size(); void move_cursor(T_cursor_movement_direction d); +void switch_history(T_cursor_movement_direction d); + +void reset_editor(); + } diff --git a/include/line/mode.h b/include/line/mode.h index d080fc3..417dd3a 100644 --- a/include/line/mode.h +++ b/include/line/mode.h @@ -20,4 +20,6 @@ void clear_below(); std::string readline(); +void editor_exit(int code); + } diff --git a/include/line/type.h b/include/line/type.h index b85a81c..321e18d 100644 --- a/include/line/type.h +++ b/include/line/type.h @@ -13,6 +13,8 @@ enum class T_cursor_movement_direction { LEFT, RIGHT, + UP, + DOWN, }; }
\ No newline at end of file |
