Skip to content

Commit

Permalink
rename uses of area to size
Browse files Browse the repository at this point in the history
  • Loading branch information
a-n-t-h-o-n-y committed Feb 26, 2024
1 parent 453ecac commit 7452214
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion examples/pong.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -307,7 +307,7 @@ using EventResponse = std::optional<State>;

[[nodiscard]] auto process(Resize event, auto state) -> EventResponse
{
screen_dimensions = event.area;
screen_dimensions = event.size;
return state;
}

Expand Down
2 changes: 1 addition & 1 deletion include/esc/event.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@ struct KeyRelease {
* Terminal window resized event.
*/
struct Resize {
Area area;
Area size;
};

/**
Expand Down
2 changes: 1 addition & 1 deletion src/detail/debug.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ auto print(::esc::MouseMove m, std::ostream& os) -> std::ostream&
auto print(::esc::Resize r, std::ostream& os) -> std::ostream&
{
os << "struct Resize {\n"
<< " Area{width: " << r.area.width << " height: " << r.area.height
<< " Area{width: " << r.size.width << " height: " << r.size.height
<< "}\n"
<< "};\n";
return os;
Expand Down
2 changes: 1 addition & 1 deletion tools/termcaps.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -352,7 +352,7 @@ auto process(KeyRelease kr) -> EventResponse

auto process(Resize r) -> EventResponse
{
return term_size_display(offset.term_size, r.area);
return term_size_display(offset.term_size, r.size);
}

auto main() -> int
Expand Down

0 comments on commit 7452214

Please sign in to comment.