summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrés <andmarti@gmail.com>2021-03-26 12:49:19 -0300
committerAndrés <andmarti@gmail.com>2021-03-26 12:49:19 -0300
commita787115fbeb3379d707a594227acd2330d4b21ad (patch)
treef0966d5d120a48f6427212cb34d296322dc8bdca /src
parentd04e4f9e75e72f4a12090152835e586964a29464 (diff)
added control of maxcol with goto_last_col for other exports types
Diffstat (limited to 'src')
-rw-r--r--src/file.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/file.c b/src/file.c
index 6e7ecd3..987b63e 100644
--- a/src/file.c
+++ b/src/file.c
@@ -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);