diff options
author | Andrés <andmarti@gmail.com> | 2021-03-26 12:49:19 -0300 |
---|---|---|
committer | Andrés <andmarti@gmail.com> | 2021-03-26 12:49:19 -0300 |
commit | a787115fbeb3379d707a594227acd2330d4b21ad (patch) | |
tree | f0966d5d120a48f6427212cb34d296322dc8bdca /src | |
parent | d04e4f9e75e72f4a12090152835e586964a29464 (diff) |
added control of maxcol with goto_last_col for other exports types
Diffstat (limited to 'src')
-rw-r--r-- | src/file.c | 6 |
1 files changed, 6 insertions, 0 deletions
@@ -1221,6 +1221,8 @@ void export_markdown(char * fname, int r0, int c0, int rn, int cn) { struct ent * ent = go_end(); if (rn > ent->row) rn = ent->row; + ent = goto_last_col(); + if (cn > ent->col) cn = ent->col; char num [FBUFLEN] = ""; char text[FBUFLEN] = ""; @@ -1350,6 +1352,8 @@ void export_plain(char * fname, int r0, int c0, int rn, int cn) { struct ent * ent = go_end(); if (rn > ent->row) rn = ent->row; + ent = goto_last_col(); + if (cn > ent->col) cn = ent->col; char num [FBUFLEN] = ""; char text[FBUFLEN] = ""; @@ -1426,6 +1430,8 @@ void export_latex(char * fname, int r0, int c0, int rn, int cn, int verbose) { // to prevent empty lines at the end of the file struct ent * ent = go_end(); if (rn > ent->row) rn = ent->row; + ent = goto_last_col(); + if (cn > ent->col) cn = ent->col; if (verbose) sc_info("Writing file \"%s\"...", fname); |