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
2 changes: 1 addition & 1 deletion cpp-terminal/terminal.h
Original file line number Diff line number Diff line change
Expand Up @@ -512,7 +512,7 @@ inline std::u32string utf8_to_utf32(const std::string &s)
if (state == UTF8_ACCEPT) {
r.push_back(codepoint);
}
if (state == UTF8_REJECT) {
else if (state == UTF8_REJECT) {
throw std::runtime_error("Invalid byte in UTF8 encoded string");
}
}
Expand Down
2 changes: 1 addition & 1 deletion examples/colors.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ using Term::style;
int main() {
try {
Terminal term;
if (Term::Terminal::is_stdout_a_tty()) {
if (Terminal::is_stdout_a_tty()) {
std::cout << "Standard output is attached to a terminal."
<< std::endl;
} else {
Expand Down
2 changes: 1 addition & 1 deletion examples/kilo.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -641,7 +641,7 @@ void editorDrawRows(std::string &ab) {
fg color = editorSyntaxToColor(hl[j]);
if (color != current_color) {
current_color = color;
ab.append(::color(color));
ab.append(Term::color(color));
}
ab.append(std::string(&c[j], 1));
}
Expand Down