From ead16b3c626ce30a4f86787b1b1a4bd438230887 Mon Sep 17 00:00:00 2001 From: Nemh Date: Sat, 6 Jun 2015 20:17:01 +0200 Subject: [PATCH] Tex generation bug fixed (^(-1) cases) and add of a 'clear screen' like command (shift + del)) --- console.c | 14 ++++---------- print.cpp | 8 ++++++-- 2 files changed, 10 insertions(+), 12 deletions(-) diff --git a/console.c b/console.c index 58b773b..c432f0f 100644 --- a/console.c +++ b/console.c @@ -617,16 +617,10 @@ int Console_GetKey() return CONSOLE_SUCCEEDED; } - /*if (key == KEY_CTRL_INS) { - if (!Line[Current_Line].readonly) { - Edit_Line[0] = '\0'; - Line[Current_Line].start_col = 0; - Line[Current_Line].type = LINE_TYPE_INPUT; - Line[Current_Line].disp_len = 0; - Cursor.x = 0; - } - return Console_Init(); - }*/ + if (key == KEY_CTRL_INS) { + Start_Line = Current_Line; + Cursor.y = 0; + } if (key == KEY_CTRL_SETUP) { menu_setup(); diff --git a/print.cpp b/print.cpp index 3ea1c76..d526e2e 100644 --- a/print.cpp +++ b/print.cpp @@ -437,15 +437,19 @@ print_factor(U *p) if (isminusone(caddr(p))) { if (test_flag == 0) - print_str("1 / "); - else + if(tex_flag) print_str("\\frac{1}{"); + else print_str("1 / "); + else { print_str("1/"); + } if (iscons(cadr(p))) { print_str("("); print_expr(cadr(p)); print_str(")"); } else print_expr(cadr(p)); + + if(tex_flag) print_str("}"); return; }