| 247 | } |
| 248 | |
| 249 | void print_text(color_ostream::color_value clr, const std::string &chunk) |
| 250 | { |
| 251 | if(!in_batch && state == con_lineedit) |
| 252 | { |
| 253 | disable_raw(); |
| 254 | fprintf(dfout_C,"\x1b[1G"); |
| 255 | fprintf(dfout_C,"\x1b[0K"); |
| 256 | |
| 257 | color(clr); |
| 258 | print(chunk.c_str()); |
| 259 | |
| 260 | reset_color(); |
| 261 | enable_raw(); |
| 262 | prompt_refresh(); |
| 263 | } |
| 264 | else |
| 265 | { |
| 266 | color(clr); |
| 267 | print(chunk.c_str()); |
| 268 | } |
| 269 | } |
| 270 | |
| 271 | void begin_batch() |
| 272 | { |