Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
### v4.0.8
* Add new Cursor::move overload to accept two integers

### v4.0.7
* Added unit testing in `tests/` directory
* Added zig build option
Expand Down
4 changes: 4 additions & 0 deletions rawterm/cursor.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,10 @@ namespace rawterm {
<< std::to_string(pos.horizontal) << 'H' << std::flush;
}

void Cursor::move(const int vertical, const int horizontal) {
move({vertical, horizontal});
}

void Cursor::move_up(int in) {
vertical -= in;

Expand Down
1 change: 1 addition & 0 deletions rawterm/cursor.h
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ namespace rawterm {
Cursor(Pos p) : Pos {p} {}
void reset() const;
void move(const Pos&);
void move(const int, const int);
void move_up(int = 1);
void move_down(int = 1);
void move_right(int = 1);
Expand Down
Loading