From 85c9e0fce6b7b4297235e6aed6c6cde05e83132e Mon Sep 17 00:00:00 2001 From: Francois Fleuret Date: Wed, 11 Mar 2009 16:14:38 +0100 Subject: [PATCH] Automatic commit --- selector.cc | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/selector.cc b/selector.cc index a6eec47..4b41d07 100644 --- a/selector.cc +++ b/selector.cc @@ -264,13 +264,13 @@ int main(int argc, char **argv) { curs_set(1); endwin(); - // ofstream out("/tmp/selector.out"); - // if(key == KEY_ENTER || key == '\n') { - // out << lines[highlighted_line] << endl; - // } else { - // out << endl; - // } - // out.flush(); + ofstream out("/tmp/selector.out"); + if((key == KEY_ENTER || key == '\n') && line >= 0 && line < nb_lines) { + out << lines[line] << endl; + } else { + out << endl; + } + out.flush(); for(int l = 0; l < nb_lines; l++) { delete[] lines[l]; -- 2.39.5