diff --git a/main.cpp b/main.cpp index 2c7f756..a74fbee 100644 --- a/main.cpp +++ b/main.cpp @@ -30,6 +30,9 @@ string get_line(count_type r) { line[i] = ' '; return line; } +string get_line_raw(count_type r) { + return file.find(file_offset+r)->text; +} char get(position p) { return get_line(file_offset+p.r)[p.c]; } void set(position p, char ch) { file.find(file_offset+p.r)->text[p.c] = ch; } void new_line(count_type r, string text = "") { file.insert(file_offset+r, text); } @@ -67,7 +70,7 @@ bool save(string filename) { return 1; for(count_type i = 0; i < file.size(); ++i) - outfile << get_line(i-file_offset) << std::endl; + outfile << get_line_raw(i-file_offset) << std::endl; return 0; }