r/o

2f31a6833e7a487047a4ed351f65502b39fcbffa parent 1ae97571

authored by Yuki Izumi <yuki@kivikakk.ee> 10 years ago

Stop inserting more than 255 chars on one line.

qb.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/qb.c b/qb.c
index 5f84385..ef356d9 100644
--- a/qb.c
+++ b/qb.c
@@ -414,7 +414,7 @@ void qb_keypress(SDL_Keycode sym, Uint16 mod) {
if (cursor_x < get_current_doc_line()->stored) {
++cursor_x;
}
- } else if (is_printable_key(sym)) {
+ } else if (is_printable_key(sym) && get_current_doc_line()->stored < 255) {
insert_character(
get_current_doc_line(),
cursor_x,