|
|
@@ -46,11 +46,11 @@ void Cli::loop(std::function<void(curses::Window &, std::string)> on_enter) {
|
|
|
case KEY_BACKSPACE:
|
|
|
case KEY_DC:
|
|
|
case 127:
|
|
|
- if (horizontal_offset_ + 1 < get().size()) {
|
|
|
+ if (horizontal_offset_ < get().size()) {
|
|
|
get().erase(get().end() - horizontal_offset_ - 1);
|
|
|
+ window_.move(Offset{-1, 0});
|
|
|
+ window_.delch();
|
|
|
}
|
|
|
- window_.move(Offset{-1, 0});
|
|
|
- window_.delch();
|
|
|
break;
|
|
|
case 10:
|
|
|
case KEY_ENTER:
|